hostapd: make rfkill support optional
This commit is contained in:
parent
65696cd9d7
commit
9845c4d778
2 changed files with 17 additions and 3 deletions
|
@ -54,7 +54,6 @@ NEED_SME=y
|
||||||
NEED_AP_MLME=y
|
NEED_AP_MLME=y
|
||||||
NEED_NETLINK=y
|
NEED_NETLINK=y
|
||||||
NEED_LINUX_IOCTL=y
|
NEED_LINUX_IOCTL=y
|
||||||
NEED_RFKILL=y
|
|
||||||
NEED_RADIOTAP=y
|
NEED_RADIOTAP=y
|
||||||
NEED_LIBNL=y
|
NEED_LIBNL=y
|
||||||
endif
|
endif
|
||||||
|
@ -111,7 +110,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
|
||||||
CONFIG_WIRELESS_EXTENSION=y
|
CONFIG_WIRELESS_EXTENSION=y
|
||||||
NEED_NETLINK=y
|
NEED_NETLINK=y
|
||||||
NEED_LINUX_IOCTL=y
|
NEED_LINUX_IOCTL=y
|
||||||
NEED_RFKILL=y
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRIVER_NDIS
|
ifdef CONFIG_DRIVER_NDIS
|
||||||
|
@ -137,7 +135,6 @@ endif
|
||||||
ifdef CONFIG_WIRELESS_EXTENSION
|
ifdef CONFIG_WIRELESS_EXTENSION
|
||||||
DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
|
DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
|
||||||
DRV_WPA_OBJS += ../src/drivers/driver_wext.o
|
DRV_WPA_OBJS += ../src/drivers/driver_wext.o
|
||||||
NEED_RFKILL=y
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef NEED_NETLINK
|
ifdef NEED_NETLINK
|
||||||
|
@ -146,6 +143,7 @@ endif
|
||||||
|
|
||||||
ifdef NEED_RFKILL
|
ifdef NEED_RFKILL
|
||||||
DRV_OBJS += ../src/drivers/rfkill.o
|
DRV_OBJS += ../src/drivers/rfkill.o
|
||||||
|
DRV_WPA_CFLAGS += -DCONFIG_RFKILL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef NEED_RADIOTAP
|
ifdef NEED_RADIOTAP
|
||||||
|
|
|
@ -18,8 +18,24 @@ struct rfkill_config {
|
||||||
void (*unblocked_cb)(void *ctx);
|
void (*unblocked_cb)(void *ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_RFKILL
|
||||||
struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
|
struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
|
||||||
void rfkill_deinit(struct rfkill_data *rfkill);
|
void rfkill_deinit(struct rfkill_data *rfkill);
|
||||||
int rfkill_is_blocked(struct rfkill_data *rfkill);
|
int rfkill_is_blocked(struct rfkill_data *rfkill);
|
||||||
|
#else
|
||||||
|
static inline struct rfkill_data * rfkill_init(struct rfkill_config *cfg)
|
||||||
|
{
|
||||||
|
return (void *) 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void rfkill_deinit(struct rfkill_data *rfkill)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int rfkill_is_blocked(struct rfkill_data *rfkill)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* RFKILL_H */
|
#endif /* RFKILL_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue