Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync 10/6 #134

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e0f7740
openssl: conditionally disable engine section
qosmio Jun 9, 2024
68c7400
feeds: use forked bitthief/nss-packages
bitthief Jul 19, 2022
8310c46
qualcommax: crypto, ktls, netfilter, misc.
bitthief Jul 17, 2023
c2405be
nat46: patches for QCA NSS ECM
bitthief Feb 3, 2023
b79720b
package: kernel: nat46: use standard build functions
qosmio May 6, 2024
7de55e8
iproute2: add NSS QDISC support
bitthief Feb 3, 2023
8bb04b7
qualcommax: dts: add NSS nodes to IPQ807x devices
bitthief Jul 17, 2023
1dee4e4
qualcommax: net: QCA NSS igs support
bitthief Jul 17, 2023
d0152f1
qualcommax: net: QCA NSS qdisc ifb support
bitthief Jul 17, 2023
53f547b
feeds: use forked dimfishr/nss-packages
dimfishr Aug 2, 2023
9f14eff
ath11k-nss: Add NSS WiFi feature
qosmio Dec 16, 2023
46cb2c7
feeds: update to use personal fork of nss-packages
qosmio Jan 7, 2024
b5683a0
ath11k_nss: handle qca-nss-drv symbol dependancies
qosmio Jan 8, 2024
be827a4
ath11k_nss: fix ordering of sysctl values
qosmio Jan 8, 2024
31d4051
qualcommax: add nss-macsec dt support
qosmio Jan 8, 2024
b589731
ath11k_nss: bugfix overwriting high watermark
qosmio Jan 9, 2024
0f50c2d
ath11k_nss: Handle 256/512/1G boards automatically
qosmio Jan 11, 2024
bfcdb53
ath11k_nss: Add support to account memory stats
qosmio Jan 11, 2024
55c6424
ath11k_nss: allow specifying pbuf 'memory_profile'
qosmio Jan 11, 2024
b894bce
ath11k_nss: ath11k support dynamic vlan
qosmio Jan 13, 2024
75d6f23
ath11k_nss: fix `'ppdu_info' is a pointer...` error
qosmio Jan 13, 2024
429b17b
ath11k_nss: bugfix NSS memleak + enhancements
qosmio Jan 16, 2024
ccff978
ath11k_nss: set pbuf script off by default
qosmio Jan 17, 2024
832e616
ath11k_nss: Refresh patches
qosmio Jan 17, 2024
5de93ef
feeds: Switch to fork that requires nss qdisc
qosmio Feb 18, 2024
b9f68b0
ath11k_nss: add missing support to enable/disable bss color collision…
qosmio Feb 27, 2024
568d303
ath11k_nss: FW Initiated Dynamic MU-EDCA
qosmio Feb 27, 2024
d6fad2c
ath11k_nss: refresh patches + cleanup Makefile
qosmio Feb 27, 2024
0781d06
ath11k_nss: Set correct pbufs for 1GB profile
qosmio Mar 9, 2024
e1fb77e
qualcommax: remove uneeded btcoex dts
qosmio Mar 9, 2024
d8dce85
ath11k_nss: Revert setting fw_mem_mode for IPQ807x
qosmio Mar 9, 2024
a55099e
ath11k_nss: Introduce skbuff_recycle for performance
qosmio Mar 9, 2024
0166072
qualcommax: Move QCE to user selectable module
qosmio Mar 25, 2024
088e42a
qualcommax: NSS: kernel 6.6 support
qosmio Mar 25, 2024
e6c7e47
ath11k_nss: set pbuf to 'auto'
qosmio Mar 25, 2024
bc3ddfb
cryptodev-linux: Add hooks for QCA NSS
qosmio Mar 25, 2024
fb6ca18
feeds: NSS: point to 6.x branch
qosmio Mar 25, 2024
8630460
ath11k_nss: refresh and fixup patches, increment release version
qosmio Mar 25, 2024
bc62fb7
qualcommax: consolidate symbols, revert built-in
qosmio Mar 25, 2024
11d9d50
qualcommax: disable swiotlb for 64mb in saving.
qosmio Mar 31, 2024
ad6a191
qualcommax: qca-mcs support for kernel >= 6.6.29
qosmio Apr 30, 2024
5ce32b3
feeds: nss-packages: switch to branch 12.5-6.x
qosmio May 5, 2024
6291889
ath11k_nss: fix invalid access to memory
qosmio May 5, 2024
fcef4fe
qualcommax: NSS: Add support for all ipq807x targets
qosmio May 7, 2024
b6d4439
ath11k_nss: revert AMPDU in radiotap header
qosmio May 15, 2024
5aad60e
qualcommax: NSS: Set required NSS packages and options
qosmio May 25, 2024
22195bf
iproute2: Fixup NSS patches for GCC 14.x
qosmio Jun 1, 2024
493a736
ath11k_nss: mac80211 fix pending airtime
qosmio Jun 2, 2024
27ab085
ath11k_nss: mac80211: remove STA txq pending airtime underflow warning
qosmio Jun 2, 2024
a2834e2
ath11k_nss: change warning levels
qosmio Jun 2, 2024
f4d39af
ath11k_nss: fix incorrect tx/rx stats WDS
qosmio Jun 2, 2024
a175188
ath11k_nss: correctly free skb using ieee80211_free_txskb()
qosmio Jun 2, 2024
8cb65f3
ath11k_nss: Add lock when accessing idr_pool of tx_ring
qosmio Jun 2, 2024
a262912
ath11k_nss: mac80211 Use C99 flexible arrays instead of zero-length a…
qosmio Jun 2, 2024
5b4dab0
qualcommax: NSS: Add support for sxk80, mx8500
qosmio Jun 2, 2024
4ec2dc2
qualcommax: NSS: Add DTS entries for nss-macsec
qosmio Jun 2, 2024
4801ec5
qualcommax: NSS: ECM: Fixes for Bridge VLAN Filtering
qosmio Jun 2, 2024
9376d0e
ath11k_nss: Fix IPQ6018 wifi offloading
qosmio Jun 7, 2024
ad2cd07
qualcommax: add ramoops memory region
qosmio Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions feeds.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ src-git packages https://git.openwrt.org/feed/packages.git
src-git luci https://git.openwrt.org/project/luci.git
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
src-git nss_packages https://github.com/qosmio/nss-packages.git;NSS-12.5-K6.x
src-git sqm_scripts_nss https://github.com/qosmio/sqm-scripts-nss.git
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- a/ath10k-6.4/mac.c
+++ b/ath10k-6.4/mac.c
@@ -6362,13 +6362,13 @@
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac set txbf conf, value: 0x%x\n",
value);
return ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
ar->wmi.vdev_param->txbf, value);
}

-static void ath10k_update_vif_offload(struct ieee80211_hw *hw,
+static int ath10k_update_vif_offload(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ath10k_vif *arvif = (void *)vif->drv_priv;
struct ath10k *ar = hw->priv;
u32 vdev_param;
int ret;
@@ -6384,14 +6384,16 @@
ATH10K_HW_TXRX_NATIVE_WIFI);
/* 10.X firmware does not support this VDEV parameter. Do not warn */
if (ret && ret != -EOPNOTSUPP) {
ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
arvif->vdev_id, ret);
}
+
+ return ret;
}

/*
* TODO:
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
* because we will send mgmt frames without CCK. This requirement
11 changes: 10 additions & 1 deletion package/kernel/cryptodev-linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,22 @@ define KernelPackage/cryptodev/description
hardware ciphers by user-space applications.
endef

ifneq ($(CONFIG_PACKAGE_kmod-crypto-qce),)
EXTRA_CFLAGS+=-DQCA
endif

ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-crypto),)
EXTRA_CFLAGS+=-DQCANSS
endif

define Build/Configure
endef

define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(KERNEL_MAKE_FLAGS) \
KERNEL_DIR="$(LINUX_DIR)"
KERNEL_DIR="$(LINUX_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
endef

define Build/InstallDev
Expand Down
99 changes: 99 additions & 0 deletions package/kernel/cryptodev-linux/patches/0005-add-qca-nss.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
--- a/ioctl.c
+++ b/ioctl.c
@@ -829,29 +829,37 @@ static inline void tfm_info_to_alg_info(
"%s", crypto_tfm_alg_driver_name(tfm));
}

-#ifndef CRYPTO_ALG_KERN_DRIVER_ONLY
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X)
static unsigned int is_known_accelerated(struct crypto_tfm *tfm)
{
const char *name = crypto_tfm_alg_driver_name(tfm);

if (name == NULL)
- return 1; /* assume accelerated */
+ return 0;

/* look for known crypto engine names */
- if (strstr(name, "-talitos") ||
- !strncmp(name, "mv-", 3) ||
- !strncmp(name, "atmel-", 6) ||
- strstr(name, "geode") ||
- strstr(name, "hifn") ||
- strstr(name, "-ixp4xx") ||
- strstr(name, "-omap") ||
- strstr(name, "-picoxcell") ||
- strstr(name, "-s5p") ||
- strstr(name, "-ppc4xx") ||
- strstr(name, "-caam") ||
- strstr(name, "-n2"))
+#if defined(QCANSS)
+ if (!strncmp(name, "nss-", 4))
return 1;
-
+#elif defined(QCA)
+ if (!strncmp(name, "qcrypto", 7))
+ return 1;
+#elif defined(MT7621)
+ if (strstr(name, "eip93"))
+ return 1;
+#elif defined(MT7622)
+ if (strstr(name, "mtk"))
+ return 1;
+#elif defined(MT798X)
+ if (strstr(name, "safexcel-"))
+ return 1;
+#elif defined(LANTIQ)
+ if (strstr(name, "ltq-crypto"))
+ return 1;
+#elif defined(BCM675X) || defined(BCM49XX)
+ if (strstr(name, "-iproc"))
+ return 1;
+#endif
return 0;
}
#endif
@@ -876,22 +884,22 @@ static int get_session_info(struct fcryp
else
tfm = crypto_aead_tfm(ses_ptr->cdata.async.as);
tfm_info_to_alg_info(&siop->cipher_info, tfm);
-#ifdef CRYPTO_ALG_KERN_DRIVER_ONLY
- if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY)
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X)
+ if (is_known_accelerated(tfm))
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY;
#else
- if (is_known_accelerated(tfm))
+ if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY)
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY;
#endif
}
if (ses_ptr->hdata.init) {
tfm = crypto_ahash_tfm(ses_ptr->hdata.async.s);
tfm_info_to_alg_info(&siop->hash_info, tfm);
-#ifdef CRYPTO_ALG_KERN_DRIVER_ONLY
- if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY)
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X)
+ if (is_known_accelerated(tfm))
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY;
#else
- if (is_known_accelerated(tfm))
+ if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY)
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY;
#endif
}
--- a/main.c
+++ b/main.c
@@ -168,6 +168,12 @@ __crypto_run_zc(struct csession *ses_ptr
struct crypt_op *cop = &kcop->cop;
int ret = 0;

+#if defined(QCANSS)
+//openssl bug!!!
+ if (unlikely(cop->src != cop->dst)) {
+ return __crypto_run_std(ses_ptr, cop);
+ }
+#endif
ret = get_userbuf(ses_ptr, cop->src, cop->len, cop->dst, cop->len,
kcop->task, kcop->mm, &src_sg, &dst_sg);
if (unlikely(ret)) {
17 changes: 17 additions & 0 deletions package/kernel/linux/modules/crypto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1159,3 +1159,20 @@ endef

$(eval $(call KernelPackage,crypto-xts))

define KernelPackage/crypto-qce
TITLE:=QTI Crypto Engine (QCE)
KCONFIG:= \
CONFIG_CRYPTO_DEV_QCE \
CONFIG_CRYPTO_DEV_QCE_AEAD=y \
CONFIG_CRYPTO_DEV_QCE_ENABLE_ALL=y \
CONFIG_CRYPTO_DEV_QCE_SHA=y \
CONFIG_CRYPTO_DEV_QCE_SKCIPHER=y \
CONFIG_CRYPTO_DEV_QCE_SW_MAX_LEN=512
FILES:= \
$(LINUX_DIR)/drivers/crypto/qce/qcrypto.ko
AUTOLOAD:=$(call AutoLoad,09,qcrypto)
DEPENDS:=@TARGET_qualcommax +kmod-crypto-manager +kmod-crypto-hash +kmod-crypto-des
$(call AddDepends/crypto)
endef

$(eval $(call KernelPackage,crypto-qce))
1 change: 1 addition & 0 deletions package/kernel/linux/modules/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ $(eval $(call KernelPackage,ipt-offload))
define KernelPackage/ipt-ipopt
TITLE:=Modules for matching/changing IP packet options
KCONFIG:=$(KCONFIG_IPT_IPOPT)
DEPENDS:=+PACKAGE_kmod-nf-conntrack:kmod-nf-conntrack
FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPOPT-m)))
$(call AddDepends/ipt)
Expand Down
53 changes: 50 additions & 3 deletions package/kernel/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211

PKG_VERSION:=6.6.15
PKG_RELEASE:=1
PKG_RELEASE:=5
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING

Expand All @@ -36,14 +36,18 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_MAC80211_DEBUGFS \
CONFIG_PACKAGE_MAC80211_MESH \
CONFIG_PACKAGE_MAC80211_TRACING \
CONFIG_PACKAGE_MAC80211_NSS_SUPPORT \
CONFIG_PACKAGE_MAC80211_NSS_REDIRECT \
CONFIG_PACKAGE_IWLWIFI_DEBUG \
CONFIG_PACKAGE_IWLWIFI_DEBUGFS \
CONFIG_PACKAGE_RTLWIFI_DEBUG \
CONFIG_PACKAGE_RTLWIFI_DEBUG

include $(INCLUDE_DIR)/package.mk

WMENU:=Wireless Drivers

NSS_PATCH:= subsys ath10k ath11k

define KernelPackage/mac80211/Default
SUBMENU:=$(WMENU)
URL:=https://wireless.wiki.kernel.org/
Expand Down Expand Up @@ -129,17 +133,37 @@ define KernelPackage/mac80211
$(call KernelPackage/mac80211/Default)
TITLE:=Linux 802.11 Wireless Networking Stack
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common
DEPENDS+= +kmod-cfg80211 +kmod-crypto-cmac +kmod-crypto-ccm +kmod-crypto-gcm +hostapd-common \
+ATH11K_NSS_SUPPORT:kmod-qca-nss-drv
KCONFIG:=\
CONFIG_AVERAGE=y
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
ifdef CONFIG_PACKAGE_MAC80211_NSS_REDIRECT
AUTOLOAD:=$(call AutoProbe, mac80211)
MODPARAMS.mac80211:=nss_redirect=1
endif
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
MENU:=1
endef

define KernelPackage/mac80211/config
if PACKAGE_kmod-mac80211

if PACKAGE_kmod-qca-nss-drv
config PACKAGE_MAC80211_NSS_SUPPORT
bool "Enable NSS support"
default y
help
This option enables support for NSS in QCA boards.
config PACKAGE_MAC80211_NSS_REDIRECT
bool "Enable autoloading with 'nss_redirect=1' (not needed on ath11k)"
depends on PACKAGE_MAC80211_NSS_SUPPORT
default n
help
This option enables autoloading mac80211 with 'nss_redirect=1'.
However, it is not required for wifi offloading.
endif

config PACKAGE_MAC80211_DEBUGFS
bool "Export mac80211 internals in DebugFS"
select KERNEL_DEBUG_FS
Expand Down Expand Up @@ -281,6 +305,12 @@ ifeq ($(BUILD_VARIANT),smallbuffers)
C_DEFINES+= -DCONFIG_ATH10K_SMALLBUFFERS
endif

ifdef CONFIG_ATH11K_NSS_SUPPORT
IREMAP_CFLAGS+=-I$(STAGING_DIR)/usr/include/qca-nss-drv -I$(STAGING_DIR)/usr/include/qca-nss-clients
endif

config-$(CONFIG_PACKAGE_MAC80211_NSS_SUPPORT) += MAC80211_NSS_SUPPORT

MAKE_OPTS:= \
$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
Expand Down Expand Up @@ -349,6 +379,11 @@ define Build/Patch
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
ifdef CONFIG_ATH11K_NSS_SUPPORT
$(foreach driver,$(NSS_PATCH),
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/nss/$(driver),nss/$(driver)/)
)
endif
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
Expand All @@ -365,6 +400,11 @@ define Quilt/Refresh/Package
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/)
ifdef CONFIG_ATH11K_NSS_SUPPORT
$(foreach driver,$(NSS_PATCH),
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/nss/$(driver),nss/$(driver)/)
)
endif
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
Expand All @@ -391,6 +431,13 @@ define Build/InstallDev
rm -f $(1)/usr/include/mac80211-backport/linux/module.h
endef

ifdef CONFIG_ATH11K_NSS_SUPPORT
define KernelPackage/ath11k/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) ./files/qca-nss-pbuf.init $(1)/etc/init.d/qca-nss-pbuf
$(INSTALL_BIN) ./files/pbuf.uci $(1)/etc/config/pbuf
endef
endif

$(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))
$(eval $(call KernelPackage,cfg80211))
Expand Down
Loading
Loading