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 6dc645a)
  • Loading branch information
qosmio committed Oct 3, 2024
1 parent aaf6099 commit f7e4533
Show file tree
Hide file tree
Showing 21 changed files with 116 additions and 37 deletions.
1 change: 1 addition & 0 deletions include/package-defaults.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright (C) 2006-2020 OpenWrt.org

PKG_DEFAULT_DEPENDS = +libc
QTI_SOFTWARE_CATEGORY:=QTI software

ifneq ($(PKG_NAME),toolchain)
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
Expand Down
3 changes: 3 additions & 0 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ define Package/base-files/install
$(1)/etc/openwrt_version \
$(1)/usr/lib/os-release

sed -i -e "s,.*,\o033[31m&\o033[0m," \
-e "s,Open.*,\o033[93m&\o033[0m," \
-e "s,W .*,\o033[34m&\o033[0m," $(1)/etc/banner

$(SED) "s#%PATH%#$(TARGET_INIT_PATH)#g" \
$(1)/sbin/hotplug-call \
Expand Down
4 changes: 4 additions & 0 deletions package/base-files/files/sbin/sysupgrade
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CONF_IMAGE=
CONF_BACKUP_LIST=0
CONF_BACKUP=
CONF_RESTORE=
CURR_PARTITION=0
NEED_IMAGE=
HELP=0
TEST=0
Expand Down Expand Up @@ -50,6 +51,7 @@ while [ -n "$1" ]; do
-r|--restore-backup) CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
-l|--list-backup) CONF_BACKUP_LIST=1;;
-f) CONF_IMAGE="$2"; shift;;
-s) CURR_PARTITION=1;;
-F|--force) export FORCE=1;;
-T|--test) TEST=1;;
-h|--help) HELP=1; break;;
Expand Down Expand Up @@ -79,6 +81,7 @@ upgrade-option:
-p do not attempt to restore the partition table after flash.
-k include in backup a list of current installed packages at
$INSTALLED_PACKAGES
-s stay on current partition (for dual firmware devices)
-T | --test
Verify image and config .tar.gz but do not actually flash.
-F | --force
Expand Down Expand Up @@ -416,6 +419,7 @@ else
json_add_string command "$COMMAND"
json_add_object options
json_add_int save_partitions "$SAVE_PARTITIONS"
[ $CURR_PARTITION -eq 1 ] && json_add_boolean curr_partition 1
json_close_object

ubus call system sysupgrade "$(json_dump)"
Expand Down
4 changes: 1 addition & 3 deletions package/kernel/linux/modules/fs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,9 @@ define KernelPackage/pstore
TITLE:=Pstore file system
DEFAULT:=m if ALL_KMODS
KCONFIG:= \
CONFIG_PSTORE \
CONFIG_PSTORE_COMPRESS=y
CONFIG_PSTORE
FILES:= $(LINUX_DIR)/fs/pstore/pstore.ko
AUTOLOAD:=$(call AutoLoad,30,pstore,1)
DEPENDS:=+kmod-lib-zlib-deflate +kmod-lib-zlib-inflate
endef

define KernelPackage/pstore/description
Expand Down
3 changes: 2 additions & 1 deletion package/kernel/linux/modules/other.mk
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ define KernelPackage/ramoops
TITLE:=Ramoops (pstore-ram)
DEFAULT:=m if ALL_KMODS
KCONFIG:=CONFIG_PSTORE_RAM \
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_CONSOLE=y \
CONFIG_PSTORE_PMSG=y
DEPENDS:=+kmod-pstore +kmod-reed-solomon
FILES:= $(LINUX_DIR)/fs/pstore/ramoops.ko
AUTOLOAD:=$(call AutoLoad,30,ramoops,1)
Expand Down
16 changes: 13 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,21 @@
# 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
if grep -q 1 /sys/module/ath11k/parameters/nss_offload; then
wifi up
fi
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 +178,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

}
2 changes: 1 addition & 1 deletion package/kernel/qca-nss-dp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ define KernelPackage/qca-nss-dp
DEPENDS:=@TARGET_qualcommax +kmod-qca-ssdk
TITLE:=Qualcom NSS dataplane ethernet driver
FILES:=$(PKG_BUILD_DIR)/qca-nss-dp.ko
AUTOLOAD:=$(call AutoLoad,31,qca-nss-dp,1)
AUTOLOAD:=$(call AutoLoad,31,qca-nss-dp)
endef

define KernelPackage/qca-nss-dp/Description
Expand Down
7 changes: 7 additions & 0 deletions package/libs/openssl/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,11 @@ config OPENSSL_WITH_ASYNC
initiate crypto operations asynchronously. In order to work
this will require the presence of an async capable engine.

config OPENSSL_KTLS
bool
prompt "Enable Kernel Transport Layer Security (kTLS) Offloads"
help
This enables the use of the kTLS offload feature in OpenSSL.
Requires kernel version 4.13 or later.

endif
16 changes: 16 additions & 0 deletions package/libs/openssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_OPTIMIZE_SPEED \
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM \
CONFIG_OPENSSL_SMALL_FOOTPRINT \
CONFIG_OPENSSL_KTLS \
CONFIG_OPENSSL_WITH_ARIA \
CONFIG_OPENSSL_WITH_ASM \
CONFIG_OPENSSL_WITH_ASYNC \
Expand Down Expand Up @@ -352,6 +353,21 @@ ifdef CONFIG_i386
endif
endif

ifndef CONFIG_OPENSSL_SSL3
OPENSSL_OPTIONS += no-ssl3 no-ssl3-method no-unit-test no-external-tests
OPENSSL_OPTIONS += no-afalgeng no-aria no-asan no-async
OPENSSL_OPTIONS += no-autoerrinit
OPENSSL_OPTIONS += no-capieng no-cast no-cms no-comp no-bf
OPENSSL_OPTIONS += no-crypto-mdebug no-ct no-dgram no-dtls no-egd no-fuzz-afl no-fuzz-libfuzzer no-gost no-idea
OPENSSL_OPTIONS += no-mdc2 no-msan no-ocb no-rc2 no-rc4 no-rc5
OPENSSL_OPTIONS += no-sctp no-seed no-sm2 no-sm3 no-sm4 no-srp no-srtp no-weak-ssl-ciphers
OPENSSL_OPTIONS += no-tests no-ts no-ubsan
endif

ifdef CONFIG_OPENSSL_KTLS
OPENSSL_OPTIONS += enable-ktls
endif

OPENSSL_TARGET:=linux-$(call qstrip,$(CONFIG_ARCH))-openwrt

STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | $(MKHASH) md5)
Expand Down
16 changes: 13 additions & 3 deletions package/system/opkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=opkg
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_FLAGS:=essential

PKG_SOURCE_PROTO:=git
Expand All @@ -24,7 +24,8 @@ PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
# Extend depends from version.mk
PKG_CONFIG_DEPENDS += \
CONFIG_SIGNATURE_CHECK \
CONFIG_TARGET_INIT_PATH
CONFIG_TARGET_INIT_PATH \
CONFIG_OPKG_USE_CURL

HOST_BUILD_DEPENDS:=libubox/host

Expand All @@ -38,11 +39,20 @@ define Package/opkg
SECTION:=base
CATEGORY:=Base system
TITLE:=opkg package manager
DEPENDS:=+uclient-fetch +libpthread +libubox
DEPENDS:=+libpthread +libubox +!BUSYBOX_CONFIG_ZCAT:gzip +!OPKG_USE_CURL:uclient-fetch
URL:=$(PKG_SOURCE_URL)
MENU:=1
endef

define Package/opkg/config
menu "Downloader"
config OPKG_USE_CURL
bool
default n
prompt "Use curl for downloading packages (default: wget)"
endmenu
endef

define Package/opkg/description
Lightweight package management system
opkg is the opkg Package Management System, for handling
Expand Down
2 changes: 2 additions & 0 deletions package/utils/f2fs-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ define Package/f2fs-tools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fscrypt $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fs_io $(1)/usr/sbin
endef

Package/f2fs-tools-selinux/install = $(Package/f2fs-tools/install)
Expand Down
9 changes: 9 additions & 0 deletions scripts/env
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Commands:
delete <name> Delete an environment
rename <newname> Rename the current environment
diff Show differences between current state and environment
status Show list of changes
save [message] Save your changes to the environment, optionally using
the given commit message
revert Revert your changes since last save
Expand Down Expand Up @@ -108,6 +109,13 @@ env_diff() {
env_link_config
}

env_status() {
env_init
env_sync_data
git status --find-renames=50%
env_link_config
}

env_save() {
env_init
env_sync "$@"
Expand Down Expand Up @@ -220,6 +228,7 @@ case "$COMMAND" in
delete) env_delete "$@";;
rename) env_rename "$@";;
diff) env_diff "$@";;
status) env_status "$@";;
save) env_save "$@";;
revert) env_revert "$@";;
*) usage;;
Expand Down
2 changes: 1 addition & 1 deletion scripts/feeds
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ my %update_method = (
'init' => "git clone --depth 1 '%s' '%s'",
'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'",
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'update' => "git pull --ff-only",
'update' => "git pull",
'update_rebase' => "git pull --rebase=merges",
'update_stash' => "git pull --rebase=merges --autostash",
'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,7 @@ CONFIG_LINEAR_RANGES=y
# CONFIG_LIQUIDIO is not set
# CONFIG_LIQUIDIO_VF is not set
# CONFIG_LIRC is not set
CONFIG_LIST_HARDENED=y
# CONFIG_LIST_HARDENED is not set
# CONFIG_LITEX_LITEETH is not set
# CONFIG_LITEX_SOC_CONTROLLER is not set
# CONFIG_LIVEPATCH is not set
Expand Down
10 changes: 3 additions & 7 deletions target/linux/qualcommax/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,11 @@ CONFIG_CRC8=y
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_DEV_QCE=y
CONFIG_CRYPTO_DEV_QCE_AEAD=y
# CONFIG_CRYPTO_DEV_QCE_ENABLE_AEAD is not set
CONFIG_CRYPTO_DEV_QCE_ENABLE_ALL=y
# CONFIG_CRYPTO_DEV_QCE is not set
# CONFIG_CRYPTO_DEV_QCE_ENABLE_ALL is not set
# CONFIG_CRYPTO_DEV_QCE_ENABLE_SHA is not set
# CONFIG_CRYPTO_DEV_QCE_ENABLE_AEAD is not set
# CONFIG_CRYPTO_DEV_QCE_ENABLE_SKCIPHER is not set
CONFIG_CRYPTO_DEV_QCE_SHA=y
CONFIG_CRYPTO_DEV_QCE_SKCIPHER=y
CONFIG_CRYPTO_DEV_QCE_SW_MAX_LEN=512
CONFIG_CRYPTO_DEV_QCOM_RNG=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_HASH_INFO=y
Expand Down
35 changes: 28 additions & 7 deletions target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ platform_do_upgrade() {
arcadyan,aw1000|\
cmcc,rm2-6|\
compex,wpq873|\
dynalink,dl-wrx36|\
edimax,cax1800|\
netgear,rax120v2|\
netgear,sxr80|\
Expand All @@ -154,6 +153,22 @@ platform_do_upgrade() {
nand_do_restore_config || nand_do_upgrade_failed
buffalo_upgrade_optvol
;;
dynalink,dl-wrx36)
boot_part="$(fw_printenv -n boot_part)"
if [ -n "$UPGRADE_OPT_CURR_PARTITION" ]; then
if [ "$boot_part" -eq "2" ]; then
CI_UBIPART="rootfs_1"
fi
else
if [ "$boot_part" -eq "1" ]; then
fw_setenv boot_part 2
CI_UBIPART="rootfs_1"
else
fw_setenv boot_part 1
fi
fi
nand_do_upgrade "$1"
;;
edgecore,eap102)
active="$(fw_printenv -n active)"
if [ "$active" -eq "1" ]; then
Expand All @@ -171,13 +186,19 @@ platform_do_upgrade() {
linksys,mx5300|\
linksys,mx8500)
boot_part="$(fw_printenv -n boot_part)"
if [ "$boot_part" -eq "1" ]; then
fw_setenv boot_part 2
CI_KERNPART="alt_kernel"
CI_UBIPART="alt_rootfs"
if [ -n "$UPGRADE_OPT_CURR_PARTITION" ]; then
if [ "$boot_part" -eq "2" ]; then
CI_KERNPART="alt_kernel"
CI_UBIPART="alt_rootfs"
fi
else
fw_setenv boot_part 1
CI_UBIPART="rootfs"
if [ "$boot_part" -eq "1" ]; then
fw_setenv boot_part 2
CI_KERNPART="alt_kernel"
CI_UBIPART="alt_rootfs"
else
fw_setenv boot_part 1
fi
fi
fw_setenv boot_part_ready 3
fw_setenv auto_recovery yes
Expand Down
5 changes: 3 additions & 2 deletions tools/e2fsprogs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=e2fsprogs
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
PKG_VERSION:=1.47.0
PKG_HASH:=0b4fe723d779b0927fb83c9ae709bc7b40f66d7df36433bef143e41c54257084
PKG_HASH:=144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/

HOST_BUILD_PARALLEL:=1
Expand Down
6 changes: 3 additions & 3 deletions tools/gmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gmp
PKG_VERSION:=6.3.0

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gmp/
PKG_HASH:=e56fd59d76810932a0555aa15a14b61c16bed66110d3c75cc2ac49ddaa9ab24c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
PKG_CPE_ID:=cpe:/a:gmplib:gmp

HOST_FIXUP:=autoreconf
Expand Down
4 changes: 2 additions & 2 deletions tools/libtool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ PKG_NAME:=libtool
PKG_CPE_ID:=cpe:/a:gnu:libtool
PKG_VERSION:=2.4.7

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8
PKG_HASH:=4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d

HOST_BUILD_PARALLEL:=1

Expand Down
2 changes: 1 addition & 1 deletion tools/mold/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ CMAKE_HOST_OPTIONS += \
-DMOLD_LTO=ON \
-DMOLD_MOSTLY_STATIC=ON \
-DMOLD_USE_SYSTEM_MIMALLOC=OFF \
-DMOLD_USE_SYSTEM_TBB=OFF
-DMOLD_USE_SYSTEM_TBB=ON

$(eval $(call HostBuild))
4 changes: 2 additions & 2 deletions tools/sed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sed
PKG_VERSION:=4.9

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=d1478a18f033a73ac16822901f6533d30b6be561bcbce46ffd7abce93602282e
PKG_HASH:=6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181
PKG_CPE_ID:=cpe:/a:gnu:sed

export SED:=
Expand Down

0 comments on commit f7e4533

Please sign in to comment.