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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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

Attachment: 0001-P2P-Skip-6GHz-band-directly-if-6GHz-P2P-is-disabled.patch
Description: 0001-P2P-Skip-6GHz-band-directly-if-6GHz-P2P-is-disabled.patch

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux