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 23/5 #125

Merged
merged 57 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
cd9241d
qualcommax: ipq807x: sax1v1k: fix QCA8081 reset
robimarko May 21, 2024
9db53fb
scripts: fix revision calculation using new "main" branch
M95D May 21, 2024
725389b
host-build: always define Host/Prepare/Default
Ansuel May 22, 2024
46bcbe4
tools/missing-macros: install files from HOST_BUILD_DIR instead of src
Ansuel May 22, 2024
01048c7
tools/padjffs2: use Host/Prepare/Default instead of raw commands
Ansuel May 22, 2024
0f5c28b
qualcommax: ipq807x support Netgear Orbi Pro SXK80
Aug 21, 2023
4a78c46
ipq40xx: dont panic on PSGMII calibration fail
robimarko May 22, 2024
9a11bc3
build: generate private key for APK early
dangowrt May 22, 2024
8097aa0
tools/lz4: remove patches
neheb May 22, 2024
337b0c8
tools: refresh all patches
neheb May 18, 2024
e83a561
mediatek: include "kmod-mt7915e" package per device
Apr 22, 2024
2a2f534
ramips: add support for TP-Link Archer MR200v5
icecream42 Apr 2, 2024
6febb93
usbmode: add Huawei E5785
OdyX May 15, 2024
b4b3322
feeds: use forked bitthief/nss-packages
bitthief Jul 19, 2022
90ae6d3
qualcommax: crypto, ktls, netfilter, misc.
bitthief Jul 17, 2023
05a868d
nat46: patches for QCA NSS ECM
bitthief Feb 3, 2023
fb7448b
package: kernel: nat46: use standard build functions
qosmio May 6, 2024
231238c
iproute2: add NSS QDISC support
bitthief Feb 3, 2023
a5867ff
qualcommax: dts: add NSS nodes to IPQ807x devices
bitthief Jul 17, 2023
ddc7c3b
qualcommax: net: QCA NSS igs support
bitthief Jul 17, 2023
0bc2fc6
qualcommax: net: QCA NSS qdisc ifb support
bitthief Jul 17, 2023
4e46b8b
feeds: use forked dimfishr/nss-packages
dimfishr Aug 2, 2023
11a2c10
ath11k-nss: Add NSS WiFi feature
qosmio Dec 16, 2023
f6318df
feeds: update to use personal fork of nss-packages
qosmio Jan 7, 2024
c1078ab
ath11k_nss: handle qca-nss-drv symbol dependancies
qosmio Jan 8, 2024
e39de87
ath11k_nss: fix ordering of sysctl values
qosmio Jan 8, 2024
3837310
qualcommax: add nss-macsec dt support
qosmio Jan 8, 2024
dae2d64
ath11k_nss: bugfix overwriting high watermark
qosmio Jan 9, 2024
4e413a3
ath11k_nss: Handle 256/512/1G boards automatically
qosmio Jan 11, 2024
48f06ea
ath11k_nss: Add support to account memory stats
qosmio Jan 11, 2024
c0d2158
ath11k_nss: allow specifying pbuf 'memory_profile'
qosmio Jan 11, 2024
105eb6d
ath11k_nss: ath11k support dynamic vlan
qosmio Jan 13, 2024
bf15f1f
ath11k_nss: fix `'ppdu_info' is a pointer...` error
qosmio Jan 13, 2024
387250f
ath11k_nss: bugfix NSS memleak + enhancements
qosmio Jan 16, 2024
ea0fd87
ath11k_nss: set pbuf script off by default
qosmio Jan 17, 2024
8b43f60
ath11k_nss: Refresh patches
qosmio Jan 17, 2024
448aa10
feeds: Switch to fork that requires nss qdisc
qosmio Feb 18, 2024
1c1d863
ath11k_nss: add missing support to enable/disable bss color collision…
qosmio Feb 27, 2024
d65d87c
ath11k_nss: FW Initiated Dynamic MU-EDCA
qosmio Feb 27, 2024
45de01d
ath11k_nss: refresh patches + cleanup Makefile
qosmio Feb 27, 2024
38fbf49
ath11k_nss: Set correct pbufs for 1GB profile
qosmio Mar 9, 2024
d0ab5aa
qualcommax: remove uneeded btcoex dts
qosmio Mar 9, 2024
3e8fd3a
ath11k_nss: Revert setting fw_mem_mode for IPQ807x
qosmio Mar 9, 2024
0175b69
ath11k_nss: Introduce skbuff_recycle for performance
qosmio Mar 9, 2024
5968f4a
qualcommax: Move QCE to user selectable module
qosmio Mar 25, 2024
39d990d
qualcommax: NSS: kernel 6.6 support
qosmio Mar 25, 2024
5039e84
ath11k_nss: set pbuf to 'auto'
qosmio Mar 25, 2024
1c72ab5
cryptodev-linux: Add hooks for QCA NSS
qosmio Mar 25, 2024
c9cc192
feeds: NSS: point to 6.x branch
qosmio Mar 25, 2024
05fd917
ath11k_nss: refresh and fixup patches, increment release version
qosmio Mar 25, 2024
aa3dd2d
qualcommax: consolidate symbols, revert built-in
qosmio Mar 25, 2024
04f6f7b
qualcommax: disable swiotlb for 64mb in saving.
qosmio Mar 31, 2024
eb9394b
qualcommax: qca-mcs support for kernel >= 6.6.29
qosmio Apr 30, 2024
d74b109
feeds: nss-packages: switch to branch 12.5-6.x
qosmio May 5, 2024
f71a08f
ath11k_nss: fix invalid access to memory
qosmio May 5, 2024
04c2e95
qualcommax: NSS: Add support for all ipq807x targets
qosmio May 7, 2024
a752394
ath11k_nss: revert AMPDU in radiotap header
qosmio May 15, 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
8 changes: 3 additions & 5 deletions include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ include $(INCLUDE_DIR)/autotools.mk
_host_target:=$(if $(HOST_QUILT),,.)

Host/Patch:=$(Host/Patch/Default)
ifneq ($(strip $(HOST_UNPACK)),)
define Host/Prepare/Default
$(HOST_UNPACK)
define Host/Prepare/Default
$(if $(strip $(HOST_UNPACK)),$(HOST_UNPACK))
[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)
$(Host/Patch)
endef
endif
endef

define Host/Prepare
$(call Host/Prepare/Default)
Expand Down
8 changes: 7 additions & 1 deletion package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ else
-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
endif

$(BUILD_KEY_APK_SEC):
$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC)

$(BUILD_KEY_APK_PUB): $(BUILD_KEY_APK_SEC)
$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)

$(curdir)/merge-index: $(curdir)/merge
ifneq ($(CONFIG_USE_APK),)
(cd $(PACKAGE_DIR_ALL) && $(STAGING_DIR_HOST)/bin/apk mkndx \
Expand All @@ -75,7 +81,7 @@ endif
ifndef SDK
$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)
ifneq ($(CONFIG_USE_APK),)
$(curdir)/compile: $(curdir)/system/apk/host/compile
$(curdir)/compile: $(curdir)/system/apk/host/compile $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB)
else
$(curdir)/compile: $(curdir)/system/opkg/host/compile
endif
Expand Down
6 changes: 0 additions & 6 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ endef
Build/Compile = $(Build/Compile/Default)

ifneq ($(CONFIG_USE_APK),)
define Build/Configure
[ -s $(BUILD_KEY_APK_SEC) -a -s $(BUILD_KEY_APK_PUB) ] || \
$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
endef

ifndef CONFIG_BUILDBOT
define Package/base-files/install-key
mkdir -p $(1)/etc/apk/keys
Expand Down
6 changes: 6 additions & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq807x
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ linksys,mx8500)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
netgear,sxr80|\
netgear,sxs80)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
;;
redmi,ax6|\
xiaomi,ax3600|\
xiaomi,ax9000)
Expand Down
2 changes: 2 additions & 0 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
linksys_mx8500 \
netgear_lbr20 \
netgear_rax120v2 \
netgear_sxk80 \
netgear_wax214 \
netgear_wax218 \
netgear_wax620 \
Expand Down Expand Up @@ -161,6 +162,7 @@ $(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
$(eval $(call generate-ipq-wifi-package,linksys_mx8500,Linksys MX8500))
$(eval $(call generate-ipq-wifi-package,netgear_lbr20,Netgear LBR20))
$(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2))
$(eval $(call generate-ipq-wifi-package,netgear_sxk80,Netgear SXK80))
$(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
$(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
$(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620))
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:=3
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