Skip to content

Commit

Permalink
ath11k_nss: Possible workaround to 0 wifi stats
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Khan <[email protected]>
(cherry picked from commit 0056ba46ffe980c88ab4d250eb4799cb0a632de7)
  • Loading branch information
qosmio committed Nov 18, 2024
1 parent 4e35f30 commit 0910019
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions package/kernel/mac80211/files/qca-nss-pbuf.init
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

START=71
START=95
NAME=qca-nss-pbuf

reload_wifi() {
if [ -r /sys/module/ath11k/parameters/nss_offload ]; then
nss_offload=$(cat /sys/module/ath11k/parameters/nss_offload 2> /dev/null)
[ "$nss_offload" -eq 1 ] && wifi up
fi
}

get_num_cpus() {
local num_cpus=$(awk -F': ' '/^processor/ {count++} END {print count}' /proc/cpuinfo)
echo ${num_cpus:-1}
local num_cpus
num_cpus=$(awk -F': ' '/^processor/ {count++} END {print count}' /proc/cpuinfo)
echo "${num_cpus:-1}"
}

apply_sysctl() {
Expand Down Expand Up @@ -169,5 +177,6 @@ start() {
num_cpus=$(get_num_cpus)
hash_bitmap="$(((1 << num_cpus) - 1))"
sysctl -w dev.nss.rps.hash_bitmap=$hash_bitmap > /dev/null 2>&1
reload_wifi

}

0 comments on commit 0910019

Please sign in to comment.