From: Jouni Malinen Date: Fri, 1 Nov 2013 09:58:52 +0000 (+0200) Subject: AOSP: nl80211 use_monitor hack X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aec9e647dab45c87511f822f6f9468800ec6f3b1;p=thirdparty%2Fhostap.git AOSP: nl80211 use_monitor hack This was somehow hidden in this AOSP commit (it was not from the upstream repository..): commit 04949598a23f501be6eec21697465fd46a28840a Author: Dmitry Shmidt Date: Thu Jul 19 12:16:46 2012 -0700 wpa_supplicant: Update to 07-Jul-2012 TOT commit a5ed45586c63ffd8f9d2b44e27c251d7bacbeaf4 Author: Jouni Malinen 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 --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 94e3673e0..44d002b0f 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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) { /*