| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 1 | #ifndef B43legacy_LEDS_H_ | 
|  | 2 | #define B43legacy_LEDS_H_ | 
|  | 3 |  | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 4 | struct b43legacy_wldev; | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 5 |  | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 6 | #ifdef CONFIG_B43LEGACY_LEDS | 
|  | 7 |  | 
|  | 8 | #include <linux/types.h> | 
|  | 9 | #include <linux/leds.h> | 
|  | 10 |  | 
|  | 11 |  | 
|  | 12 | #define B43legacy_LED_MAX_NAME_LEN	31 | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 13 |  | 
|  | 14 | struct b43legacy_led { | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 15 | struct b43legacy_wldev *dev; | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 16 | /* The LED class device */ | 
|  | 17 | struct led_classdev led_dev; | 
|  | 18 | /* The index number of the LED. */ | 
|  | 19 | u8 index; | 
|  | 20 | /* If activelow is true, the LED is ON if the | 
|  | 21 | * bit is switched off. */ | 
|  | 22 | bool activelow; | 
|  | 23 | /* The unique name string for this LED device. */ | 
|  | 24 | char name[B43legacy_LED_MAX_NAME_LEN + 1]; | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 25 | }; | 
|  | 26 |  | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 27 | #define B43legacy_LED_BEHAVIOUR		0x7F | 
|  | 28 | #define B43legacy_LED_ACTIVELOW		0x80 | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 29 | /* LED behaviour values */ | 
|  | 30 | enum b43legacy_led_behaviour { | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 31 | B43legacy_LED_OFF, | 
|  | 32 | B43legacy_LED_ON, | 
|  | 33 | B43legacy_LED_ACTIVITY, | 
|  | 34 | B43legacy_LED_RADIO_ALL, | 
|  | 35 | B43legacy_LED_RADIO_A, | 
|  | 36 | B43legacy_LED_RADIO_B, | 
|  | 37 | B43legacy_LED_MODE_BG, | 
|  | 38 | B43legacy_LED_TRANSFER, | 
|  | 39 | B43legacy_LED_APTRANSFER, | 
|  | 40 | B43legacy_LED_WEIRD, | 
|  | 41 | B43legacy_LED_ASSOC, | 
|  | 42 | B43legacy_LED_INACTIVE, | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 43 | }; | 
|  | 44 |  | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 45 | void b43legacy_leds_init(struct b43legacy_wldev *dev); | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 46 | void b43legacy_leds_exit(struct b43legacy_wldev *dev); | 
| Larry Finger | ba48f7b | 2007-10-12 23:04:51 -0500 | [diff] [blame] | 47 |  | 
|  | 48 | #else /* CONFIG_B43EGACY_LEDS */ | 
|  | 49 | /* LED support disabled */ | 
|  | 50 |  | 
|  | 51 | struct b43legacy_led { | 
|  | 52 | /* empty */ | 
|  | 53 | }; | 
|  | 54 |  | 
|  | 55 | static inline void b43legacy_leds_init(struct b43legacy_wldev *dev) | 
|  | 56 | { | 
|  | 57 | } | 
|  | 58 | static inline void b43legacy_leds_exit(struct b43legacy_wldev *dev) | 
|  | 59 | { | 
|  | 60 | } | 
|  | 61 | #endif /* CONFIG_B43LEGACY_LEDS */ | 
| Larry Finger | 75388ac | 2007-09-25 16:46:54 -0700 | [diff] [blame] | 62 |  | 
|  | 63 | #endif /* B43legacy_LEDS_H_ */ |