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> |
| 10 | |
| 11 | struct b43_rfkill { |
| 12 | /* The RFKILL subsystem data structure */ |
| 13 | struct rfkill *rfkill; |
| 14 | /* The unique name of this rfkill switch */ |
| 15 | char name[32]; |
| 16 | /* Workqueue for asynchronous notification. */ |
| 17 | struct work_struct notify_work; |
| 18 | }; |
| 19 | |
| 20 | void b43_rfkill_init(struct b43_wldev *dev); |
| 21 | void b43_rfkill_exit(struct b43_wldev *dev); |
| 22 | void b43_rfkill_toggled(struct b43_wldev *dev, bool on); |
| 23 | char * b43_rfkill_led_name(struct b43_wldev *dev); |
| 24 | |
| 25 | |
| 26 | #else /* CONFIG_B43_RFKILL */ |
| 27 | /* No RFKILL support. */ |
| 28 | |
| 29 | struct b43_rfkill { |
| 30 | /* empty */ |
| 31 | }; |
| 32 | |
| 33 | static inline void b43_rfkill_init(struct b43_wldev *dev) |
| 34 | { |
| 35 | } |
| 36 | static inline void b43_rfkill_exit(struct b43_wldev *dev) |
| 37 | { |
| 38 | } |
| 39 | static inline void b43_rfkill_toggled(struct b43_wldev *dev, bool on) |
| 40 | { |
| 41 | } |
| 42 | static inline char * b43_rfkill_led_name(struct b43_wldev *dev) |
| 43 | { |
| 44 | return NULL; |
| 45 | } |
| 46 | |
| 47 | #endif /* CONFIG_B43_RFKILL */ |
| 48 | |
| 49 | #endif /* B43_RFKILL_H_ */ |