blob: 11150a8032f0704152f0b58eb8c0b3198afa669c [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>
9#include <linux/workqueue.h>
Larry Finger6be50832007-10-10 22:48:17 -050010#include <linux/input-polldev.h>
11
Larry Finger93bb7f32007-10-10 22:44:22 -050012
13
14struct b43legacy_rfkill {
15 /* The RFKILL subsystem data structure */
16 struct rfkill *rfkill;
Larry Finger6be50832007-10-10 22:48:17 -050017 /* The poll device for the RFKILL input button */
18 struct input_polled_dev *poll_dev;
Stefano Briviodb9683fb12007-11-06 22:48:45 +010019 /* Did initialization succeed? Used for freeing. */
20 bool registered;
Larry Finger93bb7f32007-10-10 22:44:22 -050021 /* The unique name of this rfkill switch */
Stefano Briviodb9683fb12007-11-06 22:48:45 +010022 char name[sizeof("b43legacy-phy4294967295")];
Larry Finger93bb7f32007-10-10 22:44:22 -050023};
24
Stefano Briviodb9683fb12007-11-06 22:48:45 +010025/* The init function returns void, because we are not interested
Larry Finger6be50832007-10-10 22:48:17 -050026 * in failing the b43 init process when rfkill init failed. */
Larry Finger93bb7f32007-10-10 22:44:22 -050027void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
28void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
Larry Finger6be50832007-10-10 22:48:17 -050029
Jeff Garzik93a3b602007-11-23 21:50:20 -050030char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev);
Larry Finger93bb7f32007-10-10 22:44:22 -050031
32
33#else /* CONFIG_B43LEGACY_RFKILL */
34/* No RFKILL support. */
35
36struct b43legacy_rfkill {
37 /* empty */
38};
39
Larry Finger6be50832007-10-10 22:48:17 -050040static inline void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev)
41{
42}
43static inline void b43legacy_rfkill_free(struct b43legacy_wldev *dev)
44{
45}
Larry Finger93bb7f32007-10-10 22:44:22 -050046static inline void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
47{
48}
49static inline void b43legacy_rfkill_exit(struct b43legacy_wldev *dev)
50{
51}
Jeff Garzik93a3b602007-11-23 21:50:20 -050052static inline char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev)
Larry Finger93bb7f32007-10-10 22:44:22 -050053{
54 return NULL;
55}
56
57#endif /* CONFIG_B43LEGACY_RFKILL */
58
59#endif /* B43legacy_RFKILL_H_ */