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