rfkill.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef B43legacy_RFKILL_H_
  2. #define B43legacy_RFKILL_H_
  3. struct b43legacy_wldev;
  4. #ifdef CONFIG_B43LEGACY_RFKILL
  5. #include <linux/rfkill.h>
  6. #include <linux/workqueue.h>
  7. #include <linux/input-polldev.h>
  8. struct b43legacy_rfkill {
  9. /* The RFKILL subsystem data structure */
  10. struct rfkill *rfkill;
  11. /* The poll device for the RFKILL input button */
  12. struct input_polled_dev *poll_dev;
  13. /* Did initialization succeed? Used for freeing. */
  14. bool registered;
  15. /* The unique name of this rfkill switch */
  16. char name[sizeof("b43legacy-phy4294967295")];
  17. };
  18. /* The init function returns void, because we are not interested
  19. * in failing the b43 init process when rfkill init failed. */
  20. void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
  21. void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
  22. char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev);
  23. #else /* CONFIG_B43LEGACY_RFKILL */
  24. /* No RFKILL support. */
  25. struct b43legacy_rfkill {
  26. /* empty */
  27. };
  28. static inline void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev)
  29. {
  30. }
  31. static inline void b43legacy_rfkill_free(struct b43legacy_wldev *dev)
  32. {
  33. }
  34. static inline void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
  35. {
  36. }
  37. static inline void b43legacy_rfkill_exit(struct b43legacy_wldev *dev)
  38. {
  39. }
  40. static inline char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev)
  41. {
  42. return NULL;
  43. }
  44. #endif /* CONFIG_B43LEGACY_RFKILL */
  45. #endif /* B43legacy_RFKILL_H_ */