1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef B43legacy_LEDS_H_
3 #define B43legacy_LEDS_H_
5 struct b43legacy_wldev
;
7 #ifdef CONFIG_B43LEGACY_LEDS
9 #include <linux/types.h>
10 #include <linux/leds.h>
13 #define B43legacy_LED_MAX_NAME_LEN 31
15 struct b43legacy_led
{
16 struct b43legacy_wldev
*dev
;
17 /* The LED class device */
18 struct led_classdev led_dev
;
19 /* The index number of the LED. */
21 /* If activelow is true, the LED is ON if the
22 * bit is switched off. */
24 /* The unique name string for this LED device. */
25 char name
[B43legacy_LED_MAX_NAME_LEN
+ 1];
28 #define B43legacy_LED_BEHAVIOUR 0x7F
29 #define B43legacy_LED_ACTIVELOW 0x80
30 /* LED behaviour values */
31 enum b43legacy_led_behaviour
{
34 B43legacy_LED_ACTIVITY
,
35 B43legacy_LED_RADIO_ALL
,
36 B43legacy_LED_RADIO_A
,
37 B43legacy_LED_RADIO_B
,
38 B43legacy_LED_MODE_BG
,
39 B43legacy_LED_TRANSFER
,
40 B43legacy_LED_APTRANSFER
,
43 B43legacy_LED_INACTIVE
,
46 void b43legacy_leds_init(struct b43legacy_wldev
*dev
);
47 void b43legacy_leds_exit(struct b43legacy_wldev
*dev
);
49 #else /* CONFIG_B43LEGACY_LEDS */
50 /* LED support disabled */
52 struct b43legacy_led
{
56 static inline void b43legacy_leds_init(struct b43legacy_wldev
*dev
)
59 static inline void b43legacy_leds_exit(struct b43legacy_wldev
*dev
)
62 #endif /* CONFIG_B43LEGACY_LEDS */
64 #endif /* B43legacy_LEDS_H_ */