Initial commit
[wrt350n-kernel.git] / drivers / net / wireless / bcm43xx / bcm43xx_leds.h
blob811e14a81198f13f521af60872566e734ffef9d4
1 #ifndef BCM43xx_LEDS_H_
2 #define BCM43xx_LEDS_H_
4 #include <linux/types.h>
5 #include <linux/timer.h>
8 struct bcm43xx_led {
9 u8 behaviour:7;
10 u8 activelow:1;
12 struct bcm43xx_private *bcm;
13 struct timer_list blink_timer;
14 unsigned long blink_interval;
16 #define bcm43xx_led_index(led) ((int)((led) - (led)->bcm->leds))
18 /* Delay between state changes when blinking in jiffies */
19 #define BCM43xx_LEDBLINK_SLOW (HZ / 1)
20 #define BCM43xx_LEDBLINK_MEDIUM (HZ / 4)
21 #define BCM43xx_LEDBLINK_FAST (HZ / 8)
23 #define BCM43xx_LED_XFER_THRES (HZ / 100)
25 #define BCM43xx_LED_BEHAVIOUR 0x7F
26 #define BCM43xx_LED_ACTIVELOW 0x80
27 enum { /* LED behaviour values */
28 BCM43xx_LED_OFF,
29 BCM43xx_LED_ON,
30 BCM43xx_LED_ACTIVITY,
31 BCM43xx_LED_RADIO_ALL,
32 BCM43xx_LED_RADIO_A,
33 BCM43xx_LED_RADIO_B,
34 BCM43xx_LED_MODE_BG,
35 BCM43xx_LED_TRANSFER,
36 BCM43xx_LED_APTRANSFER,
37 BCM43xx_LED_WEIRD,//FIXME
38 BCM43xx_LED_ASSOC,
39 BCM43xx_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 BCM43xx_LED_TEST_BLINKSLOW,
47 BCM43xx_LED_TEST_BLINKMEDIUM,
48 BCM43xx_LED_TEST_BLINKFAST,
50 /* Misc values for BCM4303 */
51 BCM43xx_LED_BCM4303_0 = 0x2B,
52 BCM43xx_LED_BCM4303_1 = 0x78,
53 BCM43xx_LED_BCM4303_2 = 0x2E,
54 BCM43xx_LED_BCM4303_3 = 0x19,
57 int bcm43xx_leds_init(struct bcm43xx_private *bcm);
58 void bcm43xx_leds_exit(struct bcm43xx_private *bcm);
59 void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity);
60 void bcm43xx_leds_switch_all(struct bcm43xx_private *bcm, int on);
62 #endif /* BCM43xx_LEDS_H_ */