提交 877c2eab 编写于 作者: A Avraham Stern 提交者: Zheng Zengkai

cfg80211: don't add non transmitted BSS to 6GHz scanned channels

stable inclusion
from stable-v5.10.111
commit 26a1e4739e442da11607f0a757cb22a653e595ec
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5GL1Z

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=26a1e4739e442da11607f0a757cb22a653e595ec

--------------------------------

[ Upstream commit 5666ee15 ]

When adding 6GHz channels to scan request based on reported
co-located APs, don't add channels that have only APs with
"non-transmitted" BSSes if they only match the wildcard SSID since
they will be found by probing the "transmitted" BSS.
Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.f6ddf099f934.I231e55885d3644f292d00dfe0f42653269f2559e@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 78835c4e
...@@ -702,8 +702,12 @@ static bool cfg80211_find_ssid_match(struct cfg80211_colocated_ap *ap, ...@@ -702,8 +702,12 @@ static bool cfg80211_find_ssid_match(struct cfg80211_colocated_ap *ap,
for (i = 0; i < request->n_ssids; i++) { for (i = 0; i < request->n_ssids; i++) {
/* wildcard ssid in the scan request */ /* wildcard ssid in the scan request */
if (!request->ssids[i].ssid_len) if (!request->ssids[i].ssid_len) {
if (ap->multi_bss && !ap->transmitted_bssid)
continue;
return true; return true;
}
if (ap->ssid_len && if (ap->ssid_len &&
ap->ssid_len == request->ssids[i].ssid_len) { ap->ssid_len == request->ssids[i].ssid_len) {
...@@ -830,6 +834,9 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) ...@@ -830,6 +834,9 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
!cfg80211_find_ssid_match(ap, request)) !cfg80211_find_ssid_match(ap, request))
continue; continue;
if (!request->n_ssids && ap->multi_bss && !ap->transmitted_bssid)
continue;
cfg80211_scan_req_add_chan(request, chan, true); cfg80211_scan_req_add_chan(request, chan, true);
memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN); memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN);
scan_6ghz_params->short_ssid = ap->short_ssid; scan_6ghz_params->short_ssid = ap->short_ssid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册