83228311cc4514b869a98c921c1a40a4de5dee81
[openwrt/openwrt.git] / package / kernel / mac80211 / ath.mk
1 PKG_DRIVERS += \
2 ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
3 ath11k ath11k-pci carl9170 owl-loader ar5523 wil6210
4
5 PKG_CONFIG_DEPENDS += \
6 CONFIG_PACKAGE_ATH_DEBUG \
7 CONFIG_PACKAGE_ATH_DFS \
8 CONFIG_PACKAGE_ATH_SPECTRAL \
9 CONFIG_PACKAGE_ATH_DYNACK \
10 CONFIG_ATH9K_HWRNG \
11 CONFIG_ATH9K_SUPPORT_PCOEM \
12 CONFIG_ATH9K_TX99 \
13 CONFIG_ATH10K_LEDS \
14 CONFIG_ATH10K_THERMAL \
15 CONFIG_ATH11K_THERMAL \
16 CONFIG_ATH_USER_REGD
17
18 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
19 config-y += \
20 ATH9K_DEBUGFS \
21 ATH9K_HTC_DEBUGFS \
22 ATH10K_DEBUGFS \
23 ATH11K_DEBUGFS \
24 CARL9170_DEBUGFS \
25 ATH5K_DEBUG \
26 ATH6KL_DEBUG \
27 WIL6210_DEBUGFS
28 endif
29
30 ifdef CONFIG_PACKAGE_MAC80211_TRACING
31 config-y += \
32 ATH10K_TRACING \
33 ATH11K_TRACING \
34 ATH6KL_TRACING \
35 ATH_TRACEPOINTS \
36 ATH5K_TRACER \
37 WIL6210_TRACING
38 endif
39
40 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
41 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
42 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
43 config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL
44 config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
45 config-$(call config_package,ath9k) += ATH9K
46 config-$(call config_package,ath9k-common) += ATH9K_COMMON
47 config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM
48 config-$(CONFIG_TARGET_ath79) += ATH9K_AHB
49 config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB
50 config-$(CONFIG_PCI) += ATH9K_PCI
51 config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD ATH_REG_DYNAMIC_USER_REG_HINTS
52 config-$(CONFIG_ATH9K_HWRNG) += ATH9K_HWRNG
53 config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
54 config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
55 config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
56 config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
57 config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL
58 config-$(CONFIG_ATH11K_THERMAL) += ATH11K_THERMAL
59
60 config-$(call config_package,ath9k-htc) += ATH9K_HTC
61 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
62 config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
63 config-$(call config_package,ath11k) += ATH11K
64 config-$(call config_package,ath11k-pci) += ATH11K_PCI
65
66 config-$(call config_package,ath5k) += ATH5K
67 ifdef CONFIG_TARGET_ath25
68 config-y += ATH5K_AHB
69 else
70 config-y += ATH5K_PCI
71 endif
72
73 config-$(call config_package,ath6kl) += ATH6KL
74 config-$(call config_package,ath6kl-sdio) += ATH6KL_SDIO
75 config-$(call config_package,ath6kl-usb) += ATH6KL_USB
76
77 config-$(call config_package,carl9170) += CARL9170
78 config-$(call config_package,ar5523) += AR5523
79
80 config-$(call config_package,wil6210) += WIL6210
81
82 define KernelPackage/ath/config
83 if PACKAGE_kmod-ath
84 config ATH_USER_REGD
85 bool "Force Atheros drivers to respect the user's regdomain settings"
86 default y
87 help
88 Atheros' idea of regulatory handling is that the EEPROM of the card defines
89 the regulatory limits and the user is only allowed to restrict the settings
90 even further, even if the country allows frequencies or power levels that
91 are forbidden by the EEPROM settings.
92
93 Select this option if you want the driver to respect the user's decision about
94 regulatory settings.
95
96 config PACKAGE_ATH_DEBUG
97 bool "Atheros wireless debugging"
98 help
99 Say Y, if you want to debug atheros wireless drivers.
100 Only ath9k & ath10k make use of this.
101
102 config PACKAGE_ATH_DFS
103 bool "Enable DFS support"
104 default y
105 help
106 Dynamic frequency selection (DFS) is required for most of the 5 GHz band
107 channels in Europe, US, and Japan.
108
109 Select this option if you want to use such channels.
110
111 config PACKAGE_ATH_SPECTRAL
112 bool "Atheros spectral scan support"
113 depends on PACKAGE_ATH_DEBUG
114 select KERNEL_RELAY
115 help
116 Say Y to enable access to the FFT/spectral data via debugfs.
117
118 config PACKAGE_ATH_DYNACK
119 bool "Enable Dynack support"
120 depends on PACKAGE_kmod-ath9k-common
121 help
122 Enables support for Dynamic ACK estimation, which allows the fastest possible speed
123 at any distance automatically by increasing/decreasing the max frame ACK time for
124 the most remote station detected. It can be enabled by using iw (iw phy0 set distance auto),
125 or by sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink.
126
127 Select this option if you want to enable this feature
128
129 endif
130 endef
131
132 define KernelPackage/ath
133 $(call KernelPackage/mac80211/Default)
134 TITLE:=Atheros common driver part
135 DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ath79||TARGET_ath25 +kmod-mac80211
136 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
137 MENU:=1
138 endef
139
140 define KernelPackage/ath/description
141 This module contains some common parts needed by Atheros Wireless drivers.
142 endef
143
144 define KernelPackage/ath5k
145 $(call KernelPackage/mac80211/Default)
146 TITLE:=Atheros 5xxx wireless cards support
147 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath5k
148 DEPENDS+= @(PCI_SUPPORT||TARGET_ath25) +kmod-ath
149 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
150 AUTOLOAD:=$(call AutoProbe,ath5k)
151 endef
152
153 define KernelPackage/ath5k/description
154 This module adds support for wireless adapters based on
155 Atheros 5xxx chipset.
156 endef
157
158 define KernelPackage/ath6kl
159 $(call KernelPackage/mac80211/Default)
160 TITLE:=Atheros FullMAC wireless devices (common code for ath6kl_sdio and ath6kl_usb)
161 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath6kl
162 HIDDEN:=1
163 DEPENDS+= +kmod-ath
164 FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath6kl/ath6kl_core.ko
165 endef
166
167 define KernelPackage/ath6kl-sdio
168 $(call KernelPackage/mac80211/Default)
169 TITLE:=Atheros 802.11n SDIO wireless cards support
170 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath6kl
171 DEPENDS+= +kmod-mmc +kmod-ath6kl
172 FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko
173 AUTOLOAD:=$(call AutoProbe,ath6kl_sdio)
174 endef
175
176 define KernelPackage/ath6kl-sdio/description
177 This module adds support for wireless adapters based on
178 Atheros IEEE 802.11n AR6003 and AR6004 family of chipsets.
179 endef
180
181 define KernelPackage/ath6kl-usb
182 $(call KernelPackage/mac80211/Default)
183 TITLE:=Atheros 802.11n USB wireless cards support
184 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath6kl
185 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-ath6kl
186 FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath6kl/ath6kl_usb.ko
187 AUTOLOAD:=$(call AutoProbe,ath6kl_usb)
188 endef
189
190 define KernelPackage/ath6kl-usb/description
191 This module adds support for wireless adapters based on the
192 Atheros IEEE 802.11n AR6004 chipset.
193 endef
194
195 define KernelPackage/ath9k-common
196 $(call KernelPackage/mac80211/Default)
197 TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
198 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
199 HIDDEN:=1
200 DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ath79 +kmod-ath +kmod-random-core
201 FILES:= \
202 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
203 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
204 endef
205
206 define KernelPackage/ath9k
207 $(call KernelPackage/mac80211/Default)
208 TITLE:=Atheros 802.11n PCI wireless cards support
209 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
210 DEPENDS+= @PCI_SUPPORT||TARGET_ath79 +kmod-ath9k-common
211 FILES:= \
212 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
213 AUTOLOAD:=$(call AutoProbe,ath9k)
214 endef
215
216 define KernelPackage/ath9k/description
217 This module adds support for wireless adapters based on
218 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
219 endef
220
221 define KernelPackage/ath9k/config
222
223 config ATH9K_HWRNG
224 bool "Add wireless noise as source of randomness to kernel entropy pool"
225 depends on PACKAGE_kmod-ath9k
226 select PACKAGE_kmod-random-core
227 default n
228
229 config ATH9K_SUPPORT_PCOEM
230 bool "Support chips used in PC OEM cards"
231 depends on PACKAGE_kmod-ath9k
232 default y if (x86_64 || i386)
233
234 config ATH9K_TX99
235 bool "Enable TX99 support (WARNING: testing only, breaks normal operation!)"
236 depends on PACKAGE_kmod-ath9k
237
238 config ATH9K_UBNTHSR
239 bool "Support for Ubiquiti UniFi Outdoor+ access point"
240 depends on PACKAGE_kmod-ath9k && TARGET_ath79
241 default y
242
243 endef
244
245 define KernelPackage/ath9k-htc
246 $(call KernelPackage/mac80211/Default)
247 TITLE:=Atheros 802.11n USB device support
248 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
249 DEPENDS+= @USB_SUPPORT +kmod-ath9k-common +kmod-usb-core +ath9k-htc-firmware
250 FILES:= \
251 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
252 AUTOLOAD:=$(call AutoProbe,ath9k_htc)
253 endef
254
255 define KernelPackage/ath9k-htc/description
256 This module adds support for wireless adapters based on
257 Atheros USB AR9271 and AR7010 family of chipsets.
258 endef
259
260 define KernelPackage/ath10k
261 $(call KernelPackage/mac80211/Default)
262 TITLE:=Atheros 802.11ac wireless cards support
263 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath10k
264 DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11AC_SUPPORT \
265 +ATH10K_THERMAL:kmod-hwmon-core +ATH10K_THERMAL:kmod-thermal
266 FILES:= \
267 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
268 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
269 AUTOLOAD:=$(call AutoProbe,ath10k_core ath10k_pci)
270 MODPARAMS.ath10k_core:=frame_mode=2
271 VARIANT:=regular
272 endef
273
274 define KernelPackage/ath10k/description
275 This module adds support for wireless adapters based on
276 Atheros IEEE 802.11ac family of chipsets. For now only
277 PCI is supported.
278 endef
279
280 define KernelPackage/ath10k/config
281
282 config ATH10K_LEDS
283 bool "Enable LED support"
284 default y
285 depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers
286
287 config ATH10K_THERMAL
288 bool "Enable thermal sensors and throttling support"
289 depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers
290
291 endef
292
293 define KernelPackage/ath10k-smallbuffers
294 $(call KernelPackage/ath10k)
295 TITLE+= (small buffers for low-RAM devices)
296 VARIANT:=smallbuffers
297 endef
298
299 define KernelPackage/ath11k
300 $(call KernelPackage/mac80211/Default)
301 TITLE:=Qualcomm 802.11ax wireless chipset support (common code)
302 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
303 DEPENDS+= +kmod-ath +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
304 +kmod-crypto-michael-mic +ATH11K_THERMAL:kmod-hwmon-core +ATH11K_THERMAL:kmod-thermal
305 FILES:=$(PKG_BUILD_DIR)/drivers/soc/qcom/qmi_helpers.ko \
306 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
307 endef
308
309 define KernelPackage/ath11k/description
310 This module adds support for Qualcomm Technologies 802.11ax family of
311 chipsets.
312 endef
313
314 define KernelPackage/ath11k/config
315
316 config ATH11K_THERMAL
317 bool "Enable thermal sensors and throttling support"
318 depends on PACKAGE_kmod-ath11k
319
320 endef
321
322 define KernelPackage/ath11k-pci
323 $(call KernelPackage/mac80211/Default)
324 TITLE:=Qualcomm 802.11ax PCI wireless chipset support
325 URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
326 DEPENDS+= @PCI_SUPPORT +kmod-qrtr-mhi +kmod-ath11k
327 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_pci.ko
328 AUTOLOAD:=$(call AutoProbe,ath11k_pci)
329 endef
330
331 define KernelPackage/ath11k-pci/description
332 This module adds support for Qualcomm Technologies 802.11ax family of
333 chipsets with PCI bus.
334 endef
335
336 define KernelPackage/carl9170
337 $(call KernelPackage/mac80211/Default)
338 TITLE:=Driver for Atheros AR9170 USB sticks
339 DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core +carl9170-firmware
340 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
341 AUTOLOAD:=$(call AutoProbe,carl9170)
342 endef
343
344 define KernelPackage/owl-loader
345 $(call KernelPackage/mac80211/Default)
346 TITLE:=Owl loader for initializing Atheros PCI(e) Wifi chips
347 DEPENDS:=@PCI_SUPPORT +kmod-ath9k
348 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.ko
349 AUTOLOAD:=$(call AutoProbe,ath9k_pci_owl_loader)
350 endef
351
352 define KernelPackage/owl-loader/description
353 Kernel module that helps to initialize certain Qualcomm
354 Atheros' PCI(e) Wifi chips, which have the init data
355 (which contains the PCI device ID for example) stored
356 together with the calibration data in the file system.
357
358 This is necessary for devices like the Cisco Meraki Z1.
359 endef
360
361 define KernelPackage/ar5523
362 $(call KernelPackage/mac80211/Default)
363 TITLE:=Driver for Atheros AR5523 USB sticks
364 DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core
365 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ar5523/ar5523.ko
366 AUTOLOAD:=$(call AutoProbe,ar5523)
367 endef
368
369 define KernelPackage/wil6210
370 $(call KernelPackage/mac80211/Default)
371 TITLE:=QCA/Wilocity 60g WiFi card wil6210 support
372 DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +wil6210-firmware
373 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/wil6210/wil6210.ko
374 AUTOLOAD:=$(call AutoProbe,wil6210)
375 endef