aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-30 02:59:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-22 14:33:37 -0500
commit67408c8c7b9daf28b50e33be3541334c07d15789 (patch)
treeac11ea966add7f7187274fcf9e647c5227099108 /net/mac80211/iface.c
parente1e5406854378dfada3f33c7192b012083a5b8e0 (diff)
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.c16
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)
220 /* we're brought up, everything changes */ 220 /* we're brought up, everything changes */
221 hw_reconf_flags = ~0; 221 hw_reconf_flags = ~0;
222 ieee80211_led_radio(local, true); 222 ieee80211_led_radio(local, true);
223 ieee80211_start_tpt_led_trig(local); 223 ieee80211_mod_tpt_led_trig(local,
224 IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);
224 } 225 }
225 226
226 /* 227 /*
@@ -1265,6 +1266,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1265 int count = 0; 1266 int count = 0;
1266 bool working = false, scanning = false; 1267 bool working = false, scanning = false;
1267 struct ieee80211_work *wk; 1268 struct ieee80211_work *wk;
1269 unsigned int led_trig_start = 0, led_trig_stop = 0;
1268 1270
1269#ifdef CONFIG_PROVE_LOCKING 1271#ifdef CONFIG_PROVE_LOCKING
1270 WARN_ON(debug_locks && !lockdep_rtnl_is_held() && 1272 WARN_ON(debug_locks && !lockdep_rtnl_is_held() &&
@@ -1314,6 +1316,18 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1314 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); 1316 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
1315 } 1317 }
1316 1318
1319 if (working || scanning)
1320 led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
1321 else
1322 led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
1323
1324 if (count)
1325 led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
1326 else
1327 led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
1328
1329 ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);
1330
1317 if (working) 1331 if (working)
1318 return ieee80211_idle_off(local, "working"); 1332 return ieee80211_idle_off(local, "working");
1319 if (scanning) 1333 if (scanning)