mirror of
https://github.com/optim-enterprises-bv/openwrt-ipq.git
synced 2025-10-29 09:23:01 +00:00
ath11k_nss: Possible workaround to 0 wifi stats
Signed-off-by: Sean Khan <datapronix@protonmail.com> (cherry picked from commit 0056ba46ffe980c88ab4d250eb4799cb0a632de7)
This commit is contained in:
15
package/kernel/mac80211/files/qca-nss-pbuf.init
Executable file → Normal file
15
package/kernel/mac80211/files/qca-nss-pbuf.init
Executable file → Normal file
@@ -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() {
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user