]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: nl80211 use_monitor hack
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 09:58:52 +0000 (11:58 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:35:14 +0000 (16:35 +0200)
This was somehow hidden in this AOSP commit (it was not from the
upstream repository..):

commit 04949598a23f501be6eec21697465fd46a28840a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Thu Jul 19 12:16:46 2012 -0700

    wpa_supplicant: Update to 07-Jul-2012 TOT

    commit a5ed45586c63ffd8f9d2b44e27c251d7bacbeaf4
    Author: Jouni Malinen <j@w1.fi>
    Date:   Sat Jul 7 13:01:45 2012 +0300

        WPS SSDP: Fix socket leaks on error paths

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

index 94e3673e0ac83f89e63123586470e3486cdcdd9f..44d002b0fa57297f26b76193c8f46b1cb174c551 100644 (file)
@@ -3336,11 +3336,20 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
        drv->poll_command_supported = info.poll_command_supported;
        drv->data_tx_status = info.data_tx_status;
 
+#ifdef ANDROID_P2P
+       if(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) {
+               /* Driver is new enough to support monitorless mode*/
+               wpa_printf(MSG_DEBUG, "nl80211: Driver is new "
+                         "enough to support monitor-less mode");
+               drv->use_monitor = 0;
+       }
+#else
        /*
         * If poll command and tx status are supported, mac80211 is new enough
         * to have everything we need to not need monitor interfaces.
         */
        drv->use_monitor = !info.poll_command_supported || !info.data_tx_status;
+#endif
 
        if (drv->device_ap_sme && drv->use_monitor) {
                /*