morrownr / 8821au-20210708

Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets - v5.12.5.2
Other
745 stars 111 forks source link

changes for kernel v6.8 #122

Closed 5kft closed 10 months ago

5kft commented 10 months ago

A few small changes are needed for this driver to compile and operate on kernel v6.8. Enjoy!

morrownr commented 10 months ago

Merged. Thanks.

morrownr commented 8 months ago

@5kft

FYI: A few of us over in the 8821cu repo have working on the in-kernel driver for the 8821cu chipset. Five patches went into linux-wireless last week and should go into kernel 6.9 this week. Here is the link to where we discussed the work:

https://github.com/morrownr/8821cu-20210916/issues/115

Our work so far has been basic functionality and managed mode. We think it is working well. You can test when you try out 6.9. We are looking for reports on AP and monitor modes if you do those.

We have also started another project that will be harder... adding 8821au support to rtw88. Are you interested in watching, testing or coding?

5kft commented 8 months ago

@morrownr

If these are getting upstreamed this is wonderful news! I am using both the 8821cu and 8821au, and will be happy to give the in-kernel drivers a try. Do you think the 8821au changes will make it into 6.9 as well?

morrownr commented 8 months ago

@5kft

If these are getting upstreamed this is wonderful news!

Yes, this all about upstreaming. The 5 new patches for the rtl8821cu have already gone into 6.9. I've been testing Larry's repo here. In fact, I did one of the five patches. Managed mode is working really well. I am going to start testing AP mode today. Work is underway on support for the rtl8821au.

You can go ahead and test the rtl8821cu support at the kernel 6.9 level by going to this site:

https://github.com/lwfinger/rtw88

The default branch has the patches. Just uninstall your 8821cu out-of-kernel driver and follow Larry's README. His rtw88 is basically a downstream of the in-kernel

The rtw8821au branch has the work we have done so far to support the rtl8821au chipset. It is not to the point that it can be tried yet but we are making progress. Are you interested in helping?

@morrownr

5kft commented 8 months ago

Hi @morrownr , I figured I'd give you a quick update on a few things:

I went ahead built the HEAD of linux-next (next-20240321) and gave the rtw88 driver there a try with one of my RTL8821CU adapters. linux-next now includes several changes from the beginning of March, including yours, so it seems like this is the latest? Anyway, while I didn't do extensive testing, the driver seems to work, however the performance is rather poor compared to yours, by about an order of magnitude.

Using your 8821cu driver I can easily transfer at 30MB/s+; with the default rtw88 8821cu driver in linux-next it maxes out at circa 3MB/s. Not a scientific test by any stretch, but it'd be interesting to learn if you see the same thing. I did not look to see if there are any module parameters for the rtw88 driver that might impact this performance.

Also, I miss the LED support in the rtw88 driver - this works fine in yours, of course.

Just a heads-up: I made a couple of small changes for kernel v6.9 for your 8821au and 8821cu drivers; however I was going to wait to make a pull request for these following the release of v6.9-rc1. So far I've tested your 8821cu driver on v6.9 and it works great.

Re: mainline 8821au - happy to test, but unfortunately at present I don't have the bandwidth to do much more beyond this.

morrownr commented 8 months ago

Hi @5kft

I owe you a couple of updates as well.

however the performance is rather poor compared to yours, by about an order of magnitude.

I had not noticed this as I wasn't looking at it yet. I'll see what I can figure out. I was testing AP mode today. It is broke so there is something else to work on. Do you work with any modes besides managed?

Also, I miss the LED support in the rtw88 driver - this works fine in yours, of course.

I'm going to see what I can find out about that.

I was going to wait to make a pull request for these following the release of v6.9-rc1

That is fine. Thanks. That is not on my mind yet. I'll finally solved the ABSAN issue in all of the drivers. I hope. Let me know if you see it in either driver.

mainline 8821au - happy to test, but unfortunately at present I don't have the bandwidth to do much more beyond this.

It is not ready but I'll let you know when we think it is ready for a test.

@morrownr

5kft commented 8 months ago

Do you work with any modes besides managed?

No, I just use these as normal client devices.

It is not ready but I'll let you know when we think it is ready for a test.

Sounds good!

dubhater commented 6 months ago

Please test this driver with these lines commented out in include/autoconf.h:

        #define CONFIG_USB_TX_AGGREGATION    1
        #define CONFIG_USB_RX_AGGREGATION    1

Since both RTL8821CU and RTL8811AU are slow with rtw88, I'm thinking this problem has to do with the USB support, not with any chip-specific code. The aggregation is one of the things which are different in rtw88.

dubhater commented 6 months ago

@belzerus You can try this too.

5kft commented 6 months ago

@dubhater You found it! I actually tested this with my RTL8821CU adapter (happened to be more convenient at the moment), and here are the results with @morrownr's driver before commenting out these lines (simple "wget" of the kernel sources):

linux-6.9.1.tar.xz  100%[===================>] 137.38M  30.0MB/s    in 5.6s

...and here is the same driver and wget with these two lines commented out - 1/10th the speed (!):

linux-6.9.1.tar.xz   54%[=========>          ]  75.21M  3.08MB/s    eta 21s   

How difficult is it to add USB aggregation support to RTW88 for these drivers?

belzerus commented 6 months ago

@dubhater and @5kft I see similar behavior on my side.

I still get a bit higher performance with @morrownr driver even without USB aggregation, but its the difference is much smaller.

In rtw88:

~1-2 MB/s

In 8821au-20210708 with usb aggregation:

~17-18 MB/s

without aggregation:

~5-6 MB/s

I will see if disabling usb aggregation is enough to reproduce the behavior when the drivers get 'failed to get tx report' and stalls, also in the 8821au-20210708 driver.

dubhater commented 6 months ago

RX aggregation will be easy enough. TX aggregation is mostly implemented already.

belzerus commented 6 months ago

Sounds really promising! @dubhater Let me know when you have something ready for testing, then I can give it a spin on my boards :)

morrownr commented 6 months ago

@5kft @dubhater @belzerus

This is a good conversation but I would like to chase all 3 of you back to the Project issue so all can see the info:

https://github.com/morrownr/8821au-20210708/issues/133

FYI: I've been watching and testing but had not tested managed mode on ARM64. I tested AP mode on ARM64 but did not notice this problem. A short note in the Project issue would go a long way toward letting others know what the current thoughts are and what to expect/test. @dubhater could you make that short note to get everyone up to speed and on the same sheet of music?

belzerus commented 6 months ago

@5kft @dubhater @belzerus

This is a good conversation but I would like to chase all 3 of you back to the Project issue so all can see the info:

133

FYI: I've been watching and testing but had not tested managed mode on ARM64. I tested AP mode on ARM64 but did not notice this problem. A short note in the Project issue would go a long way toward letting others know what the current thoughts are and what to expect/test. @dubhater could you make that short note to get everyone up to speed and on the same sheet of music?

Ah, good catch. I missed that the conversation moved into this PR :D Totally agree, we should keep in the "main thread".