From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Kieran Frewen <kieran.frewen@morsemicro.com>,
Bassem Dawood <bassem@morsemicro.com>,
Johannes Berg <johannes.berg@intel.com>,
Sasha Levin <sashal@kernel.org>,
johannes@sipsolutions.net, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.17 05/23] cfg80211: retrieve S1G operating channel number
Date: Wed, 18 May 2022 08:26:18 -0400 [thread overview]
Message-ID: <20220518122641.342120-5-sashal@kernel.org> (raw)
In-Reply-To: <20220518122641.342120-1-sashal@kernel.org>
From: Kieran Frewen <kieran.frewen@morsemicro.com>
[ Upstream commit e847ffe2d146cfd52980ca688d84358e024a6e70 ]
When retrieving the S1G channel number from IEs, we should retrieve
the operating channel instead of the primary channel. The S1G operation
element specifies the main channel of operation as the oper channel,
unlike for HT and HE which specify their main channel of operation as
the primary channel.
Signed-off-by: Kieran Frewen <kieran.frewen@morsemicro.com>
Signed-off-by: Bassem Dawood <bassem@morsemicro.com>
Link: https://lore.kernel.org/r/20220420041321.3788789-1-kieran.frewen@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 4a6d86432910..6d82bd9eaf8c 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1829,7 +1829,7 @@ int cfg80211_get_ies_channel_number(const u8 *ie, size_t ielen,
if (tmp && tmp->datalen >= sizeof(struct ieee80211_s1g_oper_ie)) {
struct ieee80211_s1g_oper_ie *s1gop = (void *)tmp->data;
- return s1gop->primary_ch;
+ return s1gop->oper_ch;
}
} else {
tmp = cfg80211_find_elem(WLAN_EID_DS_PARAMS, ie, ielen);
--
2.35.1
next prev parent reply other threads:[~2022-05-18 12:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220518122641.342120-1-sashal@kernel.org>
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 03/23] mac80211: fix rx reordering with non explicit / psmp ack policy Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 04/23] nl80211: validate S1G channel width Sasha Levin
2022-05-18 12:26 ` Sasha Levin [this message]
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 06/23] selftests: add ping test with ping_group_range tuned Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 14/23] net: fix wrong network header length Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 15/23] nl80211: fix locking in nl80211_set_tx_bitrate_mask() Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 16/23] ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one() Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 17/23] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 18/23] net: atlantic: fix "frag[0] not initialized" Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 19/23] net: atlantic: reduce scope of is_rsc_complete Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 20/23] net: atlantic: add check for MAX_SKB_FRAGS Sasha Levin
2022-05-18 12:26 ` [PATCH AUTOSEL 5.17 21/23] net: atlantic: verify hw_head_ lies within TX buffer ring Sasha Levin
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=20220518122641.342120-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bassem@morsemicro.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=kieran.frewen@morsemicro.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).