Skip to contentSkip to conversation

mac80211: fix idle handling in monitor mode

PATCH Applied Felix Fietkau 2 participants 2 messages Feb 23, 2013 – Feb 26, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/mac80211/iface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/iface.c +1 -1
index 2c059e5..640afab 100644
@@ -107,7 +107,7 @@ void ieee80211_recalc_idle(struct ieee80211_local *local)
 
 	lockdep_assert_held(&local->mtx);
 
-	active = !list_empty(&local->chanctx_list);
+	active = !list_empty(&local->chanctx_list) || local->monitors;
 
 	if (!local->ops->remain_on_channel) {
 		list_for_each_entry(roc, &local->roc_list, list) {
Signature · 1 line
1.8.0.2
maintainer Applied
#1 lore raw
Quoted 6 lines · Felix Fietkau

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.

Applied.

johannes