rfkill.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. /* Did initialization succeed? Used for freeing. */
  13. bool registered;
  14. /* The unique name of this rfkill switch */
  15. char name[sizeof("b43-phy4294967295")];
  16. };
  17. /* The init function returns void, because we are not interested
  18. * in failing the b43 init process when rfkill init failed. */
  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_init(struct b43_wldev *dev)
  28. {
  29. }
  30. static inline void b43_rfkill_exit(struct b43_wldev *dev)
  31. {
  32. }
  33. static inline char * b43_rfkill_led_name(struct b43_wldev *dev)
  34. {
  35. return NULL;
  36. }
  37. #endif /* CONFIG_B43_RFKILL */
  38. #endif /* B43_RFKILL_H_ */