mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
8994b4b191
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40394
62 lines
1.3 KiB
Diff
62 lines
1.3 KiB
Diff
--- a/src/drivers/drivers.mak
|
|
+++ b/src/drivers/drivers.mak
|
|
@@ -25,7 +25,6 @@ NEED_SME=y
|
|
NEED_AP_MLME=y
|
|
NEED_NETLINK=y
|
|
NEED_LINUX_IOCTL=y
|
|
-NEED_RFKILL=y
|
|
|
|
ifdef CONFIG_LIBNL32
|
|
DRV_LIBS += -lnl-3
|
|
@@ -109,7 +108,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
|
|
CONFIG_WIRELESS_EXTENSION=y
|
|
NEED_NETLINK=y
|
|
NEED_LINUX_IOCTL=y
|
|
-NEED_RFKILL=y
|
|
endif
|
|
|
|
ifdef CONFIG_DRIVER_NDIS
|
|
@@ -135,7 +133,6 @@ endif
|
|
ifdef CONFIG_WIRELESS_EXTENSION
|
|
DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
|
|
DRV_WPA_OBJS += ../src/drivers/driver_wext.o
|
|
-NEED_RFKILL=y
|
|
endif
|
|
|
|
ifdef NEED_NETLINK
|
|
@@ -148,6 +145,7 @@ endif
|
|
|
|
ifdef NEED_RFKILL
|
|
DRV_OBJS += ../src/drivers/rfkill.o
|
|
+DRV_WPA_CFLAGS += -DCONFIG_RFKILL
|
|
endif
|
|
|
|
ifdef CONFIG_VLAN_NETLINK
|
|
--- a/src/drivers/rfkill.h
|
|
+++ b/src/drivers/rfkill.h
|
|
@@ -18,8 +18,24 @@ struct rfkill_config {
|
|
void (*unblocked_cb)(void *ctx);
|
|
};
|
|
|
|
+#ifdef CONFIG_RFKILL
|
|
struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
|
|
void rfkill_deinit(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 */
|