blob: 29544e8c9e5f41e45878fda6d80941aaa264f0dd [file] [log] [blame]
Michael Buesch8e9f7522007-09-27 21:35:34 +02001#ifndef B43_RFKILL_H_
2#define B43_RFKILL_H_
3
4struct b43_wldev;
5
6
7#ifdef CONFIG_B43_RFKILL
8
9#include <linux/rfkill.h>
Michael Buesch42bb4cd2007-09-28 14:22:33 +020010#include <linux/input-polldev.h>
11
Michael Buesch8e9f7522007-09-27 21:35:34 +020012
13struct b43_rfkill {
14 /* The RFKILL subsystem data structure */
15 struct rfkill *rfkill;
Michael Buesch42bb4cd2007-09-28 14:22:33 +020016 /* The poll device for the RFKILL input button */
17 struct input_polled_dev *poll_dev;
Michael Buesch8e9f7522007-09-27 21:35:34 +020018 /* The unique name of this rfkill switch */
19 char name[32];
Michael Buesch8e9f7522007-09-27 21:35:34 +020020};
21
Michael Buesch42bb4cd2007-09-28 14:22:33 +020022/* All the init functions return void, because we are not interested
23 * in failing the b43 init process when rfkill init failed. */
24void b43_rfkill_alloc(struct b43_wldev *dev);
25void b43_rfkill_free(struct b43_wldev *dev);
Michael Buesch8e9f7522007-09-27 21:35:34 +020026void b43_rfkill_init(struct b43_wldev *dev);
27void b43_rfkill_exit(struct b43_wldev *dev);
Michael Buesch42bb4cd2007-09-28 14:22:33 +020028
Michael Buesch8e9f7522007-09-27 21:35:34 +020029char * b43_rfkill_led_name(struct b43_wldev *dev);
30
31
32#else /* CONFIG_B43_RFKILL */
33/* No RFKILL support. */
34
35struct b43_rfkill {
36 /* empty */
37};
38
Michael Buesch42bb4cd2007-09-28 14:22:33 +020039static inline void b43_rfkill_alloc(struct b43_wldev *dev)
40{
41}
42static inline void b43_rfkill_free(struct b43_wldev *dev)
43{
44}
Michael Buesch8e9f7522007-09-27 21:35:34 +020045static inline void b43_rfkill_init(struct b43_wldev *dev)
46{
47}
48static inline void b43_rfkill_exit(struct b43_wldev *dev)
49{
50}
Michael Buesch8e9f7522007-09-27 21:35:34 +020051static inline char * b43_rfkill_led_name(struct b43_wldev *dev)
52{
53 return NULL;
54}
55
56#endif /* CONFIG_B43_RFKILL */
57
58#endif /* B43_RFKILL_H_ */