rfkill: add fake rfkill support
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 280-rfkill-stubs.patch
1 Index: linux-4.4.21/net/rfkill/Kconfig
2 ===================================================================
3 --- linux-4.4.21.orig/net/rfkill/Kconfig 2016-09-15 08:29:29.000000000 +0200
4 +++ linux-4.4.21/net/rfkill/Kconfig 2016-09-27 18:23:27.210404930 +0200
5 @@ -1,7 +1,11 @@
6 #
7 # RF switch subsystem configuration
8 #
9 -menuconfig RFKILL
10 +config RFKILL
11 + bool
12 + default y
13 +
14 +menuconfig RFKILL_FULL
15 tristate "RF switch subsystem support"
16 help
17 Say Y here if you want to have control over RF switches
18 @@ -13,19 +17,19 @@
19 # LED trigger support
20 config RFKILL_LEDS
21 bool
22 - depends on RFKILL
23 + depends on RFKILL_FULL
24 depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
25 default y
26
27 config RFKILL_INPUT
28 bool "RF switch input support" if EXPERT
29 - depends on RFKILL
30 + depends on RFKILL_FULL
31 depends on INPUT = y || RFKILL = INPUT
32 default y if !EXPERT
33
34 config RFKILL_REGULATOR
35 tristate "Generic rfkill regulator driver"
36 - depends on RFKILL || !RFKILL
37 + depends on RFKILL_FULL || !RFKILL_FULL
38 depends on REGULATOR
39 help
40 This options enable controlling radio transmitters connected to
41 @@ -36,7 +40,7 @@
42
43 config RFKILL_GPIO
44 tristate "GPIO RFKILL driver"
45 - depends on RFKILL
46 + depends on RFKILL_FULL
47 depends on GPIOLIB || COMPILE_TEST
48 default n
49 help
50 Index: linux-4.4.21/net/rfkill/Makefile
51 ===================================================================
52 --- linux-4.4.21.orig/net/rfkill/Makefile 2016-09-15 08:29:29.000000000 +0200
53 +++ linux-4.4.21/net/rfkill/Makefile 2016-09-27 18:22:12.373010155 +0200
54 @@ -4,6 +4,6 @@
55
56 rfkill-y += core.o
57 rfkill-$(CONFIG_RFKILL_INPUT) += input.o
58 -obj-$(CONFIG_RFKILL) += rfkill.o
59 +obj-$(CONFIG_RFKILL_FULL) += rfkill.o
60 obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o
61 obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o
62 Index: linux-4.4.21/net/Makefile
63 ===================================================================
64 --- linux-4.4.21.orig/net/Makefile 2016-09-15 08:29:29.000000000 +0200
65 +++ linux-4.4.21/net/Makefile 2016-09-27 18:23:43.954773045 +0200
66 @@ -49,7 +49,7 @@
67 obj-$(CONFIG_TIPC) += tipc/
68 obj-$(CONFIG_NETLABEL) += netlabel/
69 obj-$(CONFIG_IUCV) += iucv/
70 -obj-$(CONFIG_RFKILL) += rfkill/
71 +obj-$(CONFIG_RFKILL_FULL) += rfkill/
72 obj-$(CONFIG_NET_9P) += 9p/
73 obj-$(CONFIG_CAIF) += caif/
74 ifneq ($(CONFIG_DCB),)
75 Index: linux-4.4.21/include/linux/rfkill.h
76 ===================================================================
77 --- linux-4.4.21.orig/include/linux/rfkill.h 2016-09-15 08:29:29.000000000 +0200
78 +++ linux-4.4.21/include/linux/rfkill.h 2016-09-27 18:47:20.426653801 +0200
79 @@ -64,7 +64,7 @@
80 int (*set_block)(void *data, bool blocked);
81 };
82
83 -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
84 +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
85 /**
86 * rfkill_alloc - allocate rfkill structure
87 * @name: name of the struct -- the string is not copied internally