mirror of
https://github.com/breeze303/openwrt-ipq.git
synced 2025-12-16 20:41:05 +00:00
ath11k_nss: fix ordering of sysctl values
`dev.nss.n2hcfg.n2h_wifi_pool_buf` must be set BEFORE setting `dev.nss.n2hcfg.n2h_high_water_core0`, otherwise it resets the value.
This commit is contained in:
parent
ed4954750b
commit
e676e9ecbc
@ -18,16 +18,23 @@ START=20
|
||||
|
||||
apply_sysctl() {
|
||||
[ $(sysctl -n -e dev.nss.general.redirect) = "0" ] && /etc/init.d/qca-nss-ecm start
|
||||
# Running this script multiple times is useless, as extra_pbuf_core0
|
||||
# can't be changed if it is allocated, assume it's already been run.
|
||||
extra_pbuf_core0=$(sysctl -n -e dev.nss.n2hcfg.extra_pbuf_core0)
|
||||
|
||||
logger -t ath11k_nss "$board - setting dev.nss.n2hcfg.extra_pbuf_core0=$extra_pbuf_core0"
|
||||
sysctl -w dev.nss.n2hcfg.extra_pbuf_core0=$extra_pbuf_core0 > /dev/null 2> /dev/null
|
||||
|
||||
logger -t ath11k_nss "$board - setting dev.nss.n2hcfg.n2h_high_water_core0=$n2h_high_water_core0"
|
||||
sysctl -w dev.nss.n2hcfg.n2h_high_water_core0=$n2h_high_water_core0 > /dev/null 2> /dev/null
|
||||
if [ "$extra_pbuf_core0" = "0" ]; then
|
||||
logger -t ath11k_nss "$board - setting dev.nss.n2hcfg.extra_pbuf_core0=$extra_pbuf_core0"
|
||||
sysctl -w dev.nss.n2hcfg.extra_pbuf_core0=$extra_pbuf_core0 > /dev/null 2> /dev/null
|
||||
else
|
||||
logger -t ath11k_nss "Sysctl key 'extra_pbuf_core0' already set to '"$extra_pbuf_core0"'. Skipping applying wifi nss configs"
|
||||
fi
|
||||
|
||||
logger -t ath11k_nss "$board - setting dev.nss.n2hcfg.n2h_wifi_pool_buf=$n2h_wifi_pool_buf"
|
||||
sysctl -w dev.nss.n2hcfg.n2h_wifi_pool_buf=$n2h_wifi_pool_buf > /dev/null 2> /dev/null
|
||||
|
||||
logger -t ath11k_nss "$board - setting dev.nss.n2hcfg.n2h_high_water_core0=$n2h_high_water_core0"
|
||||
sysctl -w dev.nss.n2hcfg.n2h_high_water_core0=$n2h_high_water_core0
|
||||
|
||||
}
|
||||
|
||||
apply_nss_config() {
|
||||
@ -51,7 +58,7 @@ apply_nss_config() {
|
||||
qnap,301w | \
|
||||
xiaomi,ax9000 | \
|
||||
zyxel,nbg7815)
|
||||
extra_pbuf_core0=10000000 n2h_high_water_core0=72512 n2h_wifi_pool_buf=36864 apply_sysctl
|
||||
extra_pbuf_core0=9000000 n2h_high_water_core0=67392 n2h_wifi_pool_buf=40960 apply_sysctl
|
||||
;;
|
||||
# 512MB profile
|
||||
edimax,cax1800 | \
|
||||
@ -79,13 +86,5 @@ start() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Running this script multiple times is useless, as extra_pbuf_core0
|
||||
# can't be changed if it is allocated, assume it's already been run.
|
||||
extra_pbuf_core0=$(sysctl -n -e dev.nss.n2hcfg.extra_pbuf_core0)
|
||||
|
||||
if [ "$extra_pbuf_core0" = "0" ]; then
|
||||
apply_nss_config
|
||||
else
|
||||
logger -t ath11k_nss "Sysctl key 'extra_pbuf_core0' already set to '"$extra_pbuf_core0"'. Skipping applying wifi nss configs"
|
||||
fi
|
||||
apply_nss_config
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user