diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-01-29 21:34:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-08 14:58:29 +0300 |
commit | 2d9698dd32d086e47b8bff3df4322cc017c17b55 (patch) | |
tree | fed44b38dfd74693d7ddb8f3a6bd4500a021d09d /net/mac80211/mlme.c | |
parent | 310c8387c63830bc375827242e0f9fa689f82e21 (diff) | |
download | linux-2d9698dd32d086e47b8bff3df4322cc017c17b55.tar.xz |
wifi: mac80211: clean up HE 6 GHz and EHT chandef parsing
In the code we currently check for support 80+80, 160
and 320 channel widths, but really the way this should
be (and is otherwise) handled is that we compute the
highest channel bandwidth given there, and then cut it
down to what we support. This is also needed for wider
bandwidth OFDMA support.
Change the code to remove this limitation and always
parse the highest possible channel width.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240129194108.d06f85082e29.I47e68ed3d97b0a2f4ee61e5d8abfcefc8a5b9c08@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 549a06c9a2e5..7c0339d4f059 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -116,7 +116,7 @@ ieee80211_extract_dis_subch_bmap(const struct ieee80211_eht_operation *eht_oper, /* set 160/320 supported to get the full AP definition */ ieee80211_chandef_eht_oper((const void *)eht_oper->optional, - true, true, &ap_chandef); + &ap_chandef); ap_center_freq = ap_chandef.center_freq1; ap_bw = 20 * BIT(u8_get_bits(info->control, IEEE80211_EHT_OPER_CHAN_WIDTH)); @@ -280,7 +280,7 @@ ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata, mode = IEEE80211_CONN_MODE_HE; } - if (!ieee80211_chandef_he_6ghz_oper(sdata, he_oper, + if (!ieee80211_chandef_he_6ghz_oper(sdata->local, he_oper, eht_oper, chandef)) { sdata_info(sdata, "bad HE/EHT 6 GHz operation\n"); return IEEE80211_CONN_MODE_LEGACY; @@ -394,9 +394,7 @@ ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata, struct cfg80211_chan_def eht_chandef = *chandef; ieee80211_chandef_eht_oper((const void *)eht_oper->optional, - eht_chandef.width == - NL80211_CHAN_WIDTH_160, - false, &eht_chandef); + &eht_chandef); if (!cfg80211_chandef_valid(&eht_chandef)) { sdata_info(sdata, |