diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-09-25 19:46:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:38 -0400 |
commit | 75388acd0cd827dc1498043daa7d1c760902cd67 (patch) | |
tree | 43fac7501291145963444e439f2ff30b9e5726e3 /drivers/net/wireless/b43legacy/leds.h | |
parent | e4d6b7951812d98417feb10784e400e253caf633 (diff) |
[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43legacy/leds.h')
-rw-r--r-- | drivers/net/wireless/b43legacy/leds.h | 56 |
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 | |||
8 | struct 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 | ||
27 | enum { /* 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 | |||
51 | int b43legacy_leds_init(struct b43legacy_wldev *dev); | ||
52 | void b43legacy_leds_exit(struct b43legacy_wldev *dev); | ||
53 | void b43legacy_leds_update(struct b43legacy_wldev *dev, int activity); | ||
54 | void b43legacy_leds_switch_all(struct b43legacy_wldev *dev, int on); | ||
55 | |||
56 | #endif /* B43legacy_LEDS_H_ */ | ||