aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/leds.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-18 15:39:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:37 -0400
commite4d6b7951812d98417feb10784e400e253caf633 (patch)
tree4f653c52b4cffd5ade2eb166a56b306c9181ed08 /drivers/net/wireless/b43/leds.h
parent61e115a56d1aafd6e6a8a9fee8ac099a6128ac7b (diff)
[B43]: add mac80211-based driver for modern BCM43xx devices
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43/leds.h')
-rw-r--r--drivers/net/wireless/b43/leds.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/leds.h b/drivers/net/wireless/b43/leds.h
new file mode 100644
index 000000000000..36b46cfda220
--- /dev/null
+++ b/drivers/net/wireless/b43/leds.h
@@ -0,0 +1,55 @@
1#ifndef B43_LEDS_H_
2#define B43_LEDS_H_
3
4#include <linux/types.h>
5#include <linux/timer.h>
6
7struct b43_led {
8 u8 behaviour:7;
9 u8 activelow:1;
10
11 struct b43_wldev *dev;
12 struct timer_list blink_timer;
13 unsigned long blink_interval;
14};
15#define b43_led_index(led) ((int)((led) - (led)->dev->leds))
16
17/* Delay between state changes when blinking in jiffies */
18#define B43_LEDBLINK_SLOW (HZ / 1)
19#define B43_LEDBLINK_MEDIUM (HZ / 4)
20#define B43_LEDBLINK_FAST (HZ / 8)
21
22#define B43_LED_XFER_THRES (HZ / 100)
23
24#define B43_LED_BEHAVIOUR 0x7F
25#define B43_LED_ACTIVELOW 0x80
26enum { /* LED behaviour values */
27 B43_LED_OFF,
28 B43_LED_ON,
29 B43_LED_ACTIVITY,
30 B43_LED_RADIO_ALL,
31 B43_LED_RADIO_A,
32 B43_LED_RADIO_B,
33 B43_LED_MODE_BG,
34 B43_LED_TRANSFER,
35 B43_LED_APTRANSFER,
36 B43_LED_WEIRD, //FIXME
37 B43_LED_ASSOC,
38 B43_LED_INACTIVE,
39
40 /* Behaviour values for testing.
41 * With these values it is easier to figure out
42 * the real behaviour of leds, in case the SPROM
43 * is missing information.
44 */
45 B43_LED_TEST_BLINKSLOW,
46 B43_LED_TEST_BLINKMEDIUM,
47 B43_LED_TEST_BLINKFAST,
48};
49
50int b43_leds_init(struct b43_wldev *dev);
51void b43_leds_exit(struct b43_wldev *dev);
52void b43_leds_update(struct b43_wldev *dev, int activity);
53void b43_leds_switch_all(struct b43_wldev *dev, int on);
54
55#endif /* B43_LEDS_H_ */