diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-09-22 10:46:44 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-09-22 10:46:44 -0700 |
commit | 0e2e565a44ab7b073491cab00847f7bc62731483 (patch) | |
tree | 5ffb72f62b30509357f4e137ab770c0b8962bec3 /src/ap/ap_drv_ops.c | |
parent | baf7081ccde91913aacd00e1f6ff034b9db5100d (diff) | |
download | external_wpa_supplicant_8_ti-0e2e565a44ab7b073491cab00847f7bc62731483.zip external_wpa_supplicant_8_ti-0e2e565a44ab7b073491cab00847f7bc62731483.tar.gz external_wpa_supplicant_8_ti-0e2e565a44ab7b073491cab00847f7bc62731483.tar.bz2 |
WPS 2.0: Provide (Re)Association Response WPS IE to driver
WPS 2.0 mandates the AP to include WPS IE in (Re)Association Response
if the matching (Re)Association Request included WPS IE. Provide the
needed WPS IE information to the driver_ops API for drivers that
process association frames internally.
Note: This modifies the driver_ops API by adding a new argument to
set_ap_wps_ie().
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r-- | src/ap/ap_drv_ops.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 17c024c..5aed879 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -17,6 +17,7 @@ #include "utils/common.h" #include "drivers/driver.h" #include "common/ieee802_11_defs.h" +#include "wps/wps.h" #include "hostapd.h" #include "ieee802_11.h" #include "sta_info.h" @@ -41,7 +42,7 @@ static int hostapd_sta_flags_to_drv(int flags) static int hostapd_set_ap_wps_ie(struct hostapd_data *hapd) { - struct wpabuf *beacon, *proberesp; + struct wpabuf *beacon, *proberesp, *assocresp = NULL; int ret; if (hapd->driver == NULL || hapd->driver->set_ap_wps_ie == NULL) @@ -85,12 +86,19 @@ static int hostapd_set_ap_wps_ie(struct hostapd_data *hapd) } #endif /* CONFIG_P2P */ - ret = hapd->driver->set_ap_wps_ie(hapd->drv_priv, beacon, proberesp); +#ifdef CONFIG_WPS2 + if (hapd->conf->wps_state) + assocresp = wps_build_assoc_resp_ie(); +#endif /* CONFIG_WPS2 */ + + ret = hapd->driver->set_ap_wps_ie(hapd->drv_priv, beacon, proberesp, + assocresp); #ifdef CONFIG_P2P wpabuf_free(beacon); wpabuf_free(proberesp); #endif /* CONFIG_P2P */ + wpabuf_free(assocresp); return ret; } |