]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Use wps_rf_bands parameter to determine dualband functionality
authorJouni Malinen <j@w1.fi>
Mon, 17 Dec 2012 14:06:10 +0000 (16:06 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 17 Dec 2012 14:06:10 +0000 (16:06 +0200)
If separate hostapd processes are used for different RF bands, the
dualband parameter for WPS was not set correctly. Allow dualband
indication (mainly, addition of RF bands attribute for PBC session
overlap detection) also based on wps_rf_bands value (if set to "ag").

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/wps_hostapd.c

index 85633ec560f87c2eefe36ec7d65ebfe55c3e2420..5ce4f1be352e3848728fee2ac7ddf3f8206209c9 100644 (file)
@@ -957,6 +957,9 @@ int hostapd_init_wps(struct hostapd_data *hapd,
        if (conf->ssid.security_policy == SECURITY_STATIC_WEP)
                cfg.static_wep_only = 1;
        cfg.dualband = interface_count(hapd->iface) > 1;
+       if ((wps->dev.rf_bands & (WPS_RF_50GHZ | WPS_RF_24GHZ)) ==
+           (WPS_RF_50GHZ | WPS_RF_24GHZ))
+               cfg.dualband = 1;
        if (cfg.dualband)
                wpa_printf(MSG_DEBUG, "WPS: Dualband AP");