Parcourir la source

P2P: Fix HT40 secondary channel validation

Jouni Malinen il y a 14 ans
Parent
commit
5254eb7e50
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      wpa_supplicant/p2p_supplicant.c

+ 2 - 2
wpa_supplicant/p2p_supplicant.c

@@ -2101,11 +2101,11 @@ static int wpas_p2p_setup_channels(struct wpa_supplicant *wpa_s,
 				continue;
 			if (o->bw == BW40MINUS &&
 			    (!(flag & HOSTAPD_CHAN_HT40MINUS) ||
-			     !has_channel(mode, ch - o->inc, NULL)))
+			     !has_channel(mode, ch - 4, NULL)))
 				continue;
 			if (o->bw == BW40PLUS &&
 			    (!(flag & HOSTAPD_CHAN_HT40PLUS) ||
-			     !has_channel(mode, ch + o->inc, NULL)))
+			     !has_channel(mode, ch + 4, NULL)))
 				continue;
 			if (reg == NULL) {
 				wpa_printf(MSG_DEBUG, "P2P: Add operating "