From: Thomas Pedersen <thomas@adapt-ip.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Thomas Pedersen <thomas@adapt-ip.com>
Subject: [PATCH] mac80211: process S1G Operation element before HT
Date: Tue, 29 Sep 2020 11:19:48 -0700 [thread overview]
Message-ID: <20200929181948.22894-1-thomas@adapt-ip.com> (raw)
The sband->ht_cap was being processed before S1G Operation
element. Since the HT capability element should not be
present on the S1G band, avoid processing potential
garbage by moving the call to
ieee80211_apply_htcap_overrides() to after the S1G block.
Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
net/mac80211/mlme.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 38e87ac9902e..80b4d46d0b20 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -174,9 +174,6 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
goto out;
}
- memcpy(&sta_ht_cap, &sband->ht_cap, sizeof(sta_ht_cap));
- ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap);
-
if (s1g_oper && sband->band == NL80211_BAND_S1GHZ) {
ieee80211_chandef_s1g_oper(s1g_oper, chandef);
ret = IEEE80211_STA_DISABLE_HT | IEEE80211_STA_DISABLE_40MHZ |
@@ -186,6 +183,9 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
goto out;
}
+ memcpy(&sta_ht_cap, &sband->ht_cap, sizeof(sta_ht_cap));
+ ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap);
+
if (!ht_oper || !sta_ht_cap.ht_supported) {
ret = IEEE80211_STA_DISABLE_HT |
IEEE80211_STA_DISABLE_VHT |
--
2.20.1
next reply other threads:[~2020-09-29 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 18:19 Thomas Pedersen [this message]
2020-09-29 18:32 ` [PATCH] mac80211: process S1G Operation element before HT Johannes Berg
2020-09-29 18:44 ` Thomas Pedersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200929181948.22894-1-thomas@adapt-ip.com \
--to=thomas@adapt-ip.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox