HomeFreeBSD

net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw

Description

net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw

net80211 node ni_chw currently encodes the channel width as Mhz number.
LinuxKPI 802.11 uses enum ieee80211_sta_rx_bw for the same.

Rather than keeping the "20" and "40" throughout the code (eventually
expanded to 80/160/320) switch them over to use the enum throughout
and add a print mask for debug output. While designed as bitmask it
is not supposed to be used as such; the bitmask is only used to be
able to use %b with a print mask.

Once we get to 320Mhz channel widths we would otherwise also need to
extend the uint8_t in struct ieee80211_node; making
enum ieee80211_sta_rx_bw __packed allows us for three more channel
widths without breaking the KBI (if we were not to use %b with a
print_mask but use a lookup function for the string we could extend
it for a long time).

Sponsored by: The FreeBSD Foundation
MFC after: 14 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D47891

Details

Provenance
bzAuthored on Tue, Dec 3, 5:43 PM
Reviewer
adrian
Differential Revision
D47891: net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw
Parents
rGc1d12b925b2c: vm_page: pass page to iter_remove
Branches
Unknown
Tags
Unknown