Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 1 | #ifndef B43_RFKILL_H_ |
| 2 | #define B43_RFKILL_H_ |
| 3 | |
| 4 | struct b43_wldev; |
| 5 | |
| 6 | |
| 7 | #ifdef CONFIG_B43_RFKILL |
| 8 | |
| 9 | #include <linux/rfkill.h> |
Michael Buesch | 42bb4cd | 2007-09-28 14:22:33 +0200 | [diff] [blame] | 10 | #include <linux/input-polldev.h> |
| 11 | |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 12 | |
| 13 | struct b43_rfkill { |
| 14 | /* The RFKILL subsystem data structure */ |
| 15 | struct rfkill *rfkill; |
Michael Buesch | 42bb4cd | 2007-09-28 14:22:33 +0200 | [diff] [blame] | 16 | /* The poll device for the RFKILL input button */ |
| 17 | struct input_polled_dev *poll_dev; |
Michael Buesch | 35c7e66 | 2007-11-03 14:34:32 +0100 | [diff] [blame] | 18 | /* Did initialization succeed? Used for freeing. */ |
| 19 | bool registered; |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 20 | /* The unique name of this rfkill switch */ |
Michael Buesch | 35c7e66 | 2007-11-03 14:34:32 +0100 | [diff] [blame] | 21 | char name[sizeof("b43-phy4294967295")]; |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 22 | }; |
| 23 | |
Michael Buesch | 35c7e66 | 2007-11-03 14:34:32 +0100 | [diff] [blame] | 24 | /* The init function returns void, because we are not interested |
Michael Buesch | 42bb4cd | 2007-09-28 14:22:33 +0200 | [diff] [blame] | 25 | * in failing the b43 init process when rfkill init failed. */ |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 26 | void b43_rfkill_init(struct b43_wldev *dev); |
| 27 | void b43_rfkill_exit(struct b43_wldev *dev); |
Michael Buesch | 42bb4cd | 2007-09-28 14:22:33 +0200 | [diff] [blame] | 28 | |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 29 | char * b43_rfkill_led_name(struct b43_wldev *dev); |
| 30 | |
| 31 | |
| 32 | #else /* CONFIG_B43_RFKILL */ |
| 33 | /* No RFKILL support. */ |
| 34 | |
| 35 | struct b43_rfkill { |
| 36 | /* empty */ |
| 37 | }; |
| 38 | |
| 39 | static inline void b43_rfkill_init(struct b43_wldev *dev) |
| 40 | { |
| 41 | } |
| 42 | static inline void b43_rfkill_exit(struct b43_wldev *dev) |
| 43 | { |
| 44 | } |
Michael Buesch | 8e9f752 | 2007-09-27 21:35:34 +0200 | [diff] [blame] | 45 | static inline char * b43_rfkill_led_name(struct b43_wldev *dev) |
| 46 | { |
| 47 | return NULL; |
| 48 | } |
| 49 | |
| 50 | #endif /* CONFIG_B43_RFKILL */ |
| 51 | |
| 52 | #endif /* B43_RFKILL_H_ */ |