aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-04-04 16:19:25 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-08 09:56:34 (GMT)
commit90f14962ec14f3ff46c12f0a191404e5957786b1 (patch)
tree532e25fd19ee441140ffc26722fdc3bea88a68b5 /wpa_supplicant/ap.c
parent39881726d5b3b0ccba8f8fa175448316351fbab6 (diff)
downloadhostap-90f14962ec14f3ff46c12f0a191404e5957786b1.zip
hostap-90f14962ec14f3ff46c12f0a191404e5957786b1.tar.gz
hostap-90f14962ec14f3ff46c12f0a191404e5957786b1.tar.bz2
wpa_supplicant: "don't care" value for pbss in ssid structure
Add a new value 2 to the pbss parameter of wpa_ssid structure, which means "don't care". This value is used in infrastructure mode to request connection to either AP or PCP, whichever is available in the scan results. The value is also used in regular WPS (not P2P group formation) to make WPS work with devices running as either AP or PCP. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index b133d03..4f895f3 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -214,6 +214,13 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
if (wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf))
return -1;
+ if (ssid->pbss > 1) {
+ wpa_printf(MSG_ERROR, "Invalid pbss value(%d) for AP mode",
+ ssid->pbss);
+ return -1;
+ }
+ bss->pbss = ssid->pbss;
+
#ifdef CONFIG_ACS
if (ssid->acs) {
/* Setting channel to 0 in order to enable ACS */
@@ -453,8 +460,6 @@ no_wps:
wpabuf_dup(wpa_s->conf->ap_vendor_elements);
}
- bss->pbss = ssid->pbss;
-
return 0;
}