aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2013-02-23 11:40:57 -0600
committerJohannes Berg2013-02-26 14:53:01 -0600
commitb759f4ddcafb6414056cf3e49f2ab12359101c2e (patch)
tree79dcf58cb041956eafe8ca8a07321e48581e1ec5
parenta7679ed5a0e92c87eeef33ae463e39a843561836 (diff)
downloadam43-linux-kernel-b759f4ddcafb6414056cf3e49f2ab12359101c2e.tar.gz
am43-linux-kernel-b759f4ddcafb6414056cf3e49f2ab12359101c2e.tar.xz
am43-linux-kernel-b759f4ddcafb6414056cf3e49f2ab12359101c2e.zip
mac80211: fix idle handling in monitor mode
When the driver does not want a monitor mode VIF, no channel context is allocated for it. This causes ieee80211_recalc_idle to put the hardware into idle mode if only a monitor mode is active, breaking injection. Fix this by checking local->monitors in addition to active channel contexts. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/iface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 2c059e54e88..640afab304d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -107,7 +107,7 @@ void ieee80211_recalc_idle(struct ieee80211_local *local)
107 107
108 lockdep_assert_held(&local->mtx); 108 lockdep_assert_held(&local->mtx);
109 109
110 active = !list_empty(&local->chanctx_list); 110 active = !list_empty(&local->chanctx_list) || local->monitors;
111 111
112 if (!local->ops->remain_on_channel) { 112 if (!local->ops->remain_on_channel) {
113 list_for_each_entry(roc, &local->roc_list, list) { 113 list_for_each_entry(roc, &local->roc_list, list) {