Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cfg80211: retrieve S1G operating channel number

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>

authored by

Kieran Frewen and committed by
Johannes Berg
e847ffe2 5d087aa7

+1 -1
+1 -1
net/wireless/scan.c
··· 1829 1829 if (tmp && tmp->datalen >= sizeof(struct ieee80211_s1g_oper_ie)) { 1830 1830 struct ieee80211_s1g_oper_ie *s1gop = (void *)tmp->data; 1831 1831 1832 - return s1gop->primary_ch; 1832 + return s1gop->oper_ch; 1833 1833 } 1834 1834 } else { 1835 1835 tmp = cfg80211_find_elem(WLAN_EID_DS_PARAMS, ie, ielen);