developer | 4e0da23 | 2022-05-09 13:05:53 +0800 | [diff] [blame] | 1 | --- a/src/drivers/drivers.mak |
| 2 | +++ b/src/drivers/drivers.mak |
| 3 | @@ -54,7 +54,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 | NEED_LIBNL=y |
| 10 | endif |
| 11 | @@ -111,7 +110,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT |
| 12 | CONFIG_WIRELESS_EXTENSION=y |
| 13 | NEED_NETLINK=y |
| 14 | NEED_LINUX_IOCTL=y |
| 15 | -NEED_RFKILL=y |
| 16 | endif |
| 17 | |
| 18 | ifdef CONFIG_DRIVER_NDIS |
| 19 | @@ -137,7 +135,6 @@ endif |
| 20 | ifdef CONFIG_WIRELESS_EXTENSION |
| 21 | DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION |
| 22 | DRV_WPA_OBJS += ../src/drivers/driver_wext.o |
| 23 | -NEED_RFKILL=y |
| 24 | endif |
| 25 | |
| 26 | ifdef NEED_NETLINK |
| 27 | @@ -146,6 +143,7 @@ endif |
| 28 | |
| 29 | ifdef NEED_RFKILL |
| 30 | DRV_OBJS += ../src/drivers/rfkill.o |
| 31 | +DRV_WPA_CFLAGS += -DCONFIG_RFKILL |
| 32 | endif |
| 33 | |
| 34 | ifdef NEED_RADIOTAP |
| 35 | --- a/src/drivers/rfkill.h |
| 36 | +++ b/src/drivers/rfkill.h |
| 37 | @@ -18,8 +18,24 @@ struct rfkill_config { |
| 38 | void (*unblocked_cb)(void *ctx); |
| 39 | }; |
| 40 | |
| 41 | +#ifdef CONFIG_RFKILL |
| 42 | struct rfkill_data * rfkill_init(struct rfkill_config *cfg); |
| 43 | void rfkill_deinit(struct rfkill_data *rfkill); |
| 44 | int rfkill_is_blocked(struct rfkill_data *rfkill); |
| 45 | +#else |
| 46 | +static inline struct rfkill_data * rfkill_init(struct rfkill_config *cfg) |
| 47 | +{ |
| 48 | + return (void *) 1; |
| 49 | +} |
| 50 | + |
| 51 | +static inline void rfkill_deinit(struct rfkill_data *rfkill) |
| 52 | +{ |
| 53 | +} |
| 54 | + |
| 55 | +static inline int rfkill_is_blocked(struct rfkill_data *rfkill) |
| 56 | +{ |
| 57 | + return 0; |
| 58 | +} |
| 59 | +#endif |
| 60 | |
| 61 | #endif /* RFKILL_H */ |