From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- .../hostapd/patches/320-optional_rfkill.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/network/services/hostapd/patches/320-optional_rfkill.patch (limited to 'package/network/services/hostapd/patches/320-optional_rfkill.patch') diff --git a/package/network/services/hostapd/patches/320-optional_rfkill.patch b/package/network/services/hostapd/patches/320-optional_rfkill.patch new file mode 100644 index 0000000..75b4b07 --- /dev/null +++ b/package/network/services/hostapd/patches/320-optional_rfkill.patch @@ -0,0 +1,61 @@ +--- a/src/drivers/drivers.mak ++++ b/src/drivers/drivers.mak +@@ -34,7 +34,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 +@@ -116,7 +115,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 +@@ -142,7 +140,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 +@@ -155,6 +152,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 */ -- cgit v1.2.3