Browse Source

P2P: Fix HT40 secondary channel validation

Jouni Malinen 14 years ago
parent
commit
5254eb7e50
1 changed files with 2 additions and 2 deletions
  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;
 				continue;
 			if (o->bw == BW40MINUS &&
 			if (o->bw == BW40MINUS &&
 			    (!(flag & HOSTAPD_CHAN_HT40MINUS) ||
 			    (!(flag & HOSTAPD_CHAN_HT40MINUS) ||
-			     !has_channel(mode, ch - o->inc, NULL)))
+			     !has_channel(mode, ch - 4, NULL)))
 				continue;
 				continue;
 			if (o->bw == BW40PLUS &&
 			if (o->bw == BW40PLUS &&
 			    (!(flag & HOSTAPD_CHAN_HT40PLUS) ||
 			    (!(flag & HOSTAPD_CHAN_HT40PLUS) ||
-			     !has_channel(mode, ch + o->inc, NULL)))
+			     !has_channel(mode, ch + 4, NULL)))
 				continue;
 				continue;
 			if (reg == NULL) {
 			if (reg == NULL) {
 				wpa_printf(MSG_DEBUG, "P2P: Add operating "
 				wpa_printf(MSG_DEBUG, "P2P: Add operating "