280-rfkill-stubs.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. From 236c1acdfef5958010ac9814a9872e0a46fd78ee Mon Sep 17 00:00:00 2001
  2. From: John Crispin <[email protected]>
  3. Date: Fri, 7 Jul 2017 17:13:44 +0200
  4. Subject: rfkill: add fake rfkill support
  5. allow building of modules depending on RFKILL even if RFKILL is not enabled.
  6. Signed-off-by: John Crispin <[email protected]>
  7. ---
  8. include/linux/rfkill.h | 2 +-
  9. net/Makefile | 2 +-
  10. net/rfkill/Kconfig | 14 +++++++++-----
  11. net/rfkill/Makefile | 2 +-
  12. 4 files changed, 12 insertions(+), 8 deletions(-)
  13. --- a/include/linux/rfkill.h
  14. +++ b/include/linux/rfkill.h
  15. @@ -64,7 +64,7 @@ struct rfkill_ops {
  16. int (*set_block)(void *data, bool blocked);
  17. };
  18. -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
  19. +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
  20. /**
  21. * rfkill_alloc - allocate rfkill structure
  22. * @name: name of the struct -- the string is not copied internally
  23. --- a/net/Makefile
  24. +++ b/net/Makefile
  25. @@ -51,7 +51,7 @@ obj-$(CONFIG_MAC80211) += mac80211/
  26. obj-$(CONFIG_TIPC) += tipc/
  27. obj-$(CONFIG_NETLABEL) += netlabel/
  28. obj-$(CONFIG_IUCV) += iucv/
  29. -obj-$(CONFIG_RFKILL) += rfkill/
  30. +obj-$(CONFIG_RFKILL_FULL) += rfkill/
  31. obj-$(CONFIG_NET_9P) += 9p/
  32. obj-$(CONFIG_CAIF) += caif/
  33. ifneq ($(CONFIG_DCB),)
  34. --- a/net/rfkill/Kconfig
  35. +++ b/net/rfkill/Kconfig
  36. @@ -1,7 +1,11 @@
  37. #
  38. # RF switch subsystem configuration
  39. #
  40. -menuconfig RFKILL
  41. +config RFKILL
  42. + bool
  43. + default y
  44. +
  45. +menuconfig RFKILL_FULL
  46. tristate "RF switch subsystem support"
  47. help
  48. Say Y here if you want to have control over RF switches
  49. @@ -13,19 +17,19 @@ menuconfig RFKILL
  50. # LED trigger support
  51. config RFKILL_LEDS
  52. bool
  53. - depends on RFKILL
  54. + depends on RFKILL_FULL
  55. depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
  56. default y
  57. config RFKILL_INPUT
  58. bool "RF switch input support" if EXPERT
  59. - depends on RFKILL
  60. + depends on RFKILL_FULL
  61. depends on INPUT = y || RFKILL = INPUT
  62. default y if !EXPERT
  63. config RFKILL_REGULATOR
  64. tristate "Generic rfkill regulator driver"
  65. - depends on RFKILL || !RFKILL
  66. + depends on RFKILL_FULL || !RFKILL_FULL
  67. depends on REGULATOR
  68. help
  69. This options enable controlling radio transmitters connected to
  70. @@ -36,7 +40,7 @@ config RFKILL_REGULATOR
  71. config RFKILL_GPIO
  72. tristate "GPIO RFKILL driver"
  73. - depends on RFKILL
  74. + depends on RFKILL_FULL
  75. depends on GPIOLIB || COMPILE_TEST
  76. default n
  77. help
  78. --- a/net/rfkill/Makefile
  79. +++ b/net/rfkill/Makefile
  80. @@ -4,6 +4,6 @@
  81. rfkill-y += core.o
  82. rfkill-$(CONFIG_RFKILL_INPUT) += input.o
  83. -obj-$(CONFIG_RFKILL) += rfkill.o
  84. +obj-$(CONFIG_RFKILL_FULL) += rfkill.o
  85. obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o
  86. obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o