From: Jouni Malinen Date: Mon, 17 Oct 2011 18:30:44 +0000 (+0300) Subject: Add Ext Capab and Interworking elements to extra IEs X-Git-Tag: hostap-1-bp~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a194b06c814468ae68192b76b9d6e0e7b40ec353;p=thirdparty%2Fhostap.git Add Ext Capab and Interworking elements to extra IEs These need to be provided to drivers that implement SME/MLME. --- diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 77d6834f4..77d4909af 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -47,9 +47,28 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd, struct wpabuf **assocresp_ret) { struct wpabuf *beacon = NULL, *proberesp = NULL, *assocresp = NULL; + u8 buf[100], *pos; *beacon_ret = *proberesp_ret = *assocresp_ret = NULL; + pos = buf; + pos = hostapd_eid_ext_capab(hapd, pos); + if (pos != buf) { + if (wpabuf_resize(&assocresp, pos - buf) != 0) + goto fail; + wpabuf_put_data(assocresp, buf, pos - buf); + } + pos = hostapd_eid_interworking(hapd, pos); + if (pos != buf) { + if (wpabuf_resize(&beacon, pos - buf) != 0) + goto fail; + wpabuf_put_data(beacon, buf, pos - buf); + + if (wpabuf_resize(&proberesp, pos - buf) != 0) + goto fail; + wpabuf_put_data(proberesp, buf, pos - buf); + } + if (hapd->wps_beacon_ie) { if (wpabuf_resize(&beacon, wpabuf_len(hapd->wps_beacon_ie)) < 0)