aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-30 02:58:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-22 14:33:37 -0500
commite1e5406854378dfada3f33c7192b012083a5b8e0 (patch)
treee878058f28b8f6db50ef5d73d09aed66dd9ad9f2 /net/mac80211/ieee80211_i.h
parentfe67c913f1ec2a01aaa9176c80ef36eaf87d705d (diff)
mac80211: add throughput based LED blink trigger
iwlwifi and other drivers like to blink their LED based on throughput. Implement this generically in mac80211, based on a throughput table the driver specifies. That way, drivers can set the blink frequencies depending on their desired behaviour and max throughput. All the drivers need to do is provide an LED class device, best with blink hardware offload. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index eadaa243a3da..523b90be8dc5 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -23,6 +23,7 @@
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/etherdevice.h> 25#include <linux/etherdevice.h>
26#include <linux/leds.h>
26#include <net/ieee80211_radiotap.h> 27#include <net/ieee80211_radiotap.h>
27#include <net/cfg80211.h> 28#include <net/cfg80211.h>
28#include <net/mac80211.h> 29#include <net/mac80211.h>
@@ -630,6 +631,17 @@ enum queue_stop_reason {
630 IEEE80211_QUEUE_STOP_REASON_SKB_ADD, 631 IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
631}; 632};
632 633
634struct tpt_led_trigger {
635 struct led_trigger trig;
636 char name[32];
637 const struct ieee80211_tpt_blink *blink_table;
638 unsigned int blink_table_len;
639 struct timer_list timer;
640 bool running;
641 unsigned long prev_traffic;
642 unsigned long tx_bytes, rx_bytes;
643};
644
633/** 645/**
634 * mac80211 scan flags - currently active scan mode 646 * mac80211 scan flags - currently active scan mode
635 * 647 *
@@ -838,6 +850,7 @@ struct ieee80211_local {
838#ifdef CONFIG_MAC80211_LEDS 850#ifdef CONFIG_MAC80211_LEDS
839 int tx_led_counter, rx_led_counter; 851 int tx_led_counter, rx_led_counter;
840 struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led; 852 struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
853 struct tpt_led_trigger *tpt_led_trigger;
841 char tx_led_name[32], rx_led_name[32], 854 char tx_led_name[32], rx_led_name[32],
842 assoc_led_name[32], radio_led_name[32]; 855 assoc_led_name[32], radio_led_name[32];
843#endif 856#endif