]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
34de24043fa66575d5866633d82498b83c79782b
[thirdparty/kernel/stable-queue.git] /
1 From 6db73e4b05335fe318b2d00d97b6291ee17532e8 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Tue, 13 Oct 2020 14:01:57 +0200
4 Subject: mac80211: don't require VHT elements for HE on 2.4 GHz
5
6 From: Johannes Berg <johannes.berg@intel.com>
7
8 [ Upstream commit c2f46814521113f6699a74e0a0424cbc5b305479 ]
9
10 After the previous similar bugfix there was another bug here,
11 if no VHT elements were found we also disabled HE. Fix this to
12 disable HE only on the 5 GHz band; on 6 GHz it was already not
13 disabled, and on 2.4 GHz there need (should) not be any VHT.
14
15 Fixes: 57fa5e85d53c ("mac80211: determine chandef from HE 6 GHz operation")
16 Link: https://lore.kernel.org/r/20201013140156.535a2fc6192f.Id6e5e525a60ac18d245d86f4015f1b271fce6ee6@changeid
17 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 Signed-off-by: Sasha Levin <sashal@kernel.org>
19 ---
20 net/mac80211/mlme.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
24 index 2e400b0ff6961..0f30f50c46b1b 100644
25 --- a/net/mac80211/mlme.c
26 +++ b/net/mac80211/mlme.c
27 @@ -5359,6 +5359,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
28 struct cfg80211_assoc_request *req)
29 {
30 bool is_6ghz = req->bss->channel->band == NL80211_BAND_6GHZ;
31 + bool is_5ghz = req->bss->channel->band == NL80211_BAND_5GHZ;
32 struct ieee80211_local *local = sdata->local;
33 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
34 struct ieee80211_bss *bss = (void *)req->bss->priv;
35 @@ -5507,7 +5508,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
36 if (vht_ie && vht_ie[1] >= sizeof(struct ieee80211_vht_cap))
37 memcpy(&assoc_data->ap_vht_cap, vht_ie + 2,
38 sizeof(struct ieee80211_vht_cap));
39 - else if (!is_6ghz)
40 + else if (is_5ghz)
41 ifmgd->flags |= IEEE80211_STA_DISABLE_VHT |
42 IEEE80211_STA_DISABLE_HE;
43 rcu_read_unlock();
44 --
45 2.27.0
46