mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
ath10k: provide a build variant for small RAM devices
This commit is contained in:
parent
440bb2bf81
commit
011c015a6f
@ -443,9 +443,15 @@ config-$(call config_package,rsi91x-sdio) += RSI_SDIO
|
||||
|
||||
config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS
|
||||
|
||||
C_DEFINES=
|
||||
|
||||
ifeq ($(BUILD_VARIANT),smallbuffers)
|
||||
C_DEFINES+= -DCONFIG_ATH10K_SMALLBUFFERS
|
||||
endif
|
||||
|
||||
MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) \
|
||||
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv" \
|
||||
KLIB_BUILD="$(LINUX_DIR)" \
|
||||
MODPROBE=true \
|
||||
|
@ -1,5 +1,5 @@
|
||||
PKG_DRIVERS += \
|
||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
|
||||
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \
|
||||
ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
@ -59,6 +59,7 @@ config-$(CONFIG_ATH11K_MEM_PROFILE_512M) += ATH11K_MEM_PROFILE_512M
|
||||
|
||||
config-$(call config_package,ath9k-htc) += ATH9K_HTC
|
||||
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
|
||||
config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SMALLBUFFERS
|
||||
config-$(call config_package,ath11k) += ATH11K
|
||||
config-$(call config_package,ath11k-ahb) += ATH11K_AHB
|
||||
config-$(call config_package,ath11k-pci) += ATH11K_PCI
|
||||
@ -267,6 +268,7 @@ define KernelPackage/ath10k
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ath10k_pci)
|
||||
VARIANT:=regular
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k/description
|
||||
@ -280,15 +282,21 @@ define KernelPackage/ath10k/config
|
||||
config ATH10K_LEDS
|
||||
bool "Enable LED support"
|
||||
default y
|
||||
depends on PACKAGE_kmod-ath10k
|
||||
depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers
|
||||
|
||||
config ATH10K_THERMAL
|
||||
bool "Enable thermal sensors and throttling support"
|
||||
default y
|
||||
depends on PACKAGE_kmod-ath10k
|
||||
depends on PACKAGE_kmod-ath10k || PACKAGE_kmod-ath10k-smallbuffers
|
||||
|
||||
endef
|
||||
|
||||
define KernelPackage/ath10k-smallbuffers
|
||||
$(call KernelPackage/ath10k)
|
||||
TITLE+= (small buffers for low-RAM devices)
|
||||
VARIANT:=smallbuffers
|
||||
endef
|
||||
|
||||
define KernelPackage/ath11k
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Qualcomm 802.11ax wireless chipset support (common code)
|
||||
|
@ -0,0 +1,64 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -235,7 +235,11 @@ enum htt_rx_ring_flags {
|
||||
};
|
||||
|
||||
#define HTT_RX_RING_SIZE_MIN 128
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
#define HTT_RX_RING_SIZE_MAX 2048
|
||||
+#else
|
||||
+#define HTT_RX_RING_SIZE_MAX 512
|
||||
+#endif
|
||||
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
.dest_nentries = 512,
|
||||
+#else
|
||||
+ .dest_nentries = 128,
|
||||
+#endif
|
||||
.recv_cb = ath10k_pci_htt_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -140,7 +144,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
.dest_nentries = 128,
|
||||
+#else
|
||||
+ .dest_nentries = 64,
|
||||
+#endif
|
||||
.recv_cb = ath10k_pci_htc_rx_cb,
|
||||
},
|
||||
|
||||
@@ -167,7 +175,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 512,
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
.dest_nentries = 512,
|
||||
+#else
|
||||
+ .dest_nentries = 128,
|
||||
+#endif
|
||||
.recv_cb = ath10k_pci_htt_rx_cb,
|
||||
},
|
||||
|
||||
@@ -192,7 +204,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
.src_sz_max = 2048,
|
||||
+#ifndef CONFIG_ATH10K_SMALLBUFFERS
|
||||
.dest_nentries = 128,
|
||||
+#else
|
||||
+ .dest_nentries = 96,
|
||||
+#endif
|
||||
.recv_cb = ath10k_pci_pktlog_rx_cb,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user