COMPAT_LATEST_VERSION = 39
KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
-$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_2_6_$(ver)=y))
-ifdef CONFIG_COMPAT_KERNEL_24
+ifdef CONFIG_COMPAT_KERNEL_2_6_24
$(error "ERROR: compat-wireless by default supports kernels >= 2.6.24, try enabling only one driver though")
-endif #CONFIG_COMPAT_KERNEL_24
+endif #CONFIG_COMPAT_KERNEL_2_6_24
ifeq ($(CONFIG_CFG80211),y)
$(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
endif
# The Bluetooth compatibility only builds on kernels >= 2.6.27 for now
-ifndef CONFIG_COMPAT_KERNEL_27
+ifndef CONFIG_COMPAT_KERNEL_2_6_27
ifeq ($(CONFIG_BT),y)
# we'll ignore compiling bluetooth
else
CONFIG_COMPAT_BLUETOOTH=y
CONFIG_COMPAT_BLUETOOTH_MODULES=m
endif
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
-ifdef CONFIG_COMPAT_KERNEL_33
+ifdef CONFIG_COMPAT_KERNEL_2_6_33
ifdef CONFIG_FW_LOADER
CONFIG_COMPAT_FIRMWARE_CLASS=m
endif #CONFIG_FW_LOADER
-endif #CONFIG_COMPAT_KERNEL_33
+endif #CONFIG_COMPAT_KERNEL_2_6_33
# Wireless subsystem stuff
CONFIG_MAC80211=m
ifdef CONFIG_ISDN_CAPI
CONFIG_BT_CMTP=m
endif #CONFIG_ISDN_CAPI
-ifndef CONFIG_COMPAT_KERNEL_28
+ifndef CONFIG_COMPAT_KERNEL_2_6_28
CONFIG_COMPAT_BT_HIDP=m
-endif #CONFIG_COMPAT_KERNEL_28
+endif #CONFIG_COMPAT_KERNEL_2_6_28
CONFIG_BT_HCIUART=M
CONFIG_BT_HCIUART_H4=y
CONFIG_ATL1=m
CONFIG_ATL2=m
CONFIG_ATL1E=m
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_ATL1C=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_ATL1C=m
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
ifdef CONFIG_WIRELESS_EXT
CONFIG_HERMES=m
ifdef CONFIG_PCMCIA
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS=n
CONFIG_LIBERTAS_CS=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_CS=m
NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
endif #CONFIG_PCMCIA
## end of PCMCIA
# USB Drivers
ifdef CONFIG_USB
-ifndef CONFIG_COMPAT_KERNEL_29
+ifndef CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_COMPAT_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG=y
-endif #CONFIG_COMPAT_KERNEL_29
+endif #CONFIG_COMPAT_KERNEL_2_6_29
# Sorry, rndis_wlan uses cancel_work_sync which is new and can't be done in compat...
# is only wireless RNDIS chip known to date.
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
-ifdef CONFIG_COMPAT_KERNEL_29
+ifdef CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_USB_COMPAT_USBNET=n
CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
CONFIG_USB_NET_COMPAT_CDCETHER=n
-else #CONFIG_COMPAT_KERNEL_29
+else #CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_USB_COMPAT_USBNET=m
ifdef CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
endif #CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_COMPAT_CDCETHER=m
-endif #CONFIG_COMPAT_KERNEL_29
+endif #CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_P54_USB=m
CONFIG_AT76C50X_USB=m
-ifndef CONFIG_COMPAT_KERNEL_29
+ifndef CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_CARL9170=m
ifdef CONFIG_MAC80211_LEDS
CONFIG_CARL9170_LEDS=y
endif #CONFIG_MAC80211_LEDS
# CONFIG_CARL9170_DEBUGFS=y
# CONFIG_CARL9170_WPC=y
-endif #CONFIG_COMPAT_KERNEL_29
+endif #CONFIG_COMPAT_KERNEL_2_6_29
# This activates a threading fix for usb urb.
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
CONFIG_RT73USB=m
endif #CONFIG_CRC_ITU_T
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_THINFIRM_USB=n
CONFIG_LIBERTAS_USB=n
NEED_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_THINFIRM_USB=m
CONFIG_LIBERTAS_USB=m
NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_ORINOCO_USB=m
endif #CONFIG_USB end of USB driver list
ifdef CONFIG_SPI_MASTER
-ifndef CONFIG_COMPAT_KERNEL_25
+ifndef CONFIG_COMPAT_KERNEL_2_6_25
ifdef CONFIG_CRC7
CONFIG_WL1251_SPI=m
endif #CONFIG_CRC7
CONFIG_P54_SPI=m
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_SPI=n
NEED_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_SPI=m
NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
-endif #CONFIG_COMPAT_KERNEL_25
+endif #CONFIG_COMPAT_KERNEL_2_6_25
endif #CONFIG_SPI_MASTER end of SPI driver list
ifdef CONFIG_MMC
CONFIG_COMPAT_WL1251_SDIO=m
endif #CONFIG_WL12XX_PLATFORM_DATA
-ifndef CONFIG_COMPAT_KERNEL_32
+ifndef CONFIG_COMPAT_KERNEL_2_6_32
ifdef CONFIG_WL12XX_PLATFORM_DATA
CONFIG_COMPAT_WL12XX_SDIO=m
endif #CONFIG_WL12XX_PLATFORM_DATA
-endif #CONFIG_COMPAT_KERNEL_32
+endif #CONFIG_COMPAT_KERNEL_2_6_32
endif #CONFIG_CRC7
CONFIG_MWIFIEX_SDIO=m
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_SDIO=n
NEED_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS_SDIO=m
NEED_LIBERTAS=y
-endif #CONFIG_COMPAT_KERNEL_27
+endif #CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_IWM=m
# CONFIG_IWM_DEBUG=y
CONFIG_RT2X00_LIB_FIRMWARE=y
CONFIG_RT2X00_LIB_CRYPTO=y
# CONFIG_RT2X00_LIB_SOC=y
-ifdef CONFIG_COMPAT_KERNEL_25
+ifdef CONFIG_COMPAT_KERNEL_2_6_25
CONFIG_RT2X00_LIB_LEDS=n
-else #CONFIG_COMPAT_KERNEL_25
+else #CONFIG_COMPAT_KERNEL_2_6_25
ifdef CONFIG_LEDS_CLASS
CONFIG_RT2X00_LIB_LEDS=y
endif #CONFIG_LEDS_CLASS
-endif #CONFIG_COMPAT_KERNEL_25
+endif #CONFIG_COMPAT_KERNEL_2_6_25
# CONFIG_RT2X00_DEBUG=y
# CONFIG_RT2X00_LIB_DEBUGFS
endif
CONFIG_MWIFIEX=m
-ifdef CONFIG_COMPAT_KERNEL_27
+ifdef CONFIG_COMPAT_KERNEL_2_6_27
CONFIG_LIBERTAS=n
-else #CONFIG_COMPAT_KERNEL_27
+else #CONFIG_COMPAT_KERNEL_2_6_27
ifeq ($(NEED_LIBERTAS),y)
CONFIG_LIBERTAS_THINFIRM=m
CONFIG_LIBERTAS=m
CONFIG_LIBERTAS_MESH=y
# CONFIG_LIBERTAS_DEBUG=y
endif
-endif #CONFIG_COMPAT_KERNEL_27
+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_KERNEL_31
+ifdef CONFIG_COMPAT_KERNEL_2_6_31
CONFIG_RFKILL_BACKPORT=m
ifdef CONFIG_LEDS_TRIGGERS
CONFIG_RFKILL_BACKPORT_LEDS=y
endif #CONFIG_LEDS_TRIGGERS
CONFIG_RFKILL_BACKPORT_INPUT=y
-endif #CONFIG_COMPAT_KERNEL_31
+endif #CONFIG_COMPAT_KERNEL_2_6_31