rfkill.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef B43_RFKILL_H_
  2. #define B43_RFKILL_H_
  3. struct b43_wldev;
  4. #ifdef CONFIG_B43_RFKILL
  5. #include <linux/rfkill.h>
  6. #include <linux/input-polldev.h>
  7. struct b43_rfkill {
  8. /* The RFKILL subsystem data structure */
  9. struct rfkill *rfkill;
  10. /* The poll device for the RFKILL input button */
  11. struct input_polled_dev *poll_dev;
  12. /* The unique name of this rfkill switch */
  13. char name[32];
  14. };
  15. /* All the init functions return void, because we are not interested
  16. * in failing the b43 init process when rfkill init failed. */
  17. void b43_rfkill_alloc(struct b43_wldev *dev);
  18. void b43_rfkill_free(struct b43_wldev *dev);
  19. void b43_rfkill_init(struct b43_wldev *dev);
  20. void b43_rfkill_exit(struct b43_wldev *dev);
  21. char * b43_rfkill_led_name(struct b43_wldev *dev);
  22. #else /* CONFIG_B43_RFKILL */
  23. /* No RFKILL support. */
  24. struct b43_rfkill {
  25. /* empty */
  26. };
  27. static inline void b43_rfkill_alloc(struct b43_wldev *dev)
  28. {
  29. }
  30. static inline void b43_rfkill_free(struct b43_wldev *dev)
  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 char * b43_rfkill_led_name(struct b43_wldev *dev)
  40. {
  41. return NULL;
  42. }
  43. #endif /* CONFIG_B43_RFKILL */
  44. #endif /* B43_RFKILL_H_ */