Search Linux Wireless

[RFC] mac80211: avoid recalc_idle in monitor mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ath9k is not receiving frames in monitor mode after the commit 34d4bc.
The problem is mac80211 sets IEEE80211_CONF_IDLE in __ieee80211_recalc_idle
at ieee80211_do_open. Due to this, ath9k disables the radio.

The above said commit sets SDATA_STATE_RUNNING after __ieee80211_recalc_idle.
IMHO avoiding __ieee80211_recalc_idle in monitor mode looks better
than moving SDATA_STATE_RUNNING set before __ieee80211_recalc_idle.

Signed-off-by: Rajkumar Manoharan <rmanoharan@xxxxxxxxxxx>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@xxxxxxxxxxx>
---
 net/mac80211/iface.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index c1cc200..2bec319 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -310,9 +310,11 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
 	if (sdata->flags & IEEE80211_SDATA_PROMISC)
 		atomic_inc(&local->iff_promiscs);
 
-	mutex_lock(&local->mtx);
-	hw_reconf_flags |= __ieee80211_recalc_idle(local);
-	mutex_unlock(&local->mtx);
+	if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
+		mutex_lock(&local->mtx);
+		hw_reconf_flags |= __ieee80211_recalc_idle(local);
+		mutex_unlock(&local->mtx);
+	}
 
 	if (coming_up)
 		local->open_count++;
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux