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().
This commit is contained in:
Jouni Malinen 2010-09-22 10:46:44 -07:00 committed by Jouni Malinen
parent baf7081ccd
commit 0e2e565a44
8 changed files with 33 additions and 11 deletions

View file

@ -499,12 +499,13 @@ static inline int wpa_drv_signal_monitor(struct wpa_supplicant *wpa_s,
static inline int wpa_drv_set_ap_wps_ie(struct wpa_supplicant *wpa_s,
const struct wpabuf *beacon,
const struct wpabuf *proberesp)
const struct wpabuf *proberesp,
const struct wpabuf *assocresp)
{
if (!wpa_s->driver->set_ap_wps_ie)
return -1;
return wpa_s->driver->set_ap_wps_ie(wpa_s->drv_priv, beacon,
proberesp);
proberesp, assocresp);
}
static inline int wpa_drv_shared_freq(struct wpa_supplicant *wpa_s)

View file

@ -1021,7 +1021,7 @@ static int wpas_start_listen(void *ctx, unsigned int freq,
{
struct wpa_supplicant *wpa_s = ctx;
wpa_drv_set_ap_wps_ie(wpa_s, NULL, probe_resp_ie);
wpa_drv_set_ap_wps_ie(wpa_s, NULL, probe_resp_ie, NULL);
if (wpa_drv_probe_req_report(wpa_s, 1) < 0) {
wpa_printf(MSG_DEBUG, "P2P: Failed to request the driver to "