mac80211: Expose support for ath9k Dynack
[openwrt/openwrt.git] / package / kernel / mac80211 / Makefile
index 8656e536a0ef342d1ee16acbadcb17129ad8b314..91c08fdb7e02a49ee52aa955b66394c9ae9d64a4 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=2017-11-01
-PKG_RELEASE:=4
+PKG_RELEASE:=9
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 PKG_HASH:=8437ab7886b988c8152e7a4db30b7f41009e49a3b2cb863edd05da1ecd7eb05a
 
@@ -57,6 +57,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_ATH_DEBUG \
        CONFIG_PACKAGE_ATH_DFS \
        CONFIG_PACKAGE_ATH_SPECTRAL \
+       CONFIG_PACKAGE_ATH_DYNACK \
        CONFIG_PACKAGE_B43_DEBUG \
        CONFIG_PACKAGE_B43_PIO \
        CONFIG_PACKAGE_B43_PHY_G \
@@ -197,6 +198,17 @@ define KernelPackage/ath/config
                help
                  Say Y to enable access to the FFT/spectral data via debugfs.
 
+       config PACKAGE_ATH_DYNACK
+               bool "Enable Dynack support"
+               depends on PACKAGE_kmod-ath9k-common
+               help
+                 Enables support for Dynamic ACK estimation, which allows the fastest possible speed
+                 at any distance automatically by increasing/decreasing the max frame ACK time for
+                 the most remote station detected.  It can be enabled by using iw (iw phy0 set distance auto),
+                 or by sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink.
+
+                 Select this option if you want to enable this feature
+
   endif
 endef
 
@@ -1614,7 +1626,7 @@ config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_R
 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
-
+config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
 config-$(call config_package,ath9k) += ATH9K
 config-$(call config_package,ath9k-common) += ATH9K_COMMON
 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
@@ -1797,11 +1809,16 @@ ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
  endef
 endif
 
-define Build/Configure
-       cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
-       cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
-       cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
-endef
+#do not Build/Configure for EXTERNAL KERNEL
+ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
+  ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
+    define Build/Configure
+         cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
+         cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
+         cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
+    endef
+  endif
+endif
 
 define Build/Compile
        $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config