1 From 236c1acdfef5958010ac9814a9872e0a46fd78ee Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
3 Date: Fri, 7 Jul 2017 17:13:44 +0200
4 Subject: rfkill: add fake rfkill support
6 allow building of modules depending on RFKILL even if RFKILL is not enabled.
8 Signed-off-by: John Crispin <john@phrozen.org>
10 include/linux/rfkill.h | 2 +-
12 net/rfkill/Kconfig | 14 +++++++++-----
13 net/rfkill/Makefile | 2 +-
14 4 files changed, 12 insertions(+), 8 deletions(-)
16 diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
17 index e6a0031d1b1f..21cf4dab0b9a 100644
18 --- a/include/linux/rfkill.h
19 +++ b/include/linux/rfkill.h
20 @@ -64,7 +64,7 @@ struct rfkill_ops {
21 int (*set_block)(void *data, bool blocked);
24 -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
25 +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
27 * rfkill_alloc - allocate rfkill structure
28 * @name: name of the struct -- the string is not copied internally
29 diff --git a/net/Makefile b/net/Makefile
30 index 4cafaa2b4667..6566175e6c0a 100644
33 @@ -51,7 +51,7 @@ obj-$(CONFIG_MAC80211) += mac80211/
34 obj-$(CONFIG_TIPC) += tipc/
35 obj-$(CONFIG_NETLABEL) += netlabel/
36 obj-$(CONFIG_IUCV) += iucv/
37 -obj-$(CONFIG_RFKILL) += rfkill/
38 +obj-$(CONFIG_RFKILL_FULL) += rfkill/
39 obj-$(CONFIG_NET_9P) += 9p/
40 obj-$(CONFIG_CAIF) += caif/
41 ifneq ($(CONFIG_DCB),)
42 diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig
43 index 868f1ad0415a..159b6ebeacd8 100644
44 --- a/net/rfkill/Kconfig
45 +++ b/net/rfkill/Kconfig
48 # RF switch subsystem configuration
55 +menuconfig RFKILL_FULL
56 tristate "RF switch subsystem support"
58 Say Y here if you want to have control over RF switches
59 @@ -13,19 +17,19 @@ menuconfig RFKILL
64 + depends on RFKILL_FULL
65 depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
69 bool "RF switch input support" if EXPERT
71 + depends on RFKILL_FULL
72 depends on INPUT = y || RFKILL = INPUT
75 config RFKILL_REGULATOR
76 tristate "Generic rfkill regulator driver"
77 - depends on RFKILL || !RFKILL
78 + depends on RFKILL_FULL || !RFKILL_FULL
81 This options enable controlling radio transmitters connected to
82 @@ -36,7 +40,7 @@ config RFKILL_REGULATOR
85 tristate "GPIO RFKILL driver"
87 + depends on RFKILL_FULL
88 depends on GPIOLIB || COMPILE_TEST
91 diff --git a/net/rfkill/Makefile b/net/rfkill/Makefile
92 index 311768783f4a..dbb01a8645af 100644
93 --- a/net/rfkill/Makefile
94 +++ b/net/rfkill/Makefile
98 rfkill-$(CONFIG_RFKILL_INPUT) += input.o
99 -obj-$(CONFIG_RFKILL) += rfkill.o
100 +obj-$(CONFIG_RFKILL_FULL) += rfkill.o
101 obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o
102 obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o