1 #ifndef B43legacy_LEDS_H_
2 #define B43legacy_LEDS_H_
4 #include <linux/types.h>
5 #include <linux/timer.h>
11 /* Index in the "leds" array in b43legacy_wldev */
13 struct b43legacy_wldev
*dev
;
14 struct timer_list blink_timer
;
15 unsigned long blink_interval
;
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)
23 #define B43legacy_LED_XFER_THRES (HZ / 100)
25 #define B43legacy_LED_BEHAVIOUR 0x7F
26 #define B43legacy_LED_ACTIVELOW 0x80
27 enum { /* LED behaviour values */
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
,
39 B43legacy_LED_INACTIVE
,
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.
46 B43legacy_LED_TEST_BLINKSLOW
,
47 B43legacy_LED_TEST_BLINKMEDIUM
,
48 B43legacy_LED_TEST_BLINKFAST
,
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
);
56 #endif /* B43legacy_LEDS_H_ */