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