--- a/config.mk
+++ b/config.mk
-@@ -147,7 +147,7 @@ ifneq ($(CONFIG_PCI),)
+@@ -95,7 +95,7 @@ endif # build check
+ endif # kernel Makefile check
- CONFIG_ATH5K=m
- # CONFIG_ATH5K_DEBUG=y
--CONFIG_ATH5K_RFKILL=y
-+# CONFIG_ATH5K_RFKILL=y
- CONFIG_ATH9K_HW=m
- CONFIG_ATH9K=m
- # Note: once ath9k_htc is added we'll have to move
-@@ -159,7 +159,7 @@ CONFIG_ATH9K_COMMON=m
+ # These both are needed by compat-wireless || compat-bluetooth so enable them
+- CONFIG_COMPAT_RFKILL=y
++# CONFIG_COMPAT_RFKILL=y
- CONFIG_IWLWIFI=m
- CONFIG_IWLWIFI_LEDS=y
--CONFIG_IWLWIFI_RFKILL=y
-+# CONFIG_IWLWIFI_RFKILL=y
- CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT=y
- # CONFIG_IWLWIFI_DEBUG=y
- # CONFIG_IWLWIFI_DEBUGFS=y
-@@ -179,7 +179,7 @@ CONFIG_B43_PCMCIA=y
- endif
- CONFIG_B43_PIO=y
- CONFIG_B43_LEDS=y
--CONFIG_B43_RFKILL=y
-+# CONFIG_B43_RFKILL=y
- CONFIG_B43_PHY_LP=y
- # CONFIG_B43_DEBUG=y
- # CONFIG_B43_FORCE_PIO=y
-@@ -189,7 +189,7 @@ CONFIG_B43LEGACY_HWRNG=y
- CONFIG_B43LEGACY_PCI_AUTOSELECT=y
- CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
- CONFIG_B43LEGACY_LEDS=y
--CONFIG_B43LEGACY_RFKILL=y
-+# CONFIG_B43LEGACY_RFKILL=y
- # CONFIG_B43LEGACY_DEBUG=y
- CONFIG_B43LEGACY_DMA=y
- CONFIG_B43LEGACY_PIO=y
-@@ -422,8 +422,8 @@ endif
+ ifeq ($(CONFIG_MAC80211),y)
+ $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
+@@ -671,10 +671,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
# We need the backported rfkill module on kernel < 2.6.31.
# In more recent kernel versions use the in kernel rfkill module.
- ifdef CONFIG_COMPAT_WIRELESS_31
+ ifdef CONFIG_COMPAT_KERNEL_2_6_31
-CONFIG_RFKILL_BACKPORT=m
--CONFIG_RFKILL_BACKPORT_LEDS=y
--CONFIG_RFKILL_BACKPORT_INPUT=y
+# CONFIG_RFKILL_BACKPORT=m
+ ifdef CONFIG_LEDS_TRIGGERS
+-CONFIG_RFKILL_BACKPORT_LEDS=y
+# CONFIG_RFKILL_BACKPORT_LEDS=y
+ endif #CONFIG_LEDS_TRIGGERS
+-CONFIG_RFKILL_BACKPORT_INPUT=y
+# CONFIG_RFKILL_BACKPORT_INPUT=y
- endif
+ endif #CONFIG_COMPAT_KERNEL_2_6_31
+
+--- a/include/linux/rfkill.h
++++ b/include/linux/rfkill.h
+@@ -3,6 +3,10 @@
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
+
++#undef CONFIG_RFKILL
++#undef CONFIG_RFKILL_LEDS
++#undef CONFIG_RFKILL_MODULE
++
+ #include_next <linux/rfkill.h>
+ #else