diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-04-23 12:19:22 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-05-05 14:21:56 +0200 |
commit | 8d5c25856859bd826aca4b88103552a80b344cef (patch) | |
tree | ef166e18c83c91618e208e9726084ab77acd388c /net/mac80211/main.c | |
parent | f5c4ae07992ca64d8628a11439c184baf5595e4b (diff) |
mac80211: make LED triggering depend on activation
When LED triggers are compiled in, but not used, mac80211 will still
call them to update the status. This isn't really a problem for the
assoc and radio ones, but the TX/RX (and to a certain extend TPT)
ones can be called very frequently (for every packet.)
In order to avoid that when they're not used, track their activation
and call the corresponding trigger (and in the TPT case, account for
throughput) only when the trigger is actually used by an LED.
Additionally, make those trigger functions inlines since theyre only
used once in the remaining code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index b144de971366..effe9d39cd7e 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -643,7 +643,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, skb_queue_head_init(&local->skb_queue); skb_queue_head_init(&local->skb_queue_unreliable); - ieee80211_led_names(local); + ieee80211_alloc_led_names(local); ieee80211_roc_setup(local); @@ -1207,6 +1207,8 @@ void ieee80211_free_hw(struct ieee80211_hw *hw) sta_info_stop(local); + ieee80211_free_led_names(local); + wiphy_free(local->hw.wiphy); } EXPORT_SYMBOL(ieee80211_free_hw); |