From: Jouni Malinen Date: Fri, 1 Nov 2013 10:36:37 +0000 (+0200) Subject: AOSP: nl80211: device_ap_sme/use_monitor changes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2271c97b08a3e472d89647c962197408f8f1f74d;p=thirdparty%2Fhostap.git AOSP: nl80211: device_ap_sme/use_monitor changes These came as part of this AOSP commit: commit b638fe75d3cb9d21c67386173f10afe65053cc4d Author: Dmitry Shmidt Date: Tue Mar 20 12:51:25 2012 -0700 nl80211: Use native cfg80211 sta events Change-Id: Id59cc4af50dbccd283db2ec3e7b0b6f8c2146e68 Signed-off-by: Dmitry Shmidt --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 67589c88f..366627fc1 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -7311,6 +7311,16 @@ static int nl80211_setup_ap(struct i802_bss *bss) !drv->device_ap_sme) return -1; +#ifdef ANDROID_P2P + if (drv->device_ap_sme && drv->use_monitor) + if (nl80211_mgmt_subscribe_ap_dev_sme(bss)) + return -1; + + if (drv->use_monitor && + nl80211_create_monitor_interface(drv)) + return -1; +#endif + if (drv->device_ap_sme && wpa_driver_nl80211_probe_req_report(bss, 1) < 0) { wpa_printf(MSG_DEBUG, "nl80211: Failed to enable " @@ -7380,8 +7390,11 @@ static int wpa_driver_nl80211_hapd_send_eapol( u8 *pos; int res; int qos = flags & WPA_STA_WMM; - +#ifndef ANDROID_P2P if (drv->device_ap_sme || !drv->use_monitor) +#else + if (drv->device_ap_sme && !drv->use_monitor) +#endif return nl80211_send_eapol_data(bss, addr, data, data_len); len = sizeof(*hdr) + (qos ? 2 : 0) + sizeof(rfc1042_header) + 2 +