ath11k_nss: allow specifying pbuf 'memory_profile'

In case you want to specify the memory profile to use rather than
letting it autodetect. The following new uci option is introduced.
pbuf.

config general opt
  option memory_profile ''

choices are 1gb, 512mb, 256mb. Delete option to let it autodetect.

NOTE: You must reboot after changing these settings, for it to
autoapply.

ath11k_nss: fix compilation and rename some patches
This commit is contained in:
Qosmio 2024-01-10 22:19:51 -05:00 committed by Sean Khan
parent b93b73df54
commit 6e41396273
8 changed files with 40 additions and 7 deletions

View File

@ -43,7 +43,23 @@ apply_nss_config() {
sysctl -w dev.nss.n2hcfg.n2h_queue_limit_core0=256 > /dev/null 2> /dev/null
sysctl -w dev.nss.n2hcfg.n2h_queue_limit_core1=256 > /dev/null 2> /dev/null
board=$(board_name)
local memory_profile
if memory_profile=$(uci_get pbuf.opt.memory_profile); then
case "$memory_profile" in
1g*|512m*|256m*)
board=$memory_profile
logger -t ath11k_nss "Using custom memory profile - $board"
;;
*)
logger -s -t ath11k_nss -p user.error "Unknown profile $memory_profile. Choose 1gb, 512mb, or 256mb"
board=$(board_name)
logger -s -t ath11k_nss -p user.warn "Falling back to: $board"
;;
esac
else
board=$(board_name)
logger -t ath11k_nss "Setting n2hcfg values for board: $board"
fi
case "$board" in
# 1GB+ profile
@ -60,7 +76,8 @@ apply_nss_config() {
qnap,301w | \
xiaomi,ax9000 | \
yuncore,ax880 | \
zyxel,nbg7815)
zyxel,nbg7815 | \
1g*)
extra_pbuf_core0=9000000 n2h_high_water_core0=67392 n2h_wifi_pool_buf=40960 apply_sysctl
;;
# 512MB profile
@ -69,11 +86,13 @@ apply_nss_config() {
linksys,mx4200v1 | \
redmi,ax6 | \
xiaomi,ax3600 | \
zte,mf269) # 512MB profile
zte,mf269 | \
512m*)
extra_pbuf_core0=3100000 n2h_high_water_core0=30624 n2h_wifi_pool_buf=8192 apply_sysctl
;;
# 256MB profile
netgear,wax218)
netgear,wax218 | \
256m*)
extra_pbuf_core0=3100000 n2h_high_water_core0=30258 n2h_wifi_pool_buf=4096 apply_sysctl
;;
esac
@ -88,7 +107,7 @@ start() {
enable_nss_offload=$(cat /sys/module/ath11k/parameters/nss_offload)
if [ "$enable_nss_offload" = "0" ]; then
logger -t ath11k_nss "Module parameter 'nss_offload=0'. Skipping applying wifi nss configs"
logger -t ath11k_nss -s user.warn "Module parameter 'nss_offload=0'. Skipping applying wifi nss configs"
exit 1
fi

View File

@ -0,0 +1,5 @@
config general opt
# to bypass board autodetection, uncomment ONE of the options below
# option memory_profile '1gb'
# option memory_profile '512mb'
# option memory_profile '256mb'

View File

@ -1069,7 +1069,7 @@ Signed-off-by: Sriram R <srirrama@codeaurora.org>
/* create list containing all the subframes */
ieee80211_amsdu_to_8023s(skb, &subframe_list, NULL,
- vif->type, 0, NULL, NULL);
+ vif->type, 0, NULL, NULL, false);
+ vif->type, 0, NULL, NULL, 0);
/* This shouldn't happen, indicating error during defragmentation */
if (skb_queue_empty(&subframe_list))

View File

@ -66,6 +66,15 @@ Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
rcu_read_unlock();
return;
}
@@ -4374,7 +4378,7 @@ void __ieee80211_subif_start_xmit(struct
if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
if (sta)
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
- ieee80211_8023_xmit(sdata, dev, sta, key, skb);
+ ieee80211_8023_xmit(sdata, dev, sta, key, skb, info_flags, ctrl_flags, cookie);
} else {
ieee80211_tx_stats(dev, skb->len);
ieee80211_xmit(sdata, sta, skb);
@@ -4657,19 +4663,29 @@ static bool ieee80211_tx_8023(struct iee
static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,

View File

@ -251,7 +251,7 @@ Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org>
+
+static ssize_t
+ath11k_debug_write_enable_memory_stats(struct file *file,
+ char __user *ubuf,
+ const char __user *ubuf,
+ size_t count, loff_t *ppos)
+{
+ struct ath11k_base *ab = file->private_data;