]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix HT40 secondary channel validation
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 12 Nov 2010 17:04:48 +0000 (19:04 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 12 Nov 2010 17:04:48 +0000 (19:04 +0200)
wpa_supplicant/p2p_supplicant.c

index dd8ccc74fa8d646374888ee4f213d5b0a22109f3..dd91ddf021bf86c66da9fcd18a3318042cb3e3dc 100644 (file)
@@ -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 "