[PATCH] P2P: Skip 6GHz band directly if 6GHz P2P is disabled

姜海涛(Hector Jiang) jianghaitao at zeku.com
Sun Aug 21 04:39:51 PDT 2022


If 6GHz is supported by the device but 6GHz P2P is disabled,
P2P invitation would fail if the GO select an operating channel
which is not the preferred channel.
The root cause is that the 5GHz and 6GHz bands are both
HOSTAPD_MODE_IEEE80211A so the 5GHz channels would be added
twice for the GC's following scanning frequency list. This will
cause the GC's following scanning failed with -EINVAL.

Signed-off-by: Hector Jiang <jianghaitao at zeku.com>
---
 wpa_supplicant/scan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index abd48edb7..871885868 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1374,6 +1374,8 @@ scan:
                for (i = 0; i < wpa_s->hw.num_modes; i++) {
                        if (wpa_s->hw.modes[i].num_channels == 0)
                                continue;
+                       if (is_6ghz_freq(wpa_s->hw.modes[i].channels[0].freq))
+                               continue;
                        if (wpa_s->hw.modes[i].mode == HOSTAPD_MODE_IEEE80211G)
                                wpa_add_scan_freqs_list(
                                        wpa_s, HOSTAPD_MODE_IEEE80211G,
--
2.25.1

ZEKU
信息安全声明:本邮件包含信息归发件人所在组织ZEKU所有。 禁止任何人在未经授权的情况下以任何形式(包括但不限于全部或部分披露、复制或传播)使用包含的信息。若您错收了本邮件,请立即电话或邮件通知发件人,并删除本邮件及附件。
Information Security Notice: The information contained in this mail is solely property of the sender's organization ZEKU. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-P2P-Skip-6GHz-band-directly-if-6GHz-P2P-is-disabled.patch
Type: application/octet-stream
Size: 1237 bytes
Desc: 0001-P2P-Skip-6GHz-band-directly-if-6GHz-P2P-is-disabled.patch
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20220821/b227d73c/attachment.obj>


More information about the Hostap mailing list