From b2e3384e79a5ddf778898807e5ea723cc0fc9cef Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 24 Feb 2012 20:42:39 -0800 Subject: [PATCH] compat-wireless: fix old kernel checks for 3.x These ancient checks require a check against the 2 release as the KERNEL_26SUBLEVEL is only defined when that kernel is detected. Signed-off-by: Luis R. Rodriguez --- config.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.mk b/config.mk index 4bbbd88193db..668f9fbb7ab0 100644 --- a/config.mk +++ b/config.mk @@ -36,11 +36,13 @@ endif # you have it enabled, otherwise you will very likely run into # a kernel panic. # XXX: move this to compat_autoconf.h script generation +ifeq ($(KERNEL_VERSION),2) ifeq ($(shell test $(KERNEL_VERSION) -eq 2 -a $(KERNEL_26SUBLEVEL) -eq 27 && echo yes),yes) ifeq ($(CONFIG_DYNAMIC_FTRACE),y) $(error "ERROR: Your 2.6.27 kernel has CONFIG_DYNAMIC_FTRACE, please upgrade your distribution kernel as newer ones should not have this enabled (and if so report a bug) or remove this warning if you know what you are doing") endif endif +endif # This is because with CONFIG_MAC80211 include/linux/skbuff.h will # enable on 2.6.27 a new attribute: @@ -54,11 +56,13 @@ endif # In kernel 2.6.32 both attributes were removed. # # XXX: move this to compat_autoconf.h script generation +ifeq ($(KERNEL_VERSION),2) ifeq ($(shell test $(KERNEL_VERSION) -eq 2 -a $(KERNEL_26SUBLEVEL) -ge 27 -a $(KERNEL_26SUBLEVEL) -le 31 && echo yes),yes) ifeq ($(CONFIG_MAC80211),) $(error "ERROR: Your >=2.6.27 and <= 2.6.31 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.") endif endif +endif ifneq ($(KERNELRELEASE),) # This prevents a warning -- 2.30.2