wpa_supplicant: Add wps_disabled parameter to network block

Add a new parameter wps_disabled to network block (wpa_ssid). This
parameter allows WPS functionality to be disabled in AP mode.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
This commit is contained in:
Lior David 2016-04-12 18:13:22 +03:00 committed by Jouni Malinen
parent 23d71a0286
commit b6317b417f
6 changed files with 18 additions and 1 deletions

View file

@ -420,6 +420,8 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
!(bss->wpa & 2)))
goto no_wps; /* WPS2 does not allow WPA/TKIP-only
* configuration */
if (ssid->wps_disabled)
goto no_wps;
bss->eap_server = 1;
if (!ssid->ignore_broadcast_ssid)

View file

@ -2055,6 +2055,7 @@ static const struct parse_data ssid_fields[] = {
#endif /* CONFIG_HS20 */
{ INT_RANGE(mac_addr, 0, 2) },
{ INT_RANGE(pbss, 0, 2) },
{ INT_RANGE(wps_disabled, 0, 1) },
};
#undef OFFSET

View file

@ -756,6 +756,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
INT(mixed_cell);
INT(max_oper_chwidth);
INT(pbss);
INT(wps_disabled);
#ifdef CONFIG_IEEE80211W
write_int(f, "ieee80211w", ssid->ieee80211w,
MGMT_FRAME_PROTECTION_DEFAULT);

View file

@ -748,6 +748,14 @@ struct wpa_ssid {
* this MBSS will trigger a peering attempt.
*/
int no_auto_peer;
/**
* wps_disabled - WPS disabled in AP mode
*
* 0 = WPS enabled and configured (default)
* 1 = WPS disabled
*/
int wps_disabled;
};
#endif /* CONFIG_SSID_H */

View file

@ -1612,7 +1612,7 @@ static const char *network_fields[] = {
#ifdef CONFIG_HS20
"update_identifier",
#endif /* CONFIG_HS20 */
"mac_addr", "pbss"
"mac_addr", "pbss", "wps_disabled"
};

View file

@ -1175,6 +1175,11 @@ fast_reauth=1
# Beacon interval (default: 100 TU)
#beacon_int=100
# WPS in AP mode
# 0 = WPS enabled and configured (default)
# 1 = WPS disabled
#wps_disabled=0
# MAC address policy
# 0 = use permanent MAC address
# 1 = use random MAC address for each ESS connection