rfkill.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. struct b43legacy_rfkill {
  7. /* The RFKILL subsystem data structure */
  8. struct rfkill *rfkill;
  9. /* Did initialization succeed? Used for freeing. */
  10. bool registered;
  11. /* The unique name of this rfkill switch */
  12. char name[sizeof("b43legacy-phy4294967295")];
  13. };
  14. /* The init function returns void, because we are not interested
  15. * in failing the b43 init process when rfkill init failed. */
  16. void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
  17. void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
  18. const char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev);
  19. #else /* CONFIG_B43LEGACY_RFKILL */
  20. /* No RFKILL support. */
  21. struct b43legacy_rfkill {
  22. /* empty */
  23. };
  24. static inline void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev)
  25. {
  26. }
  27. static inline void b43legacy_rfkill_free(struct b43legacy_wldev *dev)
  28. {
  29. }
  30. static inline void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
  31. {
  32. }
  33. static inline void b43legacy_rfkill_exit(struct b43legacy_wldev *dev)
  34. {
  35. }
  36. static inline char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev)
  37. {
  38. return NULL;
  39. }
  40. #endif /* CONFIG_B43LEGACY_RFKILL */
  41. #endif /* B43legacy_RFKILL_H_ */