]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: nl80211: device_ap_sme/use_monitor changes
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 10:36:37 +0000 (12:36 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:09 +0000 (16:36 +0200)
These came as part of this AOSP commit:

commit b638fe75d3cb9d21c67386173f10afe65053cc4d
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Mar 20 12:51:25 2012 -0700

    nl80211: Use native cfg80211 sta events

    Change-Id: Id59cc4af50dbccd283db2ec3e7b0b6f8c2146e68
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/drivers/driver_nl80211.c

index 67589c88f965ce666e719fb1ec9de00782ce04b6..366627fc128eeda0ff0334dacdfa846b831f9ccc 100644 (file)
@@ -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 +