2
0

Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. #
  2. # Copyright (C) 2007-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=mac80211
  10. PKG_VERSION:=2017-01-31
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
  13. PKG_BACKPORT_VERSION:=
  14. PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317
  15. PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.xz
  16. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  19. PKG_DRIVERS = \
  20. ath ath5k ath9k ath9k-common ath9k-htc \
  21. carl9170 \
  22. lib80211 \
  23. mac80211-hwsim \
  24. rt2x00-lib \
  25. rt2800-lib rt2800-mmio rt2800-soc \
  26. PKG_CONFIG_DEPENDS:= \
  27. CONFIG_PACKAGE_kmod-mac80211 \
  28. $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS)) \
  29. CONFIG_PACKAGE_MAC80211_DEBUGFS \
  30. CONFIG_PACKAGE_MAC80211_MESH \
  31. CONFIG_PACKAGE_MAC80211_TRACING \
  32. CONFIG_PACKAGE_ATH_DEBUG \
  33. CONFIG_PACKAGE_ATH_DFS \
  34. CONFIG_ATH_USER_REGD \
  35. include $(INCLUDE_DIR)/package.mk
  36. WMENU:=Wireless Drivers
  37. define KernelPackage/mac80211/Default
  38. SUBMENU:=$(WMENU)
  39. URL:=https://wireless.wiki.kernel.org/
  40. MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  41. endef
  42. define KernelPackage/cfg80211
  43. $(call KernelPackage/mac80211/Default)
  44. TITLE:=cfg80211 - wireless configuration API
  45. DEPENDS+= +iw
  46. FILES:= \
  47. $(PKG_BUILD_DIR)/compat/compat.ko \
  48. $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
  49. endef
  50. define KernelPackage/cfg80211/description
  51. cfg80211 is the Linux wireless LAN (802.11) configuration API.
  52. endef
  53. define KernelPackage/mac80211
  54. $(call KernelPackage/mac80211/Default)
  55. TITLE:=Linux 802.11 Wireless Networking Stack
  56. DEPENDS+= +kmod-cfg80211 +hostapd-common
  57. KCONFIG:=\
  58. CONFIG_AVERAGE=y
  59. FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
  60. MENU:=1
  61. endef
  62. define KernelPackage/mac80211/config
  63. if PACKAGE_kmod-mac80211
  64. config PACKAGE_MAC80211_DEBUGFS
  65. bool "Export mac80211 internals in DebugFS"
  66. select KERNEL_DEBUG_FS
  67. default y
  68. help
  69. Select this to see extensive information about
  70. the internal state of mac80211 in debugfs.
  71. config PACKAGE_MAC80211_TRACING
  72. bool "Enable tracing (mac80211 and supported drivers)"
  73. select KERNEL_FTRACE
  74. select KERNEL_ENABLE_DEFAULT_TRACERS
  75. default n
  76. help
  77. Select this to enable tracing of mac80211 and
  78. related wifi drivers (using trace-cmd).
  79. config PACKAGE_MAC80211_MESH
  80. bool "Enable 802.11s mesh support"
  81. default y
  82. endif
  83. endef
  84. define KernelPackage/mac80211/description
  85. Generic IEEE 802.11 Networking Stack (mac80211)
  86. endef
  87. define KernelPackage/adm8211
  88. $(call KernelPackage/mac80211/Default)
  89. TITLE:=ADMTek 8211 support
  90. DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
  91. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/admtek/adm8211.ko
  92. AUTOLOAD:=$(call AutoProbe,adm8211)
  93. endef
  94. define KernelPackage/airo
  95. $(call KernelPackage/mac80211/Default)
  96. TITLE:=Cisco Aironet driver
  97. DEPENDS+=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-cfg80211 @TARGET_x86
  98. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/cisco/airo.ko
  99. AUTOLOAD:=$(call AutoProbe,airo)
  100. endef
  101. define KernelPackage/airo/description
  102. Kernel support for Cisco Aironet cards
  103. endef
  104. define KernelPackage/ath/config
  105. if PACKAGE_kmod-ath
  106. config ATH_USER_REGD
  107. bool "Force Atheros drivers to respect the user's regdomain settings"
  108. default y
  109. help
  110. Atheros' idea of regulatory handling is that the EEPROM of the card defines
  111. the regulatory limits and the user is only allowed to restrict the settings
  112. even further, even if the country allows frequencies or power levels that
  113. are forbidden by the EEPROM settings.
  114. Select this option if you want the driver to respect the user's decision about
  115. regulatory settings.
  116. config PACKAGE_ATH_DEBUG
  117. bool "Atheros wireless debugging"
  118. help
  119. Say Y, if you want to debug atheros wireless drivers.
  120. Only ath9k makes use of this.
  121. config PACKAGE_ATH_DFS
  122. bool "Enable DFS support"
  123. default y
  124. help
  125. Dynamic frequency selection (DFS) is required for most of the 5 GHz band
  126. channels in Europe, US, and Japan.
  127. Select this option if you want to use such channels.
  128. endif
  129. endef
  130. define KernelPackage/ath
  131. $(call KernelPackage/mac80211/Default)
  132. TITLE:=Atheros common driver part
  133. DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx||TARGET_ath25 +kmod-mac80211
  134. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
  135. MENU:=1
  136. endef
  137. define KernelPackage/ath/description
  138. This module contains some common parts needed by Atheros Wireless drivers.
  139. endef
  140. define KernelPackage/ath5k
  141. $(call KernelPackage/mac80211/Default)
  142. TITLE:=Atheros 5xxx wireless cards support
  143. URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath5k
  144. DEPENDS+= @PCI_SUPPORT||@TARGET_ath25 +kmod-ath +@DRIVER_11W_SUPPORT
  145. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
  146. AUTOLOAD:=$(call AutoProbe,ath5k)
  147. endef
  148. define KernelPackage/ath5k/description
  149. This module adds support for wireless adapters based on
  150. Atheros 5xxx chipset.
  151. endef
  152. define KernelPackage/ath9k-common
  153. $(call KernelPackage/mac80211/Default)
  154. TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
  155. URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
  156. HIDDEN:=1
  157. DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT +@KERNEL_RELAY
  158. FILES:= \
  159. $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
  160. $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
  161. endef
  162. define KernelPackage/ath9k
  163. $(call KernelPackage/mac80211/Default)
  164. TITLE:=Atheros 802.11n PCI wireless cards support
  165. URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
  166. DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath9k-common
  167. FILES:= \
  168. $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
  169. AUTOLOAD:=$(call AutoProbe,ath9k)
  170. endef
  171. define KernelPackage/ath9k/description
  172. This module adds support for wireless adapters based on
  173. Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
  174. endef
  175. define KernelPackage/ath9k/config
  176. config ATH9K_SUPPORT_PCOEM
  177. bool "Support chips used in PC OEM cards"
  178. depends on PACKAGE_kmod-ath9k
  179. config ATH9K_TX99
  180. bool "Enable TX99 support"
  181. depends on PACKAGE_kmod-ath9k
  182. config ATH9K_UBNTHSR
  183. bool "Support for Ubiquiti UniFi Outdoor+ access point"
  184. depends on PACKAGE_kmod-ath9k && TARGET_ar71xx_generic
  185. default y
  186. endef
  187. define KernelPackage/ath9k-htc
  188. $(call KernelPackage/mac80211/Default)
  189. TITLE:=Atheros 802.11n USB device support
  190. URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
  191. DEPENDS+= @USB_SUPPORT +kmod-ath9k-common +kmod-usb-core +ath9k-htc-firmware
  192. FILES:= \
  193. $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
  194. AUTOLOAD:=$(call AutoProbe,ath9k_htc)
  195. endef
  196. define KernelPackage/ath9k-htc/description
  197. This module adds support for wireless adapters based on
  198. Atheros USB AR9271 and AR7010 family of chipsets.
  199. endef
  200. define KernelPackage/carl9170
  201. $(call KernelPackage/mac80211/Default)
  202. TITLE:=Driver for Atheros AR9170 USB sticks
  203. DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core +@DRIVER_11N_SUPPORT +carl9170-firmware
  204. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
  205. AUTOLOAD:=$(call AutoProbe,carl9170)
  206. endef
  207. define KernelPackage/lib80211
  208. $(call KernelPackage/mac80211/Default)
  209. TITLE:=802.11 Networking stack
  210. DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash
  211. FILES:= \
  212. $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
  213. $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
  214. $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
  215. $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
  216. AUTOLOAD:=$(call AutoProbe, \
  217. lib80211 \
  218. lib80211_crypt_wep \
  219. lib80211_crypt_ccmp \
  220. lib80211_crypt_tkip \
  221. )
  222. endef
  223. define KernelPackage/lib80211/description
  224. Kernel modules for 802.11 Networking stack
  225. Includes:
  226. - lib80211
  227. - lib80211_crypt_wep
  228. - lib80211_crypt_tkip
  229. - lib80211_crytp_ccmp
  230. endef
  231. define KernelPackage/mac80211-hwsim
  232. $(call KernelPackage/mac80211/Default)
  233. TITLE:=mac80211 HW simulation device
  234. DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT
  235. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
  236. AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
  237. endef
  238. define KernelPackage/rt2x00-lib
  239. $(call KernelPackage/rt2x00/Default)
  240. DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-mac80211 +kmod-lib-crc-itu-t
  241. TITLE+= (LIB)
  242. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2x00lib.ko
  243. MENU:=1
  244. endef
  245. define KernelPackage/rt2x00-lib/config
  246. if PACKAGE_kmod-rt2x00-lib
  247. config PACKAGE_RT2X00_LIB_DEBUGFS
  248. bool "Enable rt2x00 debugfs support"
  249. depends on PACKAGE_MAC80211_DEBUGFS
  250. help
  251. Enable creation of debugfs files for the rt2x00 drivers.
  252. These debugfs files support both reading and writing of the
  253. most important register types of the rt2x00 hardware.
  254. config PACKAGE_RT2X00_DEBUG
  255. bool "Enable rt2x00 debug output"
  256. help
  257. Enable debugging output for all rt2x00 modules
  258. endif
  259. endef
  260. define KernelPackage/rt2800-lib
  261. $(call KernelPackage/rt2x00/Default)
  262. DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-lib-crc-ccitt +@DRIVER_11N_SUPPORT
  263. HIDDEN:=1
  264. TITLE+= (rt2800 LIB)
  265. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2800lib.ko
  266. endef
  267. define KernelPackage/rt2x00-mmio
  268. $(call KernelPackage/rt2x00/Default)
  269. DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-eeprom-93cx6
  270. HIDDEN:=1
  271. TITLE+= (MMIO)
  272. FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2x00mmio.ko
  273. endef
  274. define KernelPackage/rt2800-mmio
  275. $(call KernelPackage/rt2x00/Default)
  276. TITLE += (RT28xx/RT3xxx MMIO)
  277. DEPENDS += +kmod-rt2800-lib +kmod-rt2x00-mmio
  278. HIDDEN:=1
  279. FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2800mmio.ko
  280. endef
  281. define KernelPackage/rt2800-soc
  282. $(call KernelPackage/rt2x00/Default)
  283. DEPENDS += @(TARGET_ramips_rt288x||TARGET_ramips_rt305x||TARGET_ramips_rt3883||TARGET_ramips_mt7620) +kmod-rt2800-mmio +kmod-rt2800-lib
  284. TITLE += (RT28xx/RT3xxx SoC)
  285. FILES := \
  286. $(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2x00soc.ko \
  287. $(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt2800soc.ko
  288. AUTOLOAD:=$(call AutoProbe,rt2800soc)
  289. endef
  290. config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
  291. config-y:= \
  292. WLAN \
  293. NL80211_TESTMODE \
  294. CFG80211_WEXT \
  295. CFG80211_INTERNAL_REGDB \
  296. CFG80211_CERTIFICATION_ONUS \
  297. MAC80211_RC_MINSTREL \
  298. MAC80211_RC_MINSTREL_HT \
  299. MAC80211_RC_MINSTREL_VHT \
  300. MAC80211_RC_DEFAULT_MINSTREL \
  301. WLAN_VENDOR_ADMTEK \
  302. WLAN_VENDOR_ATH \
  303. WLAN_VENDOR_ATMEL \
  304. WLAN_VENDOR_INTEL \
  305. WLAN_VENDOR_INTERSIL \
  306. WLAN_VENDOR_MARVELL \
  307. WLAN_VENDOR_MEDIATEK \
  308. WLAN_VENDOR_RALINK \
  309. WLAN_VENDOR_REALTEK \
  310. WLAN_VENDOR_RSI \
  311. WLAN_VENDOR_ST \
  312. WLAN_VENDOR_TI \
  313. WLAN_VENDOR_ZYDAS \
  314. config-$(call config_package,cfg80211) += CFG80211
  315. config-$(call config_package,mac80211) += MAC80211
  316. config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
  317. ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
  318. config-y += \
  319. CFG80211_DEBUGFS \
  320. MAC80211_DEBUGFS \
  321. ATH9K_DEBUGFS \
  322. ATH9K_HTC_DEBUGFS \
  323. CARL9170_DEBUGFS \
  324. ATH5K_DEBUG
  325. endif
  326. ifdef CONFIG_PACKAGE_MAC80211_TRACING
  327. config-y += \
  328. ATH6KL_TRACING \
  329. ATH_TRACEPOINTS \
  330. WIL6210_TRACING \
  331. ATH5K_TRACER \
  332. IWLWIFI_DEVICE_TRACING
  333. endif
  334. config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
  335. config-$(call config_package,airo) += AIRO
  336. config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
  337. config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH9K_STATION_STATISTICS
  338. config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED
  339. config-$(call config_package,ath9k) += ATH9K
  340. config-$(call config_package,ath9k-common) += ATH9K_COMMON
  341. config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
  342. config-$(CONFIG_PCI) += ATH9K_PCI
  343. config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
  344. config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
  345. config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
  346. config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
  347. config-$(call config_package,ath9k-htc) += ATH9K_HTC
  348. config-$(call config_package,ath5k) += ATH5K
  349. ifdef CONFIG_TARGET_ath25
  350. config-y += ATH5K_AHB
  351. else
  352. config-y += ATH5K_PCI
  353. endif
  354. config-$(call config_package,carl9170) += CARL9170
  355. config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
  356. config-$(call config_package,rt2x00-lib) += RT2X00 RT2X00_LIB
  357. config-$(call config_package,rt2x00-mmio) += RT2X00_LIB_MMIO
  358. config-$(call config_package,rt2800-lib) += RT2800_LIB
  359. config-$(call config_package,rt2800-soc) += RT2800SOC
  360. config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS
  361. MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
  362. CROSS_COMPILE="$(KERNEL_CROSS)" \
  363. ARCH="$(LINUX_KARCH)" \
  364. EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS)" \
  365. KLIB_BUILD="$(LINUX_DIR)" \
  366. MODPROBE=true \
  367. KLIB=$(TARGET_MODULES_DIR) \
  368. KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
  369. KBUILD_LDFLAGS_MODULE_PREREQ=
  370. ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
  371. MAKE_OPTS += V=1
  372. endif
  373. define ConfigVars
  374. $(subst $(space),,$(foreach opt,$(config-$(1)),CPTCFG_$(opt)=$(1)
  375. ))
  376. endef
  377. define mac80211_config
  378. $(call ConfigVars,m)$(call ConfigVars,y)
  379. endef
  380. $(eval $(call shexport,mac80211_config))
  381. define Build/Prepare
  382. rm -rf $(PKG_BUILD_DIR)
  383. mkdir -p $(PKG_BUILD_DIR)
  384. $(PKG_UNPACK)
  385. $(Build/Patch)
  386. rm -rf \
  387. $(PKG_BUILD_DIR)/include/linux/ssb \
  388. $(PKG_BUILD_DIR)/include/linux/bcma \
  389. $(PKG_BUILD_DIR)/include/net/bluetooth
  390. rm -f \
  391. $(PKG_BUILD_DIR)/include/linux/cordic.h \
  392. $(PKG_BUILD_DIR)/include/linux/crc8.h \
  393. $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
  394. $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
  395. $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
  396. $(PKG_BUILD_DIR)/include/net/ieee80211.h \
  397. $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
  398. echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
  399. $(CP) ./files/regdb.txt $(PKG_BUILD_DIR)/net/wireless/db.txt
  400. endef
  401. ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
  402. define Build/Compile/kmod
  403. rm -rf $(PKG_BUILD_DIR)/modules
  404. +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
  405. endef
  406. endif
  407. define Build/Configure
  408. cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
  409. cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
  410. endef
  411. define Build/Compile
  412. $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
  413. $(MAKE) $(MAKE_OPTS) allnoconfig
  414. $(call Build/Compile/kmod)
  415. endef
  416. define Build/InstallDev
  417. mkdir -p \
  418. $(1)/usr/include/mac80211 \
  419. $(1)/usr/include/mac80211-backport \
  420. $(1)/usr/include/mac80211/ath \
  421. $(1)/usr/include/net/mac80211
  422. $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
  423. $(CP) $(PKG_BUILD_DIR)/backport-include/* $(1)/usr/include/mac80211-backport/
  424. $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
  425. $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
  426. rm -f $(1)/usr/include/mac80211-backport/linux/module.h
  427. endef
  428. define KernelPackage/cfg80211/install
  429. $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
  430. $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
  431. $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
  432. $(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
  433. $(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/00-wifi-detect
  434. endef
  435. $(eval $(call KernelPackage,ath))
  436. $(eval $(call KernelPackage,ath5k))
  437. $(eval $(call KernelPackage,ath9k))
  438. $(eval $(call KernelPackage,ath9k-common))
  439. $(eval $(call KernelPackage,ath9k-htc))
  440. $(eval $(call KernelPackage,carl9170))
  441. $(eval $(call KernelPackage,cfg80211))
  442. $(eval $(call KernelPackage,lib80211))
  443. $(eval $(call KernelPackage,mac80211))
  444. $(eval $(call KernelPackage,mac80211-hwsim))
  445. $(eval $(call KernelPackage,rt2x00-lib))
  446. $(eval $(call KernelPackage,rt2x00-mmio))
  447. $(eval $(call KernelPackage,rt2800-lib))
  448. $(eval $(call KernelPackage,rt2800-mmio))
  449. $(eval $(call KernelPackage,rt2800-soc))