]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mac80211: simplify ieee80211_sta_rx_bw_to_chan_width()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Apr 2026 12:42:06 +0000 (14:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 28 Apr 2026 07:27:46 +0000 (09:27 +0200)
commitae24cf3b692f4458a33d4a6aa7934d89bb1aae8f
tree43ad8ac4499ca19dd5450d61ad8be43d7f2a304e
parent032d1a3fc0e95ca804213df65ef57f5ced2a867b
wifi: mac80211: simplify ieee80211_sta_rx_bw_to_chan_width()

This function is only called for at least HT capable stations,
so doesn't need to differentiate 20/20_NOHT. Also, the check
for VHT 160 MHz support is wrong, since a station could have
support for both and the AP is using 80+80, but nothing cares
anyway, so we don't need that.

Simplify the function and move it to util.c since it now no
longer is related to VHT, and also doesn't need a station.

Also use the new function in ieee80211_get_sta_bw() for the
chandef calculations, it just needs to handle the 20/20-noht
separately; while at it fix that to handle HE stations.

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260415144514.7b0be1059436.I573add4e3ed68b15f8b45122d053ac523afe4025@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/chan.c
net/mac80211/ht.c
net/mac80211/ieee80211_i.h
net/mac80211/util.c
net/mac80211/vht.c