320-optional_rfkill.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --- a/src/drivers/drivers.mak
  2. +++ b/src/drivers/drivers.mak
  3. @@ -49,7 +49,6 @@ NEED_SME=y
  4. NEED_AP_MLME=y
  5. NEED_NETLINK=y
  6. NEED_LINUX_IOCTL=y
  7. -NEED_RFKILL=y
  8. NEED_RADIOTAP=y
  9. ifdef CONFIG_LIBNL32
  10. @@ -136,7 +135,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
  11. CONFIG_WIRELESS_EXTENSION=y
  12. NEED_NETLINK=y
  13. NEED_LINUX_IOCTL=y
  14. -NEED_RFKILL=y
  15. endif
  16. ifdef CONFIG_DRIVER_NDIS
  17. @@ -162,7 +160,6 @@ endif
  18. ifdef CONFIG_WIRELESS_EXTENSION
  19. DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
  20. DRV_WPA_OBJS += ../src/drivers/driver_wext.o
  21. -NEED_RFKILL=y
  22. endif
  23. ifdef NEED_NETLINK
  24. @@ -175,6 +172,7 @@ endif
  25. ifdef NEED_RFKILL
  26. DRV_OBJS += ../src/drivers/rfkill.o
  27. +DRV_WPA_CFLAGS += -DCONFIG_RFKILL
  28. endif
  29. ifdef NEED_RADIOTAP
  30. --- a/src/drivers/rfkill.h
  31. +++ b/src/drivers/rfkill.h
  32. @@ -18,8 +18,24 @@ struct rfkill_config {
  33. void (*unblocked_cb)(void *ctx);
  34. };
  35. +#ifdef CONFIG_RFKILL
  36. struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
  37. void rfkill_deinit(struct rfkill_data *rfkill);
  38. int rfkill_is_blocked(struct rfkill_data *rfkill);
  39. +#else
  40. +static inline struct rfkill_data * rfkill_init(struct rfkill_config *cfg)
  41. +{
  42. + return (void *) 1;
  43. +}
  44. +
  45. +static inline void rfkill_deinit(struct rfkill_data *rfkill)
  46. +{
  47. +}
  48. +
  49. +static inline int rfkill_is_blocked(struct rfkill_data *rfkill)
  50. +{
  51. + return 0;
  52. +}
  53. +#endif
  54. #endif /* RFKILL_H */