Working on wireless improvements
Details
Yesterday
ok, i think this is correct. I'm bounds checking copy in and copy out of the keys / ioctl buffers; i'm handling 0 byte empty keys properly again so ifconfig and such doesn't error out. I've tested it with CCMP, TKIP and WEP (and I'm sure if CCMP works then GCMP will work, but I'll try to validate that soon.)
change to the new key copy API that returns true/false, not key copy length.
fix; 0 size keys returning 0 == false which leads to APIs returning EINVAL
Sat, Aug 15
also it would be nice to count/log the drops here...
This currently throws errors in ifconfig if there's no key (as the key length is 0) - which means it'll error out unless four WEP keys are configured.
I'll need to go and handle the "no key configured, return a blank no key" case before this lands.
Sun, Aug 9
another bounds check fix
@bz ok this should implement the behaviours you wanted - bounds checking, buffer zero'ing, etc. Please let me know.
@bz ok this should implement the behaviours you wanted - bounds checking, buffer zero'ing, etc. Please let me know.
update to use the copy out routines
update
Fri, Aug 7
Tue, Aug 4
update the wep side size check, bz@
Mon, Aug 3
another update
oops, missed these
Feedback from bz@
Wed, Jul 22
Making this an inline function for the point of making it a function seems hard to justify for single use code.
Can we at least keep it as a normal function in ioctl.c?
Tue, Jul 21
Landed via another review (https://reviews.freebsd.org/D49161)
I've been working in this in another stack (https://reviews.freebsd.org/D58384 as an example) to do a lot of needed API cleanup before we can bump this without breaking the current ioctls.
oh damn i missed this, I think it's worth refactoring it so we do have a specific place to pull the TX power from.
Mon, Jul 20
Jul 8 2026
Jul 7 2026
Since it is also part of the VHT code path we can't just /not/ do it here; I think we need to handle NULL IE pointers in ieee80211_ht_updateparams_final() and just not do the htinfo deferefence there. (And document that the function must handle NULL IEs.)
Would you like to try that instead?
@adrian It's a (pretty terrible) AP from Huawei
Jul 3 2026
ugh ok why's do_ht being set when there's no htcap/htinfo fields.
Jul 1 2026
Jun 29 2026
For now I'd like to stay close to the original implementation and only extend the diagnostic where necessary.
Jun 28 2026
...
<VHT*>
I personally I would go with the simpler solution calling IEEE80211_IS_CHAN_VHTxxx macros already combines mode and width.
Jun 27 2026
I think we should just create a function to return a static channel description for this. something like
Jun 24 2026
Reverted to the original branching to keep the original structure. %s%d changed to %s%s to handle 80P80
Test HT20, HT40, VHT20, VHT40, VHT80, VHT160 not tested VHT80P80
Debug string update to be able to display VHT40U and VHT40D
Jun 23 2026
Original reporting:
VHT80
VHT160
VHT (covers VHT20/VHT40)
Updated reporting:
VHT20
VHT40U
VHT40D
VHT80
VHT160
VHT80P80
Reason:
ni->ni_chan->ic_flags already contains the full channel-width information, so the patch makes the debug output reflect the actual negotiated channel state.
Added every configuration currently available for more accurate debuging
Agreed but we could detail VHT40U and D and VHT20 too
If we do it then let us do better than AI and also document 80P80.
