diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-11-30 08:59:23 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-22 14:33:37 -0500 |
commit | 67408c8c7b9daf28b50e33be3541334c07d15789 (patch) | |
tree | ac11ea966add7f7187274fcf9e647c5227099108 /net/mac80211/iface.c | |
parent | e1e5406854378dfada3f33c7192b012083a5b8e0 (diff) | |
download | linux-stable-67408c8c7b9daf28b50e33be3541334c07d15789.tar.gz linux-stable-67408c8c7b9daf28b50e33be3541334c07d15789.tar.bz2 linux-stable-67408c8c7b9daf28b50e33be3541334c07d15789.zip |
mac80211: selective throughput LED trigger active
The throughput LED trigger was always active when
the radio was enabled. In most cases that's likely
the desired behaviour, but iwlwifi requires it to
be only active when one of the virtual interfaces
is actually "connected" in some way.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 989df7065c21..b6db237672ff 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -220,7 +220,8 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) /* we're brought up, everything changes */ hw_reconf_flags = ~0; ieee80211_led_radio(local, true); - ieee80211_start_tpt_led_trig(local); + ieee80211_mod_tpt_led_trig(local, + IEEE80211_TPT_LEDTRIG_FL_RADIO, 0); } /* @@ -1265,6 +1266,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) int count = 0; bool working = false, scanning = false; struct ieee80211_work *wk; + unsigned int led_trig_start = 0, led_trig_stop = 0; #ifdef CONFIG_PROVE_LOCKING WARN_ON(debug_locks && !lockdep_rtnl_is_held() && @@ -1314,6 +1316,18 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); } + if (working || scanning) + led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; + else + led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; + + if (count) + led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED; + else + led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED; + + ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); + if (working) return ieee80211_idle_off(local, "working"); if (scanning) |