wifi: remove 5/10 MHz channel support
Subsystems (5)
Johannes Berg
maintainercover wifi: remove 5/10 MHz channel support
We had this discussion last about three years ago and nothing changed, nobody cares about this code and it's de-facto unusable since the AP side exists but not client, IBSS sort of exists but can't scan for any networks, etc. It only exists to attract syzbot attention, and with all attention going to UHR (WiFi 8), NAN, sensing/ranging, etc. I don't see any of this changing.
Remove it. We can always put things back if anyone _really_ needs it (and can actually use it), but I'd expect them to help maintain it as well then.
johannes
Johannes Berg
maintainerPATCH 1/2 wifi: cfg80211: remove 5/10 MHz channel support
From: Johannes Berg <[email protected]>
Remove WIPHY_FLAG_SUPPORTS_5_10_MHZ and 5/10 MHz channel width support. We contemplated this back in early 2023 and didn't do it yet, but nobody stepped up to maintain it.
It's already _mostly_ dead code since it can really only be used for AP and maybe IBSS and monitor, but not on a client since there's no way to scan (and hasn't been in a very long time, if ever), so the only thing that ever could really happen with it was run syzbot and trip over assumptions in the code.
--- drivers/net/wireless/ath/ath5k/base.c | 2 -- drivers/net/wireless/ath/ath9k/init.c | 1 - .../wireless/virtual/mac80211_hwsim_main.c | 1 - include/net/cfg80211.h | 2 -- net/wireless/chan.c | 33 ++++--------------- net/wireless/core.c | 4 +-- net/wireless/nl80211.c | 14 ++------ net/wireless/util.c | 3 -- 8 files changed, 11 insertions(+), 49 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +0 -2
@@ -2600,8 +2600,6 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)/* SW support for IBSS_RSN is provided by mac80211 */ hw->wiphy->flags |=WIPHY_FLAG_IBSS_RSN ; - hw->wiphy->flags |=WIPHY_FLAG_SUPPORTS_5_10_MHZ ; -/* both antennas can be configured as RX or TX */ hw->wiphy->available_antennas_tx =0x3 ; hw->wiphy->available_antennas_rx =0x3 ;
drivers/net/wireless/ath/ath9k/init.c +0 -1
@@ -957,7 +957,6 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) hw->wiphy->flags |=WIPHY_FLAG_IBSS_RSN ; hw->wiphy->flags |=WIPHY_FLAG_SUPPORTS_TDLS ; hw->wiphy->flags |=WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL ; - hw->wiphy->flags |=WIPHY_FLAG_SUPPORTS_5_10_MHZ ; hw->wiphy->flags |=WIPHY_FLAG_HAS_CHANNEL_SWITCH ; hw->wiphy->flags |=WIPHY_FLAG_AP_UAPSD ;
drivers/net/wireless/virtual/mac80211_hwsim_main.c +0 -1
@@ -5903,7 +5903,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, hw->wiphy->flags |=WIPHY_FLAG_SUPPORTS_TDLS |WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |WIPHY_FLAG_AP_UAPSD | -WIPHY_FLAG_SUPPORTS_5_10_MHZ |WIPHY_FLAG_HAS_CHANNEL_SWITCH ; hw->wiphy->flags |=WIPHY_FLAG_IBSS_RSN ; hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
include/net/cfg80211.h +0 -2
@@ -5676,7 +5676,6 @@ struct cfg80211_ops {* responds to probe-requests in hardware. * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. -* @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels. * @WIPHY_FLAG_HAS_CHANNEL_SWITCH: Device supports channel switch in * beaconing mode (AP, IBSS, Mesh, ...). * @WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK: The device supports bigger kek and kck keys
@@ -5716,7 +5715,6 @@ enum wiphy_flags {WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD =BIT (19 ),WIPHY_FLAG_OFFCHAN_TX =BIT (20 ),WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL =BIT (21 ), -WIPHY_FLAG_SUPPORTS_5_10_MHZ =BIT (22 ),WIPHY_FLAG_HAS_CHANNEL_SWITCH =BIT (23 ),WIPHY_FLAG_NOTIFY_REGDOM_BY_DRIVER =BIT (24 ), WIPHY_FLAG_CHANNEL_CHANGE_ON_BEACON = BIT(25),
net/wireless/chan.c +7 -26
@@ -280,12 +280,6 @@ int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width)case NL80211_CHAN_WIDTH_16 : mhz =16 ;break ; -case NL80211_CHAN_WIDTH_5 : - mhz =5 ; -break ; -case NL80211_CHAN_WIDTH_10 : - mhz =10 ; -break ;case NL80211_CHAN_WIDTH_20 :case NL80211_CHAN_WIDTH_20_NOHT : mhz =20 ;
@@ -347,8 +341,6 @@ cfg80211_chandef_valid_control_freq(const struct cfg80211_chan_def *chandef, u32 control_freq) {switch (chandef->width) { -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :case NL80211_CHAN_WIDTH_20 :case NL80211_CHAN_WIDTH_20_NOHT :case NL80211_CHAN_WIDTH_1 :
@@ -415,8 +407,6 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)return false;switch (chandef->width) { -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :case NL80211_CHAN_WIDTH_20 :case NL80211_CHAN_WIDTH_20_NOHT : if (ieee80211_chandef_to_khz(chandef) !=
@@ -803,18 +793,16 @@ _cfg80211_chandef_compatible(const struct cfg80211_chan_def *c1,return NULL ;/* -* can't be compatible if one of them is 5/10 MHz or S1G +* can't be compatible if one of them is S1G * but they don't have the same width. */ -#define NARROW_OR_S1G (width) ((width) == NL80211_CHAN_WIDTH_5 || \ - (width) == NL80211_CHAN_WIDTH_10 || \ - (width) == NL80211_CHAN_WIDTH_1 || \ - (width) == NL80211_CHAN_WIDTH_2 || \ - (width) == NL80211_CHAN_WIDTH_4 || \ - (width) == NL80211_CHAN_WIDTH_8 || \ - (width) == NL80211_CHAN_WIDTH_16) +#define IS_S1G (width) ((width) == NL80211_CHAN_WIDTH_1 || \ + (width) == NL80211_CHAN_WIDTH_2 || \ + (width) == NL80211_CHAN_WIDTH_4 || \ + (width) == NL80211_CHAN_WIDTH_8 || \ + (width) == NL80211_CHAN_WIDTH_16) -if (NARROW_OR_S1G (c1->width) ||NARROW_OR_S1G (c2->width)) +if (IS_S1G (c1->width) ||IS_S1G (c2->width))return NULL ;/*
@@ -1506,13 +1494,6 @@ bool _cfg80211_chandef_usable(struct wiphy *wiphy, control_freq = chandef->chan->center_freq;switch (chandef->width) { -case NL80211_CHAN_WIDTH_5 : - width =5 ; -break ; -case NL80211_CHAN_WIDTH_10 : - prohibited_flags |=IEEE80211_CHAN_NO_10MHZ ; - width =10 ; -break ;case NL80211_CHAN_WIDTH_20 :if (!ht_cap->ht_supported && chandef->chan->band !=NL80211_BAND_6GHZ )
net/wireless/core.c +1 -3
@@ -917,9 +917,7 @@ int wiphy_register(struct wiphy *wiphy)BIT (NL80211_CHAN_WIDTH_80 ) |BIT (NL80211_CHAN_WIDTH_80P80 ) |BIT (NL80211_CHAN_WIDTH_160 ) | -BIT (NL80211_CHAN_WIDTH_320 ) | -BIT (NL80211_CHAN_WIDTH_5 ) | - BIT(NL80211_CHAN_WIDTH_10)))) + BIT(NL80211_CHAN_WIDTH_320)))) return -EINVAL; }
net/wireless/nl80211.c +3 -11
@@ -3450,11 +3450,6 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,if (nl80211_send_coalesce (msg, rdev)) goto nla_put_failure; -if ((rdev->wiphy.flags &WIPHY_FLAG_SUPPORTS_5_10_MHZ ) && - (nla_put_flag (msg,NL80211_ATTR_SUPPORT_5_MHZ ) || -nla_put_flag (msg,NL80211_ATTR_SUPPORT_10_MHZ ))) - goto nla_put_failure; -if (rdev->wiphy.max_ap_assoc_sta &&nla_put_u32 (msg,NL80211_ATTR_MAX_AP_ASSOC_STA , rdev->wiphy.max_ap_assoc_sta))
@@ -4085,10 +4080,9 @@ static int _nl80211_parse_chandef(struct cfg80211_registered_device *rdev,return -EINVAL ; } -if ((chandef->width ==NL80211_CHAN_WIDTH_5 || - chandef->width ==NL80211_CHAN_WIDTH_10 ) && - !(rdev->wiphy.flags &WIPHY_FLAG_SUPPORTS_5_10_MHZ )) { -NL_SET_ERR_MSG (extack,"5/10 MHz not supported" ); +if (chandef->width ==NL80211_CHAN_WIDTH_5 || + chandef->width ==NL80211_CHAN_WIDTH_10 ) { +NL_SET_ERR_MSG (extack,"5/10 MHz not supported any more" );return -EINVAL ; }
@@ -13410,8 +13404,6 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)return -EINVAL ;switch (ibss.chandef.width) { -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :case NL80211_CHAN_WIDTH_20_NOHT :break ;case NL80211_CHAN_WIDTH_20 :
net/wireless/util.c +0 -3
@@ -2304,9 +2304,6 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef,case NL80211_CHAN_WIDTH_80P80 : vht_opclass =130 ;break ; -case NL80211_CHAN_WIDTH_10 : -case NL80211_CHAN_WIDTH_5 : -return false;/* unsupported for now */ default : vht_opclass =0 ;break ;
Signature · 1 line
2.53.0
Re: [PATCH wireless-next 1/2] wifi: cfg80211: remove 5/10 MHz channel support
Quoted 7 lines · Johannes Berg
From: Johannes Berg <[email protected]>
Remove
WIPHY_FLAG_SUPPORTS_5_10_MHZand 5/10 MHz channel width support. We contemplated this back in early 2023 and didn't do it yet, but nobody stepped up to maintain it.
Quoted 8 lines
It's already _mostly_ dead code since it can really only be used for AP and maybe IBSS and monitor, but not on a client since there's no way to scan (and hasn't been in a very long time, if ever), so the only thing that ever could really happen with it was run syzbot and trip over assumptions in the code.
Signed-off-by Johannes Berg <[email protected]>
Johannes Berg
maintainerPATCH 2/2 wifi: mac80211: remove 5/10 MHz channel code
In reply to Johannes BergFrom: Johannes Berg <[email protected]>
Now that cfg80211 refuses all attempts to use 5/10 MHz channels, all of this code is unreachable; remove it.
--- net/mac80211/cfg.c | 2 -- net/mac80211/chan.c | 4 +--- net/mac80211/ibss.c | 31 ++----------------------------- net/mac80211/mesh.c | 36 +++++++++--------------------------- net/mac80211/mesh_plink.c | 2 -- net/mac80211/mlme.c | 6 ++---- net/mac80211/offchannel.c | 4 +--- net/mac80211/rate.c | 8 +------- net/mac80211/spectmgmt.c | 10 ---------- net/mac80211/util.c | 7 ------- 10 files changed, 16 insertions(+), 94 deletions(-)
net/mac80211/cfg.c +0 -2
@@ -4591,8 +4591,6 @@ static int ieee80211_set_csa_beacon(struct ieee80211_link_data *link_data, cfg80211_get_chandef_type(&sdata->u.ibss.chandef))return -EINVAL ;break ; -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :case NL80211_CHAN_WIDTH_20_NOHT :case NL80211_CHAN_WIDTH_20 :break ;
net/mac80211/chan.c +1 -3
@@ -642,9 +642,7 @@ __ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local,lockdep_assert_wiphy (local->hw.wiphy);/* don't optimize non-20MHz based and radar_enabled confs */ - if (ctx->conf.def.width == NL80211_CHAN_WIDTH_5 || - ctx->conf.def.width == NL80211_CHAN_WIDTH_10 || - ctx->conf.def.width == NL80211_CHAN_WIDTH_1 || + if (ctx->conf.def.width == NL80211_CHAN_WIDTH_1 || ctx->conf.def.width == NL80211_CHAN_WIDTH_2 || ctx->conf.def.width == NL80211_CHAN_WIDTH_4 || ctx->conf.def.width == NL80211_CHAN_WIDTH_8 ||
net/mac80211/ibss.c +2 -29
@@ -167,8 +167,6 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,/* add HT capability and information IEs */ if (chandef->width !=NL80211_CHAN_WIDTH_20_NOHT && - chandef->width !=NL80211_CHAN_WIDTH_5 && - chandef->width !=NL80211_CHAN_WIDTH_10 && sband->ht_cap.ht_supported) {struct ieee80211_sta_ht_cap ht_cap;
@@ -259,9 +257,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, chan = chanreq.oper.chan;if (!cfg80211_reg_can_beacon (local->hw.wiphy, &chanreq.oper,NL80211_IFTYPE_ADHOC )) { -if (chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - chanreq.oper.width ==NL80211_CHAN_WIDTH_10 || - chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || +if (chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || chanreq.oper.width ==NL80211_CHAN_WIDTH_20 ) {sdata_info (sdata,"Failed to join IBSS, beacons forbidden\n" );
@@ -405,12 +401,6 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, chan_type =cfg80211_get_chandef_type (&sdata->u.ibss.chandef);cfg80211_chandef_create (&chandef, cbss->channel, chan_type);break ; -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 : -cfg80211_chandef_create (&chandef, cbss->channel, -NL80211_CHAN_NO_HT ); - chandef.width = sdata->u.ibss.chandef.width; -break ;case NL80211_CHAN_WIDTH_80 :case NL80211_CHAN_WIDTH_80P80 :case NL80211_CHAN_WIDTH_160 :
@@ -762,8 +752,6 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,lockdep_assert_wiphy (sdata->local->hw.wiphy);switch (ifibss->chandef.width) { -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :case NL80211_CHAN_WIDTH_20_NOHT : conn.mode =IEEE80211_CONN_MODE_LEGACY ; fallthrough;
@@ -811,19 +799,6 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,cfg80211_chandef_create (¶ms.chandef, params.chandef.chan, ch_type);break ; -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 : -if (params.chandef.width != ifibss->chandef.width) { -sdata_info (sdata, -"IBSS %pM received channel switch from incompatible channel width (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n" , - ifibss->bssid, - params.chandef.chan->center_freq, - params.chandef.width, - params.chandef.center_freq1, - params.chandef.center_freq2); - goto disconnect; - } -break ;default :/* should not happen, conn_flags should prevent VHT modes. */ WARN_ON (1 );
@@ -1005,9 +980,7 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata, }if (sta && elems->ht_operation && elems->ht_cap_elem && - sdata->u.ibss.chandef.width !=NL80211_CHAN_WIDTH_20_NOHT && - sdata->u.ibss.chandef.width !=NL80211_CHAN_WIDTH_5 && - sdata->u.ibss.chandef.width !=NL80211_CHAN_WIDTH_10 ) { + sdata->u.ibss.chandef.width !=NL80211_CHAN_WIDTH_20_NOHT ) {/* we both use HT */ struct ieee80211_ht_cap htcap_ie;struct cfg80211_chan_def chandef;
net/mac80211/mesh.c +9 -27
@@ -439,9 +439,7 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata,return 0 ;if (!sband->ht_cap.ht_supported || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;if (skb_tailroom (skb) <2 +sizeof (struct ieee80211_ht_cap ))
@@ -480,9 +478,7 @@ int mesh_add_ht_oper_ie(struct ieee80211_sub_if_data *sdata,return 0 ;if (!ht_cap->ht_supported || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;if (skb_tailroom (skb) <2 +sizeof (struct ieee80211_ht_operation ))
@@ -511,9 +507,7 @@ int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata,return 0 ;if (!sband->vht_cap.vht_supported || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;if (skb_tailroom (skb) <2 +sizeof (struct ieee80211_vht_cap ))
@@ -552,9 +546,7 @@ int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata,return 0 ;if (!vht_cap->vht_supported || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;if (skb_tailroom (skb) <2 +sizeof (struct ieee80211_vht_operation ))
@@ -576,9 +568,7 @@ int mesh_add_he_cap_ie(struct ieee80211_sub_if_data *sdata,if (!sband)return -EINVAL ; -if (sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) +if (sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;return ieee80211_put_he_cap (skb, sdata, sband,NULL );
@@ -598,9 +588,7 @@ int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata, he_cap =ieee80211_get_he_iftype_cap (sband,NL80211_IFTYPE_MESH_POINT );if (!he_cap || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ; len =2 +1 +sizeof (struct ieee80211_he_operation );
@@ -648,9 +636,7 @@ int mesh_add_eht_cap_ie(struct ieee80211_sub_if_data *sdata,if (!sband)return -EINVAL ; -if (sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) +if (sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ;return ieee80211_put_eht_cap (skb, sdata, sband,NULL );
@@ -669,9 +655,7 @@ int mesh_add_eht_oper_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *sk eht_cap =ieee80211_get_eht_iftype_cap (sband,NL80211_IFTYPE_MESH_POINT );if (!eht_cap || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return 0 ; len = 2 + 1 + offsetof(struct ieee80211_eht_operation, optional) +
@@ -729,9 +713,7 @@ ieee80211_mesh_update_bss_params(struct ieee80211_sub_if_data *sdata,return ;if (!ieee80211_get_he_iftype_cap (sband,NL80211_IFTYPE_MESH_POINT ) || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_10 ) + sdata->vif.bss_conf.chanreq.oper.width ==NL80211_CHAN_WIDTH_20_NOHT )return ; sdata->vif.bss_conf.he_support = true;
net/mac80211/mesh_plink.c +0 -2
@@ -165,8 +165,6 @@ static u64 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata)switch (sdata->vif.bss_conf.chanreq.oper.width) {case NL80211_CHAN_WIDTH_20_NOHT : -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 :return 0 ;default :break ;
net/mac80211/mlme.c +2 -4
@@ -6376,10 +6376,8 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, ret =ieee80211_link_use_channel (link, &chanreq,IEEE80211_CHANCTX_SHARED ); -/* don't downgrade for 5/10/S1G MHz channels, though. */ -if (chanreq.oper.width ==NL80211_CHAN_WIDTH_5 || - chanreq.oper.width ==NL80211_CHAN_WIDTH_10 || -cfg80211_chandef_is_s1g (&chanreq.oper)) +/* don't downgrade for S1G channels, though. */ +if (cfg80211_chandef_is_s1g (&chanreq.oper))return ret;while (ret && chanreq.oper.width !=NL80211_CHAN_WIDTH_20_NOHT ) {
net/mac80211/offchannel.c +1 -3
@@ -355,9 +355,7 @@ static void _ieee80211_start_next_roc(struct ieee80211_local *local)* Note: scan can't run, tmp_channel is what we use, so this * must be the currently active channel. */ - roc->on_channel = roc->chan == local->hw.conf.chandef.chan && - local->hw.conf.chandef.width !=NL80211_CHAN_WIDTH_5 && - local->hw.conf.chandef.width !=NL80211_CHAN_WIDTH_10 ; + roc->on_channel = roc->chan == local->hw.conf.chandef.chan;/* start this ROC */ ieee80211_recalc_idle (local);
net/mac80211/rate.c +1 -7
@@ -601,14 +601,8 @@ static void rate_idx_match_mask(s8 *rate_idx, u16 *rate_flags,return ;/* if HT BSS, and we handle a data frame, also try HT rates */ -switch (chan_width) { -case NL80211_CHAN_WIDTH_20_NOHT : -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 : +if (chan_width ==NL80211_CHAN_WIDTH_20_NOHT )return ; -default : -break ; - } *rate_idx =0 ;/* keep protection flags */
net/mac80211/spectmgmt.c +0 -10
@@ -329,16 +329,6 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,case -1 :cfg80211_chandef_create (&csa_ie->chanreq.oper, new_chan,NL80211_CHAN_NO_HT ); -/* keep width for 5/10 MHz channels */ -switch (sdata->vif.bss_conf.chanreq.oper.width) { -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 : - csa_ie->chanreq.oper.width = - sdata->vif.bss_conf.chanreq.oper.width; -break ; -default : -break ; - }break ; }
net/mac80211/util.c +0 -7
@@ -3816,13 +3816,6 @@ void ieee80211_chandef_downgrade(struct cfg80211_chan_def *c, conn->mode =IEEE80211_CONN_MODE_S1G ; conn->bw_limit =IEEE80211_CONN_BW_LIMIT_20 ;break ; -case NL80211_CHAN_WIDTH_5 : -case NL80211_CHAN_WIDTH_10 : -WARN_ON_ONCE (1 ); -/* keep c->width */ - conn->mode =IEEE80211_CONN_MODE_LEGACY ; - conn->bw_limit =IEEE80211_CONN_BW_LIMIT_20 ; -break ; }if (new_primary_width !=NL80211_CHAN_WIDTH_20_NOHT ) {
Signature · 1 line
2.53.0
Re: [PATCH wireless-next 2/2] wifi: mac80211: remove 5/10 MHz channel code
Quoted 6 lines · Johannes Berg
From: Johannes Berg <[email protected]>
Now that cfg80211 refuses all attempts to use 5/10 MHz channels, all of this code is unreachable; remove it.
Signed-off-by Johannes Berg <[email protected]>