diff options
author | Peter Denison <openwrt@marshadder.org> | 2007-06-21 20:45:45 +0000 |
---|---|---|
committer | Peter Denison <openwrt@marshadder.org> | 2007-06-21 20:45:45 +0000 |
commit | 45a0adebf92dae844fde1588b452183c409cb0ea (patch) | |
tree | d12a3cdaab17b15bb700d369b9ba0cfc2a157621 /package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h | |
parent | 65f00ab51a3d380ca9d87f35426a076a7f291e04 (diff) | |
download | master-31e0f0ae-45a0adebf92dae844fde1588b452183c409cb0ea.tar.gz master-31e0f0ae-45a0adebf92dae844fde1588b452183c409cb0ea.tar.bz2 master-31e0f0ae-45a0adebf92dae844fde1588b452183c409cb0ea.zip |
New: mac80211-based bcm43xx driver from the wireless-dev tree
SVN-Revision: 7693
Diffstat (limited to 'package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h')
-rw-r--r-- | package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h b/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h new file mode 100644 index 0000000000..ad35047a55 --- /dev/null +++ b/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_leds.h @@ -0,0 +1,56 @@ +#ifndef BCM43xx_LEDS_H_ +#define BCM43xx_LEDS_H_ + +#include <linux/types.h> +#include <linux/timer.h> + + +struct bcm43xx_led { + u8 behaviour:7; + u8 activelow:1; + + struct bcm43xx_wldev *dev; + struct timer_list blink_timer; + unsigned long blink_interval; +}; +#define bcm43xx_led_index(led) ((int)((led) - (led)->dev->leds)) + +/* Delay between state changes when blinking in jiffies */ +#define BCM43xx_LEDBLINK_SLOW (HZ / 1) +#define BCM43xx_LEDBLINK_MEDIUM (HZ / 4) +#define BCM43xx_LEDBLINK_FAST (HZ / 8) + +#define BCM43xx_LED_XFER_THRES (HZ / 100) + +#define BCM43xx_LED_BEHAVIOUR 0x7F +#define BCM43xx_LED_ACTIVELOW 0x80 +enum { /* LED behaviour values */ + BCM43xx_LED_OFF, + BCM43xx_LED_ON, + BCM43xx_LED_ACTIVITY, + BCM43xx_LED_RADIO_ALL, + BCM43xx_LED_RADIO_A, + BCM43xx_LED_RADIO_B, + BCM43xx_LED_MODE_BG, + BCM43xx_LED_TRANSFER, + BCM43xx_LED_APTRANSFER, + BCM43xx_LED_WEIRD,//FIXME + BCM43xx_LED_ASSOC, + BCM43xx_LED_INACTIVE, + + /* Behaviour values for testing. + * With these values it is easier to figure out + * the real behaviour of leds, in case the SPROM + * is missing information. + */ + BCM43xx_LED_TEST_BLINKSLOW, + BCM43xx_LED_TEST_BLINKMEDIUM, + BCM43xx_LED_TEST_BLINKFAST, +}; + +int bcm43xx_leds_init(struct bcm43xx_wldev *dev); +void bcm43xx_leds_exit(struct bcm43xx_wldev *dev); +void bcm43xx_leds_update(struct bcm43xx_wldev *dev, int activity); +void bcm43xx_leds_switch_all(struct bcm43xx_wldev *dev, int on); + +#endif /* BCM43xx_LEDS_H_ */ |