Added identification of WRT610N and its button/led definitions.
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 001-speedup_build.patch
1 --- a/config.mk
2 +++ b/config.mk
3 @@ -17,15 +17,19 @@ ifeq ($(CONFIG_MAC80211),y)
4 $(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")
5 endif
6
7 +
8 # We will warn when you don't have MQ support or NET_SCHED enabled.
9 #
10 # We could consider just quiting if MQ and NET_SCHED is disabled
11 # as I suspect all users of this package want 802.11e (WME) and
12 # 802.11n (HT) support.
13 -ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes)
14 -KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
15 +ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
16 +COMPAT_LATEST_VERSION = 32
17 +KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
18 +COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
19 +$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_WIRELESS_$(ver)=y))
20
21 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 25 && echo yes),yes)
22 +ifdef CONFIG_COMPAT_WIRELESS_25
23 $(error "ERROR: You should use compat-wireless-2.6-old for older kernels, this one is for kernels >= 2.6.25")
24 endif
25
26 @@ -34,56 +38,10 @@ $(error "ERROR: your kernel has CONFIG_C
27 endif
28
29
30 -# Compat wireless compat-2.6.2x.c files gets selected here
31 -
32 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 21 && echo yes),yes)
33 -CONFIG_COMPAT_WIRELESS_22=y
34 -endif
35 -
36 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 22 && echo yes),yes)
37 -CONFIG_COMPAT_WIRELESS_23=y
38 -endif
39 -
40 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 23 && echo yes),yes)
41 -CONFIG_COMPAT_WIRELESS_24=y
42 -endif
43 -
44 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 24 && echo yes),yes)
45 -CONFIG_COMPAT_WIRELESS_25=y
46 -endif
47 -
48 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 25 && echo yes),yes)
49 -CONFIG_COMPAT_WIRELESS_26=y
50 -endif
51 -
52 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
53 -CONFIG_COMPAT_WIRELESS_27=y
54 -endif
55 -
56 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 27 && echo yes),yes)
57 -CONFIG_COMPAT_WIRELESS_28=y
58 -endif
59 -
60 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 28 && echo yes),yes)
61 -CONFIG_COMPAT_WIRELESS_29=y
62 -endif
63 -
64 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 29 && echo yes),yes)
65 -CONFIG_COMPAT_WIRELESS_30=y
66 -endif
67 -
68 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 30 && echo yes),yes)
69 -CONFIG_COMPAT_WIRELESS_31=y
70 -endif
71 -
72 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 31 && echo yes),yes)
73 -CONFIG_COMPAT_WIRELESS_32=y
74 -endif
75 -
76 # 2.6.27 has FTRACE_DYNAMIC borked, so we will complain if
77 # you have it enabled, otherwise you will very likely run into
78 # a kernel panic.
79 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -eq 27 && echo yes),yes)
80 +ifeq ($(KERNEL_SUBLEVEL),27)
81 ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
82 $(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")
83 endif
84 @@ -291,7 +249,7 @@ endif
85
86 ifneq ($(CONFIG_PCMCIA),)
87
88 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
89 +ifdef CONFIG_COMPAT_WIRELESS_27
90 CONFIG_LIBERTAS=n
91 CONFIG_LIBERTAS_CS=n
92 else
93 @@ -327,7 +285,7 @@ CONFIG_RTL8187=m
94
95 CONFIG_AT76C50X_USB=m
96
97 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 28 && echo yes),yes)
98 +ifndef CONFIG_COMPAT_WIRELESS_28
99 CONFIG_AR9170_USB=m
100 CONFIG_AR9170_LEDS=y
101 endif
102 @@ -343,7 +301,7 @@ CONFIG_RT73USB=m
103 NEED_RT2X00_FIRMWARE=y
104 endif
105
106 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
107 +ifdef CONFIG_COMPAT_WIRELESS_27
108 CONFIG_LIBERTAS_THINFIRM_USB=n
109 CONFIG_LIBERTAS_USB=n
110 NEED_LIBERTAS=n
111 @@ -360,7 +318,7 @@ ifneq ($(CONFIG_SPI_MASTER),)
112 CONFIG_WL1251=m
113 CONFIG_P54_SPI=m
114
115 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
116 +ifdef CONFIG_COMPAT_WIRELESS_27
117 CONFIG_LIBERTAS_SPI=n
118 NEED_LIBERTAS=n
119 else
120 @@ -372,7 +330,7 @@ endif # end of SPI driver list
121
122 ifneq ($(CONFIG_MMC),)
123
124 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
125 +ifdef CONFIG_COMPAT_WIRELESS_27
126 CONFIG_LIBERTAS_SDIO=n
127 NEED_LIBERTAS=n
128 else
129 @@ -382,7 +340,7 @@ endif
130
131 # Activate iwmc3200wifi support only on kernel >= 2.6.29.
132 # iwmc3200wifi uses new netdev_ops api no supported by old kernel.
133 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 29 && echo yes),yes)
134 +ifndef CONFIG_COMPAT_WIRELESS_29
135 CONFIG_IWM=m
136 # CONFIG_IWM_DEBUG=y
137 endif
138 @@ -425,7 +383,7 @@ CONFIG_SSB=m
139 CONFIG_SSB_SPROM=y
140 # CONFIG_SSB_DEBUG=y
141
142 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
143 +ifdef CONFIG_COMPAT_WIRELESS_27
144 CONFIG_LIBERTAS=n
145 else
146 ifeq ($(NEED_LIBERTAS),y)
147 @@ -437,7 +395,7 @@ endif
148
149 # We need the backported rfkill module on kernel < 2.6.31.
150 # In more recent kernel versions use the in kernel rfkill module.
151 -ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 30 && echo yes),yes)
152 +ifdef CONFIG_COMPAT_WIRELESS_31
153 CONFIG_RFKILL_BACKPORT=m
154 CONFIG_RFKILL_BACKPORT_LEDS=y
155 CONFIG_RFKILL_BACKPORT_INPUT=y