aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/leds.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43legacy/leds.h')
-rw-r--r--drivers/net/wireless/b43legacy/leds.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43legacy/leds.h b/drivers/net/wireless/b43legacy/leds.h
new file mode 100644
index 000000000000..b989f503e684
--- /dev/null
+++ b/drivers/net/wireless/b43legacy/leds.h
@@ -0,0 +1,56 @@
1#ifndef B43legacy_LEDS_H_
2#define B43legacy_LEDS_H_
3
4#include <linux/types.h>
5#include <linux/timer.h>
6
7
8struct b43legacy_led {
9 u8 behaviour;
10 bool activelow;
11 /* Index in the "leds" array in b43legacy_wldev */
12 u8 index;
13 struct b43legacy_wldev *dev;
14 struct timer_list blink_timer;
15 unsigned long blink_interval;
16};
17
18/* Delay between state changes when blinking in jiffies */
19#define B43legacy_LEDBLINK_SLOW (HZ / 1)
20#define B43legacy_LEDBLINK_MEDIUM (HZ / 4)
21#define B43legacy_LEDBLINK_FAST (HZ / 8)
22
23#define B43legacy_LED_XFER_THRES (HZ / 100)
24
25#define B43legacy_LED_BEHAVIOUR 0x7F
26#define B43legacy_LED_ACTIVELOW 0x80
27enum { /* LED behaviour values */
28 B43legacy_LED_OFF,
29 B43legacy_LED_ON,
30 B43legacy_LED_ACTIVITY,
31 B43legacy_LED_RADIO_ALL,
32 B43legacy_LED_RADIO_A,
33 B43legacy_LED_RADIO_B,
34 B43legacy_LED_MODE_BG,
35 B43legacy_LED_TRANSFER,
36 B43legacy_LED_APTRANSFER,
37 B43legacy_LED_WEIRD,
38 B43legacy_LED_ASSOC,
39 B43legacy_LED_INACTIVE,
40
41 /* Behaviour values for testing.
42 * With these values it is easier to figure out
43 * the real behaviour of leds, in case the SPROM
44 * is missing information.
45 */
46 B43legacy_LED_TEST_BLINKSLOW,
47 B43legacy_LED_TEST_BLINKMEDIUM,
48 B43legacy_LED_TEST_BLINKFAST,
49};
50
51int b43legacy_leds_init(struct b43legacy_wldev *dev);
52void b43legacy_leds_exit(struct b43legacy_wldev *dev);
53void b43legacy_leds_update(struct b43legacy_wldev *dev, int activity);
54void b43legacy_leds_switch_all(struct b43legacy_wldev *dev, int on);
55
56#endif /* B43legacy_LEDS_H_ */