aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/leds.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-09-11 15:44:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-23 11:35:43 -0400
commita78b3bb2f3ab9afcf78dbcff18fd7bf900c7c27e (patch)
tree708cf458e4b2c97c26fad18aea8693599723212c /drivers/net/wireless/b43/leds.h
parent90c215c47675be42f164a4bac282666753e09225 (diff)
b43: Rewrite suspend/resume code
This removes most of the b43 suspend/resume code (it's handled by mac80211) and moves the registration of devices to the attachment phase. This is required, because we must not register/unregister devices on suspend/resume. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/leds.h')
-rw-r--r--drivers/net/wireless/b43/leds.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/leds.h b/drivers/net/wireless/b43/leds.h
index b8b1dd521243..c4a58a0fc1d5 100644
--- a/drivers/net/wireless/b43/leds.h
+++ b/drivers/net/wireless/b43/leds.h
@@ -7,12 +7,13 @@ struct b43_wldev;
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/leds.h> 9#include <linux/leds.h>
10#include <linux/workqueue.h>
10 11
11 12
12#define B43_LED_MAX_NAME_LEN 31 13#define B43_LED_MAX_NAME_LEN 31
13 14
14struct b43_led { 15struct b43_led {
15 struct b43_wldev *dev; 16 struct b43_wl *wl;
16 /* The LED class device */ 17 /* The LED class device */
17 struct led_classdev led_dev; 18 struct led_classdev led_dev;
18 /* The index number of the LED. */ 19 /* The index number of the LED. */
@@ -22,8 +23,23 @@ struct b43_led {
22 bool activelow; 23 bool activelow;
23 /* The unique name string for this LED device. */ 24 /* The unique name string for this LED device. */
24 char name[B43_LED_MAX_NAME_LEN + 1]; 25 char name[B43_LED_MAX_NAME_LEN + 1];
26 /* The current status of the LED. This is updated locklessly. */
27 atomic_t state;
28 /* The active state in hardware. */
29 bool hw_state;
25}; 30};
26 31
32struct b43_leds {
33 struct b43_led led_tx;
34 struct b43_led led_rx;
35 struct b43_led led_radio;
36 struct b43_led led_assoc;
37
38 struct work_struct work;
39};
40
41#define B43_MAX_NR_LEDS 4
42
27#define B43_LED_BEHAVIOUR 0x7F 43#define B43_LED_BEHAVIOUR 0x7F
28#define B43_LED_ACTIVELOW 0x80 44#define B43_LED_ACTIVELOW 0x80
29/* LED behaviour values */ 45/* LED behaviour values */
@@ -42,6 +58,8 @@ enum b43_led_behaviour {
42 B43_LED_INACTIVE, 58 B43_LED_INACTIVE,
43}; 59};
44 60
61void b43_leds_register(struct b43_wldev *dev);
62void b43_leds_unregister(struct b43_wldev *dev);
45void b43_leds_init(struct b43_wldev *dev); 63void b43_leds_init(struct b43_wldev *dev);
46void b43_leds_exit(struct b43_wldev *dev); 64void b43_leds_exit(struct b43_wldev *dev);
47 65
@@ -49,10 +67,16 @@ void b43_leds_exit(struct b43_wldev *dev);
49#else /* CONFIG_B43_LEDS */ 67#else /* CONFIG_B43_LEDS */
50/* LED support disabled */ 68/* LED support disabled */
51 69
52struct b43_led { 70struct b43_leds {
53 /* empty */ 71 /* empty */
54}; 72};
55 73
74static inline void b43_leds_register(struct b43_wldev *dev)
75{
76}
77static inline void b43_leds_unregister(struct b43_wldev *dev)
78{
79}
56static inline void b43_leds_init(struct b43_wldev *dev) 80static inline void b43_leds_init(struct b43_wldev *dev)
57{ 81{
58} 82}