Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 801d929c authored by Felix Fietkau's avatar Felix Fietkau Committed by Johannes Berg
Browse files

mac80211: another fix for idle handling in monitor mode



When setting a monitor interface up or down, the idle state needs to be
recalculated, otherwise the hardware will just stay in its previous idle
state.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 24af717c
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -541,6 +541,9 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)


		ieee80211_adjust_monitor_flags(sdata, 1);
		ieee80211_adjust_monitor_flags(sdata, 1);
		ieee80211_configure_filter(local);
		ieee80211_configure_filter(local);
		mutex_lock(&local->mtx);
		ieee80211_recalc_idle(local);
		mutex_unlock(&local->mtx);


		netif_carrier_on(dev);
		netif_carrier_on(dev);
		break;
		break;
@@ -812,6 +815,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,


		ieee80211_adjust_monitor_flags(sdata, -1);
		ieee80211_adjust_monitor_flags(sdata, -1);
		ieee80211_configure_filter(local);
		ieee80211_configure_filter(local);
		mutex_lock(&local->mtx);
		ieee80211_recalc_idle(local);
		mutex_unlock(&local->mtx);
		break;
		break;
	case NL80211_IFTYPE_P2P_DEVICE:
	case NL80211_IFTYPE_P2P_DEVICE:
		/* relies on synchronize_rcu() below */
		/* relies on synchronize_rcu() below */