Page MenuHomeFreeBSD

linux80211: fix default deflink.rx_nss
ClosedPublic

Authored by misha on Sep 4 2024, 8:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 17, 12:15 PM
Unknown Object (File)
Thu, Oct 17, 11:21 AM
Unknown Object (File)
Oct 10 2024, 12:32 AM
Unknown Object (File)
Oct 2 2024, 11:03 PM
Unknown Object (File)
Sep 24 2024, 9:30 AM
Unknown Object (File)
Sep 24 2024, 3:22 AM
Unknown Object (File)
Sep 13 2024, 1:04 PM
Unknown Object (File)
Sep 13 2024, 7:58 AM

Details

Summary

linux80211: fix default deflink.rx_nss

Native Linux implementation sets this as a maximum between 1 and
ht/vht/eht rx SS'es, FreeBSD does the same, but uses 0 as a minimum,
which leads setting it to 0 if we're not in ht/vht case.

This 0 was damaging rtw89 driver, when it was trying to determine
SS number by subtracting 1 from rx_nss and passing the value to the
hardware.

After that patch rtw89 association and simple ping work reliably,
but more work is needed to make the driver robust with heavy traffic
(iperf3) and being long idle.

Sponsored by: Future Crew LLC

Test Plan

set compat.linuxkpi.skb.mem_limit=1 in /boot/loader.conf
connect rtw89 and rtw89fw to the build

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

misha requested review of this revision.Sep 4 2024, 8:25 AM

The change looks okay.

Can you update the proposed commit message? I think describing the general problem in addition to the actual problem it causes would be good. I don't think citing Linux sources is much of a help as that line number will probably be wrong with the next update to the file.

We could debated whether rtw89 taking that value for something else when no HT/VHT are in use and not checking it is the right behavior there.

The HW CRYPTO code likely needs adjustments in net80211 as well as finishing in LinuxKPI to properly work. I had stopped looking given cc was back then. Let me know if I can help with that. We can happily discuss that on freebsd-wireless as well (not in this review).

In D46528#1060772, @bz wrote:

The change looks okay.

I think describing the general problem in addition to the actual problem it causes would be good.

I've changed commit message, but I may have misunderstood what do you mean by 'general problem', If i guessed wrong - can you be more specific what you would want to see?

This revision is now accepted and ready to land.Sep 5 2024, 12:50 PM
This revision was automatically updated to reflect the committed changes.