Patchwork [5/5] hostap: use the monitor interface if socket tx status is not supported

login
register
mail settings
Submitter Felix Fietkau
Date Sept. 14, 2012, 1:12 p.m.
Message ID <1347628349-34362-5-git-send-email-nbd@openwrt.org>
Download mbox | patch
Permalink /patch/183917/
State Accepted
Commit 73a3c6ffca0c0292289c4fc598402b4227c85faf
Headers show

Comments

Felix Fietkau - Sept. 14, 2012, 1:12 p.m.
Fixes hostapd on recent compat-wireless builds with older kernels

Signed-hostap: Felix Fietkau <nbd@openwrt.org>
---
 src/drivers/driver_nl80211.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Jouni Malinen - Sept. 23, 2012, 10:29 a.m.
On Fri, Sep 14, 2012 at 03:12:29PM +0200, Felix Fietkau wrote:
> Fixes hostapd on recent compat-wireless builds with older kernels

Thanks, applied.

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 66389da..a5659c9 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2661,10 +2661,10 @@  static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
 	drv->data_tx_status = info.data_tx_status;
 
 	/*
-	 * If poll command is supported mac80211 is new enough to
-	 * have everything we need to not need monitor interfaces.
+	 * 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;
+	drv->use_monitor = !info.poll_command_supported || !info.data_tx_status;
 
 	if (drv->device_ap_sme && drv->use_monitor) {
 		/*