blob: adffc503a6a191fe2192995cba18159e8a894cd7 [file] [log] [blame]
Larry Finger93bb7f32007-10-10 22:44:22 -05001#ifndef B43legacy_RFKILL_H_
2#define B43legacy_RFKILL_H_
3
4struct b43legacy_wldev;
5
6#ifdef CONFIG_B43LEGACY_RFKILL
7
8#include <linux/rfkill.h>
Larry Finger6be50832007-10-10 22:48:17 -05009
Larry Finger93bb7f32007-10-10 22:44:22 -050010
11
12struct b43legacy_rfkill {
13 /* The RFKILL subsystem data structure */
14 struct rfkill *rfkill;
Stefano Briviodb9683f2007-11-06 22:48:45 +010015 /* Did initialization succeed? Used for freeing. */
16 bool registered;
Larry Finger93bb7f32007-10-10 22:44:22 -050017 /* The unique name of this rfkill switch */
Stefano Briviodb9683f2007-11-06 22:48:45 +010018 char name[sizeof("b43legacy-phy4294967295")];
Larry Finger93bb7f32007-10-10 22:44:22 -050019};
20
Stefano Briviodb9683f2007-11-06 22:48:45 +010021/* The init function returns void, because we are not interested
Larry Finger6be50832007-10-10 22:48:17 -050022 * in failing the b43 init process when rfkill init failed. */
Larry Finger93bb7f32007-10-10 22:44:22 -050023void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
24void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
Larry Finger6be50832007-10-10 22:48:17 -050025
Johannes Berg19d337d2009-06-02 13:01:37 +020026const char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev);
Larry Finger93bb7f32007-10-10 22:44:22 -050027
28
29#else /* CONFIG_B43LEGACY_RFKILL */
30/* No RFKILL support. */
31
32struct b43legacy_rfkill {
33 /* empty */
34};
35
Larry Finger6be50832007-10-10 22:48:17 -050036static inline void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev)
37{
38}
39static inline void b43legacy_rfkill_free(struct b43legacy_wldev *dev)
40{
41}
Larry Finger93bb7f32007-10-10 22:44:22 -050042static inline void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
43{
44}
45static inline void b43legacy_rfkill_exit(struct b43legacy_wldev *dev)
46{
47}
Jeff Garzik93a3b602007-11-23 21:50:20 -050048static inline char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev)
Larry Finger93bb7f32007-10-10 22:44:22 -050049{
50 return NULL;
51}
52
53#endif /* CONFIG_B43LEGACY_RFKILL */
54
55#endif /* B43legacy_RFKILL_H_ */