Page MenuHomeFreeBSD

net80211: wrong transmit MCS set in HT Capabilities IE
ClosedPublic

Authored by misha on Apr 10 2023, 7:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 7:36 PM
Unknown Object (File)
Jan 14 2024, 6:55 AM
Unknown Object (File)
Dec 20 2023, 4:40 AM
Unknown Object (File)
Nov 27 2023, 7:56 AM
Unknown Object (File)
Oct 17 2023, 7:39 PM
Unknown Object (File)
May 23 2023, 12:32 AM
Unknown Object (File)
Apr 14 2023, 3:22 PM
Unknown Object (File)
Apr 14 2023, 3:15 PM

Details

Summary

Current code checks whether or not txstreams are equal to rxstreams and if it isn't - sets needed bits in "Transmit MCS Set". But if they are equal it sets whole set to zero, which contradicts the standard, if tx and rx streams are equal 'Tx MCS Set Defined' (table 9-186, IEEE Std 802.11-2020) must be set to one.

Sponsored by: Serenity Cybersecurity, LLC

Diff Detail

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

Event Timeline

misha requested review of this revision.Apr 10 2023, 7:20 AM

oh hm! good catch, let's see!

can we use a #define for the value? is there a suitable protocol define in ieee80211.h yet?

bz requested changes to this revision.Apr 10 2023, 11:09 PM
bz added a subscriber: bz.

Can you re-upload this with context please (either arc, or diff -U9999).
We'll likely be able to set txparams = 0x01; before the if case (not seen here) and then just add other flags in the non-equal case?

Also I believe there is a secondary typo a few lines up in that `if (ic->ic_txstream >= 4) {` should be *rx*stream as well? @adrian

This revision now requires changes to proceed.Apr 10 2023, 11:09 PM

I wasn't able to find defines for these flags in ieee80211.h, but since they're used only in this context maybe we can use them as they're now, just with the comments nearby?

I also agree with the proposal to put txparams = 0x1 out of "if".

"txstream >= 4" thing looks like a typo for me.

Updated diff attached.

I wasn't able to find defines for these flags in ieee80211.h, but since they're used only in this context maybe we can use them as they're now, just with the comments nearby?

I think it is fine for now not to convolute the bug fixes with "whitespace" changes as well.

I also agree with the proposal to put txparams = 0x1 out of "if".

"txstream >= 4" thing looks like a typo for me.

Updated diff attached.

Can you please also prefix the first commit message line with net80211:; would help when reading commit emails.

sys/net80211/ieee80211_ht.c
3206

Do you want to change this as well then?

oh wait err, i recall when bernard and i were debugging this in 2010/2011 time we found that "what the spec said" and "what devices actually needed because of bugs" were very different. so let's be careful with these.

(gosh I wish we had all of that in the commit logs or bug report logs somewhere..)

oh wait err, i recall when bernard and i were debugging this in 2010/2011 time we found that "what the spec said" and "what devices actually needed because of bugs" were very different. so let's be careful with these.

(gosh I wish we had all of that in the commit logs or bug report logs somewhere..)

I think that adjusting to bugs of some devices in cost of contradicting to the standard for every device around is counter-productive, especially considering time which has passed since 2010.

What were consequences of these bugs and what were the vendors?

oh wait err, i recall when bernard and i were debugging this in 2010/2011 time we found that "what the spec said" and "what devices actually needed because of bugs" were very different. so let's be careful with these.

(gosh I wish we had all of that in the commit logs or bug report logs somewhere..)

I think that adjusting to bugs of some devices in cost of contradicting to the standard for every device around is counter-productive, especially considering time which has passed since 2010.

What were consequences of these bugs and what were the vendors?

If it's what I'm thinking about, it was like, intel/dlink/tplink and the consequences were "association was not successful." Wifi sticks around a lot, we had people with bugs talking to hotel wifi from iwn getting 11b/g "slightly" wrong back in 2011/2012.

I'm happy fixing it to be standards compliant; if we start to see association failures then we can revisit this! At least my vague memory of it is now captured /somewhere/ so if someone bisects a problem, they'll eventually land here.

misha retitled this revision from Wrong Tx set MCS in association request to net80211: wrong transmit MCS set in HT Capabilities IE.Apr 14 2023, 6:09 AM
sys/net80211/ieee80211_ht.c
3206

I need a little bit more time on this, it appears to be not so simple change as I thought, I'll take a closer look at the next week and will come back with a separate diff, if it's actually a typo.

This revision is now accepted and ready to land.Apr 14 2023, 9:45 AM