mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 10:28:06 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v2.4.1
			...
			v2.1.0-rc3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | bcd07e4a15 | ||
|   | 958e14efb0 | 
							
								
								
									
										17
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							| @@ -2,7 +2,7 @@ name: Build OpenWrt/uCentral images | |||||||
|  |  | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches: [ main, next, staging-* ] |     branches: [ uCentral-* ] | ||||||
|     tags: [ v* ] |     tags: [ v* ] | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
| @@ -11,7 +11,7 @@ jobs: | |||||||
|     strategy: |     strategy: | ||||||
|       fail-fast: false |       fail-fast: false | ||||||
|       matrix: |       matrix: | ||||||
|         target: ['cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4' ] |         target: ['cig_wf188', 'cig_wf194c', 'cig_wf160d', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'indio_um-305ac', 'linksys_e8450-ubi', 'linksys_ea8300', 'mikrotik_nand', 'tplink_cpe210_v3', 'tplink_cpe510_v3', 'tplink_eap225_outdoor_v1', 'tplink_ec420', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9' ] | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
| @@ -61,16 +61,3 @@ jobs: | |||||||
|  |  | ||||||
|         [ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME" |         [ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/octet-stream" "openwrt/$(cat openwrt/tmp/image-file)" "s3://$AWS_S3_BUCKET_NAME/$IMG_NAME" | ||||||
|         [ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME" |         [ -f openwrt/tmp/image-file ] && aws s3 cp --acl public-read --content-type "application/json" "latest-upgrade.json" "s3://$AWS_S3_BUCKET_NAME/$JSON_NAME" | ||||||
|  |  | ||||||
|   trigger-testing: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     needs: build |  | ||||||
|     if: startsWith(github.ref, 'refs/tags/v') |  | ||||||
|     steps: |  | ||||||
|     - name: Trigger testing of release |  | ||||||
|       uses: peter-evans/repository-dispatch@v1 |  | ||||||
|       with: |  | ||||||
|         token: ${{ secrets.WLAN_TESTING_PAT }} |  | ||||||
|         repository: Telecominfraproject/wlan-testing |  | ||||||
|         event-type: new-ap-release |  | ||||||
|         client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}' |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From c51ac602aff1a9b0093687fe39164a3b895fd4a2 Mon Sep 17 00:00:00 2001 | From 08be0915e06fb6f2b62c022099e82bb4d849a8c6 Mon Sep 17 00:00:00 2001 | ||||||
| From: Felix Fietkau <nbd@nbd.name> | From: Felix Fietkau <nbd@nbd.name> | ||||||
| Date: Thu, 22 Oct 2020 10:29:34 +0200 | Date: Thu, 22 Oct 2020 10:29:34 +0200 | ||||||
| Subject: [PATCH 01/27] build: build kernel image before building | Subject: [PATCH 1/9] build: build kernel image before building | ||||||
|  modules/packages |  modules/packages | ||||||
|  |  | ||||||
| This is needed for linux 5.10, where modules.builtin is generated from | This is needed for linux 5.10, where modules.builtin is generated from | ||||||
| @@ -13,10 +13,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  1 file changed, 3 insertions(+), 3 deletions(-) |  1 file changed, 3 insertions(+), 3 deletions(-) | ||||||
|  |  | ||||||
| diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk | diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk | ||||||
| index 3aa1baa761..c02e0d34ca 100644 | index e5a0ba367b..b069c1e671 100644 | ||||||
| --- a/include/kernel-defaults.mk | --- a/include/kernel-defaults.mk | ||||||
| +++ b/include/kernel-defaults.mk | +++ b/include/kernel-defaults.mk | ||||||
| @@ -115,7 +115,7 @@ endef | @@ -113,7 +113,7 @@ endef | ||||||
|   |   | ||||||
|  define Kernel/CompileModules/Default |  define Kernel/CompileModules/Default | ||||||
|  	rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map |  	rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map | ||||||
| @@ -25,7 +25,7 @@ index 3aa1baa761..c02e0d34ca 100644 | |||||||
|  endef |  endef | ||||||
|   |   | ||||||
|  OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id |  OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id | ||||||
| @@ -139,7 +139,7 @@ endef | @@ -137,7 +137,7 @@ endef | ||||||
|   |   | ||||||
|  define Kernel/CompileImage/Default |  define Kernel/CompileImage/Default | ||||||
|  	rm -f $(TARGET_DIR)/init |  	rm -f $(TARGET_DIR)/init | ||||||
| @@ -34,7 +34,7 @@ index 3aa1baa761..c02e0d34ca 100644 | |||||||
|  	$(call Kernel/CopyImage) |  	$(call Kernel/CopyImage) | ||||||
|  endef |  endef | ||||||
|   |   | ||||||
| @@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs | @@ -147,7 +147,7 @@ define Kernel/CompileImage/Initramfs | ||||||
|  	$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init |  	$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init | ||||||
|  	$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init) |  	$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init) | ||||||
|  	rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* |  	rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 6c50e27b166b30c0b3f7b730717ab4b7f446e4d0 Mon Sep 17 00:00:00 2001 | From 6d2e2ff2778ca6360af9bf1e712d7ff276afa54b Mon Sep 17 00:00:00 2001 | ||||||
| From: Felix Fietkau <nbd@nbd.name> | From: Felix Fietkau <nbd@nbd.name> | ||||||
| Date: Wed, 17 Feb 2021 13:49:14 +0100 | Date: Wed, 17 Feb 2021 13:49:14 +0100 | ||||||
| Subject: [PATCH 02/27] build: fix build with CONFIG_STRIP_KERNEL_EXPORTS | Subject: [PATCH 2/9] build: fix build with CONFIG_STRIP_KERNEL_EXPORTS | ||||||
|  |  | ||||||
| Only use symtab.h on the final kernel link | Only use symtab.h on the final kernel link | ||||||
|  |  | ||||||
| @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  1 file changed, 3 insertions(+), 3 deletions(-) |  1 file changed, 3 insertions(+), 3 deletions(-) | ||||||
|  |  | ||||||
| diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk | diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk | ||||||
| index c02e0d34ca..f9316fc3f9 100644 | index b069c1e671..93eed54ae1 100644 | ||||||
| --- a/include/kernel-defaults.mk | --- a/include/kernel-defaults.mk | ||||||
| +++ b/include/kernel-defaults.mk | +++ b/include/kernel-defaults.mk | ||||||
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||||||
| @@ -23,7 +23,7 @@ index c02e0d34ca..f9316fc3f9 100644 | |||||||
|  	EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h" |  	EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h" | ||||||
|  endif |  endif | ||||||
|   |   | ||||||
| @@ -139,7 +139,7 @@ endef | @@ -137,7 +137,7 @@ endef | ||||||
|   |   | ||||||
|  define Kernel/CompileImage/Default |  define Kernel/CompileImage/Default | ||||||
|  	rm -f $(TARGET_DIR)/init |  	rm -f $(TARGET_DIR)/init | ||||||
| @@ -32,7 +32,7 @@ index c02e0d34ca..f9316fc3f9 100644 | |||||||
|  	$(call Kernel/CopyImage) |  	$(call Kernel/CopyImage) | ||||||
|  endef |  endef | ||||||
|   |   | ||||||
| @@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs | @@ -147,7 +147,7 @@ define Kernel/CompileImage/Initramfs | ||||||
|  	$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init |  	$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init | ||||||
|  	$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init) |  	$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init) | ||||||
|  	rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* |  	rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 369794a62050fadc47b617acb29e19d6f536fe3f Mon Sep 17 00:00:00 2001 | From 0f37bb5919d96aaca7b0d06b56d37dabba87b190 Mon Sep 17 00:00:00 2001 | ||||||
| From: Felix Fietkau <nbd@nbd.name> | From: Felix Fietkau <nbd@nbd.name> | ||||||
| Date: Sat, 24 Oct 2020 21:14:16 +0200 | Date: Sat, 24 Oct 2020 21:14:16 +0200 | ||||||
| Subject: [PATCH 03/27] kernel: add linux 5.10 support | Subject: [PATCH 01/45] kernel: add linux 5.10 support | ||||||
| 
 | 
 | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> | Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||||
| ---
 | ---
 | ||||||
| @@ -422,7 +422,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  create mode 100644 target/linux/generic/pending-5.10/920-mangle_bootargs.patch |  create mode 100644 target/linux/generic/pending-5.10/920-mangle_bootargs.patch | ||||||
| 
 | 
 | ||||||
| diff --git a/include/image-commands.mk b/include/image-commands.mk
 | diff --git a/include/image-commands.mk b/include/image-commands.mk
 | ||||||
| index 4d54a14ba4..2c917d613e 100644
 | index 51e745958e..bddbed6052 100644
 | ||||||
| --- a/include/image-commands.mk
 | --- a/include/image-commands.mk
 | ||||||
| +++ b/include/image-commands.mk
 | +++ b/include/image-commands.mk
 | ||||||
| @@ -200,11 +200,12 @@ define Build/fit
 | @@ -200,11 +200,12 @@ define Build/fit
 | ||||||
| @@ -744,7 +744,7 @@ index b46fcebc08..e2bb1d0681 100644 | |||||||
|    AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m))) |    AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m))) | ||||||
|    KCONFIG:= \ |    KCONFIG:= \ | ||||||
| diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
 | diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
 | ||||||
| index 93f99f7cbe..4191590ba7 100644
 | index d050165df3..3dd20a0696 100644
 | ||||||
| --- a/package/kernel/linux/modules/usb.mk
 | --- a/package/kernel/linux/modules/usb.mk
 | ||||||
| +++ b/package/kernel/linux/modules/usb.mk
 | +++ b/package/kernel/linux/modules/usb.mk
 | ||||||
| @@ -1387,7 +1387,7 @@ define KernelPackage/usb-net-cdc-ncm
 | @@ -1387,7 +1387,7 @@ define KernelPackage/usb-net-cdc-ncm
 | ||||||
| @@ -12418,10 +12418,10 @@ index 0000000000..4eb5607f17 | |||||||
| +# CONFIG_ZSMALLOC is not set
 | +# CONFIG_ZSMALLOC is not set
 | ||||||
| +# CONFIG_ZX_TDM is not set
 | +# CONFIG_ZX_TDM is not set
 | ||||||
| diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
 | diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
 | ||||||
| index 50e627297e..da0e2e2186 100644
 | index 91dc0b0f49..d3e9325f71 100644
 | ||||||
| --- a/target/linux/generic/config-5.4
 | --- a/target/linux/generic/config-5.4
 | ||||||
| +++ b/target/linux/generic/config-5.4
 | +++ b/target/linux/generic/config-5.4
 | ||||||
| @@ -3287,6 +3287,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y
 | @@ -3273,6 +3273,7 @@ CONFIG_MTD_ROOTFS_ROOT_DEV=y
 | ||||||
|  CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=4096 |  CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=4096 | ||||||
|  CONFIG_MTD_SPLIT=y |  CONFIG_MTD_SPLIT=y | ||||||
|  # CONFIG_MTD_SPLIT_BCM_WFI_FW is not set |  # CONFIG_MTD_SPLIT_BCM_WFI_FW is not set | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 29f60bb65745d63e7d8cce273bd3f773fda251ff Mon Sep 17 00:00:00 2001 | From 583b54e2f10ee14b5756d7035e641f7a1bb3095c Mon Sep 17 00:00:00 2001 | ||||||
| From: Felix Fietkau <nbd@nbd.name> | From: Felix Fietkau <nbd@nbd.name> | ||||||
| Date: Thu, 9 Apr 2020 09:53:24 +0200 | Date: Thu, 9 Apr 2020 09:53:24 +0200 | ||||||
| Subject: [PATCH 04/27] mediatek: update to latest trunk version | Subject: [PATCH 01/43] mediatek: update to latest trunk version | ||||||
| 
 | 
 | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> | Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||||
| ---
 | ---
 | ||||||
| @@ -101957,7 +101957,7 @@ diff --git a/target/linux/mediatek/mt7622/config-5.4 b/target/linux/mediatek/mt7 | |||||||
| similarity index 67% | similarity index 67% | ||||||
| rename from target/linux/mediatek/mt7622/config-5.4 | rename from target/linux/mediatek/mt7622/config-5.4 | ||||||
| rename to target/linux/mediatek/mt7622/config-5.10 | rename to target/linux/mediatek/mt7622/config-5.10 | ||||||
| index 282cd0bab5..e6696bd50a 100644
 | index b873bdc40c..2d7f82ce23 100644
 | ||||||
| --- a/target/linux/mediatek/mt7622/config-5.4
 | --- a/target/linux/mediatek/mt7622/config-5.4
 | ||||||
| +++ b/target/linux/mediatek/mt7622/config-5.10
 | +++ b/target/linux/mediatek/mt7622/config-5.10
 | ||||||
| @@ -1,59 +1,6 @@
 | @@ -1,59 +1,6 @@
 | ||||||
| @@ -102116,7 +102116,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  # CONFIG_FUJITSU_ERRATUM_010001 is not set |  # CONFIG_FUJITSU_ERRATUM_010001 is not set | ||||||
|  CONFIG_FW_LOADER_PAGED_BUF=y |  CONFIG_FW_LOADER_PAGED_BUF=y | ||||||
|  CONFIG_GENERIC_ALLOCATOR=y |  CONFIG_GENERIC_ALLOCATOR=y | ||||||
| @@ -267,103 +201,20 @@ CONFIG_GLOB=y
 | @@ -267,102 +201,19 @@ CONFIG_GLOB=y
 | ||||||
|  CONFIG_GPIOLIB=y |  CONFIG_GPIOLIB=y | ||||||
|  CONFIG_GRO_CELLS=y |  CONFIG_GRO_CELLS=y | ||||||
|  CONFIG_HANDLE_DOMAIN_IRQ=y |  CONFIG_HANDLE_DOMAIN_IRQ=y | ||||||
| @@ -102184,7 +102184,6 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
| -CONFIG_HAVE_UID16=y
 | -CONFIG_HAVE_UID16=y
 | ||||||
| -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 | -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 | ||||||
|  CONFIG_HOLES_IN_ZONE=y |  CONFIG_HOLES_IN_ZONE=y | ||||||
|  # CONFIG_HW_RANDOM_MTK is not set |  | ||||||
|  CONFIG_HZ=250 |  CONFIG_HZ=250 | ||||||
|  CONFIG_HZ_250=y |  CONFIG_HZ_250=y | ||||||
| -CONFIG_I2C=y
 | -CONFIG_I2C=y
 | ||||||
| @@ -102220,7 +102219,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_IO_URING=y |  CONFIG_IO_URING=y | ||||||
|  CONFIG_IRQCHIP=y |  CONFIG_IRQCHIP=y | ||||||
|  CONFIG_IRQ_DOMAIN=y |  CONFIG_IRQ_DOMAIN=y | ||||||
| @@ -371,9 +222,10 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y
 | @@ -370,9 +221,10 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y
 | ||||||
|  CONFIG_IRQ_FORCED_THREADING=y |  CONFIG_IRQ_FORCED_THREADING=y | ||||||
|  CONFIG_IRQ_TIME_ACCOUNTING=y |  CONFIG_IRQ_TIME_ACCOUNTING=y | ||||||
|  CONFIG_IRQ_WORK=y |  CONFIG_IRQ_WORK=y | ||||||
| @@ -102232,7 +102231,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_LOCK_DEBUGGING_SUPPORT=y |  CONFIG_LOCK_DEBUGGING_SUPPORT=y | ||||||
|  CONFIG_LOCK_SPIN_ON_OWNER=y |  CONFIG_LOCK_SPIN_ON_OWNER=y | ||||||
|  CONFIG_LZO_COMPRESS=y |  CONFIG_LZO_COMPRESS=y | ||||||
| @@ -381,21 +233,25 @@ CONFIG_LZO_DECOMPRESS=y
 | @@ -380,21 +232,25 @@ CONFIG_LZO_DECOMPRESS=y
 | ||||||
|  CONFIG_MAGIC_SYSRQ=y |  CONFIG_MAGIC_SYSRQ=y | ||||||
|  CONFIG_MDIO_BUS=y |  CONFIG_MDIO_BUS=y | ||||||
|  CONFIG_MDIO_DEVICE=y |  CONFIG_MDIO_DEVICE=y | ||||||
| @@ -102260,7 +102259,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_MTD_RAW_NAND=y |  CONFIG_MTD_RAW_NAND=y | ||||||
|  CONFIG_MTD_SPI_NAND=y |  CONFIG_MTD_SPI_NAND=y | ||||||
|  CONFIG_MTD_SPI_NOR=y |  CONFIG_MTD_SPI_NOR=y | ||||||
| @@ -423,7 +279,6 @@ CONFIG_NET_DSA=y
 | @@ -422,7 +278,6 @@ CONFIG_NET_DSA=y
 | ||||||
|  CONFIG_NET_DSA_MT7530=y |  CONFIG_NET_DSA_MT7530=y | ||||||
|  CONFIG_NET_DSA_TAG_MTK=y |  CONFIG_NET_DSA_TAG_MTK=y | ||||||
|  CONFIG_NET_FLOW_LIMIT=y |  CONFIG_NET_FLOW_LIMIT=y | ||||||
| @@ -102268,7 +102267,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_NET_MEDIATEK_SOC=y |  CONFIG_NET_MEDIATEK_SOC=y | ||||||
|  CONFIG_NET_SWITCHDEV=y |  CONFIG_NET_SWITCHDEV=y | ||||||
|  CONFIG_NET_VENDOR_MEDIATEK=y |  CONFIG_NET_VENDOR_MEDIATEK=y | ||||||
| @@ -448,7 +303,6 @@ CONFIG_PARTITION_PERCPU=y
 | @@ -447,7 +302,6 @@ CONFIG_PARTITION_PERCPU=y
 | ||||||
|  CONFIG_PCI=y |  CONFIG_PCI=y | ||||||
|  CONFIG_PCIEAER=y |  CONFIG_PCIEAER=y | ||||||
|  CONFIG_PCIEASPM=y |  CONFIG_PCIEASPM=y | ||||||
| @@ -102276,7 +102275,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  # CONFIG_PCIEASPM_DEFAULT is not set |  # CONFIG_PCIEASPM_DEFAULT is not set | ||||||
|  CONFIG_PCIEASPM_PERFORMANCE=y |  CONFIG_PCIEASPM_PERFORMANCE=y | ||||||
|  # CONFIG_PCIEASPM_POWERSAVE is not set |  # CONFIG_PCIEASPM_POWERSAVE is not set | ||||||
| @@ -461,6 +315,7 @@ CONFIG_PCI_DOMAINS=y
 | @@ -460,6 +314,7 @@ CONFIG_PCI_DOMAINS=y
 | ||||||
|  CONFIG_PCI_DOMAINS_GENERIC=y |  CONFIG_PCI_DOMAINS_GENERIC=y | ||||||
|  CONFIG_PCI_MSI=y |  CONFIG_PCI_MSI=y | ||||||
|  CONFIG_PCI_MSI_IRQ_DOMAIN=y |  CONFIG_PCI_MSI_IRQ_DOMAIN=y | ||||||
| @@ -102284,7 +102283,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_PGTABLE_LEVELS=3 |  CONFIG_PGTABLE_LEVELS=3 | ||||||
|  CONFIG_PHYLIB=y |  CONFIG_PHYLIB=y | ||||||
|  CONFIG_PHYLINK=y |  CONFIG_PHYLINK=y | ||||||
| @@ -478,7 +333,7 @@ CONFIG_PINCTRL_MT7622=y
 | @@ -477,7 +332,7 @@ CONFIG_PINCTRL_MT7622=y
 | ||||||
|  CONFIG_PINCTRL_MT8516=y |  CONFIG_PINCTRL_MT8516=y | ||||||
|  CONFIG_PINCTRL_MTK=y |  CONFIG_PINCTRL_MTK=y | ||||||
|  CONFIG_PINCTRL_MTK_MOORE=y |  CONFIG_PINCTRL_MTK_MOORE=y | ||||||
| @@ -102293,7 +102292,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_PM=y |  CONFIG_PM=y | ||||||
|  CONFIG_PM_CLK=y |  CONFIG_PM_CLK=y | ||||||
|  CONFIG_PM_GENERIC_DOMAINS=y |  CONFIG_PM_GENERIC_DOMAINS=y | ||||||
| @@ -488,6 +343,20 @@ CONFIG_POWER_RESET=y
 | @@ -487,6 +342,20 @@ CONFIG_POWER_RESET=y
 | ||||||
|  CONFIG_POWER_RESET_SYSCON=y |  CONFIG_POWER_RESET_SYSCON=y | ||||||
|  CONFIG_POWER_SUPPLY=y |  CONFIG_POWER_SUPPLY=y | ||||||
|  CONFIG_PRINTK_TIME=y |  CONFIG_PRINTK_TIME=y | ||||||
| @@ -102314,7 +102313,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_PWM=y |  CONFIG_PWM=y | ||||||
|  CONFIG_PWM_MEDIATEK=y |  CONFIG_PWM_MEDIATEK=y | ||||||
|  # CONFIG_PWM_MTK_DISP is not set |  # CONFIG_PWM_MTK_DISP is not set | ||||||
| @@ -500,7 +369,9 @@ CONFIG_RATIONAL=y
 | @@ -499,7 +368,9 @@ CONFIG_RATIONAL=y
 | ||||||
|  CONFIG_RCU_NEED_SEGCBLIST=y |  CONFIG_RCU_NEED_SEGCBLIST=y | ||||||
|  CONFIG_RCU_STALL_COMMON=y |  CONFIG_RCU_STALL_COMMON=y | ||||||
|  CONFIG_REALTEK_PHY=y |  CONFIG_REALTEK_PHY=y | ||||||
| @@ -102325,7 +102324,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_REGMAP=y |  CONFIG_REGMAP=y | ||||||
|  CONFIG_REGMAP_MMIO=y |  CONFIG_REGMAP_MMIO=y | ||||||
|  CONFIG_REGULATOR=y |  CONFIG_REGULATOR=y | ||||||
| @@ -555,7 +426,6 @@ CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
 | @@ -552,7 +423,6 @@ CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
 | ||||||
|  CONFIG_THERMAL_EMULATION=y |  CONFIG_THERMAL_EMULATION=y | ||||||
|  CONFIG_THERMAL_GOV_BANG_BANG=y |  CONFIG_THERMAL_GOV_BANG_BANG=y | ||||||
|  CONFIG_THERMAL_GOV_FAIR_SHARE=y |  CONFIG_THERMAL_GOV_FAIR_SHARE=y | ||||||
| @@ -102333,7 +102332,7 @@ index 282cd0bab5..e6696bd50a 100644 | |||||||
|  CONFIG_THERMAL_GOV_STEP_WISE=y |  CONFIG_THERMAL_GOV_STEP_WISE=y | ||||||
|  CONFIG_THERMAL_GOV_USER_SPACE=y |  CONFIG_THERMAL_GOV_USER_SPACE=y | ||||||
|  CONFIG_THERMAL_OF=y |  CONFIG_THERMAL_OF=y | ||||||
| @@ -587,6 +457,9 @@ CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
 | @@ -584,6 +454,9 @@ CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y
 | ||||||
|  CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m |  CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m | ||||||
|  CONFIG_WATCHDOG_SYSFS=y |  CONFIG_WATCHDOG_SYSFS=y | ||||||
|  CONFIG_XPS=y |  CONFIG_XPS=y | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 7ed003d57f1c5273fecddabcdc7bd6845c3854a0 Mon Sep 17 00:00:00 2001 | From 0a0953b5c81a2b5b366a3f0f543db71ffc81f713 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Sat, 20 Feb 2021 08:36:43 +0100 | Date: Sat, 20 Feb 2021 08:36:43 +0100 | ||||||
| Subject: [PATCH 05/27] sysupgrade-nand: allow limiting rootfs_data by setting | Subject: [PATCH 5/9] sysupgrade-nand: allow limiting rootfs_data by setting | ||||||
|  env variable |  env variable | ||||||
|  |  | ||||||
| Check if firmware environment variable 'rootfs_data_max' exists and is | Check if firmware environment variable 'rootfs_data_max' exists and is | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 3c6515c9db444da27192c1182fa1e9ab8ba6e2f6 Mon Sep 17 00:00:00 2001 | From eed2e31cb32b565a3ebcc3bc2e9d7dc7a9550b4b Mon Sep 17 00:00:00 2001 | ||||||
| From: Daniel Golle <daniel@makrotopia.org> | From: Daniel Golle <daniel@makrotopia.org> | ||||||
| Date: Sat, 30 Jan 2021 13:58:16 +0000 | Date: Sat, 30 Jan 2021 13:58:16 +0000 | ||||||
| Subject: [PATCH 06/27] uboot-mediatek: add support for linksys e8450 | Subject: [PATCH 01/36] uboot-mediatek: add support for linksys e8450 | ||||||
|  |  | ||||||
| Build U-Boot for the Linksys E8450 in order to have support for UBI. | Build U-Boot for the Linksys E8450 in order to have support for UBI. | ||||||
| The loader has a default environment with scripts handling the reset | The loader has a default environment with scripts handling the reset | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 1a9921bab861dd2c89337c3e4833c716a0474653 Mon Sep 17 00:00:00 2001 | From 256daf33ec9c8cc8b094d7612ba7384db18d0a6b Mon Sep 17 00:00:00 2001 | ||||||
| From: Daniel Golle <daniel@makrotopia.org> | From: Daniel Golle <daniel@makrotopia.org> | ||||||
| Date: Fri, 12 Feb 2021 03:09:39 +0000 | Date: Fri, 12 Feb 2021 03:09:39 +0000 | ||||||
| Subject: [PATCH 07/27] uboot-envtools: add defaults for linksys-e8450-ubi | Subject: [PATCH 04/64] uboot-envtools: add defaults for linksys-e8450-ubi | ||||||
|  |  | ||||||
| Add U-Boot environment configuration for the Linksys E8450 (UBI) to | Add U-Boot environment configuration for the Linksys E8450 (UBI) to | ||||||
| allow access to the bootloader environment from OpenWrt via | allow access to the bootloader environment from OpenWrt via | ||||||
|   | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| From 4ed9b7d04405d5109681643f3ceebbd25f3f28e2 Mon Sep 17 00:00:00 2001 | From 3b896a540de03ca8dfd5596881f9ec6dc15d72c9 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Wed, 7 Apr 2021 10:46:26 +0200 | Date: Wed, 7 Apr 2021 10:46:26 +0200 | ||||||
| Subject: [PATCH 09/27] include: set kernel-version.mk | Subject: [PATCH 01/32] include: set kernel-version.mk | ||||||
|  |  | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| --- | --- | ||||||
| @@ -9,7 +9,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  1 file changed, 6 insertions(+) |  1 file changed, 6 insertions(+) | ||||||
|  |  | ||||||
| diff --git a/include/kernel-version.mk b/include/kernel-version.mk | diff --git a/include/kernel-version.mk b/include/kernel-version.mk | ||||||
| index fe81dbf603..3c109c13c8 100644 | index 52e5c11d75..547f57fa11 100644 | ||||||
| --- a/include/kernel-version.mk | --- a/include/kernel-version.mk | ||||||
| +++ b/include/kernel-version.mk | +++ b/include/kernel-version.mk | ||||||
| @@ -6,9 +6,15 @@ ifdef CONFIG_TESTING_KERNEL | @@ -6,9 +6,15 @@ ifdef CONFIG_TESTING_KERNEL | ||||||
| @@ -18,12 +18,12 @@ index fe81dbf603..3c109c13c8 100644 | |||||||
|   |   | ||||||
| +LINUX_VERSION-4.4 = .60 | +LINUX_VERSION-4.4 = .60 | ||||||
| +LINUX_VERSION-4.14 = .193 | +LINUX_VERSION-4.14 = .193 | ||||||
|  LINUX_VERSION-5.4 = .142 |  LINUX_VERSION-5.4 = .111 | ||||||
| +LINUX_VERSION-5.10 = .27 | +LINUX_VERSION-5.10 = .27 | ||||||
|   |   | ||||||
| +LINUX_KERNEL_HASH-4.4.60 = 2cd8df6f1ac6a5329c5a286ec9b5956215977221a1b731597ed169fff74a9659 | +LINUX_KERNEL_HASH-4.4.60 = 2cd8df6f1ac6a5329c5a286ec9b5956215977221a1b731597ed169fff74a9659 | ||||||
| +LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03 | +LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03 | ||||||
|  LINUX_KERNEL_HASH-5.4.142 = 99785728968564ba27c7e552d024b560072dcbc885540912eabb5c021e231451 |  LINUX_KERNEL_HASH-5.4.111 = 21626132658dc34cb41b7aa7b80ecf83751890a71ac1a63d77aea9d488271a03 | ||||||
| +LINUX_KERNEL_HASH-5.10.27 = d99dc9662951299c53a0a8d8c8d0a72a16ff861d20e927c0f9b14f63282d69d9 | +LINUX_KERNEL_HASH-5.10.27 = d99dc9662951299c53a0a8d8c8d0a72a16ff861d20e927c0f9b14f63282d69d9 | ||||||
|   |   | ||||||
|  remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) |  remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) | ||||||
|   | |||||||
							
								
								
									
										137757
									
								
								backports/0010-ar71xx-forward-port-target-to-get-routerboard-suppor.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137757
									
								
								backports/0010-ar71xx-forward-port-target-to-get-routerboard-suppor.patch
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| From ad860cb413d1934332de60658d5eb8fb64d19663 Mon Sep 17 00:00:00 2001 | From 43f832c25bb9dee1a817370ab11531e81348f177 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Sun, 9 May 2021 12:23:00 +0200 | Date: Sun, 9 May 2021 12:23:00 +0200 | ||||||
| Subject: [PATCH 11/27] backport: mkits.sh | Subject: [PATCH 42/43] backport: mkits.sh | ||||||
|  |  | ||||||
| 969083634481c3ab5fb80509f385ef10ab45b55f | 969083634481c3ab5fb80509f385ef10ab45b55f | ||||||
| e991c1b8a2385397fc1e657ed73878938997d951 | e991c1b8a2385397fc1e657ed73878938997d951 | ||||||
| @@ -17,10 +17,10 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  5 files changed, 95 insertions(+), 12 deletions(-) |  5 files changed, 95 insertions(+), 12 deletions(-) | ||||||
|  |  | ||||||
| diff --git a/include/image-commands.mk b/include/image-commands.mk | diff --git a/include/image-commands.mk b/include/image-commands.mk | ||||||
| index 2c917d613e..c6e8eb0293 100644 | index bde6e030bc..f97d4363d1 100644 | ||||||
| --- a/include/image-commands.mk | --- a/include/image-commands.mk | ||||||
| +++ b/include/image-commands.mk | +++ b/include/image-commands.mk | ||||||
| @@ -203,7 +203,7 @@ define Build/fit | @@ -204,7 +204,7 @@ define Build/fit | ||||||
|  		$(if $(word 3,$(1)),-r $(IMAGE_ROOTFS) -f $(subst _,$(comma),$(DEVICE_NAME))) \ |  		$(if $(word 3,$(1)),-r $(IMAGE_ROOTFS) -f $(subst _,$(comma),$(DEVICE_NAME))) \ | ||||||
|  		-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ |  		-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ | ||||||
|  		$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ |  		$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ | ||||||
| @@ -30,7 +30,7 @@ index 2c917d613e..c6e8eb0293 100644 | |||||||
|  	PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(word 3,$(1)),-E -B 0x1000 -p 0x1000) -f $@.its $@.new |  	PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(word 3,$(1)),-E -B 0x1000 -p 0x1000) -f $@.its $@.new | ||||||
|  	@mv $@.new $@ |  	@mv $@.new $@ | ||||||
| diff --git a/include/image.mk b/include/image.mk | diff --git a/include/image.mk b/include/image.mk | ||||||
| index b6e8ab3c84..7c2dcf0e8b 100644 | index fc46012e87..7a48b789af 100644 | ||||||
| --- a/include/image.mk | --- a/include/image.mk | ||||||
| +++ b/include/image.mk | +++ b/include/image.mk | ||||||
| @@ -139,7 +139,7 @@ endef | @@ -139,7 +139,7 @@ endef | ||||||
|   | |||||||
							
								
								
									
										167
									
								
								backports/0013-iw-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								backports/0013-iw-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,167 @@ | |||||||
|  | From 0ddce2498be815e098154867d0b18293fe613f12 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Thu, 27 May 2021 11:57:10 +0200 | ||||||
|  | Subject: [PATCH 13/13] iw: update to latest HEAD | ||||||
|  |  | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  package/network/utils/iw/Makefile             | 11 +++---- | ||||||
|  |  .../utils/iw/patches/200-reduce_size.patch    | 30 +++++++++---------- | ||||||
|  |  2 files changed, 21 insertions(+), 20 deletions(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile | ||||||
|  | index 6db9aaf105..8e11046189 100644 | ||||||
|  | --- a/package/network/utils/iw/Makefile | ||||||
|  | +++ b/package/network/utils/iw/Makefile | ||||||
|  | @@ -8,12 +8,13 @@ | ||||||
|  |  include $(TOPDIR)/rules.mk | ||||||
|  |   | ||||||
|  |  PKG_NAME:=iw | ||||||
|  | -PKG_VERSION:=5.9 | ||||||
|  | -PKG_RELEASE:=1 | ||||||
|  | +PKG_VERSION:=5.9-8fab0c9e | ||||||
|  | +PKG_RELEASE:=$(AUTORELEASE) | ||||||
|  |   | ||||||
|  | -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | ||||||
|  | -PKG_SOURCE_URL:=@KERNEL/software/network/iw | ||||||
|  | -PKG_HASH:=293a07109aeb7e36267cf59e3ce52857e9ffae3a6666eb8ac77894b1839fe1f2 | ||||||
|  | +PKG_SOURCE_PROTO:=git | ||||||
|  | +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git | ||||||
|  | +PKG_SOURCE_VERSION:=8fab0c9ee9db217587a58efcc37421c86edcb638 | ||||||
|  | +PKG_MIRROR_HASH:=797b322bc03952f3127ae0a7da476c14ada1bbe9a9ae234a56dd6f864c568e16 | ||||||
|  |   | ||||||
|  |  PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> | ||||||
|  |  PKG_LICENSE:=GPL-2.0 | ||||||
|  | diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch | ||||||
|  | index af30876012..83e11405cb 100644 | ||||||
|  | --- a/package/network/utils/iw/patches/200-reduce_size.patch | ||||||
|  | +++ b/package/network/utils/iw/patches/200-reduce_size.patch | ||||||
|  | @@ -1,6 +1,6 @@ | ||||||
|  |  --- a/event.c | ||||||
|  |  +++ b/event.c | ||||||
|  | -@@ -944,6 +944,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  | +@@ -956,6 +956,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  |   	} | ||||||
|  |    | ||||||
|  |   	switch (gnlh->cmd) { | ||||||
|  | @@ -8,7 +8,7 @@ | ||||||
|  |   	case NL80211_CMD_NEW_WIPHY: | ||||||
|  |   		printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); | ||||||
|  |   		break; | ||||||
|  | -@@ -979,6 +980,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  | +@@ -991,6 +992,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  |   	case NL80211_CMD_SCHED_SCAN_RESULTS: | ||||||
|  |   		printf("got scheduled scan results\n"); | ||||||
|  |   		break; | ||||||
|  | @@ -16,7 +16,7 @@ | ||||||
|  |   	case NL80211_CMD_WIPHY_REG_CHANGE: | ||||||
|  |   	case NL80211_CMD_REG_CHANGE: | ||||||
|  |   		if (gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE) | ||||||
|  | -@@ -1061,6 +1063,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  | +@@ -1073,6 +1075,7 @@ static int print_event(struct nl_msg *ms | ||||||
|  |   		mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); | ||||||
|  |   		printf("del station %s\n", macbuf); | ||||||
|  |   		break; | ||||||
|  | @@ -24,7 +24,7 @@ | ||||||
|  |   	case NL80211_CMD_JOIN_IBSS: | ||||||
|  |   		mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); | ||||||
|  |   		printf("IBSS %s joined\n", macbuf); | ||||||
|  | -@@ -1254,9 +1257,9 @@ static int print_event(struct nl_msg *ms | ||||||
|  | +@@ -1271,9 +1274,9 @@ static int print_event(struct nl_msg *ms | ||||||
|  |   	case NL80211_CMD_CH_SWITCH_NOTIFY: | ||||||
|  |   		parse_ch_switch_notify(tb, gnlh->cmd); | ||||||
|  |   		break; | ||||||
|  | @@ -134,7 +134,7 @@ | ||||||
|  |   { | ||||||
|  |  --- a/scan.c | ||||||
|  |  +++ b/scan.c | ||||||
|  | -@@ -1297,6 +1297,9 @@ static void print_ht_op(const uint8_t ty | ||||||
|  | +@@ -1306,6 +1306,9 @@ static void print_ht_op(const uint8_t ty | ||||||
|  |   	printf("\t\t * secondary channel offset: %s\n", | ||||||
|  |   		ht_secondary_offset[data[1] & 0x3]); | ||||||
|  |   	printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); | ||||||
|  | @@ -144,7 +144,7 @@ | ||||||
|  |   	printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); | ||||||
|  |   	printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); | ||||||
|  |   	printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); | ||||||
|  | -@@ -1707,6 +1710,14 @@ static void print_ie(const struct ie_pri | ||||||
|  | +@@ -1716,6 +1719,14 @@ static void print_ie(const struct ie_pri | ||||||
|  |    | ||||||
|  |   static const struct ie_print ieprinters[] = { | ||||||
|  |   	[0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, | ||||||
|  | @@ -159,7 +159,7 @@ | ||||||
|  |   	[1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, | ||||||
|  |   	[3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, | ||||||
|  |   	[5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, | ||||||
|  | -@@ -1716,26 +1727,20 @@ static const struct ie_print ieprinters[ | ||||||
|  | +@@ -1725,26 +1736,20 @@ static const struct ie_print ieprinters[ | ||||||
|  |   	[32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, | ||||||
|  |   	[35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, | ||||||
|  |   	[42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, | ||||||
|  | @@ -187,15 +187,15 @@ | ||||||
|  |   }; | ||||||
|  |    | ||||||
|  |   static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, | ||||||
|  | -@@ -2279,6 +2284,7 @@ void print_ies(unsigned char *ie, int ie | ||||||
|  | +@@ -2326,6 +2331,7 @@ void print_ies(unsigned char *ie, int ie | ||||||
|  |   		    ieprinters[ie[0]].flags & BIT(ptype)) { | ||||||
|  |   			print_ie(&ieprinters[ie[0]], | ||||||
|  |   				 ie[0], ie[1], ie + 2, &ie_buffer); | ||||||
|  |  +#ifdef IW_FULL | ||||||
|  |   		} else if (ie[0] == 221 /* vendor */) { | ||||||
|  |   			print_vendor(ie[1], ie + 2, unknown, ptype); | ||||||
|  | - 		} else if (unknown) { | ||||||
|  | -@@ -2288,6 +2294,7 @@ void print_ies(unsigned char *ie, int ie | ||||||
|  | + 		} else if (ie[0] == 255 /* extension */) { | ||||||
|  | +@@ -2337,6 +2343,7 @@ void print_ies(unsigned char *ie, int ie | ||||||
|  |   			for (i=0; i<ie[1]; i++) | ||||||
|  |   				printf(" %.2x", ie[2+i]); | ||||||
|  |   			printf("\n"); | ||||||
|  | @@ -203,7 +203,7 @@ | ||||||
|  |   		} | ||||||
|  |   		ielen -= ie[1] + 2; | ||||||
|  |   		ie += ie[1] + 2; | ||||||
|  | -@@ -2328,6 +2335,7 @@ static void print_capa_non_dmg(__u16 cap | ||||||
|  | +@@ -2377,6 +2384,7 @@ static void print_capa_non_dmg(__u16 cap | ||||||
|  |   		printf(" ESS"); | ||||||
|  |   	if (capa & WLAN_CAPABILITY_IBSS) | ||||||
|  |   		printf(" IBSS"); | ||||||
|  | @@ -211,7 +211,7 @@ | ||||||
|  |   	if (capa & WLAN_CAPABILITY_CF_POLLABLE) | ||||||
|  |   		printf(" CfPollable"); | ||||||
|  |   	if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST) | ||||||
|  | -@@ -2356,6 +2364,7 @@ static void print_capa_non_dmg(__u16 cap | ||||||
|  | +@@ -2405,6 +2413,7 @@ static void print_capa_non_dmg(__u16 cap | ||||||
|  |   		printf(" DelayedBACK"); | ||||||
|  |   	if (capa & WLAN_CAPABILITY_IMM_BACK) | ||||||
|  |   		printf(" ImmediateBACK"); | ||||||
|  | @@ -219,7 +219,7 @@ | ||||||
|  |   } | ||||||
|  |    | ||||||
|  |   static int print_bss_handler(struct nl_msg *msg, void *arg) | ||||||
|  | -@@ -2440,8 +2449,10 @@ static int print_bss_handler(struct nl_m | ||||||
|  | +@@ -2489,8 +2498,10 @@ static int print_bss_handler(struct nl_m | ||||||
|  |   	if (bss[NL80211_BSS_FREQUENCY]) { | ||||||
|  |   		int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); | ||||||
|  |   		printf("\tfreq: %d\n", freq); | ||||||
|  | @@ -230,7 +230,7 @@ | ||||||
|  |   	} | ||||||
|  |   	if (bss[NL80211_BSS_BEACON_INTERVAL]) | ||||||
|  |   		printf("\tbeacon interval: %d TUs\n", | ||||||
|  | -@@ -2635,6 +2646,7 @@ static int handle_stop_sched_scan(struct | ||||||
|  | +@@ -2684,6 +2695,7 @@ static int handle_stop_sched_scan(struct | ||||||
|  |   	return 0; | ||||||
|  |   } | ||||||
|  |    | ||||||
|  | @@ -238,7 +238,7 @@ | ||||||
|  |   COMMAND(scan, sched_start, | ||||||
|  |   	SCHED_SCAN_OPTIONS, | ||||||
|  |   	NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan, | ||||||
|  | -@@ -2645,3 +2657,4 @@ COMMAND(scan, sched_start, | ||||||
|  | +@@ -2694,3 +2706,4 @@ COMMAND(scan, sched_start, | ||||||
|  |   COMMAND(scan, sched_stop, "", | ||||||
|  |   	NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan, | ||||||
|  |   	"Stop an ongoing scheduled scan."); | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
| @@ -1,27 +1,32 @@ | |||||||
| From bb797fc82f8ade2a1c0b7a68dd7c920eae2f531f Mon Sep 17 00:00:00 2001 | From 029282d8ef8e4e813817d1c7d4aeae4208bc2da5 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Tue, 18 May 2021 10:46:43 +0200 | Date: Tue, 18 May 2021 10:46:43 +0200 | ||||||
| Subject: [PATCH 01/74] libubox: update to latest HEAD | Subject: [PATCH 01/52] libubox: update to latest HEAD | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
|  package/libs/libubox/Makefile | 8 ++++---- |  package/libs/libubox/Makefile | 10 +++++----- | ||||||
|  1 file changed, 4 insertions(+), 4 deletions(-) |  1 file changed, 5 insertions(+), 5 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
 | diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
 | ||||||
| index d2c07783e1..3b01930d6c 100644
 | index 4d582eacfd..33aa73eef7 100644
 | ||||||
| --- a/package/libs/libubox/Makefile
 | --- a/package/libs/libubox/Makefile
 | ||||||
| +++ b/package/libs/libubox/Makefile
 | +++ b/package/libs/libubox/Makefile
 | ||||||
| @@ -5,9 +5,9 @@ PKG_RELEASE=2
 | @@ -1,13 +1,13 @@
 | ||||||
|  |  include $(TOPDIR)/rules.mk | ||||||
|  |   | ||||||
|  |  PKG_NAME:=libubox | ||||||
|  | -PKG_RELEASE=1
 | ||||||
|  | +PKG_RELEASE=2
 | ||||||
|   |   | ||||||
|  PKG_SOURCE_PROTO:=git |  PKG_SOURCE_PROTO:=git | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git |  PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git | ||||||
| -PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca
 | -PKG_MIRROR_HASH:=97dc4eba01cf2c5d6a6d0db3747e0cdc0d95cb87e51b3115272e7d3e69a8b255
 | ||||||
| -PKG_SOURCE_DATE:=2021-05-16
 | -PKG_SOURCE_DATE:=2020-12-12
 | ||||||
| -PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
 | -PKG_SOURCE_VERSION:=357877693ca363b12e6e7e14d345639b2440cd07
 | ||||||
| +PKG_MIRROR_HASH:=82d84fb97e725b0a18ceac639cae0c17d922754bb648ff58c62069d92798a6cd
 | +PKG_MIRROR_HASH:=1cdb91ac0ee925f133ee9f70eac131a99def312fe7cf0aed44df84eb1762e30b
 | ||||||
| +PKG_SOURCE_DATE:=2021-08-19
 | +PKG_SOURCE_DATE:=2021-08-19
 | ||||||
| +PKG_SOURCE_VERSION:=c86a894ec63d83ecf2c373bbf9dc8fba9713d942
 | +PKG_SOURCE_VERSION:=d716ac4bc4236031d4c3cc1ed362b502e20e3787
 | ||||||
|  PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) |  PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) | ||||||
|  CMAKE_INSTALL:=1 |  CMAKE_INSTALL:=1 | ||||||
|   |   | ||||||
| @@ -1,33 +0,0 @@ | |||||||
| From 8ba5feb6aaba50bda126db027490c7d37e428e3b Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Stijn Tintel <stijn@linux-ipv6.be> |  | ||||||
| Date: Fri, 20 Aug 2021 16:11:12 +0300 |  | ||||||
| Subject: [PATCH 15/27] uhttpd: add config option for json_script |  | ||||||
|  |  | ||||||
| Add a config option for json_script instead of unconditionally including |  | ||||||
| all json files in /etc/uhttpd in every uhttpd instance. This makes it |  | ||||||
| possible to configure a single instance with an unconditional redirect, |  | ||||||
| which is currently not possible as it would render all other uhttpd |  | ||||||
| instances unusable. |  | ||||||
|  |  | ||||||
| Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> |  | ||||||
| --- |  | ||||||
|  package/network/services/uhttpd/files/uhttpd.init | 3 ++- |  | ||||||
|  1 file changed, 2 insertions(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init |  | ||||||
| index 869f79bea2..7020912c6c 100755 |  | ||||||
| --- a/package/network/services/uhttpd/files/uhttpd.init |  | ||||||
| +++ b/package/network/services/uhttpd/files/uhttpd.init |  | ||||||
| @@ -195,7 +195,8 @@ start_instance() |  | ||||||
|  		append_bool "$cfg" redirect_https "-q" 0 |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| -	for file in /etc/uhttpd/*.json; do |  | ||||||
| +	config_get json_script "$cfg" json_script |  | ||||||
| +	for file in $json_script; do |  | ||||||
|  		[ -s "$file" ] && procd_append_param command -H "$file" |  | ||||||
|  	done |  | ||||||
|   |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 41db6b8282d09bd9d7ee453f54e592003904ab0e Mon Sep 17 00:00:00 2001 | From e413c12b77acc0012a79e8981b553e35d4a2b20e Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Wed, 30 Jun 2021 14:21:23 +0200 | Date: Wed, 30 Jun 2021 14:21:23 +0200 | ||||||
| Subject: [PATCH 13/27] umdns: update to latest HEAD | Subject: [PATCH] umdns: update to latest HEAD | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
| @@ -1,41 +0,0 @@ | |||||||
| From 63281b982b3692828ff453dcb9e68b8e43d628e5 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: John Crispin <john@phrozen.org> |  | ||||||
| Date: Mon, 21 Jun 2021 12:53:28 +0200 |  | ||||||
| Subject: [PATCH 16/27] iwinfo: update to latest git HEAD |  | ||||||
|  |  | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> |  | ||||||
| --- |  | ||||||
|  package/network/utils/iwinfo/Makefile | 14 +++++++++++--- |  | ||||||
|  1 file changed, 11 insertions(+), 3 deletions(-) |  | ||||||
|  |  | ||||||
| diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile |  | ||||||
| index 815c477988..d235f07da9 100644 |  | ||||||
| --- a/package/network/utils/iwinfo/Makefile |  | ||||||
| +++ b/package/network/utils/iwinfo/Makefile |  | ||||||
| @@ -11,12 +11,20 @@ PKG_RELEASE:=2.1 |  | ||||||
|   |  | ||||||
|  PKG_SOURCE_PROTO:=git |  | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git |  | ||||||
| -PKG_SOURCE_DATE:=2021-04-30 |  | ||||||
| -PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2 |  | ||||||
| -PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2 |  | ||||||
| +PKG_SOURCE_DATE:=2021-06-09 |  | ||||||
| +PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a |  | ||||||
| +PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea |  | ||||||
|  PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io> |  | ||||||
|  PKG_LICENSE:=GPL-2.0 |  | ||||||
|   |  | ||||||
| +PKG_FLAGS := nonshared |  | ||||||
| + |  | ||||||
| +PKG_CONFIG_DEPENDS := \ |  | ||||||
| +	CONFIG_PACKAGE_kmod-brcm-wl \ |  | ||||||
| +	CONFIG_PACKAGE_kmod-brcm-wl-mini \ |  | ||||||
| +	CONFIG_PACKAGE_kmod-brcm-wl-mimo \ |  | ||||||
| +	CONFIG_PACKAGE_kmod-cfg80211 |  | ||||||
| + |  | ||||||
|  IWINFO_ABI_VERSION:=20210430 |  | ||||||
|   |  | ||||||
|  include $(INCLUDE_DIR)/package.mk |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -0,0 +1,45 @@ | |||||||
|  | From 6c7e11cccbd28224a9a473a36df1102b4257d356 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: DENG Qingfang <dqfext@gmail.com> | ||||||
|  | Date: Fri, 9 Apr 2021 12:25:08 +0800 | ||||||
|  | Subject: [PATCH 5/6] kernel/modules: move act_gact into kmod-sched-core | ||||||
|  |  | ||||||
|  | As the name suggests, act_gact has the generic actions such as dropping | ||||||
|  | and accepting packets, so move it into kmod-sched-core. | ||||||
|  |  | ||||||
|  | Signed-off-by: DENG Qingfang <dqfext@gmail.com> | ||||||
|  | --- | ||||||
|  |  package/kernel/linux/modules/netsupport.mk | 4 ++-- | ||||||
|  |  1 file changed, 2 insertions(+), 2 deletions(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk | ||||||
|  | index 9fd49c1392..4343e850e9 100644 | ||||||
|  | --- a/package/kernel/linux/modules/netsupport.mk | ||||||
|  | +++ b/package/kernel/linux/modules/netsupport.mk | ||||||
|  | @@ -721,7 +721,7 @@ $(eval $(call KernelPackage,mppe)) | ||||||
|  |   | ||||||
|  |   | ||||||
|  |  SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) | ||||||
|  | -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit cls_matchall | ||||||
|  | +SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall | ||||||
|  |  SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan | ||||||
|  |  SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) | ||||||
|  |  SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) | ||||||
|  | @@ -745,6 +745,7 @@ define KernelPackage/sched-core | ||||||
|  |  	CONFIG_NET_CLS_ROUTE4 \ | ||||||
|  |  	CONFIG_NET_CLS_TCINDEX \ | ||||||
|  |  	CONFIG_NET_CLS_U32 \ | ||||||
|  | +	CONFIG_NET_ACT_GACT \ | ||||||
|  |  	CONFIG_NET_ACT_MIRRED \ | ||||||
|  |  	CONFIG_NET_ACT_SKBEDIT \ | ||||||
|  |  	CONFIG_NET_CLS_MATCHALL \ | ||||||
|  | @@ -899,7 +900,6 @@ define KernelPackage/sched | ||||||
|  |  	CONFIG_NET_SCH_FQ \ | ||||||
|  |  	CONFIG_NET_SCH_PIE \ | ||||||
|  |  	CONFIG_NET_ACT_POLICE \ | ||||||
|  | -	CONFIG_NET_ACT_GACT \ | ||||||
|  |  	CONFIG_NET_ACT_IPT \ | ||||||
|  |  	CONFIG_NET_ACT_PEDIT \ | ||||||
|  |  	CONFIG_NET_ACT_SIMP \ | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 9df1500bde8e609dcbbecbefa0eb5a29d9e6f7f5 Mon Sep 17 00:00:00 2001 | From 97fb5323a826e6b5ad89b5281c0b9d9e92bfc0b4 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Fri, 27 Aug 2021 16:52:34 +0200 | Date: Fri, 27 Aug 2021 16:52:34 +0200 | ||||||
| Subject: [PATCH 14/27] kernel: add bdpu filter support | Subject: [PATCH 59/59] kernel: add bdpu filter support | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
| @@ -1,111 +0,0 @@ | |||||||
| From 1496ca5ceb941ba725311c6c0366193092035f32 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: John Crispin <john@phrozen.org> |  | ||||||
| Date: Thu, 27 May 2021 13:24:47 +0200 |  | ||||||
| Subject: [PATCH 01/60] netifd: update to latest HEAD |  | ||||||
|  |  | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> |  | ||||||
| --- |  | ||||||
|  package/network/config/netifd/Makefile        |  8 ++-- |  | ||||||
|  .../config/netifd/patches/100-script.patch    | 21 +++++++++++ |  | ||||||
|  .../config/netifd/patches/hairpin.patch       | 37 +++++++++++++++++++ |  | ||||||
|  3 files changed, 61 insertions(+), 5 deletions(-) |  | ||||||
|  create mode 100644 package/network/config/netifd/patches/100-script.patch |  | ||||||
|  create mode 100644 package/network/config/netifd/patches/hairpin.patch |  | ||||||
|  |  | ||||||
| diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile |  | ||||||
| index 4b5f110da2..d41bddfd56 100644 |  | ||||||
| --- a/package/network/config/netifd/Makefile |  | ||||||
| +++ b/package/network/config/netifd/Makefile |  | ||||||
| @@ -5,16 +5,14 @@ PKG_RELEASE:=1 |  | ||||||
|   |  | ||||||
|  PKG_SOURCE_PROTO:=git |  | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git |  | ||||||
| -PKG_SOURCE_DATE:=2021-07-26 |  | ||||||
| -PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023 |  | ||||||
| -PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9 |  | ||||||
| +PKG_SOURCE_DATE:=2021-10-20 |  | ||||||
| +PKG_SOURCE_VERSION:=c61a1d432b34babe230e49a82712608b07410fc3 |  | ||||||
| +PKG_MIRROR_HASH:=2b040d039c560cbc04dfe1e496aa81f714a032db88986803728dd6b724c11cd2 |  | ||||||
|  PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> |  | ||||||
|   |  | ||||||
|  PKG_LICENSE:=GPL-2.0 |  | ||||||
|  PKG_LICENSE_FILES:= |  | ||||||
|   |  | ||||||
| -PKG_BUILD_PARALLEL:=1 |  | ||||||
| - |  | ||||||
|  include $(INCLUDE_DIR)/package.mk |  | ||||||
|  include $(INCLUDE_DIR)/cmake.mk |  | ||||||
|   |  | ||||||
| diff --git a/package/network/config/netifd/patches/100-script.patch b/package/network/config/netifd/patches/100-script.patch |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..e7ba83f4bb |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/package/network/config/netifd/patches/100-script.patch |  | ||||||
| @@ -0,0 +1,21 @@ |  | ||||||
| +Index: a/scripts/netifd-wireless.sh |  | ||||||
| +=================================================================== |  | ||||||
| +--- a/scripts/netifd-wireless.sh |  | ||||||
| ++++ b/scripts/netifd-wireless.sh |  | ||||||
| +@@ -252,11 +252,14 @@ wireless_vif_parse_encryption() { |  | ||||||
| + 			auth_type=owe |  | ||||||
| + 		;; |  | ||||||
| + 		wpa3-mixed*) |  | ||||||
| +-			auth_type=eap-eap192 |  | ||||||
| ++			auth_type=eap-eap256 |  | ||||||
| + 		;; |  | ||||||
| +-		wpa3*) |  | ||||||
| ++		wpa3-192*) |  | ||||||
| + 			auth_type=eap192 |  | ||||||
| + 		;; |  | ||||||
| ++		wpa3*) |  | ||||||
| ++			auth_type=eap256 |  | ||||||
| ++		;; |  | ||||||
| + 		psk3-mixed*|sae-mixed*) |  | ||||||
| + 			auth_type=psk-sae |  | ||||||
| + 		;; |  | ||||||
| diff --git a/package/network/config/netifd/patches/hairpin.patch b/package/network/config/netifd/patches/hairpin.patch |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..25515d75d4 |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/package/network/config/netifd/patches/hairpin.patch |  | ||||||
| @@ -0,0 +1,37 @@ |  | ||||||
| +diff --git a/wireless.c b/wireless.c |  | ||||||
| +index b26c4e8c8f0b..bd847e72ab40 100644 |  | ||||||
| +--- a/wireless.c |  | ||||||
| ++++ b/wireless.c |  | ||||||
| +@@ -804,20 +804,13 @@ wireless_interface_init_config(struct wireless_interface *vif) |  | ||||||
| + 		vif->network = cur; |  | ||||||
| +  |  | ||||||
| + 	cur = tb[VIF_ATTR_MODE]; |  | ||||||
| +-	if (cur) |  | ||||||
| +-		vif->ap_mode = !strcmp(blobmsg_get_string(cur), "ap"); |  | ||||||
| +- |  | ||||||
| +-	if (!vif->ap_mode) |  | ||||||
| +-		return; |  | ||||||
| ++	vif->ap_mode = cur && !strcmp(blobmsg_get_string(cur), "ap"); |  | ||||||
| +  |  | ||||||
| + 	cur = tb[VIF_ATTR_ISOLATE]; |  | ||||||
| +-	if (cur) |  | ||||||
| +-		vif->isolate = blobmsg_get_bool(cur); |  | ||||||
| ++	vif->isolate = vif->ap_mode && cur && blobmsg_get_bool(cur); |  | ||||||
| +  |  | ||||||
| + 	cur = tb[VIF_ATTR_PROXYARP]; |  | ||||||
| +-	if (cur) |  | ||||||
| +-		vif->proxyarp = blobmsg_get_bool(cur); |  | ||||||
| +- |  | ||||||
| ++	vif->proxyarp = vif->ap_mode && cur && blobmsg_get_bool(cur); |  | ||||||
| + } |  | ||||||
| +  |  | ||||||
| + /* vlist update call for wireless interface list */ |  | ||||||
| +@@ -846,8 +839,6 @@ vif_update(struct vlist_tree *tree, struct vlist_node *node_new, |  | ||||||
| + 		wireless_interface_handle_link(vif_old, NULL, false); |  | ||||||
| + 		free(vif_old->config); |  | ||||||
| + 		vif_old->config = blob_memdup(vif_new->config); |  | ||||||
| +-		vif_old->isolate = vif_new->isolate; |  | ||||||
| +-		vif_old->ap_mode = vif_new->ap_mode; |  | ||||||
| + 		wireless_interface_init_config(vif_old); |  | ||||||
| + 		free(vif_new); |  | ||||||
| + 	} else if (vif_new) { |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,247 +0,0 @@ | |||||||
| From 99b9f524e94b98ce8fd3e141bf7e07bfa96bbea0 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: John Crispin <john@phrozen.org> |  | ||||||
| Date: Tue, 14 Sep 2021 09:19:08 +0200 |  | ||||||
| Subject: [PATCH] mt76: update to latest HEAD |  | ||||||
|  |  | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> |  | ||||||
| --- |  | ||||||
|  package/kernel/mt76/Makefile                  |   7 +- |  | ||||||
|  ...the-dst-buffer-to-of_get_mac_address.patch | 206 ++++++++++++++++++ |  | ||||||
|  2 files changed, 210 insertions(+), 3 deletions(-) |  | ||||||
|  create mode 100644 package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch |  | ||||||
|  |  | ||||||
| diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |  | ||||||
| index e4051d8347..431c57a240 100644 |  | ||||||
| --- a/package/kernel/mt76/Makefile |  | ||||||
| +++ b/package/kernel/mt76/Makefile |  | ||||||
| @@ -8,11 +8,12 @@ PKG_LICENSE_FILES:= |  | ||||||
|   |  | ||||||
|  PKG_SOURCE_URL:=https://github.com/openwrt/mt76 |  | ||||||
|  PKG_SOURCE_PROTO:=git |  | ||||||
| -PKG_SOURCE_DATE:=2021-06-06 |  | ||||||
| -PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc |  | ||||||
| -PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630 |  | ||||||
| +PKG_SOURCE_DATE:=2021-07-15 |  | ||||||
| +PKG_SOURCE_VERSION:=bbebea7d6dc64313132226adc3f7369d36e9359d |  | ||||||
| +PKG_MIRROR_HASH:=17cd74e72c1f6c8742b698bf6772afacc6fba71b233af8c4d59530600cf44d5b |  | ||||||
|   |  | ||||||
|  PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> |  | ||||||
| +PKG_USE_NINJA:=0 |  | ||||||
|  PKG_BUILD_PARALLEL:=1 |  | ||||||
|   |  | ||||||
|  PKG_CONFIG_DEPENDS += \ |  | ||||||
| diff --git a/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..66075f2771 |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/package/kernel/mt76/patches/001-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch |  | ||||||
| @@ -0,0 +1,206 @@ |  | ||||||
| +From 83216e3988cd196183542937c9bd58b279f946af Mon Sep 17 00:00:00 2001 |  | ||||||
| +From: Michael Walle <michael@walle.cc> |  | ||||||
| +Date: Mon, 12 Apr 2021 19:47:17 +0200 |  | ||||||
| +Subject: of: net: pass the dst buffer to of_get_mac_address() |  | ||||||
| + |  | ||||||
| +of_get_mac_address() returns a "const void*" pointer to a MAC address. |  | ||||||
| +Lately, support to fetch the MAC address by an NVMEM provider was added. |  | ||||||
| +But this will only work with platform devices. It will not work with |  | ||||||
| +PCI devices (e.g. of an integrated root complex) and esp. not with DSA |  | ||||||
| +ports. |  | ||||||
| + |  | ||||||
| +There is an of_* variant of the nvmem binding which works without |  | ||||||
| +devices. The returned data of a nvmem_cell_read() has to be freed after |  | ||||||
| +use. On the other hand the return of_get_mac_address() points to some |  | ||||||
| +static data without a lifetime. The trick for now, was to allocate a |  | ||||||
| +device resource managed buffer which is then returned. This will only |  | ||||||
| +work if we have an actual device. |  | ||||||
| + |  | ||||||
| +Change it, so that the caller of of_get_mac_address() has to supply a |  | ||||||
| +buffer where the MAC address is written to. Unfortunately, this will |  | ||||||
| +touch all drivers which use the of_get_mac_address(). |  | ||||||
| + |  | ||||||
| +Usually the code looks like: |  | ||||||
| + |  | ||||||
| +  const char *addr; |  | ||||||
| +  addr = of_get_mac_address(np); |  | ||||||
| +  if (!IS_ERR(addr)) |  | ||||||
| +    ether_addr_copy(ndev->dev_addr, addr); |  | ||||||
| + |  | ||||||
| +This can then be simply rewritten as: |  | ||||||
| + |  | ||||||
| +  of_get_mac_address(np, ndev->dev_addr); |  | ||||||
| + |  | ||||||
| +Sometimes is_valid_ether_addr() is used to test the MAC address. |  | ||||||
| +of_get_mac_address() already makes sure, it just returns a valid MAC |  | ||||||
| +address. Thus we can just test its return code. But we have to be |  | ||||||
| +careful if there are still other sources for the MAC address before the |  | ||||||
| +of_get_mac_address(). In this case we have to keep the |  | ||||||
| +is_valid_ether_addr() call. |  | ||||||
| + |  | ||||||
| +The following coccinelle patch was used to convert common cases to the |  | ||||||
| +new style. Afterwards, I've manually gone over the drivers and fixed the |  | ||||||
| +return code variable: either used a new one or if one was already |  | ||||||
| +available use that. Mansour Moufid, thanks for that coccinelle patch! |  | ||||||
| + |  | ||||||
| +<spml> |  | ||||||
| +@a@ |  | ||||||
| +identifier x; |  | ||||||
| +expression y, z; |  | ||||||
| +@@ |  | ||||||
| +- x = of_get_mac_address(y); |  | ||||||
| ++ x = of_get_mac_address(y, z); |  | ||||||
| +  <... |  | ||||||
| +- ether_addr_copy(z, x); |  | ||||||
| +  ...> |  | ||||||
| + |  | ||||||
| +@@ |  | ||||||
| +identifier a.x; |  | ||||||
| +@@ |  | ||||||
| +- if (<+... x ...+>) {} |  | ||||||
| + |  | ||||||
| +@@ |  | ||||||
| +identifier a.x; |  | ||||||
| +@@ |  | ||||||
| +  if (<+... x ...+>) { |  | ||||||
| +      ... |  | ||||||
| +  } |  | ||||||
| +- else {} |  | ||||||
| + |  | ||||||
| +@@ |  | ||||||
| +identifier a.x; |  | ||||||
| +expression e; |  | ||||||
| +@@ |  | ||||||
| +- if (<+... x ...+>@e) |  | ||||||
| +-     {} |  | ||||||
| +- else |  | ||||||
| ++ if (!(e)) |  | ||||||
| +      {...} |  | ||||||
| + |  | ||||||
| +@@ |  | ||||||
| +expression x, y, z; |  | ||||||
| +@@ |  | ||||||
| +- x = of_get_mac_address(y, z); |  | ||||||
| ++ of_get_mac_address(y, z); |  | ||||||
| +  ... when != x |  | ||||||
| +</spml> |  | ||||||
| + |  | ||||||
| +All drivers, except drivers/net/ethernet/aeroflex/greth.c, were |  | ||||||
| +compile-time tested. |  | ||||||
| + |  | ||||||
| +Suggested-by: Andrew Lunn <andrew@lunn.ch> |  | ||||||
| +Signed-off-by: Michael Walle <michael@walle.cc> |  | ||||||
| +Reviewed-by: Andrew Lunn <andrew@lunn.ch> |  | ||||||
| +Signed-off-by: David S. Miller <davem@davemloft.net> |  | ||||||
| +--- |  | ||||||
| + arch/arm/mach-mvebu/kirkwood.c                     |  3 +- |  | ||||||
| + arch/powerpc/sysdev/tsi108_dev.c                   |  5 +- |  | ||||||
| + drivers/net/ethernet/aeroflex/greth.c              |  6 +-- |  | ||||||
| + drivers/net/ethernet/allwinner/sun4i-emac.c        | 10 ++-- |  | ||||||
| + drivers/net/ethernet/altera/altera_tse_main.c      |  7 +-- |  | ||||||
| + drivers/net/ethernet/arc/emac_main.c               |  8 +-- |  | ||||||
| + drivers/net/ethernet/atheros/ag71xx.c              |  7 +-- |  | ||||||
| + drivers/net/ethernet/broadcom/bcm4908_enet.c       |  7 +-- |  | ||||||
| + drivers/net/ethernet/broadcom/bcmsysport.c         |  7 +-- |  | ||||||
| + drivers/net/ethernet/broadcom/bgmac-bcma.c         | 10 ++-- |  | ||||||
| + drivers/net/ethernet/broadcom/bgmac-platform.c     | 11 ++-- |  | ||||||
| + drivers/net/ethernet/cadence/macb_main.c           | 11 ++-- |  | ||||||
| + drivers/net/ethernet/cavium/octeon/octeon_mgmt.c   |  8 +-- |  | ||||||
| + drivers/net/ethernet/cavium/thunder/thunder_bgx.c  |  5 +- |  | ||||||
| + drivers/net/ethernet/davicom/dm9000.c              | 10 ++-- |  | ||||||
| + drivers/net/ethernet/ethoc.c                       |  6 +-- |  | ||||||
| + drivers/net/ethernet/ezchip/nps_enet.c             |  7 +-- |  | ||||||
| + drivers/net/ethernet/freescale/fec_main.c          |  7 +-- |  | ||||||
| + drivers/net/ethernet/freescale/fec_mpc52xx.c       |  7 +-- |  | ||||||
| + drivers/net/ethernet/freescale/fman/mac.c          |  9 ++-- |  | ||||||
| + .../net/ethernet/freescale/fs_enet/fs_enet-main.c  |  5 +- |  | ||||||
| + drivers/net/ethernet/freescale/gianfar.c           |  8 +-- |  | ||||||
| + drivers/net/ethernet/freescale/ucc_geth.c          |  5 +- |  | ||||||
| + drivers/net/ethernet/hisilicon/hisi_femac.c        |  7 +-- |  | ||||||
| + drivers/net/ethernet/hisilicon/hix5hd2_gmac.c      |  7 +-- |  | ||||||
| + drivers/net/ethernet/lantiq_xrx200.c               |  7 +-- |  | ||||||
| + drivers/net/ethernet/marvell/mv643xx_eth.c         |  5 +- |  | ||||||
| + drivers/net/ethernet/marvell/mvneta.c              |  6 +-- |  | ||||||
| + .../net/ethernet/marvell/prestera/prestera_main.c  | 11 ++-- |  | ||||||
| + drivers/net/ethernet/marvell/pxa168_eth.c          |  9 +--- |  | ||||||
| + drivers/net/ethernet/marvell/sky2.c                |  8 ++- |  | ||||||
| + drivers/net/ethernet/mediatek/mtk_eth_soc.c        | 11 ++-- |  | ||||||
| + drivers/net/ethernet/micrel/ks8851_common.c        |  7 ++- |  | ||||||
| + drivers/net/ethernet/microchip/lan743x_main.c      |  5 +- |  | ||||||
| + drivers/net/ethernet/nxp/lpc_eth.c                 |  4 +- |  | ||||||
| + drivers/net/ethernet/qualcomm/qca_spi.c            | 10 ++-- |  | ||||||
| + drivers/net/ethernet/qualcomm/qca_uart.c           |  9 +--- |  | ||||||
| + drivers/net/ethernet/renesas/ravb_main.c           | 12 +++-- |  | ||||||
| + drivers/net/ethernet/renesas/sh_eth.c              |  5 +- |  | ||||||
| + .../net/ethernet/samsung/sxgbe/sxgbe_platform.c    | 13 ++--- |  | ||||||
| + drivers/net/ethernet/socionext/sni_ave.c           | 10 ++-- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-anarion.c    |  2 +- |  | ||||||
| + .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-generic.c    |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c    |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c    |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c    |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c   |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c  |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c    |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c  |  2 +- |  | ||||||
| + .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c    |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c     |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c    |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c  |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c  |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/dwmac-visconti.c   |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/stmmac.h       |  2 +- |  | ||||||
| + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  2 +- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 14 ++--- |  | ||||||
| + .../net/ethernet/stmicro/stmmac/stmmac_platform.h  |  2 +- |  | ||||||
| + drivers/net/ethernet/ti/am65-cpsw-nuss.c           | 19 ++++--- |  | ||||||
| + drivers/net/ethernet/ti/cpsw.c                     |  7 +-- |  | ||||||
| + drivers/net/ethernet/ti/cpsw_new.c                 |  7 +-- |  | ||||||
| + drivers/net/ethernet/ti/davinci_emac.c             |  8 +-- |  | ||||||
| + drivers/net/ethernet/ti/netcp_core.c               |  7 +-- |  | ||||||
| + drivers/net/ethernet/wiznet/w5100-spi.c            |  8 ++- |  | ||||||
| + drivers/net/ethernet/wiznet/w5100.c                |  2 +- |  | ||||||
| + drivers/net/ethernet/xilinx/ll_temac_main.c        |  8 +-- |  | ||||||
| + drivers/net/ethernet/xilinx/xilinx_axienet_main.c  | 15 +++--- |  | ||||||
| + drivers/net/ethernet/xilinx/xilinx_emaclite.c      |  8 +-- |  | ||||||
| + drivers/net/wireless/ath/ath9k/init.c              |  5 +- |  | ||||||
| + drivers/net/wireless/mediatek/mt76/eeprom.c        |  9 +--- |  | ||||||
| + drivers/net/wireless/ralink/rt2x00/rt2x00dev.c     |  6 +-- |  | ||||||
| + drivers/of/of_net.c                                | 60 ++++++++++------------ |  | ||||||
| + drivers/staging/octeon/ethernet.c                  | 10 ++-- |  | ||||||
| + drivers/staging/wfx/main.c                         |  7 ++- |  | ||||||
| + include/linux/of_net.h                             |  6 +-- |  | ||||||
| + include/net/dsa.h                                  |  2 +- |  | ||||||
| + net/dsa/dsa2.c                                     |  2 +- |  | ||||||
| + net/dsa/slave.c                                    |  2 +- |  | ||||||
| + net/ethernet/eth.c                                 | 11 ++-- |  | ||||||
| + 85 files changed, 218 insertions(+), 364 deletions(-) |  | ||||||
| + |  | ||||||
| +diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c |  | ||||||
| +index 665b54c5c8ae5..6d895738222ad 100644 |  | ||||||
| +--- a/eeprom.c |  | ||||||
| ++++ b/eeprom.c |  | ||||||
| +@@ -91,15 +91,9 @@ void |  | ||||||
| + { |  | ||||||
| + 	struct mt76_dev *dev = phy->dev; |  | ||||||
| +  |  | ||||||
| +-#ifdef CONFIG_OF |  | ||||||
| + 	struct device_node *np = dev->dev->of_node; |  | ||||||
| +-	const u8 *mac = NULL; |  | ||||||
| +  |  | ||||||
| +-	if (np) |  | ||||||
| +-		mac = of_get_mac_address(np); |  | ||||||
| +-	if (!IS_ERR_OR_NULL(mac)) |  | ||||||
| +-		ether_addr_copy(phy->macaddr, mac); |  | ||||||
| +-#endif |  | ||||||
| ++	of_get_mac_address(np, phy->macaddr); |  | ||||||
| +  |  | ||||||
| + 	if (!is_valid_ether_addr(phy->macaddr)) { |  | ||||||
| + 		eth_random_addr(phy->macaddr); |  | ||||||
| +--  |  | ||||||
| +cgit 1.2.3-1.el7 |  | ||||||
| + |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,47 +0,0 @@ | |||||||
| From 4b2e6bb352b400e244646a7bc59bc5ca3ca6f5df Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Roman Yeryomin <roman@advem.lv> |  | ||||||
| Date: Fri, 3 Sep 2021 17:31:11 +0300 |  | ||||||
| Subject: [PATCH 32/32] iproute2: m_xt.so depends on dynsyms.list |  | ||||||
|  |  | ||||||
| When doing parallel build on a fast machine with bottleneck in i/o, |  | ||||||
| m_xt.so may start linking faster than dynsyms.list gets populated, |  | ||||||
| resulting in error: |  | ||||||
|  |  | ||||||
| ld:dynsyms.list:0: syntax error in dynamic list |  | ||||||
|  |  | ||||||
| Fix this by adding dynsyms.list as make dependency to m_xt.so |  | ||||||
| Described also here: |  | ||||||
| https://bugs.openwrt.org/index.php?do=details&task_id=3353 |  | ||||||
|  |  | ||||||
| Change from v1: |  | ||||||
| - add dynsysms.list dependancy only when shared libs are enabled |  | ||||||
|  |  | ||||||
| Signed-off-by: Roman Yeryomin <roman@advem.lv> |  | ||||||
| Fixes: FS#3353 |  | ||||||
| --- |  | ||||||
|  .../utils/iproute2/patches/175-reduce-dynamic-syms.patch       | 3 ++- |  | ||||||
|  1 file changed, 2 insertions(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch |  | ||||||
| index da961a183b..c3892e5a0e 100644 |  | ||||||
| --- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch |  | ||||||
| +++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch |  | ||||||
| @@ -26,13 +26,14 @@ |  | ||||||
|    |  | ||||||
|   q_atm.so: q_atm.c |  | ||||||
|   	$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm |  | ||||||
| -@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c) |  | ||||||
| +@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c) |  | ||||||
|   		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ |  | ||||||
|   	done > $@ |  | ||||||
|    |  | ||||||
|  +else |  | ||||||
|  + |  | ||||||
|  +tc: dynsyms.list |  | ||||||
| ++m_xt.so: dynsyms.list |  | ||||||
|  +dynsyms.list: $(wildcard *.c) |  | ||||||
|  +	files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \ |  | ||||||
|  +	echo "{" > $@ ; \ |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,35 +0,0 @@ | |||||||
| From d4e24006e05474b6dbe582f7c56a505cc0c45e81 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Mon, 1 Nov 2021 11:59:41 +0100 |  | ||||||
| Subject: [PATCH] ubus: update to the latest version |  | ||||||
|  |  | ||||||
| b743a331421d ubusd: log ACL init errors |  | ||||||
| 2099bb3ad997 libubus: use list_empty/list_first_entry in ubus_process_pending_msg |  | ||||||
| ef038488edc3 libubus: process pending messages in data handler if stack depth is 0 |  | ||||||
| a72457b61df0 libubus: increase stack depth for processing obj msgs |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  package/system/ubus/Makefile | 6 +++--- |  | ||||||
|  1 file changed, 3 insertions(+), 3 deletions(-) |  | ||||||
|  |  | ||||||
| diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile |  | ||||||
| index 8a3fd1de7b..d5f86b6850 100644 |  | ||||||
| --- a/package/system/ubus/Makefile |  | ||||||
| +++ b/package/system/ubus/Makefile |  | ||||||
| @@ -5,9 +5,9 @@ PKG_RELEASE:=2 |  | ||||||
|   |  | ||||||
|  PKG_SOURCE_PROTO:=git |  | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git |  | ||||||
| -PKG_SOURCE_DATE:=2021-06-30 |  | ||||||
| -PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044 |  | ||||||
| -PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8 |  | ||||||
| +PKG_SOURCE_DATE:=2021-08-09 |  | ||||||
| +PKG_SOURCE_VERSION:=a72457b61df045d3c499a6211362b751710590d7 |  | ||||||
| +PKG_MIRROR_HASH:=ac617577bcb2ff3dbc3039ad67200afcce910840223a2de15977d3224e6557fd |  | ||||||
|  PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) |  | ||||||
|  CMAKE_INSTALL:=1 |  | ||||||
|   |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,34 +0,0 @@ | |||||||
| From 49ceb8a8d7009e5c81599c68b8aacc16d17d2e62 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Stijn Tintel <stijn@linux-ipv6.be> |  | ||||||
| Date: Tue, 9 Nov 2021 17:20:41 +0100 |  | ||||||
| Subject: [PATCH] rpcd: bump to git HEAD |  | ||||||
|  |  | ||||||
|  20bf958 session: use uloop_timeout_remaining64 |  | ||||||
|  d11ffe9 session: use blobmsg_get_u64 for RPC_DUMP_EXPIRES |  | ||||||
|  |  | ||||||
| Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> |  | ||||||
| --- |  | ||||||
|  package/system/rpcd/Makefile | 6 +++--- |  | ||||||
|  1 file changed, 3 insertions(+), 3 deletions(-) |  | ||||||
|  |  | ||||||
| diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile |  | ||||||
| index 0896a7dada..af788dcfaa 100644 |  | ||||||
| --- a/package/system/rpcd/Makefile |  | ||||||
| +++ b/package/system/rpcd/Makefile |  | ||||||
| @@ -12,10 +12,10 @@ PKG_RELEASE:=1 |  | ||||||
|   |  | ||||||
|  PKG_SOURCE_PROTO:=git |  | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git |  | ||||||
| -PKG_SOURCE_DATE:=2021-03-11 |  | ||||||
| -PKG_SOURCE_VERSION:=ccb75178cf6a726896729c6904bd623636aa0b29 |  | ||||||
| +PKG_MIRROR_HASH:=98071b4a1ce983a0e738d7e4a2f6e52b7f6db19f99510ddef430093314134ca4 |  | ||||||
| +PKG_SOURCE_DATE:=2021-11-04 |  | ||||||
| +PKG_SOURCE_VERSION:=d11ffe9383ae0ec34836421926364b24c1d891ca |  | ||||||
|  PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io> |  | ||||||
| -PKG_MIRROR_HASH:=87b1839275c209f9767057d6da5272cae973a064767fa28f380a37fb65e2e643 |  | ||||||
|   |  | ||||||
|  PKG_LICENSE:=ISC |  | ||||||
|  PKG_LICENSE_FILES:= |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
							
								
								
									
										157
									
								
								backports/0035-uhttp-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								backports/0035-uhttp-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,157 @@ | |||||||
|  | From patchwork Fri Aug 20 13:11:12 2021 | ||||||
|  | Content-Type: text/plain; charset="utf-8" | ||||||
|  | MIME-Version: 1.0 | ||||||
|  | Content-Transfer-Encoding: 7bit | ||||||
|  | X-Patchwork-Submitter: Stijn Tintel <stijn@linux-ipv6.be> | ||||||
|  | X-Patchwork-Id: 1519040 | ||||||
|  | X-Patchwork-Delegate: stijn@linux-ipv6.be | ||||||
|  | Return-Path:  | ||||||
|  |  <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> | ||||||
|  | X-Original-To: incoming@patchwork.ozlabs.org | ||||||
|  | Delivered-To: patchwork-incoming@bilbo.ozlabs.org | ||||||
|  | Authentication-Results: ozlabs.org; | ||||||
|  |  spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org | ||||||
|  |  (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; | ||||||
|  |  envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; | ||||||
|  |  receiver=<UNKNOWN>) | ||||||
|  | Authentication-Results: ozlabs.org; | ||||||
|  | 	dkim=pass (2048-bit key; | ||||||
|  |  secure) header.d=lists.infradead.org header.i=@lists.infradead.org | ||||||
|  |  header.a=rsa-sha256 header.s=bombadil.20210309 header.b=r2Ly8Vhy; | ||||||
|  | 	dkim=fail reason="signature verification failed" (1024-bit key; | ||||||
|  |  unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be | ||||||
|  |  header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 | ||||||
|  |  header.b=BipII9T0; | ||||||
|  | 	dkim-atps=neutral | ||||||
|  | Received: from bombadil.infradead.org (bombadil.infradead.org | ||||||
|  |  [IPv6:2607:7c80:54:e::133]) | ||||||
|  | 	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) | ||||||
|  | 	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest | ||||||
|  |  SHA256) | ||||||
|  | 	(No client certificate requested) | ||||||
|  | 	by ozlabs.org (Postfix) with ESMTPS id 4Grhsz3FQvz9s1l | ||||||
|  | 	for <incoming@patchwork.ozlabs.org>; Fri, 20 Aug 2021 23:13:59 +1000 (AEST) | ||||||
|  | DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; | ||||||
|  | 	d=lists.infradead.org; s=bombadil.20210309; h=Sender: | ||||||
|  | 	Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: | ||||||
|  | 	List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc | ||||||
|  | 	:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: | ||||||
|  | 	Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: | ||||||
|  | 	List-Owner; bh=Dxw7atu76L/aBQntt7pW1jTYPCULL0mkcY2U1BYT2sI=; b=r2Ly8VhysFZseN | ||||||
|  | 	kLaheAFj130coCdyeHSxT/951GnDDBkmyursFZAP2hBLaKv9Z+9HpHIGM3sOiNhM/zDKfabNJ/1D2 | ||||||
|  | 	CV4iyPpVkhRxG9t6HPpPx94E6J5Oknl7l6eyL04DWUB28EzXcoBSMiP0zYsoOWjI8sQO8wITNp6hf | ||||||
|  | 	neAM1VlZlNb22n5/Wu5oD1RoEiMUS5GeyhU7kEFEWpC45rcpyuQdvHpPLMn5GkcqCOO6i90E7BKAK | ||||||
|  | 	ipYG2tptIjqjrmR+nC6CPRavA+hSG/o6HzDSYNJvWmgVjCc6RpN/xliN03Rum4+mbDtMEB4Wpidmj | ||||||
|  | 	FepfgPqKxWRJ0UiXBJew==; | ||||||
|  | Received: from localhost ([::1] helo=bombadil.infradead.org) | ||||||
|  | 	by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) | ||||||
|  | 	id 1mH4J2-00BF23-C2; Fri, 20 Aug 2021 13:11:32 +0000 | ||||||
|  | Received: from mail.tintel.eu ([51.83.127.189]) | ||||||
|  |  by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) | ||||||
|  |  id 1mH4Iw-00BF1P-CR | ||||||
|  |  for openwrt-devel@lists.openwrt.org; Fri, 20 Aug 2021 13:11:30 +0000 | ||||||
|  | Received: from localhost (localhost [IPv6:::1]) | ||||||
|  |  by mail.tintel.eu (Postfix) with ESMTP id 1BE4C4486AC4; | ||||||
|  |  Fri, 20 Aug 2021 15:11:14 +0200 (CEST) | ||||||
|  | Received: from mail.tintel.eu ([IPv6:::1]) | ||||||
|  |  by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) | ||||||
|  |  with ESMTP id npDXmiQngdDU; Fri, 20 Aug 2021 15:11:13 +0200 (CEST) | ||||||
|  | Received: from localhost (localhost [IPv6:::1]) | ||||||
|  |  by mail.tintel.eu (Postfix) with ESMTP id 5B1EC4486ACC; | ||||||
|  |  Fri, 20 Aug 2021 15:11:13 +0200 (CEST) | ||||||
|  | DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 5B1EC4486ACC | ||||||
|  | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; | ||||||
|  |  s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1629465073; | ||||||
|  |  bh=3YKw9bephsRsf4MDuHSX4MioHjRWefi/5PEc54pFn4g=; | ||||||
|  |  h=From:To:Date:Message-Id:MIME-Version; | ||||||
|  |  b=BipII9T0eY8ENYqcdZ7rxKFn6rwkKKOhJ2IoeLZ1fx4lgpPuGWsZrexzqU6mYTDRa | ||||||
|  |  Aihei2/ovPeWgUDbzfjNC9hIqv0fXRaEW0sCAPZGOP6gNHWNCkJxuPqYI+4pjijRRt | ||||||
|  |  6YYC2qCi8DqzQJv7St1FqeVFoIaF8SfbniBW+1N4= | ||||||
|  | X-Virus-Scanned: amavisd-new at mail.tintel.eu | ||||||
|  | Received: from mail.tintel.eu ([IPv6:::1]) | ||||||
|  |  by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) | ||||||
|  |  with ESMTP id J5m0pY66LdR7; Fri, 20 Aug 2021 15:11:13 +0200 (CEST) | ||||||
|  | Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) | ||||||
|  |  by mail.tintel.eu (Postfix) with SMTP id 17DF94486AC4; | ||||||
|  |  Fri, 20 Aug 2021 15:11:13 +0200 (CEST) | ||||||
|  | Received: (nullmailer pid 141125 invoked by uid 1000); | ||||||
|  |  Fri, 20 Aug 2021 13:11:12 -0000 | ||||||
|  | From: Stijn Tintel <stijn@linux-ipv6.be> | ||||||
|  | To: openwrt-devel@lists.openwrt.org | ||||||
|  | Cc: nbd@nbd.name | ||||||
|  | Subject: [PATCH] uhttpd: add config option for json_script | ||||||
|  | Date: Fri, 20 Aug 2021 16:11:12 +0300 | ||||||
|  | Message-Id: <20210820131112.141077-1-stijn@linux-ipv6.be> | ||||||
|  | X-Mailer: git-send-email 2.31.1 | ||||||
|  | MIME-Version: 1.0 | ||||||
|  | X-Rspamd-Queue-Id: 17DF94486AC4 | ||||||
|  | X-Spamd-Result: default: False [0.00 / 15.00]; | ||||||
|  |  IP_WHITELIST(0.00)[2001:67c:21bc:20::10]; | ||||||
|  |  ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG] | ||||||
|  | X-Rspamd-Server: skulls | ||||||
|  | X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3  | ||||||
|  | X-CRM114-CacheID: sfid-20210820_061126_592239_17869382  | ||||||
|  | X-CRM114-Status: UNSURE (   9.50  ) | ||||||
|  | X-CRM114-Notice: Please train this message. | ||||||
|  | X-Spam-Score: 0.2 (/) | ||||||
|  | X-Spam-Report: Spam detection software, | ||||||
|  |  running on the system "bombadil.infradead.org", | ||||||
|  |  has NOT identified this incoming email as spam.  The original | ||||||
|  |  message has been attached to this so you can view it or label | ||||||
|  |  similar future email.  If you have any questions, see | ||||||
|  |  the administrator of that system for details. | ||||||
|  |  Content preview: Add a config option for json_script instead of | ||||||
|  |  unconditionally | ||||||
|  |  including all json files in /etc/uhttpd in every uhttpd instance. This makes | ||||||
|  |  it possible to configure a single instance with an unconditi [...] | ||||||
|  |  Content analysis details:   (0.2 points, 5.0 required) | ||||||
|  |  pts rule name              description | ||||||
|  |  ---- ---------------------- | ||||||
|  |  -------------------------------------------------- | ||||||
|  |  -0.0 SPF_PASS               SPF: sender matches SPF record | ||||||
|  |  -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record | ||||||
|  |  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, | ||||||
|  |  not necessarily | ||||||
|  |  valid | ||||||
|  |  0.1 DKIM_INVALID           DKIM or DK signature exists, but is not valid | ||||||
|  | X-BeenThere: openwrt-devel@lists.openwrt.org | ||||||
|  | X-Mailman-Version: 2.1.34 | ||||||
|  | Precedence: list | ||||||
|  | List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> | ||||||
|  | List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, | ||||||
|  |  <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> | ||||||
|  | List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> | ||||||
|  | List-Post: <mailto:openwrt-devel@lists.openwrt.org> | ||||||
|  | List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> | ||||||
|  | List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, | ||||||
|  |  <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> | ||||||
|  | Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> | ||||||
|  | Errors-To:  | ||||||
|  |  openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org | ||||||
|  |  | ||||||
|  | Add a config option for json_script instead of unconditionally including | ||||||
|  | all json files in /etc/uhttpd in every uhttpd instance. This makes it | ||||||
|  | possible to configure a single instance with an unconditional redirect, | ||||||
|  | which is currently not possible as it would render all other uhttpd | ||||||
|  | instances unusable. | ||||||
|  |  | ||||||
|  | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> | ||||||
|  | --- | ||||||
|  |  package/network/services/uhttpd/Makefile          | 2 +- | ||||||
|  |  package/network/services/uhttpd/files/uhttpd.init | 3 ++- | ||||||
|  |  2 files changed, 3 insertions(+), 2 deletions(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init | ||||||
|  | index e7709941c2..30fd7b4259 100755 | ||||||
|  | --- a/package/network/services/uhttpd/files/uhttpd.init | ||||||
|  | +++ b/package/network/services/uhttpd/files/uhttpd.init | ||||||
|  | @@ -196,7 +196,8 @@ start_instance() | ||||||
|  |  		append_bool "$cfg" redirect_https "-q" 0 | ||||||
|  |  	} | ||||||
|  |   | ||||||
|  | -	for file in /etc/uhttpd/*.json; do | ||||||
|  | +	config_get json_script "$cfg" json_script | ||||||
|  | +	for file in $json_script; do | ||||||
|  |  		[ -s "$file" ] && procd_append_param command -H "$file" | ||||||
|  |  	done | ||||||
|  |   | ||||||
							
								
								
									
										39
									
								
								backports/0036-iwinfo-update-to-latest-git-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								backports/0036-iwinfo-update-to-latest-git-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | From c90fec205137d8d8c1197722a39d5c700ae3f6b1 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Mon, 21 Jun 2021 12:53:28 +0200 | ||||||
|  | Subject: [PATCH 02/36] iwinfo: update to latest git HEAD | ||||||
|  |  | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  package/network/utils/iwinfo/Makefile | 8 ++++---- | ||||||
|  |  1 file changed, 4 insertions(+), 4 deletions(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile | ||||||
|  | index 3454d615a9..b7c8370bba 100644 | ||||||
|  | --- a/package/network/utils/iwinfo/Makefile | ||||||
|  | +++ b/package/network/utils/iwinfo/Makefile | ||||||
|  | @@ -11,9 +11,9 @@ PKG_RELEASE:=1 | ||||||
|  |   | ||||||
|  |  PKG_SOURCE_PROTO:=git | ||||||
|  |  PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git | ||||||
|  | -PKG_SOURCE_DATE:=2021-01-31 | ||||||
|  | -PKG_SOURCE_VERSION:=4a32b33e9606f1bc1125f4bc24b0581349e55f2e | ||||||
|  | -PKG_MIRROR_HASH:=414e5d150efaadba21103e66f862be66a94dcf83c16a2850f7c05051a9b0739d | ||||||
|  | +PKG_SOURCE_DATE:=2021-06-09 | ||||||
|  | +PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a | ||||||
|  | +PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea | ||||||
|  |  PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io> | ||||||
|  |  PKG_LICENSE:=GPL-2.0 | ||||||
|  |   | ||||||
|  | @@ -25,7 +25,7 @@ PKG_CONFIG_DEPENDS := \ | ||||||
|  |  	CONFIG_PACKAGE_kmod-brcm-wl-mimo \ | ||||||
|  |  	CONFIG_PACKAGE_kmod-cfg80211 | ||||||
|  |   | ||||||
|  | -IWINFO_ABI_VERSION:=20210106 | ||||||
|  | +IWINFO_ABI_VERSION:=20210430 | ||||||
|  |   | ||||||
|  |  include $(INCLUDE_DIR)/package.mk | ||||||
|  |   | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
							
								
								
									
										105
									
								
								backports/0037-netifd-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								backports/0037-netifd-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,105 @@ | |||||||
|  | From a622ab0c15a2f58b724362339d6b467c02ee7576 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Thu, 27 May 2021 13:24:47 +0200 | ||||||
|  | Subject: [PATCH 01/57] netifd: update to latest HEAD | ||||||
|  |  | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  package/network/config/netifd/Makefile          | 14 +++++++++----- | ||||||
|  |  .../network/config/netifd/files/etc/udhcpc.user |  1 + | ||||||
|  |  .../config/netifd/files/lib/netifd/dhcp.script  |  3 +++ | ||||||
|  |  .../netifd/patches/002-fix-dhcp-issue.patch     | 17 +++++++++++++++++ | ||||||
|  |  4 files changed, 30 insertions(+), 5 deletions(-) | ||||||
|  |  create mode 100644 package/network/config/netifd/files/etc/udhcpc.user | ||||||
|  |  create mode 100644 package/network/config/netifd/patches/002-fix-dhcp-issue.patch | ||||||
|  |  | ||||||
|  | diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile | ||||||
|  | index 7061456b08..13c1d96ed7 100644 | ||||||
|  | --- a/package/network/config/netifd/Makefile | ||||||
|  | +++ b/package/network/config/netifd/Makefile | ||||||
|  | @@ -5,16 +5,14 @@ PKG_RELEASE:=1 | ||||||
|  |   | ||||||
|  |  PKG_SOURCE_PROTO:=git | ||||||
|  |  PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git | ||||||
|  | -PKG_SOURCE_DATE:=2021-01-09 | ||||||
|  | -PKG_SOURCE_VERSION:=c00c8335d6188daa326ecfe5a62da15a9b9987e1 | ||||||
|  | -PKG_MIRROR_HASH:=c740e51e0cec13eec336ba1c7a643db3b64a9a2235f8c1b73a566cb89e841190 | ||||||
|  | +PKG_SOURCE_DATE:=2021-09-01 | ||||||
|  | +PKG_SOURCE_VERSION:=300b1220fab38600f102bb8cfcc59a29ce41b095 | ||||||
|  | +PKG_MIRROR_HASH:=310fa90059795b1c956f9822db712ecc58bc19725b0f05f98c9e0a6824c8ca36 | ||||||
|  |  PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> | ||||||
|  |   | ||||||
|  |  PKG_LICENSE:=GPL-2.0 | ||||||
|  |  PKG_LICENSE_FILES:= | ||||||
|  |   | ||||||
|  | -PKG_BUILD_PARALLEL:=1 | ||||||
|  | - | ||||||
|  |  include $(INCLUDE_DIR)/package.mk | ||||||
|  |  include $(INCLUDE_DIR)/cmake.mk | ||||||
|  |   | ||||||
|  | @@ -25,6 +23,11 @@ define Package/netifd | ||||||
|  |    TITLE:=OpenWrt Network Interface Configuration Daemon | ||||||
|  |  endef | ||||||
|  |   | ||||||
|  | +define Package/netifd/conffiles | ||||||
|  | +/etc/udhcpc.user | ||||||
|  | +/etc/udhcpc.user.d/ | ||||||
|  | +endef | ||||||
|  | + | ||||||
|  |  TARGET_CFLAGS += \ | ||||||
|  |  	-I$(STAGING_DIR)/usr/include/libnl-tiny \ | ||||||
|  |  	-I$(STAGING_DIR)/usr/include \ | ||||||
|  | @@ -40,6 +43,7 @@ define Package/netifd/install | ||||||
|  |  	$(INSTALL_DIR) $(1)/sbin | ||||||
|  |  	$(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/ | ||||||
|  |  	$(CP) ./files/* $(1)/ | ||||||
|  | +	$(INSTALL_DIR) $(1)/etc/udhcpc.user.d/ | ||||||
|  |  	$(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/ | ||||||
|  |  endef | ||||||
|  |   | ||||||
|  | diff --git a/package/network/config/netifd/files/etc/udhcpc.user b/package/network/config/netifd/files/etc/udhcpc.user | ||||||
|  | new file mode 100644 | ||||||
|  | index 0000000000..78e2ba5f18 | ||||||
|  | --- /dev/null | ||||||
|  | +++ b/package/network/config/netifd/files/etc/udhcpc.user | ||||||
|  | @@ -0,0 +1 @@ | ||||||
|  | +# This script is sourced by udhcpc's dhcp.script at every DHCP event. | ||||||
|  | diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script | ||||||
|  | index 6585b641d6..e46005d84c 100755 | ||||||
|  | --- a/package/network/config/netifd/files/lib/netifd/dhcp.script | ||||||
|  | +++ b/package/network/config/netifd/files/lib/netifd/dhcp.script | ||||||
|  | @@ -112,5 +112,8 @@ esac | ||||||
|  |   | ||||||
|  |  # user rules | ||||||
|  |  [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user "$@" | ||||||
|  | +for f in /etc/udhcpc.user.d/*; do | ||||||
|  | +	[ -f "$f" ] && (. "$f" "$@") | ||||||
|  | +done | ||||||
|  |   | ||||||
|  |  exit 0 | ||||||
|  | diff --git a/package/network/config/netifd/patches/002-fix-dhcp-issue.patch b/package/network/config/netifd/patches/002-fix-dhcp-issue.patch | ||||||
|  | new file mode 100644 | ||||||
|  | index 0000000000..6f1d2e708e | ||||||
|  | --- /dev/null | ||||||
|  | +++ b/package/network/config/netifd/patches/002-fix-dhcp-issue.patch | ||||||
|  | @@ -0,0 +1,17 @@ | ||||||
|  | +Index: netifd-2019-08-05-5e02f944/interface.c | ||||||
|  | +=================================================================== | ||||||
|  | +--- netifd-2019-08-05-5e02f944.orig/interface.c | ||||||
|  | ++++ netifd-2019-08-05-5e02f944/interface.c | ||||||
|  | +@@ -424,7 +424,11 @@ interface_main_dev_cb(struct device_user | ||||||
|  | + 		interface_set_link_state(iface, false); | ||||||
|  | + 		break; | ||||||
|  | + 	case DEV_EVENT_TOPO_CHANGE: | ||||||
|  | +-		interface_proto_event(iface->proto, PROTO_CMD_RENEW, false); | ||||||
|  | ++	/* This renews the dhcp lease when the bridge adds/deletes a | ||||||
|  | ++	 * new interface. It causes some dhcp servers to fail in | ||||||
|  | ++	 * case where there are many interfaces being added to the | ||||||
|  | ++	 * bridge frequently. Disabling this for now. */ | ||||||
|  | ++	/*	interface_proto_event(iface->proto, PROTO_CMD_RENEW, false); */ | ||||||
|  | + 		return; | ||||||
|  | + 	default: | ||||||
|  | + 		break; | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,16 +1,16 @@ | |||||||
| From 6e3370a4c785c2c245b77832960f1dbed2736192 Mon Sep 17 00:00:00 2001 | From b70c9429587452776241c95729481accb9c193ae Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Sat, 4 Sep 2021 05:48:27 +0200 | Date: Thu, 27 May 2021 13:25:19 +0200 | ||||||
| Subject: [PATCH 01/70] hostapd: update to latest HEAD | Subject: [PATCH 03/57] hostapd: upsate to latest HEAD | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
|  package/network/services/hostapd/Makefile     |  15 +- |  package/network/services/hostapd/Makefile     |  15 +- | ||||||
|  .../hostapd/files/hostapd-basic.config        |   2 +- |  .../hostapd/files/hostapd-basic.config        |   2 +- | ||||||
|  .../hostapd/files/hostapd-full.config         |   4 +- |  .../hostapd/files/hostapd-full.config         |   4 +- | ||||||
|  .../network/services/hostapd/files/hostapd.sh | 188 +++++++++--- |  .../network/services/hostapd/files/hostapd.sh | 158 ++++++++-- | ||||||
|  ...-fix-frequency-setup-with-HE-enabled.patch | 196 ------------- |  ...-fix-frequency-setup-with-HE-enabled.patch | 196 ------------- | ||||||
|  ...> 001-wolfssl-init-RNG-with-ECC-key.patch} |  11 +- |  .../001-wolfssl-init-RNG-with-ECC-key.patch   |  43 +++ | ||||||
|  ...-init-order-disable-pri-sec-channel-.patch | 126 -------- |  ...-init-order-disable-pri-sec-channel-.patch | 126 -------- | ||||||
|  ...andle-HT40-and-mode-downgrade-in-AP-.patch | 102 ------- |  ...andle-HT40-and-mode-downgrade-in-AP-.patch | 102 ------- | ||||||
|  ...ix-frequency-config-for-non-p2p-vht-.patch |  63 ---- |  ...ix-frequency-config-for-non-p2p-vht-.patch |  63 ---- | ||||||
| @@ -63,19 +63,18 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  .../hostapd/patches/600-ubus_support.patch    | 166 ++++++++--- |  .../hostapd/patches/600-ubus_support.patch    | 166 ++++++++--- | ||||||
|  .../hostapd/patches/700-wifi-reload.patch     |  51 ++-- |  .../hostapd/patches/700-wifi-reload.patch     |  51 ++-- | ||||||
|  .../hostapd/patches/710-vlan_no_bridge.patch  |  41 +++ |  .../hostapd/patches/710-vlan_no_bridge.patch  |  41 +++ | ||||||
|  .../patches/711-wds_bridge_force.patch        |  26 ++ |  | ||||||
|  .../720-ACS-fix-channel-100-frequency.patch   |  30 ++ |  .../720-ACS-fix-channel-100-frequency.patch   |  30 ++ | ||||||
|  .../patches/720-iface_max_num_sta.patch       |  82 ++++++ |  .../patches/720-iface_max_num_sta.patch       |  82 ++++++ | ||||||
|  .../hostapd/patches/730-ft_iface.patch        |  38 +++ |  .../hostapd/patches/730-ft_iface.patch        |  38 +++ | ||||||
|  .../hostapd/patches/740-snoop_iface.patch     |  72 +++++ |  .../hostapd/patches/740-snoop_iface.patch     |  66 +++++ | ||||||
|  ...ate-if-no-available-channel-is-found.patch |  37 --- |  ...ate-if-no-available-channel-is-found.patch |  37 --- | ||||||
|  ...of-secondary-device-types-for-P2P-gr.patch |  33 --- |  ...of-secondary-device-types-for-P2P-gr.patch |  33 --- | ||||||
|  .../services/hostapd/src/src/ap/ubus.c        | 214 +++++++++++++- |  .../services/hostapd/src/src/ap/ubus.c        | 214 +++++++++++++- | ||||||
|  .../services/hostapd/src/src/ap/ubus.h        |  16 + |  .../services/hostapd/src/src/ap/ubus.h        |  16 + | ||||||
|  .../hostapd/src/src/utils/build_features.h    |   2 - |  .../hostapd/src/src/utils/build_features.h    |   2 - | ||||||
|  68 files changed, 1343 insertions(+), 2347 deletions(-) |  67 files changed, 1329 insertions(+), 2331 deletions(-) | ||||||
|  delete mode 100644 package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch |  delete mode 100644 package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch | ||||||
|  rename package/network/services/hostapd/patches/{802-wolfssl-init-RNG-with-ECC-key.patch => 001-wolfssl-init-RNG-with-ECC-key.patch} (76%) |  create mode 100644 package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch | ||||||
|  delete mode 100644 package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch |  delete mode 100644 package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch | ||||||
|  delete mode 100644 package/network/services/hostapd/patches/003-wpa_supplicant-handle-HT40-and-mode-downgrade-in-AP-.patch |  delete mode 100644 package/network/services/hostapd/patches/003-wpa_supplicant-handle-HT40-and-mode-downgrade-in-AP-.patch | ||||||
|  delete mode 100644 package/network/services/hostapd/patches/004-wpa_supplicant-fix-frequency-config-for-non-p2p-vht-.patch |  delete mode 100644 package/network/services/hostapd/patches/004-wpa_supplicant-fix-frequency-config-for-non-p2p-vht-.patch | ||||||
| @@ -104,7 +103,6 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  delete mode 100644 package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch |  delete mode 100644 package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch | ||||||
|  delete mode 100644 package/network/services/hostapd/patches/120-reconfigure-wps-credentials.patch |  delete mode 100644 package/network/services/hostapd/patches/120-reconfigure-wps-credentials.patch | ||||||
|  create mode 100644 package/network/services/hostapd/patches/710-vlan_no_bridge.patch |  create mode 100644 package/network/services/hostapd/patches/710-vlan_no_bridge.patch | ||||||
|  create mode 100644 package/network/services/hostapd/patches/711-wds_bridge_force.patch |  | ||||||
|  create mode 100644 package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch |  create mode 100644 package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch | ||||||
|  create mode 100644 package/network/services/hostapd/patches/720-iface_max_num_sta.patch |  create mode 100644 package/network/services/hostapd/patches/720-iface_max_num_sta.patch | ||||||
|  create mode 100644 package/network/services/hostapd/patches/730-ft_iface.patch |  create mode 100644 package/network/services/hostapd/patches/730-ft_iface.patch | ||||||
| @@ -113,7 +111,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  delete mode 100644 package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch |  delete mode 100644 package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch | ||||||
| 
 | 
 | ||||||
| diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
 | diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
 | ||||||
| index 67ea89c339..fee6889b40 100644
 | index bd2a7c96ad..fee6889b40 100644
 | ||||||
| --- a/package/network/services/hostapd/Makefile
 | --- a/package/network/services/hostapd/Makefile
 | ||||||
| +++ b/package/network/services/hostapd/Makefile
 | +++ b/package/network/services/hostapd/Makefile
 | ||||||
| @@ -1,19 +1,17 @@
 | @@ -1,19 +1,17 @@
 | ||||||
| @@ -128,7 +126,7 @@ index 67ea89c339..fee6889b40 100644 | |||||||
|  include $(TOPDIR)/rules.mk |  include $(TOPDIR)/rules.mk | ||||||
|   |   | ||||||
|  PKG_NAME:=hostapd |  PKG_NAME:=hostapd | ||||||
| -PKG_RELEASE:=35
 | -PKG_RELEASE:=32
 | ||||||
| +PKG_RELEASE:=$(AUTORELEASE)
 | +PKG_RELEASE:=$(AUTORELEASE)
 | ||||||
|   |   | ||||||
|  PKG_SOURCE_URL:=http://w1.fi/hostap.git |  PKG_SOURCE_URL:=http://w1.fi/hostap.git | ||||||
| @@ -181,39 +179,28 @@ index df272e443a..61b6daf861 100644 | |||||||
|  # EAP-SAKE for the integrated EAP server |  # EAP-SAKE for the integrated EAP server | ||||||
|  #CONFIG_EAP_SAKE=y |  #CONFIG_EAP_SAKE=y | ||||||
| diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
 | diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
 | ||||||
| index aa72e09eba..fe6af98f4d 100644
 | index 45a49b8faa..e941fa4f77 100644
 | ||||||
| --- a/package/network/services/hostapd/files/hostapd.sh
 | --- a/package/network/services/hostapd/files/hostapd.sh
 | ||||||
| +++ b/package/network/services/hostapd/files/hostapd.sh
 | +++ b/package/network/services/hostapd/files/hostapd.sh
 | ||||||
| @@ -48,13 +48,17 @@ hostapd_append_wpa_key_mgmt() {
 | @@ -49,6 +49,7 @@ hostapd_append_wpa_key_mgmt() {
 | ||||||
|  		;; |  | ||||||
|  		eap192) |  		eap192) | ||||||
|  			append wpa_key_mgmt "WPA-EAP-SUITE-B-192" |  			append wpa_key_mgmt "WPA-EAP-SUITE-B-192" | ||||||
| +			append wpa_key_mgmt "WPA-EAP-SHA256"
 |  | ||||||
|  			[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" |  			[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" | ||||||
|  | +			[ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-EAP-SHA256"
 | ||||||
|  		;; |  		;; | ||||||
| -		eap-eap192)
 |  		eap-eap192) | ||||||
| -			append wpa_key_mgmt "WPA-EAP-SUITE-B-192"
 |  			append wpa_key_mgmt "WPA-EAP-SUITE-B-192" | ||||||
| +		eap-eap256)
 | @@ -91,14 +92,19 @@ hostapd_add_log_config() {
 | ||||||
|  			append wpa_key_mgmt "WPA-EAP" |  | ||||||
| +			append wpa_key_mgmt "WPA-EAP-SHA256"
 |  | ||||||
| +			[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP"
 |  | ||||||
| +		;;
 |  | ||||||
| +		eap256)
 |  | ||||||
| +			append wpa_key_mgmt "WPA-EAP-SHA256"
 |  | ||||||
|  			[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" |  | ||||||
| -			[ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-EAP-SHA256"
 |  | ||||||
|  		;; |  | ||||||
|  		sae) |  | ||||||
|  			append wpa_key_mgmt "SAE" |  | ||||||
| @@ -91,6 +95,7 @@ hostapd_add_log_config() {
 |  | ||||||
|  hostapd_common_add_device_config() { |  hostapd_common_add_device_config() { | ||||||
|  	config_add_array basic_rate |  	config_add_array basic_rate | ||||||
|  	config_add_array supported_rates |  	config_add_array supported_rates | ||||||
| +	config_add_string beacon_rate
 | +	config_add_string beacon_rate
 | ||||||
|   |   | ||||||
|  	config_add_string country country3 | -	config_add_string country
 | ||||||
|  | +	config_add_string country country3
 | ||||||
|  	config_add_boolean country_ie doth |  	config_add_boolean country_ie doth | ||||||
| @@ -99,6 +104,10 @@ hostapd_common_add_device_config() {
 |  	config_add_boolean spectrum_mgmt_required | ||||||
|  |  	config_add_int local_pwr_constraint | ||||||
|  	config_add_string require_mode |  	config_add_string require_mode | ||||||
|  	config_add_boolean legacy_rates |  	config_add_boolean legacy_rates | ||||||
|  	config_add_int cell_density |  	config_add_int cell_density | ||||||
| @@ -224,17 +211,27 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	config_add_string acs_chan_bias |  	config_add_string acs_chan_bias | ||||||
|  	config_add_array hostapd_options |  	config_add_array hostapd_options | ||||||
| @@ -115,7 +124,8 @@ hostapd_prepare_device_config() {
 | @@ -114,8 +120,9 @@ hostapd_prepare_device_config() {
 | ||||||
|  |   | ||||||
|  	local base_cfg= |  	local base_cfg= | ||||||
|   |   | ||||||
|  	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | -	json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
 | ||||||
| -		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density
 | -		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density
 | ||||||
|  | +	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
 | ||||||
| +		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
 | +		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
 | ||||||
| +		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc
 | +		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc
 | ||||||
|   |   | ||||||
|  	hostapd_set_log_options base_cfg |  	hostapd_set_log_options base_cfg | ||||||
|   |   | ||||||
| @@ -207,11 +217,16 @@ hostapd_prepare_device_config() {
 | @@ -128,6 +135,7 @@ hostapd_prepare_device_config() {
 | ||||||
|  |   | ||||||
|  |  	[ -n "$country" ] && { | ||||||
|  |  		append base_cfg "country_code=$country" "$N" | ||||||
|  | +		[ -n "$country3" ] && append base_cfg "country3=$country3" "$N"
 | ||||||
|  |   | ||||||
|  |  		[ "$country_ie" -gt 0 ] && { | ||||||
|  |  			append base_cfg "ieee80211d=1" "$N" | ||||||
|  | @@ -206,11 +214,16 @@ hostapd_prepare_device_config() {
 | ||||||
|  		hostapd_add_rate brlist "$br" |  		hostapd_add_rate brlist "$br" | ||||||
|  	done |  	done | ||||||
|   |   | ||||||
| @@ -251,7 +248,16 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	json_get_values opts hostapd_options |  	json_get_values opts hostapd_options | ||||||
|  	for val in $opts; do |  	for val in $opts; do | ||||||
| @@ -269,7 +284,7 @@ hostapd_common_add_bss_config() {
 | @@ -251,6 +264,8 @@ hostapd_common_add_bss_config() {
 | ||||||
|  |  	config_add_int acct_port | ||||||
|  |  	config_add_int acct_interval | ||||||
|  |   | ||||||
|  | +	config_add_int bss_load_update_period chan_util_avg_period
 | ||||||
|  | +
 | ||||||
|  |  	config_add_string dae_client | ||||||
|  |  	config_add_string dae_secret | ||||||
|  |  	config_add_int dae_port | ||||||
|  | @@ -266,7 +281,7 @@ hostapd_common_add_bss_config() {
 | ||||||
|  	config_add_array domain_match domain_match2 domain_suffix_match domain_suffix_match2 |  	config_add_array domain_match domain_match2 domain_suffix_match domain_suffix_match2 | ||||||
|  	config_add_string ieee80211w_mgmt_cipher |  	config_add_string ieee80211w_mgmt_cipher | ||||||
|   |   | ||||||
| @@ -260,15 +266,19 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  	config_add_string vlan_tagged_interface vlan_bridge |  	config_add_string vlan_tagged_interface vlan_bridge | ||||||
|  	config_add_string vlan_file |  	config_add_string vlan_file | ||||||
|   |   | ||||||
| @@ -287,6 +302,7 @@ hostapd_common_add_bss_config() {
 | @@ -281,9 +296,10 @@ hostapd_common_add_bss_config() {
 | ||||||
|  	config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition |  	config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin | ||||||
|  |  	config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key | ||||||
|  |   | ||||||
|  | -	config_add_boolean wnm_sleep_mode bss_transition
 | ||||||
|  | +	config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
 | ||||||
|  	config_add_int time_advertisement |  	config_add_int time_advertisement | ||||||
|  	config_add_string time_zone |  	config_add_string time_zone | ||||||
| +	config_add_string vendor_elements
 | +	config_add_string vendor_elements
 | ||||||
|   |   | ||||||
|  	config_add_boolean ieee80211k rrm_neighbor_report rrm_beacon_report |  	config_add_boolean ieee80211k rrm_neighbor_report rrm_beacon_report | ||||||
|   |   | ||||||
| @@ -311,6 +327,7 @@ hostapd_common_add_bss_config() {
 | @@ -308,6 +324,7 @@ hostapd_common_add_bss_config() {
 | ||||||
|  	config_add_array supported_rates |  	config_add_array supported_rates | ||||||
|   |   | ||||||
|  	config_add_boolean sae_require_mfp |  	config_add_boolean sae_require_mfp | ||||||
| @@ -276,7 +286,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string' |  	config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string' | ||||||
|   |   | ||||||
| @@ -319,23 +336,35 @@ hostapd_common_add_bss_config() {
 | @@ -316,7 +333,7 @@ hostapd_common_add_bss_config() {
 | ||||||
|  	config_add_int iw_ipaddr_type_availability iw_gas_address3 |  	config_add_int iw_ipaddr_type_availability iw_gas_address3 | ||||||
|  	config_add_string iw_hessid iw_network_auth_type iw_qos_map_set |  	config_add_string iw_hessid iw_network_auth_type iw_qos_map_set | ||||||
|  	config_add_array iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm |  	config_add_array iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm | ||||||
| @@ -285,11 +295,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	config_add_boolean hs20 disable_dgaf osen |  	config_add_boolean hs20 disable_dgaf osen | ||||||
|  	config_add_int anqp_domain_id |  	config_add_int anqp_domain_id | ||||||
| -	config_add_int hs20_deauth_req_timeout
 | @@ -327,12 +344,22 @@ hostapd_common_add_bss_config() {
 | ||||||
| +	config_add_int hs20_deauth_req_timeout hs20_release
 |  | ||||||
|  	config_add_array hs20_oper_friendly_name |  | ||||||
|  	config_add_array osu_provider |  | ||||||
|  	config_add_array operator_icon |  | ||||||
|  	config_add_array hs20_conn_capab |  	config_add_array hs20_conn_capab | ||||||
|  	config_add_string osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp |  	config_add_string osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp | ||||||
|   |   | ||||||
| @@ -310,12 +316,10 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
| +
 | +
 | ||||||
| +	config_add_int eap_server
 | +	config_add_int eap_server
 | ||||||
| +	config_add_string eap_user_file ca_cert server_cert private_key private_key_passwd server_id
 | +	config_add_string eap_user_file ca_cert server_cert private_key private_key_passwd server_id
 | ||||||
| +	
 |  | ||||||
| +	config_add_boolean ratelimit
 |  | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  hostapd_set_vlan_file() { |  hostapd_set_vlan_file() { | ||||||
| @@ -387,7 +416,7 @@ append_iw_anqp_3gpp_cell_net() {
 | @@ -384,7 +411,7 @@ append_iw_anqp_3gpp_cell_net() {
 | ||||||
|  	if [ -z "$iw_anqp_3gpp_cell_net_conf" ]; then |  	if [ -z "$iw_anqp_3gpp_cell_net_conf" ]; then | ||||||
|  		iw_anqp_3gpp_cell_net_conf="$1" |  		iw_anqp_3gpp_cell_net_conf="$1" | ||||||
|  	else |  	else | ||||||
| @@ -324,7 +328,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  	fi |  	fi | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -399,10 +428,22 @@ append_iw_nai_realm() {
 | @@ -396,10 +423,22 @@ append_iw_nai_realm() {
 | ||||||
|  	[ -n "$1" ] && append bss_conf "nai_realm=$1" "$N" |  	[ -n "$1" ] && append bss_conf "nai_realm=$1" "$N" | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -347,7 +351,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  append_osu_provider_service_desc() { |  append_osu_provider_service_desc() { | ||||||
|  	append bss_conf "osu_service_desc=$1" "$N" |  	append bss_conf "osu_service_desc=$1" "$N" | ||||||
|  } |  } | ||||||
| @@ -450,6 +491,7 @@ append_osu_provider() {
 | @@ -447,6 +486,7 @@ append_osu_provider() {
 | ||||||
|  	append bss_conf "osu_method_list=$osu_method_list" "$N" |  	append bss_conf "osu_method_list=$osu_method_list" "$N" | ||||||
|   |   | ||||||
|  	config_list_foreach "$1" osu_service_desc append_osu_provider_service_desc |  	config_list_foreach "$1" osu_service_desc append_osu_provider_service_desc | ||||||
| @@ -355,7 +359,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  	config_list_foreach "$1" osu_icon append_osu_icon |  	config_list_foreach "$1" osu_icon append_osu_icon | ||||||
|   |   | ||||||
|  	append bss_conf "$N" |  	append bss_conf "$N" | ||||||
| @@ -459,6 +501,14 @@ append_hs20_conn_capab() {
 | @@ -456,6 +496,14 @@ append_hs20_conn_capab() {
 | ||||||
|  	[ -n "$1" ] && append bss_conf "hs20_conn_capab=$1" "$N" |  	[ -n "$1" ] && append bss_conf "hs20_conn_capab=$1" "$N" | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -370,7 +374,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  append_airtime_sta_weight() { |  append_airtime_sta_weight() { | ||||||
|  	[ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N" |  	[ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N" | ||||||
|  } |  } | ||||||
| @@ -482,10 +532,12 @@ hostapd_set_bss_options() {
 | @@ -479,10 +527,12 @@ hostapd_set_bss_options() {
 | ||||||
|  		macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \ |  		macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \ | ||||||
|  		iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ |  		iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ | ||||||
|  		acct_server acct_secret acct_port acct_interval \ |  		acct_server acct_secret acct_port acct_interval \ | ||||||
| @@ -385,7 +389,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	set_default isolate 0 |  	set_default isolate 0 | ||||||
|  	set_default maxassoc 0 |  	set_default maxassoc 0 | ||||||
| @@ -506,6 +558,7 @@ hostapd_set_bss_options() {
 | @@ -503,6 +553,7 @@ hostapd_set_bss_options() {
 | ||||||
|  	set_default multi_ap 0 |  	set_default multi_ap 0 | ||||||
|  	set_default airtime_bss_weight 0 |  	set_default airtime_bss_weight 0 | ||||||
|  	set_default airtime_bss_limit 0 |  	set_default airtime_bss_limit 0 | ||||||
| @@ -393,7 +397,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	append bss_conf "ctrl_interface=/var/run/hostapd" |  	append bss_conf "ctrl_interface=/var/run/hostapd" | ||||||
|  	if [ "$isolate" -gt 0 ]; then |  	if [ "$isolate" -gt 0 ]; then | ||||||
| @@ -532,6 +585,7 @@ hostapd_set_bss_options() {
 | @@ -529,6 +580,7 @@ hostapd_set_bss_options() {
 | ||||||
|  	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" |  	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | ||||||
|  	append bss_conf "utf8_ssid=$utf8_ssid" "$N" |  	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | ||||||
|  	append bss_conf "multi_ap=$multi_ap" "$N" |  	append bss_conf "multi_ap=$multi_ap" "$N" | ||||||
| @@ -401,7 +405,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" |  	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | ||||||
|   |   | ||||||
| @@ -550,19 +604,21 @@ hostapd_set_bss_options() {
 | @@ -547,6 +599,7 @@ hostapd_set_bss_options() {
 | ||||||
|  			append bss_conf "acct_server_shared_secret=$acct_secret" "$N" |  			append bss_conf "acct_server_shared_secret=$acct_secret" "$N" | ||||||
|  		[ -n "$acct_interval" ] && \ |  		[ -n "$acct_interval" ] && \ | ||||||
|  			append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" |  			append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" | ||||||
| @@ -409,15 +413,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	case "$auth_type" in |  	case "$auth_type" in | ||||||
| -		sae|owe|eap192|eap-eap192)
 | @@ -560,6 +613,7 @@ hostapd_set_bss_options() {
 | ||||||
| +		sae|owe|eap192|eap256)
 |  | ||||||
|  			set_default ieee80211w 2 |  | ||||||
|  			set_default sae_require_mfp 1 |  | ||||||
|  		;; |  | ||||||
| -		psk-sae)
 |  | ||||||
| +		psk-sae|eap-eap256)
 |  | ||||||
|  			set_default ieee80211w 1 |  | ||||||
|  			set_default sae_require_mfp 1 |  | ||||||
|  		;; |  		;; | ||||||
|  	esac |  	esac | ||||||
|  	[ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" |  	[ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" | ||||||
| @@ -425,13 +421,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	local vlan_possible="" |  	local vlan_possible="" | ||||||
|   |   | ||||||
| @@ -599,12 +655,12 @@ hostapd_set_bss_options() {
 | @@ -601,7 +655,7 @@ hostapd_set_bss_options() {
 | ||||||
|  			vlan_possible=1 |  | ||||||
|  			wps_possible=1 |  | ||||||
|  		;; |  | ||||||
| -		eap|eap192|eap-eap192)
 |  | ||||||
| +		eap|eap192|eap-eap256|eap256)
 |  | ||||||
|  			json_get_vars \ |  | ||||||
|  				auth_server auth_secret auth_port \ |  				auth_server auth_secret auth_port \ | ||||||
|  				dae_client dae_secret dae_port \ |  				dae_client dae_secret dae_port \ | ||||||
|  				ownip radius_client_addr \ |  				ownip radius_client_addr \ | ||||||
| @@ -440,7 +430,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  			# radius can provide VLAN ID for clients |  			# radius can provide VLAN ID for clients | ||||||
|  			vlan_possible=1 |  			vlan_possible=1 | ||||||
| @@ -616,18 +672,22 @@ hostapd_set_bss_options() {
 | @@ -613,18 +667,22 @@ hostapd_set_bss_options() {
 | ||||||
|   |   | ||||||
|  			set_default auth_port 1812 |  			set_default auth_port 1812 | ||||||
|  			set_default dae_port 3799 |  			set_default dae_port 3799 | ||||||
| @@ -467,17 +457,34 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  			[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N" |  			[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N" | ||||||
|  			[ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N" |  			[ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N" | ||||||
| @@ -699,7 +759,8 @@ hostapd_set_bss_options() {
 | @@ -697,19 +755,24 @@ hostapd_set_bss_options() {
 | ||||||
|  	} |  | ||||||
|   |   | ||||||
|  	append bss_conf "ssid=$ssid" "$N" |  	append bss_conf "ssid=$ssid" "$N" | ||||||
| -	[ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N"
 |  	[ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N" | ||||||
| +	[ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge${N}wds_bridge=" "$N"
 |  | ||||||
| +	[ -n "$network_ifname" ] && append bss_conf "snoop_iface=$network_ifname" "$N"
 | +	[ -n "$network_ifname" ] && append bss_conf "snoop_iface=$network_ifname" "$N"
 | ||||||
|  	[ -n "$iapp_interface" ] && { |  	[ -n "$iapp_interface" ] && { | ||||||
|  		local ifname |  		local ifname | ||||||
|  		network_get_device ifname "$iapp_interface" || ifname="$iapp_interface" |  		network_get_device ifname "$iapp_interface" || ifname="$iapp_interface" | ||||||
| @@ -740,7 +801,7 @@ hostapd_set_bss_options() {
 |  		append bss_conf "iapp_interface=$ifname" "$N" | ||||||
|  |  	} | ||||||
|  |   | ||||||
|  | -	json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition
 | ||||||
|  | +	json_get_vars time_advertisement time_zone wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
 | ||||||
|  |  	set_default bss_transition 0 | ||||||
|  |  	set_default wnm_sleep_mode 0 | ||||||
|  | +	set_default wnm_sleep_mode_no_keys 0
 | ||||||
|  |   | ||||||
|  |  	[ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N" | ||||||
|  |  	[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N" | ||||||
|  | -	[ "$wnm_sleep_mode" -eq "1" ] && append bss_conf "wnm_sleep_mode=1" "$N"
 | ||||||
|  | +	if [ "$wnm_sleep_mode" -eq "1" ]; then
 | ||||||
|  | +		append bss_conf "wnm_sleep_mode=1" "$N"
 | ||||||
|  | +		[ "$wnm_sleep_mode_no_keys" -eq "1" ] && append bss_conf "wnm_sleep_mode_no_keys=1" "$N"
 | ||||||
|  | +	fi
 | ||||||
|  |  	[ "$bss_transition" -eq "1" ] && append bss_conf "bss_transition=1" "$N" | ||||||
|  |   | ||||||
|  |  	json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report | ||||||
|  | @@ -733,7 +796,7 @@ hostapd_set_bss_options() {
 | ||||||
|  			append bss_conf "ftm_responder=1" "$N" |  			append bss_conf "ftm_responder=1" "$N" | ||||||
|  			[ "$stationary_ap" -eq "1" ] && append bss_conf "stationary_ap=1" "$N" |  			[ "$stationary_ap" -eq "1" ] && append bss_conf "stationary_ap=1" "$N" | ||||||
|  			[ -n "$lci" ] && append bss_conf "lci=$lci" "$N" |  			[ -n "$lci" ] && append bss_conf "lci=$lci" "$N" | ||||||
| @@ -486,7 +493,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  		} |  		} | ||||||
|  	fi |  	fi | ||||||
|   |   | ||||||
| @@ -764,6 +825,7 @@ hostapd_set_bss_options() {
 | @@ -757,6 +820,7 @@ hostapd_set_bss_options() {
 | ||||||
|  				;; |  				;; | ||||||
|  			esac |  			esac | ||||||
|   |   | ||||||
| @@ -494,7 +501,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  			append bss_conf "mobility_domain=$mobility_domain" "$N" |  			append bss_conf "mobility_domain=$mobility_domain" "$N" | ||||||
|  			append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N" |  			append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N" | ||||||
|  			append bss_conf "ft_over_ds=$ft_over_ds" "$N" |  			append bss_conf "ft_over_ds=$ft_over_ds" "$N" | ||||||
| @@ -778,6 +840,13 @@ hostapd_set_bss_options() {
 | @@ -771,6 +835,13 @@ hostapd_set_bss_options() {
 | ||||||
|  				set_default r0_key_lifetime 10000 |  				set_default r0_key_lifetime 10000 | ||||||
|  				set_default pmk_r1_push 0 |  				set_default pmk_r1_push 0 | ||||||
|   |   | ||||||
| @@ -508,25 +515,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  				[ -n "$r1_key_holder" ] && append bss_conf "r1_key_holder=$r1_key_holder" "$N" |  				[ -n "$r1_key_holder" ] && append bss_conf "r1_key_holder=$r1_key_holder" "$N" | ||||||
|  				append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N" |  				append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N" | ||||||
|  				append bss_conf "pmk_r1_push=$pmk_r1_push" "$N" |  				append bss_conf "pmk_r1_push=$pmk_r1_push" "$N" | ||||||
| @@ -822,7 +891,16 @@ hostapd_set_bss_options() {
 | @@ -856,13 +927,17 @@ hostapd_set_bss_options() {
 | ||||||
|  				json_get_vars ieee80211w_mgmt_cipher ieee80211w_max_timeout ieee80211w_retry_timeout |  | ||||||
|  				append bss_conf "ieee80211w=$ieee80211w" "$N" |  | ||||||
|  				[ "$ieee80211w" -gt "0" ] && { |  | ||||||
| -					append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N"
 |  | ||||||
| +					case "$auth_type" in
 |  | ||||||
| +					eap192)
 |  | ||||||
| +						append bss_conf "group_mgmt_cipher=BIP-GMAC-256" "$N"
 |  | ||||||
| +						append bss_conf "group_cipher=GCMP-256" "$N"
 |  | ||||||
| +						;;
 |  | ||||||
| +					*)
 |  | ||||||
| +						append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N"
 |  | ||||||
| +						;;
 |  | ||||||
| +					esac
 |  | ||||||
| +
 |  | ||||||
|  					[ -n "$ieee80211w_max_timeout" ] && \ |  | ||||||
|  						append bss_conf "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N" |  | ||||||
|  					[ -n "$ieee80211w_retry_timeout" ] && \ |  | ||||||
| @@ -863,13 +941,17 @@ hostapd_set_bss_options() {
 |  | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	[ -n "$vlan_possible" -a -n "$dynamic_vlan" ] && { |  	[ -n "$vlan_possible" -a -n "$dynamic_vlan" ] && { | ||||||
| @@ -546,7 +535,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  		[ -n "$vlan_tagged_interface" ] && \ |  		[ -n "$vlan_tagged_interface" ] && \ | ||||||
|  			append bss_conf "vlan_tagged_interface=$vlan_tagged_interface" "$N" |  			append bss_conf "vlan_tagged_interface=$vlan_tagged_interface" "$N" | ||||||
|  		[ -n "$vlan_file" ] && { |  		[ -n "$vlan_file" ] && { | ||||||
| @@ -882,6 +964,7 @@ hostapd_set_bss_options() {
 | @@ -875,6 +950,7 @@ hostapd_set_bss_options() {
 | ||||||
|  	json_get_vars iw_hessid iw_venue_group iw_venue_type iw_network_auth_type |  	json_get_vars iw_hessid iw_venue_group iw_venue_type iw_network_auth_type | ||||||
|  	json_get_vars iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm |  	json_get_vars iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm | ||||||
|  	json_get_vars iw_anqp_elem iw_qos_map_set iw_ipaddr_type_availability iw_gas_address3 |  	json_get_vars iw_anqp_elem iw_qos_map_set iw_ipaddr_type_availability iw_gas_address3 | ||||||
| @@ -554,12 +543,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	set_default iw_enabled 0 |  	set_default iw_enabled 0 | ||||||
|  	if [ "$iw_enabled" = "1" ]; then |  	if [ "$iw_enabled" = "1" ]; then | ||||||
| @@ -905,11 +988,12 @@ hostapd_set_bss_options() {
 | @@ -903,6 +979,8 @@ hostapd_set_bss_options() {
 | ||||||
|  		[ -n "$iw_network_auth_type" ] && \ |  | ||||||
|  			append bss_conf "network_auth_type=$iw_network_auth_type" "$N" |  | ||||||
|  		[ -n "$iw_gas_address3" ] && append bss_conf "gas_address3=$iw_gas_address3" "$N" |  | ||||||
| -		[ -n "$iw_qos_map_set" ] && append bss_conf "qos_map_set=$iw_qos_map_set" "$N"
 |  | ||||||
|   |  | ||||||
|  		json_for_each_item append_iw_roaming_consortium iw_roaming_consortium |  		json_for_each_item append_iw_roaming_consortium iw_roaming_consortium | ||||||
|  		json_for_each_item append_iw_anqp_elem iw_anqp_elem |  		json_for_each_item append_iw_anqp_elem iw_anqp_elem | ||||||
|  		json_for_each_item append_iw_nai_realm iw_nai_realm |  		json_for_each_item append_iw_nai_realm iw_nai_realm | ||||||
| @@ -568,40 +552,21 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  		iw_domain_name_conf= |  		iw_domain_name_conf= | ||||||
|  		json_for_each_item append_iw_domain_name iw_domain_name |  		json_for_each_item append_iw_domain_name iw_domain_name | ||||||
| @@ -922,13 +1006,22 @@ hostapd_set_bss_options() {
 | @@ -917,9 +995,11 @@ hostapd_set_bss_options() {
 | ||||||
|  			append bss_conf "anqp_3gpp_cell_net=$iw_anqp_3gpp_cell_net_conf" "$N" |  | ||||||
|  	fi |  | ||||||
|   |   | ||||||
| +	set_default iw_qos_map_set 0,0,2,16,1,1,255,255,18,22,24,38,40,40,44,46,48,56
 |  | ||||||
| +	case "$iw_qos_map_set" in
 |  | ||||||
| +		*,*);;
 |  | ||||||
| +		*) iw_qos_map_set="";;
 |  | ||||||
| +	esac
 |  | ||||||
| +	[ -n "$iw_qos_map_set" ] && append bss_conf "qos_map_set=$iw_qos_map_set" "$N"
 |  | ||||||
|   |   | ||||||
|  	local hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ |  	local hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ | ||||||
| -		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
 | -		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
 | ||||||
| +		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
 | +		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
 | ||||||
| +		hs20_t_c_server_url hs20_release
 | +		hs20_t_c_server_url
 | ||||||
|  	json_get_vars hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ |  	json_get_vars hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ | ||||||
| -		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
 | -		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
 | ||||||
| +		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
 | +		osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
 | ||||||
| +		hs20_t_c_server_url hs20_release
 | +		hs20_t_c_server_url
 | ||||||
|   |   | ||||||
|  	set_default hs20 0 |  	set_default hs20 0 | ||||||
| +	set_default hs20_release  1
 |  | ||||||
|  	set_default disable_dgaf $hs20 |  	set_default disable_dgaf $hs20 | ||||||
|  	set_default osen 0 | @@ -938,16 +1018,31 @@ hostapd_set_bss_options() {
 | ||||||
|  	set_default anqp_domain_id 0 |  | ||||||
| @@ -936,6 +1029,7 @@ hostapd_set_bss_options() {
 |  | ||||||
|  	if [ "$hs20" = "1" ]; then |  | ||||||
|  		append bss_conf "hs20=1" "$N" |  | ||||||
|  		append_hs20_icons |  | ||||||
| +		append bss_conf "hs20_release=$hs20_release" "$N"
 |  | ||||||
|  		append bss_conf "disable_dgaf=$disable_dgaf" "$N" |  | ||||||
|  		append bss_conf "osen=$osen" "$N" |  | ||||||
|  		append bss_conf "anqp_domain_id=$anqp_domain_id" "$N" |  | ||||||
| @@ -945,16 +1039,31 @@ hostapd_set_bss_options() {
 |  | ||||||
|  		[ -n "$hs20_operating_class" ] && append bss_conf "hs20_operating_class=$hs20_operating_class" "$N" |  		[ -n "$hs20_operating_class" ] && append bss_conf "hs20_operating_class=$hs20_operating_class" "$N" | ||||||
|  		[ -n "$hs20_t_c_filename" ] && append bss_conf "hs20_t_c_filename=$hs20_t_c_filename" "$N" |  		[ -n "$hs20_t_c_filename" ] && append bss_conf "hs20_t_c_filename=$hs20_t_c_filename" "$N" | ||||||
|  		[ -n "$hs20_t_c_timestamp" ] && append bss_conf "hs20_t_c_timestamp=$hs20_t_c_timestamp" "$N" |  		[ -n "$hs20_t_c_timestamp" ] && append bss_conf "hs20_t_c_timestamp=$hs20_t_c_timestamp" "$N" | ||||||
| @@ -634,7 +599,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	set_default per_sta_vif 0 |  	set_default per_sta_vif 0 | ||||||
|  	if [ "$per_sta_vif" -gt 0 ]; then |  	if [ "$per_sta_vif" -gt 0 ]; then | ||||||
| @@ -1079,16 +1188,16 @@ wpa_supplicant_set_fixed_freq() {
 | @@ -1072,16 +1167,16 @@ wpa_supplicant_set_fixed_freq() {
 | ||||||
|  	append network_data "frequency=$freq" "$N$T" |  	append network_data "frequency=$freq" "$N$T" | ||||||
|  	case "$htmode" in |  	case "$htmode" in | ||||||
|  		NOHT) append network_data "disable_ht=1" "$N$T";; |  		NOHT) append network_data "disable_ht=1" "$N$T";; | ||||||
| @@ -655,7 +620,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|  		*) append network_data "disable_vht=1" "$N$T";; |  		*) append network_data "disable_vht=1" "$N$T";; | ||||||
|  	esac |  	esac | ||||||
|  } |  } | ||||||
| @@ -1106,19 +1215,21 @@ wpa_supplicant_add_network() {
 | @@ -1099,7 +1194,8 @@ wpa_supplicant_add_network() {
 | ||||||
|  		ssid bssid key \ |  		ssid bssid key \ | ||||||
|  		basic_rate mcast_rate \ |  		basic_rate mcast_rate \ | ||||||
|  		ieee80211w ieee80211r \ |  		ieee80211w ieee80211r \ | ||||||
| @@ -664,15 +629,8 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
| +		default_disabled
 | +		default_disabled
 | ||||||
|   |   | ||||||
|  	case "$auth_type" in |  	case "$auth_type" in | ||||||
| -		sae|owe|eap192|eap-eap192)
 |  		sae|owe|eap192|eap-eap192) | ||||||
| +		sae|owe|eap-eap256)
 | @@ -1112,6 +1208,7 @@ wpa_supplicant_add_network() {
 | ||||||
|  			set_default ieee80211w 2 |  | ||||||
|  		;; |  | ||||||
| -		psk-sae)
 |  | ||||||
| +		psk-sae|eap192|eap256)
 |  | ||||||
|  			set_default ieee80211w 1 |  | ||||||
|  		;; |  | ||||||
|  	esac |  | ||||||
|   |   | ||||||
|  	set_default ieee80211r 0 |  	set_default ieee80211r 0 | ||||||
|  	set_default multi_ap 0 |  	set_default multi_ap 0 | ||||||
| @@ -680,7 +638,7 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	local key_mgmt='NONE' |  	local key_mgmt='NONE' | ||||||
|  	local network_data= |  	local network_data= | ||||||
| @@ -1150,7 +1261,10 @@ wpa_supplicant_add_network() {
 | @@ -1143,7 +1240,10 @@ wpa_supplicant_add_network() {
 | ||||||
|  		scan_ssid="" |  		scan_ssid="" | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -692,15 +650,6 @@ index aa72e09eba..fe6af98f4d 100644 | |||||||
|   |   | ||||||
|  	case "$auth_type" in |  	case "$auth_type" in | ||||||
|  		none) ;; |  		none) ;; | ||||||
| @@ -1186,7 +1300,7 @@ wpa_supplicant_add_network() {
 |  | ||||||
|  			fi |  | ||||||
|  			append network_data "$passphrase" "$N$T" |  | ||||||
|  		;; |  | ||||||
| -		eap|eap192|eap-eap192)
 |  | ||||||
| +		eap|eap192|eap-eap256|eap256)
 |  | ||||||
|  			hostapd_append_wpa_key_mgmt |  | ||||||
|  			key_mgmt="$wpa_key_mgmt" |  | ||||||
|   |  | ||||||
| diff --git a/package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch b/package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch
 | diff --git a/package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch b/package/network/services/hostapd/patches/001-HE-VHT-fix-frequency-setup-with-HE-enabled.patch
 | ||||||
| deleted file mode 100644 | deleted file mode 100644 | ||||||
| index 37c17c50af..0000000000
 | index 37c17c50af..0000000000
 | ||||||
| @@ -903,51 +852,55 @@ index 37c17c50af..0000000000 | |||||||
| - 
 | - 
 | ||||||
| - 	if (ssid->mesh_basic_rates == NULL) {
 | - 	if (ssid->mesh_basic_rates == NULL) {
 | ||||||
| - 		/*
 | - 		/*
 | ||||||
| diff --git a/package/network/services/hostapd/patches/802-wolfssl-init-RNG-with-ECC-key.patch b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
 | diff --git a/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
 | ||||||
| similarity index 76% | new file mode 100644 | ||||||
| rename from package/network/services/hostapd/patches/802-wolfssl-init-RNG-with-ECC-key.patch | index 0000000000..84fc1c9351
 | ||||||
| rename to package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch | --- /dev/null
 | ||||||
| index 89d111e991..84fc1c9351 100644
 |  | ||||||
| --- a/package/network/services/hostapd/patches/802-wolfssl-init-RNG-with-ECC-key.patch
 |  | ||||||
| +++ b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
 | +++ b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
 | ||||||
| @@ -14,11 +14,9 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 | @@ -0,0 +1,43 @@
 | ||||||
|   src/crypto/crypto_wolfssl.c | 4 ++++ | +From 21ce83b4ae2b9563175fdb4fc4312096cc399cf8 Mon Sep 17 00:00:00 2001
 | ||||||
|   1 file changed, 4 insertions(+) | +From: David Bauer <mail@david-bauer.net>
 | ||||||
|   | +Date: Wed, 5 May 2021 00:44:34 +0200
 | ||||||
| -diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c
 | +Subject: [PATCH] wolfssl: add RNG to EC key
 | ||||||
| -index 2e4bf8962..ed2528159 100644
 | +
 | ||||||
|  --- a/src/crypto/crypto_wolfssl.c | +Since upstream commit 6467de5a8840 ("Randomize z ordinates in
 | ||||||
|  +++ b/src/crypto/crypto_wolfssl.c | +scalar mult when timing resistant") WolfSSL requires a RNG for
 | ||||||
| -@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R,
 | +the EC key when built hardened which is the default.
 | ||||||
|  | +
 | ||||||
|  | +Set the RNG for the EC key to fix connections for OWE clients.
 | ||||||
|  | +
 | ||||||
|  | +Signed-off-by: David Bauer <mail@david-bauer.net>
 | ||||||
|  | +---
 | ||||||
|  | + src/crypto/crypto_wolfssl.c | 4 ++++
 | ||||||
|  | + 1 file changed, 4 insertions(+)
 | ||||||
|  | +
 | ||||||
|  | +--- a/src/crypto/crypto_wolfssl.c
 | ||||||
|  | ++++ b/src/crypto/crypto_wolfssl.c
 | ||||||
| +@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point *
 | +@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point *
 | ||||||
|    | + 
 | ||||||
|   struct crypto_ec { | + struct crypto_ec {
 | ||||||
|   	ecc_key key; | + 	ecc_key key;
 | ||||||
| @@ -26,7 +24,7 @@ index 2e4bf8962..ed2528159 100644
 | ++	WC_RNG rng;
 | ||||||
|   	mp_int a; | + 	mp_int a;
 | ||||||
|   	mp_int prime; | + 	mp_int prime;
 | ||||||
|   	mp_int order; | + 	mp_int order;
 | ||||||
| -@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int group)
 |  | ||||||
| +@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int gr
 | +@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int gr
 | ||||||
|   		return NULL; | + 		return NULL;
 | ||||||
|    | + 
 | ||||||
|   	if (wc_ecc_init(&e->key) != 0 || | + 	if (wc_ecc_init(&e->key) != 0 ||
 | ||||||
| @@ -35,7 +33,7 @@ index 2e4bf8962..ed2528159 100644
 | ++	    wc_InitRng(&e->rng) != 0 ||
 | ||||||
|   	    wc_ecc_set_curve(&e->key, 0, curve_id) != 0 || | ++	    wc_ecc_set_rng(&e->key, &e->rng) != 0 ||
 | ||||||
|   	    mp_init(&e->a) != MP_OKAY || | + 	    wc_ecc_set_curve(&e->key, 0, curve_id) != 0 ||
 | ||||||
|   	    mp_init(&e->prime) != MP_OKAY || | + 	    mp_init(&e->a) != MP_OKAY ||
 | ||||||
| -@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec* e)
 | + 	    mp_init(&e->prime) != MP_OKAY ||
 | ||||||
| +@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec*
 | +@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec*
 | ||||||
|   	mp_clear(&e->order); | + 	mp_clear(&e->order);
 | ||||||
|   	mp_clear(&e->prime); | + 	mp_clear(&e->prime);
 | ||||||
|   	mp_clear(&e->a); | + 	mp_clear(&e->a);
 | ||||||
| @@ -43,6 +41,3 @@ index 2e4bf8962..ed2528159 100644
 | ++	wc_FreeRng(&e->rng);
 | ||||||
|   	wc_ecc_free(&e->key); | + 	wc_ecc_free(&e->key);
 | ||||||
|   	os_free(e); | + 	os_free(e);
 | ||||||
|   } | + }
 | ||||||
| --- 
 |  | ||||||
| -2.31.1
 |  | ||||||
| -
 |  | ||||||
| diff --git a/package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch b/package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch
 | diff --git a/package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch b/package/network/services/hostapd/patches/002-mesh-fix-channel-init-order-disable-pri-sec-channel-.patch
 | ||||||
| deleted file mode 100644 | deleted file mode 100644 | ||||||
| index c7101b1dbc..0000000000
 | index c7101b1dbc..0000000000
 | ||||||
| @@ -5202,38 +5155,6 @@ index 0000000000..73db32e54a | |||||||
| + 	} else if (os_strcmp(buf, "per_sta_vif") == 0) {
 | + 	} else if (os_strcmp(buf, "per_sta_vif") == 0) {
 | ||||||
| + 		bss->ssid.per_sta_vif = atoi(pos);
 | + 		bss->ssid.per_sta_vif = atoi(pos);
 | ||||||
| + 	} else if (os_strcmp(buf, "vlan_file") == 0) {
 | + 	} else if (os_strcmp(buf, "vlan_file") == 0) {
 | ||||||
| diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
 |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..76a3547805
 |  | ||||||
| --- /dev/null
 |  | ||||||
| +++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
 |  | ||||||
| @@ -0,0 +1,26 @@
 |  | ||||||
| +Index: hostapd-2021-05-22-b102f19b/hostapd/config_file.c
 |  | ||||||
| +===================================================================
 |  | ||||||
| +--- hostapd-2021-05-22-b102f19b.orig/hostapd/config_file.c
 |  | ||||||
| ++++ hostapd-2021-05-22-b102f19b/hostapd/config_file.c
 |  | ||||||
| +@@ -2357,6 +2357,8 @@ static int hostapd_config_fill(struct ho
 |  | ||||||
| + 			   sizeof(conf->bss[0]->iface));
 |  | ||||||
| + 	} else if (os_strcmp(buf, "bridge") == 0) {
 |  | ||||||
| + 		os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
 |  | ||||||
| ++		if (!bss->wds_bridge[0])
 |  | ||||||
| ++			os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
 |  | ||||||
| + 	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
 |  | ||||||
| + 		os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
 |  | ||||||
| + 	} else if (os_strcmp(buf, "wds_bridge") == 0) {
 |  | ||||||
| +Index: hostapd-2021-05-22-b102f19b/src/ap/ap_drv_ops.c
 |  | ||||||
| +===================================================================
 |  | ||||||
| +--- hostapd-2021-05-22-b102f19b.orig/src/ap/ap_drv_ops.c
 |  | ||||||
| ++++ hostapd-2021-05-22-b102f19b/src/ap/ap_drv_ops.c
 |  | ||||||
| +@@ -340,8 +340,6 @@ int hostapd_set_wds_sta(struct hostapd_d
 |  | ||||||
| + 		return -1;
 |  | ||||||
| + 	if (hapd->conf->wds_bridge[0])
 |  | ||||||
| + 		bridge = hapd->conf->wds_bridge;
 |  | ||||||
| +-	else if (hapd->conf->bridge[0])
 |  | ||||||
| +-		bridge = hapd->conf->bridge;
 |  | ||||||
| + 	return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val,
 |  | ||||||
| + 					 bridge, ifname_wds);
 |  | ||||||
| + }
 |  | ||||||
| diff --git a/package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch b/package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch
 | diff --git a/package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch b/package/network/services/hostapd/patches/720-ACS-fix-channel-100-frequency.patch
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000000..3ef19e5298
 | index 0000000000..3ef19e5298
 | ||||||
| @@ -5404,14 +5325,12 @@ index 0000000000..793e8e0194 | |||||||
| + 		if (!hapd->l2) {
 | + 		if (!hapd->l2) {
 | ||||||
| diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
 | diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000000..6e60cde844
 | index 0000000000..8d928f8505
 | ||||||
| --- /dev/null
 | --- /dev/null
 | ||||||
| +++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
 | +++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
 | ||||||
| @@ -0,0 +1,72 @@
 | @@ -0,0 +1,66 @@
 | ||||||
| +Index: hostapd-2021-05-22-b102f19b/src/ap/ap_config.h
 | +--- a/src/ap/ap_config.h
 | ||||||
| +===================================================================
 | ++++ b/src/ap/ap_config.h
 | ||||||
| +--- hostapd-2021-05-22-b102f19b.orig/src/ap/ap_config.h
 |  | ||||||
| ++++ hostapd-2021-05-22-b102f19b/src/ap/ap_config.h
 |  | ||||||
| +@@ -278,6 +278,7 @@ struct hostapd_bss_config {
 | +@@ -278,6 +278,7 @@ struct hostapd_bss_config {
 | ||||||
| + 	char iface[IFNAMSIZ + 1];
 | + 	char iface[IFNAMSIZ + 1];
 | ||||||
| + 	char bridge[IFNAMSIZ + 1];
 | + 	char bridge[IFNAMSIZ + 1];
 | ||||||
| @@ -5420,10 +5339,8 @@ index 0000000000..6e60cde844 | |||||||
| + 	char vlan_bridge[IFNAMSIZ + 1];
 | + 	char vlan_bridge[IFNAMSIZ + 1];
 | ||||||
| + 	char wds_bridge[IFNAMSIZ + 1];
 | + 	char wds_bridge[IFNAMSIZ + 1];
 | ||||||
| + 
 | + 
 | ||||||
| +Index: hostapd-2021-05-22-b102f19b/src/ap/x_snoop.c
 | +--- a/src/ap/x_snoop.c
 | ||||||
| +===================================================================
 | ++++ b/src/ap/x_snoop.c
 | ||||||
| +--- hostapd-2021-05-22-b102f19b.orig/src/ap/x_snoop.c
 |  | ||||||
| ++++ hostapd-2021-05-22-b102f19b/src/ap/x_snoop.c
 |  | ||||||
| +@@ -31,14 +31,16 @@ int x_snoop_init(struct hostapd_data *ha
 | +@@ -31,14 +31,16 @@ int x_snoop_init(struct hostapd_data *ha
 | ||||||
| + 		return -1;
 | + 		return -1;
 | ||||||
| + 	}
 | + 	}
 | ||||||
| @@ -5467,14 +5384,12 @@ index 0000000000..6e60cde844 | |||||||
| + 	if (l2 == NULL) {
 | + 	if (l2 == NULL) {
 | ||||||
| + 		wpa_printf(MSG_DEBUG,
 | + 		wpa_printf(MSG_DEBUG,
 | ||||||
| + 			   "x_snoop: Failed to initialize L2 packet processing %s",
 | + 			   "x_snoop: Failed to initialize L2 packet processing %s",
 | ||||||
| +Index: hostapd-2021-05-22-b102f19b/hostapd/config_file.c
 | +--- a/hostapd/config_file.c
 | ||||||
| +===================================================================
 | ++++ b/hostapd/config_file.c
 | ||||||
| +--- hostapd-2021-05-22-b102f19b.orig/hostapd/config_file.c
 | +@@ -2357,6 +2357,8 @@ static int hostapd_config_fill(struct ho
 | ||||||
| ++++ hostapd-2021-05-22-b102f19b/hostapd/config_file.c
 | + 			   sizeof(conf->bss[0]->iface));
 | ||||||
| +@@ -2359,6 +2359,8 @@ static int hostapd_config_fill(struct ho
 | + 	} else if (os_strcmp(buf, "bridge") == 0) {
 | ||||||
| + 		os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
 | + 		os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
 | ||||||
| + 		if (!bss->wds_bridge[0])
 |  | ||||||
| + 			os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
 |  | ||||||
| ++	} else if (os_strcmp(buf, "snoop_iface") == 0) {
 | ++	} else if (os_strcmp(buf, "snoop_iface") == 0) {
 | ||||||
| ++		os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
 | ++		os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
 | ||||||
| + 	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
 | + 	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
 | ||||||
							
								
								
									
										51
									
								
								backports/0040-mt76-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								backports/0040-mt76-update-to-latest-HEAD.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | |||||||
|  | From e01de214b2492e1b8001d6057211017b5f0f6f49 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Thu, 27 May 2021 13:25:41 +0200 | ||||||
|  | Subject: [PATCH 04/44] mt76: update to latest HEAD | ||||||
|  |  | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  package/kernel/mt76/Makefile | 11 ++++++----- | ||||||
|  |  1 file changed, 6 insertions(+), 5 deletions(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile | ||||||
|  | index e9e95fa9b3..431c57a240 100644 | ||||||
|  | --- a/package/kernel/mt76/Makefile | ||||||
|  | +++ b/package/kernel/mt76/Makefile | ||||||
|  | @@ -8,11 +8,12 @@ PKG_LICENSE_FILES:= | ||||||
|  |   | ||||||
|  |  PKG_SOURCE_URL:=https://github.com/openwrt/mt76 | ||||||
|  |  PKG_SOURCE_PROTO:=git | ||||||
|  | -PKG_SOURCE_DATE:=2021-04-11 | ||||||
|  | -PKG_SOURCE_VERSION:=bf45b30d891961dd7c4139dddb58b909ea2c2b5a | ||||||
|  | -PKG_MIRROR_HASH:=431cecf80dafa986e805f809522721c2bb26289867d6770695d49baf8b471bea | ||||||
|  | +PKG_SOURCE_DATE:=2021-07-15 | ||||||
|  | +PKG_SOURCE_VERSION:=bbebea7d6dc64313132226adc3f7369d36e9359d | ||||||
|  | +PKG_MIRROR_HASH:=17cd74e72c1f6c8742b698bf6772afacc6fba71b233af8c4d59530600cf44d5b | ||||||
|  |   | ||||||
|  |  PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> | ||||||
|  | +PKG_USE_NINJA:=0 | ||||||
|  |  PKG_BUILD_PARALLEL:=1 | ||||||
|  |   | ||||||
|  |  PKG_CONFIG_DEPENDS += \ | ||||||
|  | @@ -155,7 +156,7 @@ define KernelPackage/mt7615-common | ||||||
|  |    $(KernelPackage/mt76-default) | ||||||
|  |    TITLE:=MediaTek MT7615 wireless driver common code | ||||||
|  |    HIDDEN:=1 | ||||||
|  | -  DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac | ||||||
|  | +  DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core | ||||||
|  |    FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko | ||||||
|  |  endef | ||||||
|  |   | ||||||
|  | @@ -213,7 +214,7 @@ endef | ||||||
|  |  define KernelPackage/mt7915e | ||||||
|  |    $(KernelPackage/mt76-default) | ||||||
|  |    TITLE:=MediaTek MT7915e wireless driver | ||||||
|  | -  DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +@DRIVER_11AX_SUPPORT | ||||||
|  | +  DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT | ||||||
|  |    FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko | ||||||
|  |    AUTOLOAD:=$(call AutoProbe,mt7915e) | ||||||
|  |  endef | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
							
								
								
									
										53
									
								
								backports/0041-ar71xx-hacks.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								backports/0041-ar71xx-hacks.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | |||||||
|  | From d01d8c9e5cf7de98222860011d1d5b362bfde005 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Mon, 12 Jul 2021 13:09:25 +0200 | ||||||
|  | Subject: [PATCH 01/39] ar71xx: hacks | ||||||
|  |  | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  package/kernel/linux/modules/crypto.mk                 | 2 +- | ||||||
|  |  package/kernel/mac80211/ath.mk                         | 1 + | ||||||
|  |  target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c | 2 ++ | ||||||
|  |  3 files changed, 4 insertions(+), 1 deletion(-) | ||||||
|  |  | ||||||
|  | diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk | ||||||
|  | index 19b0d4696b..1b1c1e1a51 100644 | ||||||
|  | --- a/package/kernel/linux/modules/crypto.mk | ||||||
|  | +++ b/package/kernel/linux/modules/crypto.mk | ||||||
|  | @@ -882,7 +882,7 @@ define KernelPackage/crypto-sha256 | ||||||
|  |  	CONFIG_CRYPTO_SHA256_SSSE3 | ||||||
|  |    FILES:= \ | ||||||
|  |  	$(LINUX_DIR)/crypto/sha256_generic.ko \ | ||||||
|  | -	$(LINUX_DIR)/lib/crypto/libsha256.ko | ||||||
|  | +	$(LINUX_DIR)/lib/crypto/libsha256.ko@ge4.15 | ||||||
|  |    AUTOLOAD:=$(call AutoLoad,09,sha256_generic) | ||||||
|  |    $(call AddDepends/crypto) | ||||||
|  |  endef | ||||||
|  | diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk | ||||||
|  | index ba03ae11a6..ad2860a98e 100644 | ||||||
|  | --- a/package/kernel/mac80211/ath.mk | ||||||
|  | +++ b/package/kernel/mac80211/ath.mk | ||||||
|  | @@ -43,6 +43,7 @@ config-$(call config_package,ath9k) += ATH9K | ||||||
|  |  config-$(call config_package,ath9k-common) += ATH9K_COMMON | ||||||
|  |  config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM | ||||||
|  |  config-$(CONFIG_TARGET_ath79) += ATH9K_AHB | ||||||
|  | +config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB | ||||||
|  |  config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB | ||||||
|  |  config-$(CONFIG_PCI) += ATH9K_PCI | ||||||
|  |  config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD ATH_REG_DYNAMIC_USER_REG_HINTS | ||||||
|  | diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c | ||||||
|  | index 9620718962..2cdf97efd6 100644 | ||||||
|  | --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c | ||||||
|  | +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c | ||||||
|  | @@ -271,6 +271,8 @@ static const struct rb_board_info rb711gr100_boards[] __initconst = { | ||||||
|  |  	RB_BOARD_INFO("911G-5HPnD", 0), | ||||||
|  |  	RB_BOARD_INFO("912UAG-2HPnD", RB91X_FLAG_USB | RB91X_FLAG_PCIE), | ||||||
|  |  	RB_BOARD_INFO("912UAG-5HPnD", RB91X_FLAG_USB | RB91X_FLAG_PCIE), | ||||||
|  | +	RB_BOARD_INFO("RB912UAG-2HPnD", RB91X_FLAG_USB | RB91X_FLAG_PCIE), | ||||||
|  | +	RB_BOARD_INFO("RB912UAG-5HPnD", RB91X_FLAG_USB | RB91X_FLAG_PCIE), | ||||||
|  |  }; | ||||||
|  |   | ||||||
|  |  static u32 rb711gr100_get_flags(const struct rb_info *info) | ||||||
|  | --  | ||||||
|  | 2.25.1 | ||||||
|  |  | ||||||
| @@ -1,221 +0,0 @@ | |||||||
| From 3937223beab0c3e4284fd916c0c3b6548c287e03 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Tue, 26 Oct 2021 20:41:22 +0200 |  | ||||||
| Subject: [PATCH 050/102] bpf-headers: add a package with kernel headers for |  | ||||||
|  ebpf |  | ||||||
|  |  | ||||||
| In order to genererate suitable kernel headers, a 5.10 kernel tree is |  | ||||||
| prepared with a default config for mips. The arch is forced to mips in |  | ||||||
| order to avoid issues with inline asm on various architectures in a way |  | ||||||
| that doesn't involve relying on the host toolchain/headers. |  | ||||||
| It also has the advantage of supporting both endian types |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  include/bpf.mk                                | 65 ++++++++++++ |  | ||||||
|  package/kernel/bpf-headers/Makefile           | 99 +++++++++++++++++++ |  | ||||||
|  .../src/include/generated/bounds.h            | 14 +++ |  | ||||||
|  3 files changed, 178 insertions(+) |  | ||||||
|  create mode 100644 include/bpf.mk |  | ||||||
|  create mode 100644 package/kernel/bpf-headers/Makefile |  | ||||||
|  create mode 100644 package/kernel/bpf-headers/src/include/generated/bounds.h |  | ||||||
|  |  | ||||||
| diff --git a/include/bpf.mk b/include/bpf.mk |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..3dc65c7685 |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/include/bpf.mk |  | ||||||
| @@ -0,0 +1,65 @@ |  | ||||||
| +ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),) |  | ||||||
| +  BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH)) |  | ||||||
| +  ifneq ($(BPF_TOOLCHAIN_HOST_PATH),) |  | ||||||
| +    BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH) |  | ||||||
| +  else |  | ||||||
| +    BPF_PATH:=$(BPF_PATH) |  | ||||||
| +  endif |  | ||||||
| +  CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11)) |  | ||||||
| +  LLVM_VER:=$(subst clang,,$(notdir $(CLANG))) |  | ||||||
| +else |  | ||||||
| +  CLANG:=$(STAGING_DIR_HOST)/bin/clang |  | ||||||
| +  LLVM_VER:= |  | ||||||
| +endif |  | ||||||
| + |  | ||||||
| +LLVM_PATH:=$(dir $(CLANG)) |  | ||||||
| +LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER) |  | ||||||
| +LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER) |  | ||||||
| +LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER) |  | ||||||
| +LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER) |  | ||||||
| + |  | ||||||
| +BPF_KARCH:=mips |  | ||||||
| +BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el) |  | ||||||
| + |  | ||||||
| +BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers |  | ||||||
| + |  | ||||||
| +BPF_KERNEL_INCLUDE := \ |  | ||||||
| +	-nostdinc -isystem $(TOOLCHAIN_DIR)/include \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/include \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/uapi \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated/uapi \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/include/uapi \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/include/generated/uapi \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/tools/lib \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/tools/testing/selftests \ |  | ||||||
| +	-I$(BPF_HEADERS_DIR)/samples/bpf \ |  | ||||||
| +	-include linux/kconfig.h -include asm_goto_workaround.h |  | ||||||
| + |  | ||||||
| +BPF_CFLAGS := \ |  | ||||||
| +	$(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \ |  | ||||||
| +	-D__KERNEL__ -D__BPF_TRACING__ \ |  | ||||||
| +	-D__TARGET_ARCH_${BPF_KARCH} \ |  | ||||||
| +	-m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \ |  | ||||||
| +	-fno-stack-protector -Wall \ |  | ||||||
| +	-Wno-unused-value -Wno-pointer-sign \ |  | ||||||
| +	-Wno-compare-distinct-pointer-types \ |  | ||||||
| +	-Wno-gnu-variable-sized-type-not-at-end \ |  | ||||||
| +	-Wno-address-of-packed-member -Wno-tautological-compare \ |  | ||||||
| +	-Wno-unknown-warning-option \ |  | ||||||
| +	-fno-asynchronous-unwind-tables \ |  | ||||||
| +	-Wno-uninitialized -Wno-unused-variable \ |  | ||||||
| +	-Wno-unused-label \ |  | ||||||
| +	-O2 -emit-llvm -Xclang -disable-llvm-passes |  | ||||||
| + |  | ||||||
| +define CompileBPF |  | ||||||
| +	$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \ |  | ||||||
| +		-c $(1) -o $(patsubst %.c,%.bc,$(1)) |  | ||||||
| +	$(LLVM_OPT) -O2 -mtriple=bpf-pc-linux < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1)) |  | ||||||
| +	$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1)) |  | ||||||
| +	$(LLVM_LLC) -march=bpf -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) |  | ||||||
| +	$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1)) |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..5f5b89370d |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/package/kernel/bpf-headers/Makefile |  | ||||||
| @@ -0,0 +1,99 @@ |  | ||||||
| +# |  | ||||||
| +# Copyright (C) 2006-2009 OpenWrt.org |  | ||||||
| +# |  | ||||||
| +# This is free software, licensed under the GNU General Public License v2. |  | ||||||
| +# See /LICENSE for more information. |  | ||||||
| +# |  | ||||||
| +include $(TOPDIR)/rules.mk |  | ||||||
| + |  | ||||||
| +override QUILT:= |  | ||||||
| +override HOST_QUILT:= |  | ||||||
| + |  | ||||||
| +include $(INCLUDE_DIR)/kernel.mk |  | ||||||
| + |  | ||||||
| + |  | ||||||
| +PKG_NAME:=linux |  | ||||||
| +PKG_PATCHVER:=5.10 |  | ||||||
| +PKG_VERSION:=$(PKG_PATCHVER)$(strip $(LINUX_VERSION-$(PKG_PATCHVER))) |  | ||||||
| +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz |  | ||||||
| +PKG_SOURCE_URL:=$(LINUX_SITE) |  | ||||||
| +PKG_HASH:=$(LINUX_KERNEL_HASH-$(strip $(PKG_VERSION))) |  | ||||||
| +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/bpf-headers/$(PKG_NAME)-$(PKG_VERSION) |  | ||||||
| + |  | ||||||
| +GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(PKG_PATCHVER)),-$(PKG_PATCHVER)) |  | ||||||
| +GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(PKG_PATCHVER)),-$(PKG_PATCHVER)) |  | ||||||
| +GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(PKG_PATCHVER)),-$(PKG_PATCHVER)) |  | ||||||
| +GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(PKG_PATCHVER)),"$(dir)") |  | ||||||
| +PATCH_DIR := $(CURDIR)/patches |  | ||||||
| +FILES_DIR := |  | ||||||
| + |  | ||||||
| +REAL_LINUX_DIR := $(LINUX_DIR) |  | ||||||
| +LINUX_DIR := $(PKG_BUILD_DIR) |  | ||||||
| + |  | ||||||
| +include $(INCLUDE_DIR)/bpf.mk |  | ||||||
| +include $(INCLUDE_DIR)/package.mk |  | ||||||
| + |  | ||||||
| +define Package/bpf-headers |  | ||||||
| +  SECTION:=kernel |  | ||||||
| +  CATEGORY:=Kernel |  | ||||||
| +  TITLE:=eBPF kernel headers |  | ||||||
| +  BUILDONLY:=1 |  | ||||||
| +  HIDDEN:=1 |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| +export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include |  | ||||||
| + |  | ||||||
| +KERNEL_MAKE := \ |  | ||||||
| +	$(MAKE) -C $(PKG_BUILD_DIR) \ |  | ||||||
| +		ARCH=$(BPF_KARCH) \ |  | ||||||
| +		CROSS_COMPILE=$(BPF_ARCH)-linux- \ |  | ||||||
| +		LLVM=1 CC="$(CLANG)" LD="$(TARGET_CROSS)ld" \ |  | ||||||
| +		HOSTCC="$(HOSTCC)" \ |  | ||||||
| +		HOSTCXX="$(HOSTCXX)" \ |  | ||||||
| +		HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \ |  | ||||||
| +		KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \ |  | ||||||
| +		CONFIG_SHELL="$(BASH)" \ |  | ||||||
| +		INSTALL_HDR_PATH="$(PKG_BUILD_DIR)/user_headers" |  | ||||||
| + |  | ||||||
| +define Build/Patch |  | ||||||
| +	$(Kernel/Patch/Default) |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| +BPF_DOC = $(PKG_BUILD_DIR)/scripts/bpf_helpers_doc.py |  | ||||||
| + |  | ||||||
| +define Build/Configure |  | ||||||
| +	grep -vE 'CONFIG_(CPU_.*ENDIAN|HZ)' $(PKG_BUILD_DIR)/arch/mips/configs/generic_defconfig > $(PKG_BUILD_DIR)/.config |  | ||||||
| +	echo 'CONFIG_CPU_$(if $(CONFIG_BIG_ENDIAN),BIG,LITTLE)_ENDIAN=y' >> $(PKG_BUILD_DIR)/.config |  | ||||||
| +	grep CONFIG_HZ $(REAL_LINUX_DIR)/.config >> $(PKG_BUILD_DIR)/.config |  | ||||||
| +	yes '' | $(KERNEL_MAKE) oldconfig |  | ||||||
| +	grep 'CONFIG_HZ=' $(REAL_LINUX_DIR)/.config | \ |  | ||||||
| +		cut -d= -f2 | \ |  | ||||||
| +		bc -q $(LINUX_DIR)/kernel/time/timeconst.bc \ |  | ||||||
| +		> $(LINUX_DIR)/include/generated/timeconst.h |  | ||||||
| +	$(BPF_DOC) --header \ |  | ||||||
| +		--file $(LINUX_DIR)/tools/include/uapi/linux/bpf.h \ |  | ||||||
| +		> $(PKG_BUILD_DIR)/tools/lib/bpf/bpf_helper_defs.h |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| +define Build/Compile |  | ||||||
| +	$(KERNEL_MAKE) archprepare headers_install |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| +define Build/InstallDev |  | ||||||
| +	mkdir -p $(1)/bpf-headers/arch $(1)/bpf-headers/tools |  | ||||||
| +	$(CP) \ |  | ||||||
| +		$(PKG_BUILD_DIR)/arch/$(BPF_KARCH) \ |  | ||||||
| +		$(1)/bpf-headers/arch/ |  | ||||||
| +	$(CP) \ |  | ||||||
| +		$(PKG_BUILD_DIR)/tools/lib \ |  | ||||||
| +		$(PKG_BUILD_DIR)/tools/testing \ |  | ||||||
| +		$(1)/bpf-headers/tools/ |  | ||||||
| +	$(CP) \ |  | ||||||
| +		$(PKG_BUILD_DIR)/include \ |  | ||||||
| +		$(PKG_BUILD_DIR)/samples \ |  | ||||||
| +		$(PKG_BUILD_DIR)/scripts \ |  | ||||||
| +		$(PKG_BUILD_DIR)/user_headers \ |  | ||||||
| +		$(1)/bpf-headers |  | ||||||
| +endef |  | ||||||
| + |  | ||||||
| +$(eval $(call BuildPackage,bpf-headers)) |  | ||||||
| diff --git a/package/kernel/bpf-headers/src/include/generated/bounds.h b/package/kernel/bpf-headers/src/include/generated/bounds.h |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..82ff01043c |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/package/kernel/bpf-headers/src/include/generated/bounds.h |  | ||||||
| @@ -0,0 +1,14 @@ |  | ||||||
| +#ifndef __LINUX_BOUNDS_H__ |  | ||||||
| +#define __LINUX_BOUNDS_H__ |  | ||||||
| +/* |  | ||||||
| + * DO NOT MODIFY. |  | ||||||
| + * |  | ||||||
| + * This file was generated by Kbuild |  | ||||||
| + */ |  | ||||||
| + |  | ||||||
| +#define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS */ |  | ||||||
| +#define MAX_NR_ZONES 4 /* __MAX_NR_ZONES */ |  | ||||||
| +#define NR_CPUS_BITS 1 /* ilog2(CONFIG_NR_CPUS) */ |  | ||||||
| +#define SPINLOCK_SIZE 64 /* sizeof(spinlock_t) */ |  | ||||||
| + |  | ||||||
| +#endif |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,29 +0,0 @@ | |||||||
| From 32243b2148fd0dacd0630affaea59345c64df79a Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Tue, 2 Nov 2021 10:36:14 +0100 |  | ||||||
| Subject: [PATCH 051/102] bpf-headers: unset PKG_CONFIG_PATH |  | ||||||
|  |  | ||||||
| This fixes an issue where the kernel would pick up an incompatible target |  | ||||||
| libyaml for building host tools |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  package/kernel/bpf-headers/Makefile | 2 ++ |  | ||||||
|  1 file changed, 2 insertions(+) |  | ||||||
|  |  | ||||||
| diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile |  | ||||||
| index 5f5b89370d..df24bfa13f 100644 |  | ||||||
| --- a/package/kernel/bpf-headers/Makefile |  | ||||||
| +++ b/package/kernel/bpf-headers/Makefile |  | ||||||
| @@ -41,6 +41,8 @@ define Package/bpf-headers |  | ||||||
|    HIDDEN:=1 |  | ||||||
|  endef |  | ||||||
|   |  | ||||||
| +PKG_CONFIG_PATH:= |  | ||||||
| + |  | ||||||
|  export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include |  | ||||||
|   |  | ||||||
|  KERNEL_MAKE := \ |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,99 +0,0 @@ | |||||||
| From 1eb36bc2be4b54e4e4e4ceffc01be78d996205f0 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Sun, 17 Oct 2021 17:50:53 +0200 |  | ||||||
| Subject: [PATCH 052/102] tools/llvm-bpf: add llvm+clang build suitable for |  | ||||||
|  compiling code to eBPF |  | ||||||
|  |  | ||||||
| Preparation for building packages that ship eBPF code |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  toolchain/Config.in     |  7 +++++++ |  | ||||||
|  tools/Makefile          |  2 ++ |  | ||||||
|  tools/llvm-bpf/Makefile | 36 ++++++++++++++++++++++++++++++++++++ |  | ||||||
|  3 files changed, 45 insertions(+) |  | ||||||
|  create mode 100644 tools/llvm-bpf/Makefile |  | ||||||
|  |  | ||||||
| diff --git a/toolchain/Config.in b/toolchain/Config.in |  | ||||||
| index 6dda9af92d..9062d6f65e 100644 |  | ||||||
| --- a/toolchain/Config.in |  | ||||||
| +++ b/toolchain/Config.in |  | ||||||
| @@ -37,6 +37,13 @@ menuconfig TARGET_OPTIONS |  | ||||||
|   |  | ||||||
|  		  Most people will answer N. |  | ||||||
|   |  | ||||||
| +config BUILD_LLVM_BPF |  | ||||||
| +	bool "Build LLVM toolchain for eBPF" if DEVEL |  | ||||||
| +	help |  | ||||||
| +	  If enabled, a LLVM toolchain for building eBPF binaries will be built. |  | ||||||
| +	  If this is not enabled, eBPF packages can only be built if the host |  | ||||||
| +	  has a suitable toolchain |  | ||||||
| + |  | ||||||
|   |  | ||||||
|  menuconfig EXTERNAL_TOOLCHAIN |  | ||||||
|  	bool |  | ||||||
| diff --git a/tools/Makefile b/tools/Makefile |  | ||||||
| index a2665dbc9a..83147014c6 100644 |  | ||||||
| --- a/tools/Makefile |  | ||||||
| +++ b/tools/Makefile |  | ||||||
| @@ -35,6 +35,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage |  | ||||||
|  tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs |  | ||||||
|  tools-$(CONFIG_USES_MINOR) += kernel2minor |  | ||||||
|  tools-$(CONFIG_USE_SPARSE) += sparse |  | ||||||
| +tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf |  | ||||||
|   |  | ||||||
|  # builddir dependencies |  | ||||||
|  $(curdir)/autoconf/compile := $(curdir)/m4/compile |  | ||||||
| @@ -57,6 +58,7 @@ $(curdir)/libelf/compile := $(curdir)/libtool/compile |  | ||||||
|  $(curdir)/libressl/compile := $(curdir)/pkgconf/compile |  | ||||||
|  $(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile |  | ||||||
|  $(curdir)/lzma-old/compile := $(curdir)/zlib/compile |  | ||||||
| +$(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile |  | ||||||
|  $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile |  | ||||||
|  $(curdir)/missing-macros/compile := $(curdir)/autoconf/compile |  | ||||||
|  $(curdir)/mkimage/compile += $(curdir)/libressl/compile |  | ||||||
| diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000000..a5ba2a4cb7 |  | ||||||
| --- /dev/null |  | ||||||
| +++ b/tools/llvm-bpf/Makefile |  | ||||||
| @@ -0,0 +1,36 @@ |  | ||||||
| +# |  | ||||||
| +# Copyright (C) 2006-2016 OpenWrt.org |  | ||||||
| +# |  | ||||||
| +# This is free software, licensed under the GNU General Public License v2. |  | ||||||
| +# See /LICENSE for more information. |  | ||||||
| +# |  | ||||||
| +include $(TOPDIR)/rules.mk |  | ||||||
| + |  | ||||||
| +PKG_NAME:=llvm-project |  | ||||||
| +PKG_VERSION:=13.0.0 |  | ||||||
| +PKG_RELEASE:=1 |  | ||||||
| + |  | ||||||
| +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz |  | ||||||
| +PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION) |  | ||||||
| +PKG_HASH:=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3 |  | ||||||
| + |  | ||||||
| +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src |  | ||||||
| + |  | ||||||
| +HOST_BUILD_PARALLEL:=1 |  | ||||||
| + |  | ||||||
| +CMAKE_BINARY_SUBDIR := build |  | ||||||
| +CMAKE_SOURCE_SUBDIR := llvm |  | ||||||
| + |  | ||||||
| +include $(INCLUDE_DIR)/host-build.mk |  | ||||||
| +include $(INCLUDE_DIR)/cmake.mk |  | ||||||
| + |  | ||||||
| +CMAKE_HOST_OPTIONS += \ |  | ||||||
| +	-DLLVM_ENABLE_BINDINGS=OFF \ |  | ||||||
| +	-DLLVM_INCLUDE_DOCS=OFF \ |  | ||||||
| +	-DLLVM_INCLUDE_EXAMPLES=OFF \ |  | ||||||
| +	-DLLVM_INCLUDE_TESTS=OFF \ |  | ||||||
| +	-DLLVM_ENABLE_PROJECTS="clang;lld" \ |  | ||||||
| +	-DLLVM_TARGETS_TO_BUILD=BPF \ |  | ||||||
| +	-DCLANG_BUILD_EXAMPLES=OFF |  | ||||||
| + |  | ||||||
| +$(eval $(call HostBuild)) |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,40 +0,0 @@ | |||||||
| From 103a743e7ca4a2e98969d0f60d8aeb6cc7641f67 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Tue, 2 Nov 2021 19:38:12 +0100 |  | ||||||
| Subject: [PATCH 053/102] llvm-bpf: move to staging_dir/host/llvm-bpf |  | ||||||
|  |  | ||||||
| This makes it easier to package it up for the download server |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  tools/llvm-bpf/Makefile | 8 +++++++- |  | ||||||
|  1 file changed, 7 insertions(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile |  | ||||||
| index a5ba2a4cb7..ae279d26d2 100644 |  | ||||||
| --- a/tools/llvm-bpf/Makefile |  | ||||||
| +++ b/tools/llvm-bpf/Makefile |  | ||||||
| @@ -24,6 +24,8 @@ CMAKE_SOURCE_SUBDIR := llvm |  | ||||||
|  include $(INCLUDE_DIR)/host-build.mk |  | ||||||
|  include $(INCLUDE_DIR)/cmake.mk |  | ||||||
|   |  | ||||||
| +CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/llvm-bpf |  | ||||||
| + |  | ||||||
|  CMAKE_HOST_OPTIONS += \ |  | ||||||
|  	-DLLVM_ENABLE_BINDINGS=OFF \ |  | ||||||
|  	-DLLVM_INCLUDE_DOCS=OFF \ |  | ||||||
| @@ -31,6 +33,10 @@ CMAKE_HOST_OPTIONS += \ |  | ||||||
|  	-DLLVM_INCLUDE_TESTS=OFF \ |  | ||||||
|  	-DLLVM_ENABLE_PROJECTS="clang;lld" \ |  | ||||||
|  	-DLLVM_TARGETS_TO_BUILD=BPF \ |  | ||||||
| -	-DCLANG_BUILD_EXAMPLES=OFF |  | ||||||
| +	-DCLANG_BUILD_EXAMPLES=OFF \ |  | ||||||
| +	-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \ |  | ||||||
| +	-DLLVM_LINK_LLVM_DYLIB=ON \ |  | ||||||
| +	-DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \ |  | ||||||
| +	-DCMAKE_SKIP_RPATH=OFF |  | ||||||
|   |  | ||||||
|  $(eval $(call HostBuild)) |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,103 +0,0 @@ | |||||||
| From a368d456ba1e9198fd8f473b7e82c0e066e4eb82 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Mon, 1 Nov 2021 18:40:03 +0100 |  | ||||||
| Subject: [PATCH 054/102] build: fix bpf toolchain dependency for qosify |  | ||||||
|  |  | ||||||
| Add hidden symbols to fix defaults with CONFIG_DEVEL unset |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  include/bpf.mk      |  2 ++ |  | ||||||
|  toolchain/Config.in | 45 +++++++++++++++++++++++++++++++++++++++++++++ |  | ||||||
|  tools/Makefile      |  2 +- |  | ||||||
|  3 files changed, 48 insertions(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| diff --git a/include/bpf.mk b/include/bpf.mk |  | ||||||
| index 3dc65c7685..5211ec4434 100644 |  | ||||||
| --- a/include/bpf.mk |  | ||||||
| +++ b/include/bpf.mk |  | ||||||
| @@ -1,3 +1,5 @@ |  | ||||||
| +BPF_DEPENDS := @HAS_BPF_TOOLCHAIN |  | ||||||
| + |  | ||||||
|  ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),) |  | ||||||
|    BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH)) |  | ||||||
|    ifneq ($(BPF_TOOLCHAIN_HOST_PATH),) |  | ||||||
| diff --git a/toolchain/Config.in b/toolchain/Config.in |  | ||||||
| index 9062d6f65e..997cff59e4 100644 |  | ||||||
| --- a/toolchain/Config.in |  | ||||||
| +++ b/toolchain/Config.in |  | ||||||
| @@ -44,6 +44,32 @@ config BUILD_LLVM_BPF |  | ||||||
|  	  If this is not enabled, eBPF packages can only be built if the host |  | ||||||
|  	  has a suitable toolchain |  | ||||||
|   |  | ||||||
| +	choice BPF_TOOLCHAIN |  | ||||||
| +		prompt "BPF toolchain" if DEVEL |  | ||||||
| +		default BPF_TOOLCHAIN_NONE |  | ||||||
| + |  | ||||||
| +		config BPF_TOOLCHAIN_NONE |  | ||||||
| +			bool "None" |  | ||||||
| + |  | ||||||
| +		config BPF_TOOLCHAIN_HOST |  | ||||||
| +			select USE_LLVM_HOST |  | ||||||
| +			bool "Use host LLVM toolchain" |  | ||||||
| + |  | ||||||
| +		config BPF_TOOLCHAIN_BUILD_LLVM |  | ||||||
| +			select USE_LLVM_BUILD |  | ||||||
| +			bool "Build LLVM toolchain for eBPF" |  | ||||||
| +			help |  | ||||||
| +			  If enabled, a LLVM toolchain for building eBPF binaries will be built. |  | ||||||
| +			  If this is not enabled, eBPF packages can only be built if the host |  | ||||||
| +			  has a suitable toolchain |  | ||||||
| +	endchoice |  | ||||||
| + |  | ||||||
| +	config BPF_TOOLCHAIN_HOST_PATH |  | ||||||
| +		string |  | ||||||
| +		depends on BPF_TOOLCHAIN_HOST |  | ||||||
| +		prompt "Host LLVM toolchain path (prefix)" if DEVEL |  | ||||||
| +		default "/usr/local/opt/llvm" if HOST_OS_MACOS |  | ||||||
| +		default "" |  | ||||||
|   |  | ||||||
|  menuconfig EXTERNAL_TOOLCHAIN |  | ||||||
|  	bool |  | ||||||
| @@ -266,6 +292,25 @@ config GDB |  | ||||||
|  	help |  | ||||||
|  	  Enable if you want to build the gdb. |  | ||||||
|   |  | ||||||
| +config GDB_PYTHON |  | ||||||
| +	bool |  | ||||||
| +	depends on GDB |  | ||||||
| +	prompt "Build gdb with python binding" |  | ||||||
| +	 |  | ||||||
| +	help |  | ||||||
| +	  Enable the python bindings for GDB to allow using python in the gdb shell. |  | ||||||
| + |  | ||||||
| +config HAS_BPF_TOOLCHAIN |  | ||||||
| +	bool |  | ||||||
| + |  | ||||||
| +config USE_LLVM_HOST |  | ||||||
| +	select HAS_BPF_TOOLCHAIN |  | ||||||
| +	bool |  | ||||||
| + |  | ||||||
| +config USE_LLVM_BUILD |  | ||||||
| +	select HAS_BPF_TOOLCHAIN |  | ||||||
| +	bool |  | ||||||
| + |  | ||||||
|  config USE_GLIBC |  | ||||||
|  	default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc) |  | ||||||
|  	bool |  | ||||||
| diff --git a/tools/Makefile b/tools/Makefile |  | ||||||
| index 83147014c6..ae3cc5dfd6 100644 |  | ||||||
| --- a/tools/Makefile |  | ||||||
| +++ b/tools/Makefile |  | ||||||
| @@ -35,7 +35,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage |  | ||||||
|  tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs |  | ||||||
|  tools-$(CONFIG_USES_MINOR) += kernel2minor |  | ||||||
|  tools-$(CONFIG_USE_SPARSE) += sparse |  | ||||||
| -tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf |  | ||||||
| +tools-$(CONFIG_USE_LLVM_BUILD) += llvm-bpf |  | ||||||
|   |  | ||||||
|  # builddir dependencies |  | ||||||
|  $(curdir)/autoconf/compile := $(curdir)/m4/compile |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,26 +0,0 @@ | |||||||
| From 2ae5b19a52da190ea342ec4210523407837c58ea Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Tue, 2 Nov 2021 09:56:10 +0100 |  | ||||||
| Subject: [PATCH 055/102] include/bpf.mk: fix typo |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  include/bpf.mk | 2 +- |  | ||||||
|  1 file changed, 1 insertion(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| diff --git a/include/bpf.mk b/include/bpf.mk |  | ||||||
| index 5211ec4434..6223648c5d 100644 |  | ||||||
| --- a/include/bpf.mk |  | ||||||
| +++ b/include/bpf.mk |  | ||||||
| @@ -5,7 +5,7 @@ ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),) |  | ||||||
|    ifneq ($(BPF_TOOLCHAIN_HOST_PATH),) |  | ||||||
|      BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH) |  | ||||||
|    else |  | ||||||
| -    BPF_PATH:=$(BPF_PATH) |  | ||||||
| +    BPF_PATH:=$(PATH) |  | ||||||
|    endif |  | ||||||
|    CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11)) |  | ||||||
|    LLVM_VER:=$(subst clang,,$(notdir $(CLANG))) |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,39 +0,0 @@ | |||||||
| From aff796bf3e60d7f09e5ca500cbf59221211dd218 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Felix Fietkau <nbd@nbd.name> |  | ||||||
| Date: Tue, 2 Nov 2021 10:39:35 +0100 |  | ||||||
| Subject: [PATCH 056/102] include/bpf.mk: fix compile for big-endian targets |  | ||||||
|  |  | ||||||
| llvm-opt and llc need endian flags in the target as well |  | ||||||
|  |  | ||||||
| Signed-off-by: Felix Fietkau <nbd@nbd.name> |  | ||||||
| --- |  | ||||||
|  include/bpf.mk | 5 +++-- |  | ||||||
|  1 file changed, 3 insertions(+), 2 deletions(-) |  | ||||||
|  |  | ||||||
| diff --git a/include/bpf.mk b/include/bpf.mk |  | ||||||
| index 6223648c5d..9636ad5165 100644 |  | ||||||
| --- a/include/bpf.mk |  | ||||||
| +++ b/include/bpf.mk |  | ||||||
| @@ -22,6 +22,7 @@ LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER) |  | ||||||
|   |  | ||||||
|  BPF_KARCH:=mips |  | ||||||
|  BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el) |  | ||||||
| +BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el) |  | ||||||
|   |  | ||||||
|  BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers |  | ||||||
|   |  | ||||||
| @@ -59,9 +60,9 @@ BPF_CFLAGS := \ |  | ||||||
|  define CompileBPF |  | ||||||
|  	$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \ |  | ||||||
|  		-c $(1) -o $(patsubst %.c,%.bc,$(1)) |  | ||||||
| -	$(LLVM_OPT) -O2 -mtriple=bpf-pc-linux < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1)) |  | ||||||
| +	$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1)) |  | ||||||
|  	$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1)) |  | ||||||
| -	$(LLVM_LLC) -march=bpf -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) |  | ||||||
| +	$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) |  | ||||||
|  	$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1)) |  | ||||||
|  endef |  | ||||||
|   |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
| @@ -1,34 +0,0 @@ | |||||||
| From d05fae42794c5fe76509935b1e8f900e1d17d9f0 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: John Crispin <john@phrozen.org> |  | ||||||
| Date: Fri, 5 Nov 2021 10:46:00 +0100 |  | ||||||
| Subject: [PATCH] include/bpf.mk: add LD_LIBRARY_PATH |  | ||||||
|  |  | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> |  | ||||||
| --- |  | ||||||
|  include/bpf.mk | 5 +++++ |  | ||||||
|  1 file changed, 5 insertions(+) |  | ||||||
|  |  | ||||||
| diff --git a/include/bpf.mk b/include/bpf.mk |  | ||||||
| index 9636ad5165..2f797625b6 100644 |  | ||||||
| --- a/include/bpf.mk |  | ||||||
| +++ b/include/bpf.mk |  | ||||||
| @@ -58,11 +58,16 @@ BPF_CFLAGS := \ |  | ||||||
|  	-O2 -emit-llvm -Xclang -disable-llvm-passes |  | ||||||
|   |  | ||||||
|  define CompileBPF |  | ||||||
| +	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \ |  | ||||||
|  	$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \ |  | ||||||
|  		-c $(1) -o $(patsubst %.c,%.bc,$(1)) |  | ||||||
| +	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \ |  | ||||||
|  	$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1)) |  | ||||||
| +	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \ |  | ||||||
|  	$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1)) |  | ||||||
| +	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \ |  | ||||||
|  	$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1)) |  | ||||||
| +	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \ |  | ||||||
|  	$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1)) |  | ||||||
|  endef |  | ||||||
|   |  | ||||||
| --  |  | ||||||
| 2.25.1 |  | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,29 +1,29 @@ | |||||||
| From 006abf1773051ad355b52d70095f63f44a496b13 Mon Sep 17 00:00:00 2001 | From 8897bab871fb43701fad786c94af5d1b1ef123ae Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Sun, 25 Jul 2021 13:32:37 +0200 | Date: Sun, 25 Jul 2021 13:32:37 +0200 | ||||||
| Subject: [PATCH 02/70] procd: add uxc support | Subject: [PATCH 01/46] procd: add uxc support | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
|  package/system/procd/Makefile       | 15 +++--- |  package/system/procd/Makefile       | 12 ++--- | ||||||
|  package/system/procd/files/procd.sh | 79 +++++++++++++++++++++++++++++ |  package/system/procd/files/procd.sh | 79 +++++++++++++++++++++++++++++ | ||||||
|  package/system/procd/files/uxc.init |  4 ++ |  package/system/procd/files/uxc.init |  4 ++ | ||||||
|  3 files changed, 90 insertions(+), 8 deletions(-) |  3 files changed, 89 insertions(+), 6 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
 | diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
 | ||||||
| index 30d5adf427..b831f86639 100644
 | index fff9faa1bf..98f1ed1775 100644
 | ||||||
| --- a/package/system/procd/Makefile
 | --- a/package/system/procd/Makefile
 | ||||||
| +++ b/package/system/procd/Makefile
 | +++ b/package/system/procd/Makefile
 | ||||||
| @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 | @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 | ||||||
|   |   | ||||||
|  PKG_SOURCE_PROTO:=git |  PKG_SOURCE_PROTO:=git | ||||||
|  PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git |  PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git | ||||||
| -PKG_SOURCE_DATE:=2021-02-23
 | -PKG_SOURCE_DATE:=2021-02-08
 | ||||||
| -PKG_SOURCE_VERSION:=37eed131e9967a35f47bacb3437a9d3c8a57b3f4
 | -PKG_SOURCE_VERSION:=08938fe1cbc06eeaafa39448057368391d165272
 | ||||||
| -PKG_MIRROR_HASH:=2b0131ff9055ccf987cbeb5f36c2c2585dc780999df6be312fbbbcd61ce676d4
 | -PKG_MIRROR_HASH:=efc3deac56057e929789d44742858b2a16d976f6bfa0a2036e413d10afcaeee4
 | ||||||
| +PKG_MIRROR_HASH:=0d51642d82d7bb4150355a6986e54504dce171c6fcb7eeff312d20a5d106bad8
 | +PKG_SOURCE_DATE:=2021-08-15
 | ||||||
| +PKG_SOURCE_DATE:=2021-11-04
 | +PKG_SOURCE_VERSION:=104b49d6ab25a8cf067e6d8d1f2da7defb9876d4
 | ||||||
| +PKG_SOURCE_VERSION:=0ee8e734a7f67220cf4a3412b60ff674b5fb20dd
 | +PKG_MIRROR_HASH:=d13b566a14e84f6babe8b7d3dfb88e34c3dff0e97d7770d6fe71174685bca628
 | ||||||
|  CMAKE_INSTALL:=1 |  CMAKE_INSTALL:=1 | ||||||
|   |   | ||||||
|  PKG_LICENSE:=GPL-2.0 |  PKG_LICENSE:=GPL-2.0 | ||||||
| @@ -36,30 +36,21 @@ index 30d5adf427..b831f86639 100644 | |||||||
|  endif |  endif | ||||||
|   |   | ||||||
|  CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)" |  CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)" | ||||||
| @@ -68,7 +68,7 @@ define Package/procd-ujail
 | @@ -82,7 +82,7 @@ endef
 | ||||||
|    SECTION:=base |  | ||||||
|    CATEGORY:=Base system |  | ||||||
|    DEPENDS:=@KERNEL_NAMESPACES +@KERNEL_UTS_NS +@KERNEL_IPC_NS +@KERNEL_PID_NS \ |  | ||||||
| -	  +libubox +libubus +libblobmsg-json
 |  | ||||||
| +	  +libubox +libubus +libuci +libblobmsg-json
 |  | ||||||
|    TITLE:=OpenWrt process jail helper |  | ||||||
|  endef |  | ||||||
|   |  | ||||||
| @@ -82,15 +82,14 @@ endef
 |  | ||||||
|  define Package/procd-seccomp |  define Package/procd-seccomp | ||||||
|    SECTION:=base |    SECTION:=base | ||||||
|    CATEGORY:=Base system |    CATEGORY:=Base system | ||||||
| -  DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \
 | -  DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \
 | ||||||
| -	  @KERNEL_SECCOMP +libubox +libblobmsg-json
 | +  DEPENDS:=@(aarch64||arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \
 | ||||||
| +  DEPENDS:=@SECCOMP +libubox +libblobmsg-json
 |  	  @KERNEL_SECCOMP +libubox +libblobmsg-json | ||||||
|    TITLE:=OpenWrt process seccomp helper + utrace |    TITLE:=OpenWrt process seccomp helper + utrace | ||||||
|  endef |  endef | ||||||
|   | @@ -90,7 +90,7 @@ endef
 | ||||||
|  define Package/uxc |  define Package/uxc | ||||||
|    SECTION:=base |    SECTION:=base | ||||||
|    CATEGORY:=Base system |    CATEGORY:=Base system | ||||||
| -  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
 | -  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
 | ||||||
| +  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +PACKAGE_uxc:rpcd
 | +  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +rpcd
 | ||||||
|    TITLE:=OpenWrt container management |    TITLE:=OpenWrt container management | ||||||
|    MAINTAINER:=Daniel Golle <daniel@makrotopia.org> |    MAINTAINER:=Daniel Golle <daniel@makrotopia.org> | ||||||
|  endef |  endef | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 23c15e2536d0fa5ed81c5bdfe7623d3370dca997 Mon Sep 17 00:00:00 2001 | From 0a31ac2bfc8aa43c2a5e43eac81c4647dbf2d1b7 Mon Sep 17 00:00:00 2001 | ||||||
| From: Paul Spooren <mail@aparcar.org> | From: Paul Spooren <mail@aparcar.org> | ||||||
| Date: Fri, 2 Oct 2020 23:30:30 -1000 | Date: Fri, 2 Oct 2020 23:30:30 -1000 | ||||||
| Subject: [PATCH 21/27] build: create APK files parrallel to IPK | Subject: [PATCH 01/45] build: create APK files parrallel to IPK | ||||||
| 
 | 
 | ||||||
| Create APK files based on the folder and control files of IPK packages. | Create APK files based on the folder and control files of IPK packages. | ||||||
| 
 | 
 | ||||||
| @@ -16,11 +16,11 @@ Signed-off-by: Paul Spooren <mail@aparcar.org> | |||||||
|  create mode 100755 scripts/apk-make-index.sh |  create mode 100755 scripts/apk-make-index.sh | ||||||
| 
 | 
 | ||||||
| diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
 | diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
 | ||||||
| index e972b7de0b..5c31b1774f 100644
 | index c2017cd220..b0177070f8 100644
 | ||||||
| --- a/include/package-ipkg.mk
 | --- a/include/package-ipkg.mk
 | ||||||
| +++ b/include/package-ipkg.mk
 | +++ b/include/package-ipkg.mk
 | ||||||
| @@ -102,6 +102,7 @@ ifeq ($(DUMP),)
 | @@ -102,6 +102,7 @@ ifeq ($(DUMP),)
 | ||||||
|      ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION)) |      ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION)) | ||||||
|      PDIR_$(1):=$(call FeedPackageDir,$(1)) |      PDIR_$(1):=$(call FeedPackageDir,$(1)) | ||||||
|      IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk |      IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk | ||||||
| +    APK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).apk
 | +    APK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).apk
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 8e8b3e443a7f1d0644f43888c8683698f26d4d13 Mon Sep 17 00:00:00 2001 | From 2239c3c87a723bee8efa64ecf22c61a15433517e Mon Sep 17 00:00:00 2001 | ||||||
| From: Daniel Golle <daniel@makrotopia.org> | From: Daniel Golle <daniel@makrotopia.org> | ||||||
| Date: Sun, 25 Jul 2021 01:20:31 +0100 | Date: Sun, 25 Jul 2021 01:20:31 +0100 | ||||||
| Subject: [PATCH 22/27] fstools: update to git HEAD | Subject: [PATCH 102/146] fstools: update to git HEAD | ||||||
| 
 | 
 | ||||||
|  bad1835 fstools: add partname volume driver |  bad1835 fstools: add partname volume driver | ||||||
|  19d7d93 libfstools: partname: several fixes |  19d7d93 libfstools: partname: several fixes | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 873052b99d6597209957ec32898fa56324cf34a4 Mon Sep 17 00:00:00 2001 | From c40bb49f31443d9c03043c4361e4af56e5c3eba4 Mon Sep 17 00:00:00 2001 | ||||||
| From: Rosen Penev <rosenp@gmail.com> | From: Rosen Penev <rosenp@gmail.com> | ||||||
| Date: Sat, 19 Jun 2021 14:45:11 -0700 | Date: Sat, 19 Jun 2021 14:45:11 -0700 | ||||||
| Subject: [PATCH 23/27] tools/libressl: update to 3.3.3 | Subject: [PATCH 103/146] tools/libressl: update to 3.3.3 | ||||||
| 
 | 
 | ||||||
| Fix wrong FPIC variable usage. Fixes compilation under sparc64 host. | Fix wrong FPIC variable usage. Fixes compilation under sparc64 host. | ||||||
| 
 | 
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 08809a60a8f2c065a38c24fcdbd69b939e5c29d9 Mon Sep 17 00:00:00 2001 | From b915cb9a73c7696f25994c3f63fed4e6ea3aa55b Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Fri, 13 Aug 2021 08:46:57 +0200 | Date: Fri, 13 Aug 2021 08:46:57 +0200 | ||||||
| Subject: [PATCH 24/27] uvol: backport package | Subject: [PATCH 05/46] uvol: backport package | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
| @@ -25,7 +25,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
| 
 | 
 | ||||||
| diff --git a/package/system/uvol/Makefile b/package/system/uvol/Makefile
 | diff --git a/package/system/uvol/Makefile b/package/system/uvol/Makefile
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000000..bd70410c5e
 | index 0000000000..e988d51682
 | ||||||
| --- /dev/null
 | --- /dev/null
 | ||||||
| +++ b/package/system/uvol/Makefile
 | +++ b/package/system/uvol/Makefile
 | ||||||
| @@ -0,0 +1,77 @@
 | @@ -0,0 +1,77 @@
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From bf98d3c1de524ca50cbc09f825a4b0648e353624 Mon Sep 17 00:00:00 2001 | From 6741963067c4be8999896a5e653dc0d72487e392 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Fri, 13 Aug 2021 08:47:11 +0200 | Date: Fri, 13 Aug 2021 08:47:11 +0200 | ||||||
| Subject: [PATCH 25/27] apk: backport package | Subject: [PATCH 06/46] apk: backport package | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From ec862d472fca676cc04ce71b640e880ecefdd477 Mon Sep 17 00:00:00 2001 | From 900d18f3ae2cd5bb3d8d6e2584d2280cb5302e01 Mon Sep 17 00:00:00 2001 | ||||||
| From: John Crispin <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Fri, 13 Aug 2021 08:48:02 +0200 | Date: Fri, 13 Aug 2021 08:48:02 +0200 | ||||||
| Subject: [PATCH 26/27] lua-lzlib: backport package | Subject: [PATCH 106/146] lua-lzlib: backport package | ||||||
| 
 | 
 | ||||||
| Signed-off-by: John Crispin <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| ---
 | ---
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| From 5fc717aa60b36934892d6d77c0637fc53aa7f761 Mon Sep 17 00:00:00 2001 | From 5c8a575ec759105e63a3aad033289d124516ec69 Mon Sep 17 00:00:00 2001 | ||||||
| From: Daniel Golle <daniel@makrotopia.org> | From: Daniel Golle <daniel@makrotopia.org> | ||||||
| Date: Sat, 10 Jul 2021 20:21:26 +0100 | Date: Sat, 10 Jul 2021 20:21:26 +0100 | ||||||
| Subject: [PATCH 27/27] lua: make it easier to detect host-built Lua | Subject: [PATCH 107/146] lua: make it easier to detect host-built Lua | ||||||
| 
 | 
 | ||||||
| Install pkg-config file also for host-build, clean up Lua symlinks. | Install pkg-config file also for host-build, clean up Lua symlinks. | ||||||
| 
 | 
 | ||||||
| @@ -12,7 +12,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org> | |||||||
|  1 file changed, 6 insertions(+), 2 deletions(-) |  1 file changed, 6 insertions(+), 2 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
 | diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
 | ||||||
| index d262d1e1fc..e15142d8d2 100644
 | index a54ef7d25a..be18880cb1 100644
 | ||||||
| --- a/package/utils/lua/Makefile
 | --- a/package/utils/lua/Makefile
 | ||||||
| +++ b/package/utils/lua/Makefile
 | +++ b/package/utils/lua/Makefile
 | ||||||
| @@ -134,8 +134,12 @@ define Host/Install
 | @@ -134,8 +134,12 @@ define Host/Install
 | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| repo:  https://github.com/openwrt/openwrt.git | repo:  https://github.com/openwrt/openwrt.git | ||||||
| branch: openwrt-21.02 | branch: openwrt-21.02 | ||||||
| revision: 378769b5551714ccaa821b481bfeecbf362f351e | revision: 6fd65c657351908302b37447675ee352ec927d93 | ||||||
| output_dir: ./output | output_dir: ./output | ||||||
|  |  | ||||||
| patch_folders: | patch_folders: | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ FROM ubuntu:20.04 | |||||||
| RUN apt-get update \ | RUN apt-get update \ | ||||||
|     && DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata \ |     && DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata \ | ||||||
|     && apt-get install -y \ |     && apt-get install -y \ | ||||||
|             time git-core build-essential gcc-multilib clang \ |             time git-core build-essential gcc-multilib \ | ||||||
|             libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python \ |             libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python \ | ||||||
|             python3 python3-pip python3-yaml libssl-dev rsync \ |             python3 python3-pip python3-yaml libssl-dev rsync \ | ||||||
|     && apt-get clean |     && apt-get clean | ||||||
|   | |||||||
| @@ -24,7 +24,8 @@ define Package/fbwifi | |||||||
|   SECTION:=net |   SECTION:=net | ||||||
|   CATEGORY:=Network |   CATEGORY:=Network | ||||||
|   DEPENDS:=+iptables +luasec +luasocket \ |   DEPENDS:=+iptables +luasec +luasocket \ | ||||||
| 	+libuci-lua +luaposix \ | 	+luci-base +libuci-lua +luaposix \ | ||||||
|  | 	+luci-mod-network +luci-mod-status +luci-theme-bootstrap \ | ||||||
| 	+lua-cjson +uhttpd | 	+lua-cjson +uhttpd | ||||||
|   TITLE:=Facebook Wi-Fi |   TITLE:=Facebook Wi-Fi | ||||||
|   PKGARCH:=all |   PKGARCH:=all | ||||||
| @@ -34,22 +35,6 @@ define Package/fbwifi/description | |||||||
|   Facebook Wi-Fi, an AP authorisation solution |   Facebook Wi-Fi, an AP authorisation solution | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  |  | ||||||
| define Package/luci-app-fbwifi |  | ||||||
|   SUBMENU:=3. Applications |  | ||||||
|   SECTION:=luci |  | ||||||
|   CATEGORY:=LuCI |  | ||||||
|   TITLE:=LuCI support for Facebook Wi-Fi |  | ||||||
|   DEPENDS:= \ |  | ||||||
| 	+fbwifi \ |  | ||||||
| 	+luci-base +luci-mod-network +luci-mod-status +luci-theme-bootstrap |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| define Package/luci-app-fbwifi/description |  | ||||||
|   LuCI support for Facebook Wi-Fi |  | ||||||
| endef |  | ||||||
|  |  | ||||||
|  |  | ||||||
| define Package/fbwifi/conffiles | define Package/fbwifi/conffiles | ||||||
| /etc/config/fbwifi | /etc/config/fbwifi | ||||||
| endef | endef | ||||||
| @@ -65,13 +50,7 @@ endef | |||||||
|  |  | ||||||
| define Package/fbwifi/install | define Package/fbwifi/install | ||||||
| 	$(INSTALL_DIR) $(1) | 	$(INSTALL_DIR) $(1) | ||||||
| 	$(CP) ./files/fbwifi/* $(1)/ | 	$(CP) ./files/* $(1)/ | ||||||
| endef |  | ||||||
|  |  | ||||||
| define Package/luci-app-fbwifi/install |  | ||||||
| 	$(INSTALL_DIR) $(1) |  | ||||||
| 	$(CP) ./files/luci-app-fbwifi/* $(1) |  | ||||||
| endef | endef | ||||||
|  |  | ||||||
| $(eval $(call BuildPackage,fbwifi)) | $(eval $(call BuildPackage,fbwifi)) | ||||||
| $(eval $(call BuildPackage,luci-app-fbwifi)) |  | ||||||
|   | |||||||
| @@ -6,17 +6,50 @@ Case studies for OEM customers are available at the official page of [Facebook W | |||||||
|  |  | ||||||
| For OEM engineers, start by reading the init script in [files/etc/init.d/fbwifi](https://github.com/facebookincubator/fbc_owrt_feed/blob/master/fbwifi/files/etc/init.d/fbwifi) | For OEM engineers, start by reading the init script in [files/etc/init.d/fbwifi](https://github.com/facebookincubator/fbc_owrt_feed/blob/master/fbwifi/files/etc/init.d/fbwifi) | ||||||
|  |  | ||||||
| To enable Facebook Wi-Fi, configure the gateway_token in `/etc/config/fbwifi`, and run `fbwifi enable`. |  | ||||||
| To disable Facebook Wi-Fi, run `fbwifi disable`. |  | ||||||
|  |  | ||||||
| ## Contents | ## Contents | ||||||
|  |  | ||||||
| The 'files' subdirectory contains two subdirectories, one for the fbwifi | The 'files' subdirectory contains all the configuration, script and code  | ||||||
| package that implements the Facebook Wi-Fi v2.0 standard for OpenWrt, and | that implements the Facebook Wi-Fi v2.0 standard for OpenWrt. | ||||||
| another one containing a LuCI application to configure Facebook Wi-Fi. |  | ||||||
|  |  | ||||||
| The folder structures follow *nix conventions: | The folder structure follows *nix conventions : | ||||||
| - 'etc' is the boot time scripts and configuration | - 'etc' is the boot time scripts and configuration | ||||||
| - 'usr' contains procedural scripts, lua common code module and GUI prototype for luci | - 'usr' contains procedural scripts, lua common code module and GUI prototype for luci | ||||||
| - 'www' contains the HTTP endpoints as CGI handlers  | - 'www' contains the HTTP endpoints as CGI handlers  | ||||||
|  |  | ||||||
|  | ``` | ||||||
|  | files/ | ||||||
|  | ├── etc | ||||||
|  | │   ├── config | ||||||
|  | │   │   └── fbwifi | ||||||
|  | │   ├── hotplug.d | ||||||
|  | │   │   └── iface | ||||||
|  | │   │       └── 50-fbwifi | ||||||
|  | │   ├── init.d | ||||||
|  | │   │   └── fbwifi | ||||||
|  | ├── usr | ||||||
|  | │   ├── lib | ||||||
|  | │   │   └── lua | ||||||
|  | │   │       ├── fbwifi.lua | ||||||
|  | │   │       └── luci | ||||||
|  | │   │           ├── controller | ||||||
|  | │   │           │   └── fbwifi.lua | ||||||
|  | │   │           └── view | ||||||
|  | │   │               └── fbwifi.htm | ||||||
|  | │   ├── sbin | ||||||
|  | │   │   ├── fbwifi | ||||||
|  | │   │   ├── fbwifi_debug_dump | ||||||
|  | │   │   ├── fbwifi_gateway_info_update | ||||||
|  | │   │   ├── fbwifi_get_config | ||||||
|  | │   │   └── fbwifi_validate_token_db | ||||||
|  | │   └── share | ||||||
|  | │       └── fbwifi | ||||||
|  | │           ├── firewall.include | ||||||
|  | │           └── uhttpd.json | ||||||
|  | └── www | ||||||
|  |     └── cgi-bin | ||||||
|  |         └── fbwifi | ||||||
|  |             └── v2.0 | ||||||
|  |                 ├── auth | ||||||
|  |                 ├── capport | ||||||
|  |                 └── info | ||||||
|  | ``` | ||||||
|   | |||||||
| @@ -1,75 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
|  |  | ||||||
| # SPDX-License-Identifier: GPL-2.0-only |  | ||||||
| # Copyright (c) Facebook, Inc. and its affiliates. |  | ||||||
|  |  | ||||||
| IPT4="/usr/sbin/iptables" |  | ||||||
|  |  | ||||||
| set -- --wait 1 --wait-interval 100 |  | ||||||
|  |  | ||||||
| fbwifi_http_port="$(uci get fbwifi.main.http_port)" |  | ||||||
| [ -n "$fbwifi_http_port" ] || { |  | ||||||
| 	logger -t fbwifi "required option http_port not set" |  | ||||||
| 	exit 1 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| fbwifi_https_port="$(uci get fbwifi.main.https_port)" |  | ||||||
| [ -n "$fbwifi_https_port" ] || { |  | ||||||
| 	logger -t fbwifi "required option https_port not set" |  | ||||||
| 	exit 1 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| fbwifi_zone="$(uci get fbwifi.main.zone)" |  | ||||||
| [ -n "$fbwifi_zone" ] || { |  | ||||||
| 	logger -t fbwifi "required option zone  not set" |  | ||||||
| 	exit 1 |  | ||||||
| } |  | ||||||
|  |  | ||||||
| fbwifi_ifaces="$(fw3 -q zone "$fbwifi_zone")" |  | ||||||
|  |  | ||||||
| ## Create custom chains |  | ||||||
| "$IPT4" "$@" -t filter -N FBWIFI_FORWARD 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t filter -N FBWIFI_INPUT 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t mangle -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t mangle -N FBWIFI_PREROUTING 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t mangle -N FBWIFI_TRAFFIC_ALLOWLIST 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t nat -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t nat -N FBWIFI_PREROUTING 2>/dev/null |  | ||||||
| "$IPT4" "$@" -t nat -N FBWIFI_HOST_REDIRLIST 2>/dev/null |  | ||||||
|  |  | ||||||
| ## Flush custom chains |  | ||||||
| "$IPT4" "$@" -t filter -F FBWIFI_FORWARD |  | ||||||
| "$IPT4" "$@" -t filter -F FBWIFI_INPUT |  | ||||||
| "$IPT4" "$@" -t mangle -F FBWIFI_CLIENT_TO_INTERNET |  | ||||||
| "$IPT4" "$@" -t mangle -F FBWIFI_PREROUTING |  | ||||||
| "$IPT4" "$@" -t mangle -F FBWIFI_TRAFFIC_ALLOWLIST |  | ||||||
| "$IPT4" "$@" -t nat -F FBWIFI_CLIENT_TO_INTERNET |  | ||||||
| "$IPT4" "$@" -t nat -F FBWIFI_PREROUTING |  | ||||||
| "$IPT4" "$@" -t nat -F FBWIFI_HOST_REDIRLIST |  | ||||||
|  |  | ||||||
| ## Populate custom chains |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_FORWARD -p udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_FORWARD -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_FORWARD -j REJECT |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_http_port" -m conntrack --ctstate NEW -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_https_port"  -m conntrack --ctstate NEW -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t filter -A FBWIFI_INPUT -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t mangle -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET |  | ||||||
| "$IPT4" "$@" -t mangle -A FBWIFI_PREROUTING -j FBWIFI_TRAFFIC_ALLOWLIST |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p udp --dport 443 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p udp --dport 443 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT |  | ||||||
| "$IPT4" "$@" -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j REDIRECT --to-ports "$fbwifi_http_port" |  | ||||||
|  |  | ||||||
| ## Hook custom chains in firewall3 chains |  | ||||||
| "$IPT4" "$@" -t filter -I "zone_${fbwifi_zone}_input" 2 -j FBWIFI_INPUT |  | ||||||
| "$IPT4" "$@" -t filter -I "zone_${fbwifi_zone}_forward" 2 -j FBWIFI_FORWARD |  | ||||||
| "$IPT4" "$@" -t nat -I "zone_${fbwifi_zone}_prerouting" 2 -j FBWIFI_PREROUTING |  | ||||||
| # There are no firewall3 zone chains in the mangle table so we need to do this for all interfaces in the zone |  | ||||||
| for iface in $fbwifi_ifaces; do |  | ||||||
| 	"$IPT4" "$@" -t mangle -I PREROUTING -i "$iface" -j FBWIFI_PREROUTING |  | ||||||
| done |  | ||||||
| @@ -1,6 +1,3 @@ | |||||||
| -- SPDX-License-Identifier: GPL-2.0-only |  | ||||||
| -- Copyright (c) Facebook, Inc. and its affiliates. |  | ||||||
| -- |  | ||||||
| -- FBWIFI Lua library | -- FBWIFI Lua library | ||||||
| -- function table | -- function table | ||||||
| local fbwifi = {} | local fbwifi = {} | ||||||
| @@ -11,7 +8,9 @@ local log = require("posix.syslog") | |||||||
| local uci = require("uci") | local uci = require("uci") | ||||||
| 
 | 
 | ||||||
| function fbwifi.gateway_token() | function fbwifi.gateway_token() | ||||||
| 	token = uci.get("fbwifi.main.gateway_token") | 
 | ||||||
|  | 	state = uci.cursor(nil, "/var/state") | ||||||
|  | 	token = state:get("fbwifi", "main", "gateway_token") | ||||||
| 	if token and string.len(token) > 0 then | 	if token and string.len(token) > 0 then | ||||||
| 		return token | 		return token | ||||||
| 	else | 	else | ||||||
| @@ -45,7 +44,7 @@ end | |||||||
| 
 | 
 | ||||||
| local mac_to_purge='' | local mac_to_purge='' | ||||||
| function remove_client_by_mac(client) | function remove_client_by_mac(client) | ||||||
| 	state = uci.cursor("/var/state", "/tmp/fbwifi") | 	state = uci.cursor(nil, "/var/state") | ||||||
| 
 | 
 | ||||||
| 	for key, value in pairs(client) do | 	for key, value in pairs(client) do | ||||||
| 		if | 		if | ||||||
| @@ -63,7 +62,7 @@ function fbwifi.instate_client_rule( token, client_mac ) | |||||||
| 
 | 
 | ||||||
| 	log.syslog(log.LOG_INFO, "[fbwifi] Validating client "..client_mac) | 	log.syslog(log.LOG_INFO, "[fbwifi] Validating client "..client_mac) | ||||||
| 
 | 
 | ||||||
| 	state = uci.cursor("/var/state", "/tmp/fbwifi") | 	state = uci.cursor(nil, "/var/state") | ||||||
| 	state_name = "token_" .. token | 	state_name = "token_" .. token | ||||||
| 
 | 
 | ||||||
| 	RULE_COND="iptables -w -L FBWIFI_CLIENT_TO_INTERNET -t mangle | grep -i -q \"%s\"" | 	RULE_COND="iptables -w -L FBWIFI_CLIENT_TO_INTERNET -t mangle | grep -i -q \"%s\"" | ||||||
| @@ -91,9 +90,8 @@ function fbwifi.instate_client_rule( token, client_mac ) | |||||||
| 		log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Failed to update iptables (%s)", res ) ) | 		log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Failed to update iptables (%s)", res ) ) | ||||||
| 	end | 	end | ||||||
| 	log.syslog(log.LOG_INFO, "[fbwifi] "..RULE) | 	log.syslog(log.LOG_INFO, "[fbwifi] "..RULE) | ||||||
| 
 | 	 | ||||||
| 	state:save('fbwifi') | 	state:save('fbwifi') | ||||||
| 	state:commit('fbwifi') |  | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function fbwifi.revoke_client_rule( token ) | function fbwifi.revoke_client_rule( token ) | ||||||
| @@ -105,7 +103,7 @@ function fbwifi.revoke_client_rule( token ) | |||||||
| 
 | 
 | ||||||
| 	log.syslog(log.LOG_INFO, string.format( "[fbwifi] Invalidating token (%s)", token) ) | 	log.syslog(log.LOG_INFO, string.format( "[fbwifi] Invalidating token (%s)", token) ) | ||||||
| 
 | 
 | ||||||
| 	state = uci.cursor("/var/state", "/tmp/fbwifi") | 	state = uci.cursor(nil, "/var/state") | ||||||
| 	state_name = "token_" .. token | 	state_name = "token_" .. token | ||||||
| 	 | 	 | ||||||
| 	client_mac = state:get("fbwifi", state_name, "mac") | 	client_mac = state:get("fbwifi", state_name, "mac") | ||||||
| @@ -126,7 +124,6 @@ function fbwifi.revoke_client_rule( token ) | |||||||
| 
 | 
 | ||||||
| 		state:delete("fbwifi", state_name) | 		state:delete("fbwifi", state_name) | ||||||
| 		state:save('fbwifi') | 		state:save('fbwifi') | ||||||
| 		state:commit('fbwifi') |  | ||||||
| 	else | 	else | ||||||
| 		log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Client MAC not found in DB (%s)", state_name ) ) | 		log.syslog(log.LOG_WARNING, string.format( "[fbwifi] Client MAC not found in DB (%s)", state_name ) ) | ||||||
| 	end | 	end | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| -- SPDX-License-Identifier: GPL-2.0-only | -- Copyright  | ||||||
| -- Copyright (c) Facebook, Inc. and its affiliates. | -- Licensed to the public under the GNU General Public License v2. | ||||||
| 
 | 
 | ||||||
| module("luci.controller.fbwifi", package.seeall) | module("luci.controller.fbwifi", package.seeall) | ||||||
| 
 | 
 | ||||||
| @@ -8,7 +8,7 @@ | |||||||
| <h1>Facebook Wi-Fi</h1> | <h1>Facebook Wi-Fi</h1> | ||||||
| <% | <% | ||||||
| 	require("uci") | 	require("uci") | ||||||
| 	state = uci.cursor("/var/state", "/tmp/fbwifi") | 	state = uci.cursor(nil, "/var/state") | ||||||
| 	url = state:get("fbwifi", "main", "captive_portal_config_url") | 	url = state:get("fbwifi", "main", "captive_portal_config_url") | ||||||
| %> | %> | ||||||
| <a href="<% print(url) %>">Configure FB business page</a> | <a href="<% print(url) %>">Configure FB business page</a> | ||||||
| @@ -26,7 +26,6 @@ enable) | |||||||
| 	uci set uhttpd.fbwifi_redirect=uhttpd | 	uci set uhttpd.fbwifi_redirect=uhttpd | ||||||
| 	uci set uhttpd.fbwifi_redirect.enabled=1 | 	uci set uhttpd.fbwifi_redirect.enabled=1 | ||||||
| 	uci set uhttpd.fbwifi_redirect.cert='/tmp/fbwifi/https_server_cert' | 	uci set uhttpd.fbwifi_redirect.cert='/tmp/fbwifi/https_server_cert' | ||||||
| 	uci set uhttpd.fbwifi_redirect.home='/dev/null' |  | ||||||
| 	uci set uhttpd.fbwifi_redirect.json_script='/tmp/fbwifi/uhttpd-redirect.json' | 	uci set uhttpd.fbwifi_redirect.json_script='/tmp/fbwifi/uhttpd-redirect.json' | ||||||
| 	uci set uhttpd.fbwifi_redirect.key='/tmp/fbwifi/https_server_key' | 	uci set uhttpd.fbwifi_redirect.key='/tmp/fbwifi/https_server_key' | ||||||
| 	uci set uhttpd.fbwifi_redirect.listen_http='0.0.0.0:2060' | 	uci set uhttpd.fbwifi_redirect.listen_http='0.0.0.0:2060' | ||||||
| @@ -40,7 +39,7 @@ enable) | |||||||
| reload) | reload) | ||||||
| 	/usr/sbin/fbwifi_get_config | 	/usr/sbin/fbwifi_get_config | ||||||
| 
 | 
 | ||||||
| 	login_url=$(uci -c /var/state get fbwifi.main.captive_portal_url) | 	login_url=$(uci -p /var/state get fbwifi.main.captive_portal_url) | ||||||
| 	[ -z "$login_url" ] && { | 	[ -z "$login_url" ] && { | ||||||
| 		logger -t fbwifi "captive_portal_url not available yet" | 		logger -t fbwifi "captive_portal_url not available yet" | ||||||
| 		exit 1 | 		exit 1 | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| echo -e "Runtime configuration and token DB\n" | echo -e "Runtime configuration and token DB\n" | ||||||
| uci -c /var/state export fbwifi | uci -p /var/state export fbwifi | ||||||
| 
 | 
 | ||||||
| echo -e "\nDynamic firewall flow rules\n" | echo -e "\nDynamic firewall flow rules\n" | ||||||
| iptables -t mangle -L FBWIFI_CLIENT_TO_INTERNET | iptables -t mangle -L FBWIFI_CLIENT_TO_INTERNET | ||||||
| @@ -8,7 +8,7 @@ require("uci") | |||||||
| fbwifi = require("fbwifi") | fbwifi = require("fbwifi") | ||||||
| 
 | 
 | ||||||
| GATEWAY_TOKEN = fbwifi.gateway_token() | GATEWAY_TOKEN = fbwifi.gateway_token() | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") | state = uci.cursor(nil, "/var/state") | ||||||
| 
 | 
 | ||||||
| payload="name="..socket.dns.gethostname() | payload="name="..socket.dns.gethostname() | ||||||
| 
 | 
 | ||||||
| @@ -19,7 +19,6 @@ function queue_ssid_update(iface) | |||||||
|             for line in file:lines() do |             for line in file:lines() do | ||||||
| 		payload=payload.."&bssid[]="..line | 		payload=payload.."&bssid[]="..line | ||||||
|             end |             end | ||||||
| 	    file:close() |  | ||||||
| 	    payload=payload.."ssid[]="..iface["ssid"] | 	    payload=payload.."ssid[]="..iface["ssid"] | ||||||
|         else |         else | ||||||
| 	    log.syslog(log.LOG_WARNING, "[fbwifi] Failed to find BSSID for interface br-"..iface["network"]) | 	    log.syslog(log.LOG_WARNING, "[fbwifi] Failed to find BSSID for interface br-"..iface["network"]) | ||||||
| @@ -10,10 +10,7 @@ GATEWAY_TOKEN = fbwifi.gateway_token() | |||||||
| http_port = uci.get("fbwifi.main.http_port") | http_port = uci.get("fbwifi.main.http_port") | ||||||
| https_port = uci.get("fbwifi.main.https_port") | https_port = uci.get("fbwifi.main.https_port") | ||||||
| 
 | 
 | ||||||
| statefile = assert(io.open("/var/state/fbwifi", "a"), "could not create state file") | state = uci.cursor(nil, "/var/state") | ||||||
| statefile:close() |  | ||||||
| 
 |  | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") |  | ||||||
| 
 | 
 | ||||||
| URL="https://api.fbwifi.com/v2.0/gateway" | URL="https://api.fbwifi.com/v2.0/gateway" | ||||||
| body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN.."&fields=config,config_version") | body, code, headers = http.request(URL.."?access_token="..GATEWAY_TOKEN.."&fields=config,config_version") | ||||||
| @@ -103,9 +100,7 @@ result = os.execute("iptables -t mangle -F FBWIFI_TRAFFIC_ALLOWLIST ") | |||||||
| table.foreach(obj['config']['traffic_allowlist'], process_traffic_rule) | table.foreach(obj['config']['traffic_allowlist'], process_traffic_rule) | ||||||
| table.foreach(obj['config']['cross_origin_allowlist'], process_cross_origin_rule) | table.foreach(obj['config']['cross_origin_allowlist'], process_cross_origin_rule) | ||||||
| table.foreach(obj['config']['urls'], process_url) | table.foreach(obj['config']['urls'], process_url) | ||||||
| 
 |  | ||||||
| state:set("fbwifi", "main", "cross_origin_allow_rules", cross_origin_list) | state:set("fbwifi", "main", "cross_origin_allow_rules", cross_origin_list) | ||||||
| state:set("fbwifi", "main", "config_version", obj['config_version']) |  | ||||||
| 
 | 
 | ||||||
|  | state:set("fbwifi", "main", "config_version", obj['config_version']) | ||||||
| state:save('fbwifi') | state:save('fbwifi') | ||||||
| state:commit('fbwifi') |  | ||||||
| @@ -6,7 +6,7 @@ log = require("posix.syslog") | |||||||
| fbwifi = require("fbwifi") | fbwifi = require("fbwifi") | ||||||
| require("uci") | require("uci") | ||||||
| 
 | 
 | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") | state = uci.cursor(nil, "/var/state") | ||||||
| GATEWAY_TOKEN = fbwifi.gateway_token() | GATEWAY_TOKEN = fbwifi.gateway_token() | ||||||
| 
 | 
 | ||||||
| request = {  | request = {  | ||||||
| @@ -36,7 +36,7 @@ URL="https://api.fbwifi.com/v2.0/tokens" | |||||||
| BODY=string.format( | BODY=string.format( | ||||||
| 	"tokens=%s&traffic_type=%s&config_version=%s", | 	"tokens=%s&traffic_type=%s&config_version=%s", | ||||||
| 	json.encode(request.tokens), | 	json.encode(request.tokens), | ||||||
| 	"total", | 	"'total'", | ||||||
| 	state:get("fbwifi", "main", "config_version") | 	state:get("fbwifi", "main", "config_version") | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| @@ -0,0 +1,67 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | IPT4="/usr/sbin/iptables" | ||||||
|  |  | ||||||
|  | fbwifi_http_port="$(uci get fbwifi.main.http_port)" | ||||||
|  | [ -n "$fbwifi_http_port" ] || { | ||||||
|  | 	logger -t fbwifi "required option http_port not set" | ||||||
|  | 	exit 1 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | fbwifi_https_port="$(uci get fbwifi.main.https_port)" | ||||||
|  | [ -n "$fbwifi_https_port" ] || { | ||||||
|  | 	logger -t fbwifi "required option https_port not set" | ||||||
|  | 	exit 1 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | fbwifi_zone="$(uci get fbwifi.main.zone)" | ||||||
|  | [ -n "$fbwifi_zone" ] || { | ||||||
|  | 	logger -t fbwifi "required option zone  not set" | ||||||
|  | 	exit 1 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | fbwifi_ifaces="$(fw3 -q zone "$fbwifi_zone")" | ||||||
|  |  | ||||||
|  | ## Create custom chains | ||||||
|  | $IPT4 -t filter -N FBWIFI_FORWARD 2>/dev/null | ||||||
|  | $IPT4 -t filter -N FBWIFI_INPUT 2>/dev/null | ||||||
|  | $IPT4 -t mangle -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null | ||||||
|  | $IPT4 -t mangle -N FBWIFI_PREROUTING 2>/dev/null | ||||||
|  | $IPT4 -t mangle -N FBWIFI_TRAFFIC_ALLOWLIST 2>/dev/null | ||||||
|  | $IPT4 -t nat -N FBWIFI_CLIENT_TO_INTERNET 2>/dev/null | ||||||
|  | $IPT4 -t nat -N FBWIFI_PREROUTING 2>/dev/null | ||||||
|  | $IPT4 -t nat -N FBWIFI_HOST_REDIRLIST 2>/dev/null | ||||||
|  |  | ||||||
|  | ## Flush custom chains | ||||||
|  | $IPT4 -t filter -F FBWIFI_FORWARD | ||||||
|  | $IPT4 -t filter -F FBWIFI_INPUT | ||||||
|  | $IPT4 -t mangle -F FBWIFI_CLIENT_TO_INTERNET | ||||||
|  | $IPT4 -t mangle -F FBWIFI_PREROUTING | ||||||
|  | $IPT4 -t mangle -F FBWIFI_TRAFFIC_ALLOWLIST | ||||||
|  | $IPT4 -t nat -F FBWIFI_CLIENT_TO_INTERNET | ||||||
|  | $IPT4 -t nat -F FBWIFI_PREROUTING | ||||||
|  | $IPT4 -t nat -F FBWIFI_HOST_REDIRLIST | ||||||
|  |  | ||||||
|  | ## Populate custom chains | ||||||
|  | $IPT4 -t filter -A FBWIFI_FORWARD -p udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT | ||||||
|  | $IPT4 -t filter -A FBWIFI_FORWARD -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT | ||||||
|  | $IPT4 -t filter -A FBWIFI_FORWARD -j REJECT | ||||||
|  | $IPT4 -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_http_port" -m conntrack --ctstate NEW -j ACCEPT | ||||||
|  | $IPT4 -t filter -A FBWIFI_INPUT -p tcp --dport "$fbwifi_https_port"  -m conntrack --ctstate NEW -j ACCEPT | ||||||
|  | $IPT4 -t mangle -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET | ||||||
|  | $IPT4 -t mangle -A FBWIFI_PREROUTING -j FBWIFI_TRAFFIC_ALLOWLIST | ||||||
|  | $IPT4 -t nat -A FBWIFI_PREROUTING -j FBWIFI_CLIENT_TO_INTERNET | ||||||
|  | $IPT4 -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST | ||||||
|  | $IPT4 -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -j FBWIFI_HOST_REDIRLIST | ||||||
|  | $IPT4 -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT | ||||||
|  | $IPT4 -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 443 -m conntrack --ctstate NEW -m mark --mark 0xfb -j ACCEPT | ||||||
|  | $IPT4 -t nat -A FBWIFI_CLIENT_TO_INTERNET -p tcp --dport 80 -m conntrack --ctstate NEW -j REDIRECT --to-ports "$fbwifi_http_port" | ||||||
|  |  | ||||||
|  | ## Hook custom chains in firewall3 chains | ||||||
|  | $IPT4 -t filter -I "zone_${fbwifi_zone}_input" 2 -j FBWIFI_INPUT | ||||||
|  | $IPT4 -t filter -I "zone_${fbwifi_zone}_forward" 2 -j FBWIFI_FORWARD | ||||||
|  | $IPT4 -t nat -I "zone_${fbwifi_zone}_prerouting" 2 -j FBWIFI_PREROUTING | ||||||
|  | # There are no firewall3 zone chains in the mangle table so we need to do this for all interfaces in the zone | ||||||
|  | for iface in $fbwifi_ifaces; do | ||||||
|  | 	$IPT4 -t mangle -I PREROUTING -i "$iface" -j FBWIFI_PREROUTING | ||||||
|  | done | ||||||
| @@ -3,7 +3,7 @@ require("uci") | |||||||
| log = require("posix.syslog") | log = require("posix.syslog") | ||||||
| fbwifi = require("fbwifi") | fbwifi = require("fbwifi") | ||||||
| 
 | 
 | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") | state = uci.cursor(nil, "/var/state") | ||||||
| function process_cors() | function process_cors() | ||||||
| 	origin = os.getenv("HTTP_ORIGIN") | 	origin = os.getenv("HTTP_ORIGIN") | ||||||
| 	log.syslog(log.LOG_INFO, string.format("[fbwifi] [auth] process_cors origin %s", origin or 'not found') ) | 	log.syslog(log.LOG_INFO, string.format("[fbwifi] [auth] process_cors origin %s", origin or 'not found') ) | ||||||
| @@ -25,7 +25,7 @@ end | |||||||
| method = os.getenv("REQUEST_METHOD") | method = os.getenv("REQUEST_METHOD") | ||||||
| if method == 'GET' then | if method == 'GET' then | ||||||
| 	log.syslog(log.LOG_INFO, "[fbwifi] [auth] GET handler") | 	log.syslog(log.LOG_INFO, "[fbwifi] [auth] GET handler") | ||||||
| 	print("Status: 302 Found") | 	print("Status: 302") | ||||||
| 	print("Location: "..state:get("fbwifi", "main", "landing_page_url")) | 	print("Location: "..state:get("fbwifi", "main", "landing_page_url")) | ||||||
| 	process_cors() | 	process_cors() | ||||||
| 	print ('\n') | 	print ('\n') | ||||||
| @@ -35,7 +35,7 @@ elseif method == 'POST' then | |||||||
| 	 | 	 | ||||||
| 	log.syslog(log.LOG_INFO, "[fbwifi] [auth] POST handler") | 	log.syslog(log.LOG_INFO, "[fbwifi] [auth] POST handler") | ||||||
| 	process_cors() | 	process_cors() | ||||||
| 	print("Status: 200 OK") | 	print("Status: 200") | ||||||
| 
 | 
 | ||||||
| 	form_data=io.read() | 	form_data=io.read() | ||||||
| 	while form_data do | 	while form_data do | ||||||
| @@ -43,9 +43,8 @@ elseif method == 'POST' then | |||||||
| 		if string.len(token or '') > 14 then | 		if string.len(token or '') > 14 then | ||||||
| 
 | 
 | ||||||
| 			client = os.getenv("REMOTE_ADDR") | 			client = os.getenv("REMOTE_ADDR") | ||||||
| 			f = io.popen("awk '/"..client..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | 			f = io.popen("awk '/"..client.."/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | ||||||
| 			client_mac = assert(f:read('*a')) | 			client_mac = assert(f:read('*a')) | ||||||
| 			f:close() |  | ||||||
| 
 | 
 | ||||||
| 			if fbwifi.validate_token(token) then | 			if fbwifi.validate_token(token) then | ||||||
|                                 log.syslog(log.LOG_INFO, string.format( "[fbwifi] [auth] POST handler : Validating Token (%s) for MAC (%s)", token or 'nil', client_mac or 'nil') ) |                                 log.syslog(log.LOG_INFO, string.format( "[fbwifi] [auth] POST handler : Validating Token (%s) for MAC (%s)", token or 'nil', client_mac or 'nil') ) | ||||||
| @@ -2,7 +2,7 @@ | |||||||
| json = require("cjson") | json = require("cjson") | ||||||
| require("uci") | require("uci") | ||||||
| 
 | 
 | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") | state = uci.cursor(nil, "/var/state") | ||||||
| client_mac = "" | client_mac = "" | ||||||
| token = "" | token = "" | ||||||
| 
 | 
 | ||||||
| @@ -22,9 +22,8 @@ function map_remote_mac_to_token(client) | |||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function hasValidToken(client_ip) | function hasValidToken(client_ip) | ||||||
| 	f = io.popen("awk '/"..client_ip..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | 	f = io.popen("awk '/"..client_ip.."/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | ||||||
| 	client_mac = assert(f:read('*a')) | 	client_mac = assert(f:read('*a')) | ||||||
| 	f:close() |  | ||||||
| 	state:foreach("fbwifi", "client", map_remote_mac_to_token) | 	state:foreach("fbwifi", "client", map_remote_mac_to_token) | ||||||
| 
 | 
 | ||||||
| 	return 0 < string.len(token) | 	return 0 < string.len(token) | ||||||
| @@ -1,8 +1,10 @@ | |||||||
| #!/usr/bin/lua | #!/usr/bin/lua | ||||||
|  | require "luci.cacheloader" | ||||||
|  | require "luci.sgi.cgi" | ||||||
| json = require("cjson") | json = require("cjson") | ||||||
| fbwifi = require("fbwifi") | fbwifi = require("fbwifi") | ||||||
| 
 | 
 | ||||||
| state = uci.cursor("/var/state", "/tmp/fbwifi") | state = uci.cursor(nil, "/var/state") | ||||||
| GATEWAY_TOKEN = fbwifi.gateway_token() | GATEWAY_TOKEN = fbwifi.gateway_token() | ||||||
| 
 | 
 | ||||||
| response = { api_version = "2.0", token = json.null } | response = { api_version = "2.0", token = json.null } | ||||||
| @@ -36,9 +38,8 @@ function map_remote_mac_to_token(client) | |||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function getClientToken(client_ip) | function getClientToken(client_ip) | ||||||
| 	f = io.popen("awk '/"..client_ip..".*0x2/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | 	f = io.popen("awk '/"..client_ip.."/ { printf(\"%s\", $4) }' /proc/net/arp", 'r') | ||||||
| 	client_mac = assert(f:read('*a')) | 	client_mac = assert(f:read('*a')) | ||||||
| 	f:close() |  | ||||||
| 
 | 
 | ||||||
| 	state:foreach("fbwifi", "client", map_remote_mac_to_token) | 	state:foreach("fbwifi", "client", map_remote_mac_to_token) | ||||||
| end | end | ||||||
| @@ -1,42 +0,0 @@ | |||||||
| # |  | ||||||
| # Copyright (C) 2016 LEDE |  | ||||||
| # |  | ||||||
| # This is free software, licensed under the GNU General Public License v2. |  | ||||||
| # See /LICENSE for more information. |  | ||||||
| # |  | ||||||
|  |  | ||||||
| include $(TOPDIR)/rules.mk |  | ||||||
| include $(INCLUDE_DIR)/kernel.mk |  | ||||||
|  |  | ||||||
| PKG_NAME:=sched-cake |  | ||||||
| PKG_RELEASE:=1 |  | ||||||
|  |  | ||||||
| PKG_SOURCE_PROTO:=git |  | ||||||
| PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git |  | ||||||
| PKG_SOURCE_DATE:=2021-07-09 |  | ||||||
| PKG_SOURCE_VERSION:=d9e1398cc9091e9e7c7a740361e4617b75c24427 |  | ||||||
| #PKG_MIRROR_HASH:=5bf06a804824db36ae393fc174aeec7b12633176e05a765c0931b39df5bd34df |  | ||||||
| PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> |  | ||||||
|  |  | ||||||
| include $(INCLUDE_DIR)/package.mk |  | ||||||
|  |  | ||||||
| define KernelPackage/sched-cake |  | ||||||
|   SUBMENU:=Network Support |  | ||||||
|   TITLE:=Cake fq_codel/blue derived shaper |  | ||||||
|   URL:=https://github.com/dtaht/sch_cake |  | ||||||
|   FILES:=$(PKG_BUILD_DIR)/sch_cake.ko |  | ||||||
|   AUTOLOAD:=$(call AutoLoad,75,sch_cake) |  | ||||||
|   DEPENDS:=+kmod-ipt-conntrack |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| include $(INCLUDE_DIR)/kernel-defaults.mk |  | ||||||
|  |  | ||||||
| define KernelPackage/sched-cake/description |  | ||||||
|   Common Applications Kept Enhanced fq_codel/blue derived shaper |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| define Build/Compile |  | ||||||
| 	$(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| $(eval $(call KernelPackage,sched-cake)) |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| Index: sched-cake-2021-07-09-d9e1398c/cobalt_compat.h |  | ||||||
| =================================================================== |  | ||||||
| --- sched-cake-2021-07-09-d9e1398c.orig/cobalt_compat.h |  | ||||||
| +++ sched-cake-2021-07-09-d9e1398c/cobalt_compat.h |  | ||||||
| @@ -95,15 +95,6 @@ static inline unsigned int __tcp_hdrlen( |  | ||||||
|  } |  | ||||||
|  #endif |  | ||||||
|   |  | ||||||
| -#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE |  | ||||||
| -static inline int skb_try_make_writable(struct sk_buff *skb, |  | ||||||
| -					unsigned int write_len) |  | ||||||
| -{ |  | ||||||
| -	return skb_cloned(skb) && !skb_clone_writable(skb, write_len) && |  | ||||||
| -	       pskb_expand_head(skb, 0, 0, GFP_ATOMIC); |  | ||||||
| -} |  | ||||||
| -#endif |  | ||||||
| - |  | ||||||
|  #if KERNEL_VERSION(4, 11, 0) > LINUX_VERSION_CODE |  | ||||||
|  static inline int skb_mac_offset(const struct sk_buff *skb) |  | ||||||
|  { |  | ||||||
| @@ -6,7 +6,7 @@ PKG_SOURCE_PROTO:=git | |||||||
| PKG_BRANCH:=master | PKG_BRANCH:=master | ||||||
| PKG_RELEASE:=2 | PKG_RELEASE:=2 | ||||||
| PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients/ | PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients/ | ||||||
| PKG_VERSION:=153998d70fdba508a59a28c13a606032cbf32686 | PKG_VERSION:=9136ef60bf68ceed760781d3acbeddb05470e432 | ||||||
|  |  | ||||||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||||||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||||||
| @@ -18,12 +18,23 @@ MAKE_OPTS:= | |||||||
| include $(INCLUDE_DIR)/package.mk | include $(INCLUDE_DIR)/package.mk | ||||||
|  |  | ||||||
| # Keep default as ipq806x for branches that does not have subtarget framework | # Keep default as ipq806x for branches that does not have subtarget framework | ||||||
|  | ifeq ($(CONFIG_TARGET_ipq),y) | ||||||
| subtarget:=$(SUBTARGET) | subtarget:=$(SUBTARGET) | ||||||
|  | else | ||||||
|  | subtarget:=$(CONFIG_TARGET_BOARD) | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_ipq807x" "ipq60xx" "ipq807x_ipq60xx")) | ||||||
| # DTLS Manager v2.0 for Hawkeye/Cypress | # DTLS Manager v2.0 for Hawkeye/Cypress | ||||||
|   DTLSMGR_DIR:=v2.0 |   DTLSMGR_DIR:=v2.0 | ||||||
| # IPsec Manager v2.0 for Hawkeye/Cypress | # IPsec Manager v2.0 for Hawkeye/Cypress | ||||||
|   IPSECMGR_DIR:=v2.0 |   IPSECMGR_DIR:=v2.0 | ||||||
|  | else | ||||||
|  | # DTLS Manager v1.0 for Akronite. | ||||||
|  |   DTLSMGR_DIR:=v1.0 | ||||||
|  | # IPsec Manager v1.0 for Akronite. | ||||||
|  |   IPSECMGR_DIR:=v1.0 | ||||||
|  | endif | ||||||
|  |  | ||||||
| define KernelPackage/qca-nss-drv-tun6rd | define KernelPackage/qca-nss-drv-tun6rd | ||||||
|   SECTION:=kernel |   SECTION:=kernel | ||||||
| @@ -426,20 +437,6 @@ define Build/InstallDev/qca-nss-clients | |||||||
| 	$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-clients/ | 	$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-clients/ | ||||||
| endef | endef | ||||||
|  |  | ||||||
| define KernelPackage/qca-nss-drv-wifi-meshmgr |  | ||||||
|   SECTION:=kernel |  | ||||||
|   CATEGORY:=Kernel modules |  | ||||||
|   SUBMENU:=Network Devices |  | ||||||
|   DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 |  | ||||||
|   TITLE:=NSS WiFi-Mesh Manager for QCA NSS driver |  | ||||||
|   FILES:=$(PKG_BUILD_DIR)/wifi_meshmgr/qca-nss-wifi-meshmgr.ko |  | ||||||
|   AUTOLOAD:=$(call AutoLoad,51,qca-nss-wifi-meshmgr) |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| define KernelPackage/qca-nss-drv-wifi-meshmgr/Description |  | ||||||
| Kernel module for WiFi Mesh manager |  | ||||||
| endef |  | ||||||
|  |  | ||||||
| define Build/InstallDev | define Build/InstallDev | ||||||
| 	$(call Build/InstallDev/qca-nss-clients,$(1)) | 	$(call Build/InstallDev/qca-nss-clients,$(1)) | ||||||
| endef | endef | ||||||
| @@ -588,10 +585,6 @@ ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-mirror),) | |||||||
| MAKE_OPTS+=mirror=y | MAKE_OPTS+=mirror=y | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-wifi-meshmgr),) |  | ||||||
| MAKE_OPTS+=wifi-meshmgr=y |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| define Build/Compile | define Build/Compile | ||||||
| 	$(MAKE) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \ | 	$(MAKE) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \ | ||||||
| 		CROSS_COMPILE="$(TARGET_CROSS)" \ | 		CROSS_COMPILE="$(TARGET_CROSS)" \ | ||||||
| @@ -631,4 +624,3 @@ $(eval $(call KernelPackage,qca-nss-drv-vxlanmgr)) | |||||||
| $(eval $(call KernelPackage,qca-nss-drv-match)) | $(eval $(call KernelPackage,qca-nss-drv-match)) | ||||||
| #$(eval $(call KernelPackage,qca-nss-drv-tlsmgr)) | #$(eval $(call KernelPackage,qca-nss-drv-tlsmgr)) | ||||||
| $(eval $(call KernelPackage,qca-nss-drv-mirror)) | $(eval $(call KernelPackage,qca-nss-drv-mirror)) | ||||||
| $(eval $(call KernelPackage,qca-nss-drv-wifi-meshmgr)) |  | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ NSS_DP_INCLUDE += -I$(obj)/hal/gmac_hal_ops/syn/gmac | |||||||
| endif | endif | ||||||
|  |  | ||||||
| ccflags-y += $(NSS_DP_INCLUDE) | ccflags-y += $(NSS_DP_INCLUDE) | ||||||
| ccflags-y += -Wall -Werror | ccflags-y += -Werror | ||||||
|  |  | ||||||
| ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64 ipq60xx ipq60xx_64)) | ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64 ipq60xx ipq60xx_64)) | ||||||
| ccflags-y += -DNSS_DP_PPE_SUPPORT | ccflags-y += -DNSS_DP_PPE_SUPPORT | ||||||
| @@ -43,7 +43,7 @@ endif | |||||||
|  |  | ||||||
| ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64)) | ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64)) | ||||||
| qca-nss-dp-objs += hal/arch/ipq807x/nss_ipq807x.o | qca-nss-dp-objs += hal/arch/ipq807x/nss_ipq807x.o | ||||||
| ccflags-y += -DNSS_DP_IPQ807X -DNSS_DP_EDMA_TX_SMALL_PKT_WAR | ccflags-y += -DNSS_DP_IPQ807X | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64)) | ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64)) | ||||||
|   | |||||||
| @@ -68,13 +68,8 @@ static void nss_dp_hal_tcsr_set(void) | |||||||
| 	 * If TZ is not enabled, we can write to the register directly. | 	 * If TZ is not enabled, we can write to the register directly. | ||||||
| 	 */ | 	 */ | ||||||
| 	if (qcom_scm_is_available()) { | 	if (qcom_scm_is_available()) { | ||||||
| #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) |  | ||||||
| 		err = qcom_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET), | 		err = qcom_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET), | ||||||
| 						TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE); | 						TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE); | ||||||
| #else |  | ||||||
| 		err = qti_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET), |  | ||||||
| 						TCSR_GMAC_AXI_CACHE_OVERRIDE_VALUE); |  | ||||||
| #endif |  | ||||||
| 		if (err) { | 		if (err) { | ||||||
| 			pr_err("%s: SCM TCSR write error: %d\n", __func__, err); | 			pr_err("%s: SCM TCSR write error: %d\n", __func__, err); | ||||||
| 		} | 		} | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| /* | /* | ||||||
|  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for any |  * Permission to use, copy, modify, and/or distribute this software for any | ||||||
|  * purpose with or without fee is hereby granted, provided that the above |  * purpose with or without fee is hereby granted, provided that the above | ||||||
| @@ -67,76 +67,6 @@ void edma_reg_write(uint32_t reg_off, uint32_t val) | |||||||
| 	writel(val, edma_hw.reg_base + reg_off); | 	writel(val, edma_hw.reg_base + reg_off); | ||||||
| } | } | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * edma_disable_interrupts() |  | ||||||
|  *	Disable EDMA RX/TX interrupt masks. |  | ||||||
|  */ |  | ||||||
| static void edma_disable_interrupts(void) |  | ||||||
| { |  | ||||||
| 	struct edma_rxdesc_ring *rxdesc_ring = NULL; |  | ||||||
| 	struct edma_rxfill_ring *rxfill_ring = NULL; |  | ||||||
| 	struct edma_txcmpl_ring *txcmpl_ring = NULL; |  | ||||||
| 	int i; |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.rxdesc_rings; i++) { |  | ||||||
| 		rxdesc_ring = &edma_hw.rxdesc_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id), |  | ||||||
| 			       EDMA_MASK_INT_CLEAR); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.txcmpl_rings; i++) { |  | ||||||
| 		txcmpl_ring = &edma_hw.txcmpl_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id), |  | ||||||
| 			       EDMA_MASK_INT_CLEAR); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.rxfill_rings; i++) { |  | ||||||
| 		rxfill_ring = &edma_hw.rxfill_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id), |  | ||||||
| 			       EDMA_MASK_INT_CLEAR); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/* |  | ||||||
| 	 * Clear MISC interrupt mask. |  | ||||||
| 	 */ |  | ||||||
| 	edma_reg_write(EDMA_REG_MISC_INT_MASK, EDMA_MASK_INT_CLEAR); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * edma_enable_interrupts() |  | ||||||
|  *	Enable RX/TX EDMA interrupt masks. |  | ||||||
|  */ |  | ||||||
| static void edma_enable_interrupts(void) |  | ||||||
| { |  | ||||||
| 	struct edma_rxdesc_ring *rxdesc_ring = NULL; |  | ||||||
| 	struct edma_rxfill_ring *rxfill_ring = NULL; |  | ||||||
| 	struct edma_txcmpl_ring *txcmpl_ring = NULL; |  | ||||||
| 	int i; |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.rxfill_rings; i++) { |  | ||||||
| 		rxfill_ring = &edma_hw.rxfill_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id), |  | ||||||
| 				edma_hw.rxfill_intr_mask); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.txcmpl_rings; i++) { |  | ||||||
| 		txcmpl_ring = &edma_hw.txcmpl_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id), |  | ||||||
| 				edma_hw.txcmpl_intr_mask); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < edma_hw.rxdesc_rings; i++) { |  | ||||||
| 		rxdesc_ring = &edma_hw.rxdesc_ring[i]; |  | ||||||
| 		edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id), |  | ||||||
| 				edma_hw.rxdesc_intr_mask); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/* |  | ||||||
| 	 * Enable MISC interrupt mask. |  | ||||||
| 	 */ |  | ||||||
| 	edma_reg_write(EDMA_REG_MISC_INT_MASK, edma_hw.misc_intr_mask); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * nss_dp_edma_if_open() |  * nss_dp_edma_if_open() | ||||||
|  *	Do slow path data plane open |  *	Do slow path data plane open | ||||||
| @@ -155,12 +85,6 @@ static int edma_if_open(struct nss_dp_data_plane_ctx *dpc, | |||||||
| 		return NSS_DP_SUCCESS; | 		return NSS_DP_SUCCESS; | ||||||
|  |  | ||||||
| 	napi_enable(&edma_hw.napi); | 	napi_enable(&edma_hw.napi); | ||||||
|  |  | ||||||
| 	/* |  | ||||||
| 	 * Enable the interrupt masks. |  | ||||||
| 	 */ |  | ||||||
| 	edma_enable_interrupts(); |  | ||||||
|  |  | ||||||
| 	return NSS_DP_SUCCESS; | 	return NSS_DP_SUCCESS; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -173,11 +97,6 @@ static int edma_if_close(struct nss_dp_data_plane_ctx *dpc) | |||||||
| 	if (--edma_hw.active != 0) | 	if (--edma_hw.active != 0) | ||||||
| 		return NSS_DP_SUCCESS; | 		return NSS_DP_SUCCESS; | ||||||
|  |  | ||||||
| 	/* |  | ||||||
| 	 * Disable the interrupt masks. |  | ||||||
| 	 */ |  | ||||||
| 	edma_disable_interrupts(); |  | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Disable NAPI | 	 * Disable NAPI | ||||||
| 	 */ | 	 */ | ||||||
| @@ -392,6 +311,9 @@ static int edma_if_deinit(struct nss_dp_data_plane_ctx *dpc) | |||||||
|  */ |  */ | ||||||
| static int edma_irq_init(void) | static int edma_irq_init(void) | ||||||
| { | { | ||||||
|  | 	struct edma_rxdesc_ring *rxdesc_ring = NULL; | ||||||
|  | 	struct edma_rxfill_ring *rxfill_ring = NULL; | ||||||
|  | 	struct edma_txcmpl_ring *txcmpl_ring = NULL; | ||||||
| 	int err; | 	int err; | ||||||
| 	uint32_t entry_num, i; | 	uint32_t entry_num, i; | ||||||
|  |  | ||||||
| @@ -511,6 +433,28 @@ static int edma_irq_init(void) | |||||||
| 		goto misc_intr_req_fail; | 		goto misc_intr_req_fail; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	/* | ||||||
|  | 	 * Set interrupt mask | ||||||
|  | 	 */ | ||||||
|  | 	for (i = 0; i < edma_hw.rxfill_rings; i++) { | ||||||
|  | 		rxfill_ring = &edma_hw.rxfill_ring[i]; | ||||||
|  | 		edma_reg_write(EDMA_REG_RXFILL_INT_MASK(rxfill_ring->id), | ||||||
|  | 				edma_hw.rxfill_intr_mask); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	for (i = 0; i < edma_hw.txcmpl_rings; i++) { | ||||||
|  | 		txcmpl_ring = &edma_hw.txcmpl_ring[i]; | ||||||
|  | 		edma_reg_write(EDMA_REG_TX_INT_MASK(txcmpl_ring->id), | ||||||
|  | 				edma_hw.txcmpl_intr_mask); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	for (i = 0; i < edma_hw.rxdesc_rings; i++) { | ||||||
|  | 		rxdesc_ring = &edma_hw.rxdesc_ring[i]; | ||||||
|  | 		edma_reg_write(EDMA_REG_RXDESC_INT_MASK(rxdesc_ring->id), | ||||||
|  | 				edma_hw.rxdesc_intr_mask); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	edma_reg_write(EDMA_REG_MISC_INT_MASK, edma_hw.misc_intr_mask); | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
| misc_intr_req_fail: | misc_intr_req_fail: | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2016, 2018-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016, 2018-2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
| @@ -30,7 +30,7 @@ | |||||||
| #define EDMA_NAPI_WORK			100 | #define EDMA_NAPI_WORK			100 | ||||||
| #define EDMA_START_GMACS		NSS_DP_START_IFNUM | #define EDMA_START_GMACS		NSS_DP_START_IFNUM | ||||||
| #define EDMA_MAX_GMACS			NSS_DP_HAL_MAX_PORTS | #define EDMA_MAX_GMACS			NSS_DP_HAL_MAX_PORTS | ||||||
| #define EDMA_TX_PKT_MIN_SIZE		33	/* IPQ807x EDMA needs a minimum packet size of 33 bytes */ | #define EDMA_TX_PKT_MIN_SIZE		33 | ||||||
| #if defined(NSS_DP_IPQ60XX) | #if defined(NSS_DP_IPQ60XX) | ||||||
| #define EDMA_MAX_TXCMPL_RINGS		24	/* Max TxCmpl rings */ | #define EDMA_MAX_TXCMPL_RINGS		24	/* Max TxCmpl rings */ | ||||||
| #else | #else | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| /* | /* | ||||||
|  * Copyright (c) 2016-2018, 2020-21, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for any |  * Permission to use, copy, modify, and/or distribute this software for any | ||||||
|  * purpose with or without fee is hereby granted, provided that the above |  * purpose with or without fee is hereby granted, provided that the above | ||||||
| @@ -524,7 +524,7 @@ enum edma_tx edma_ring_xmit(struct edma_hw *ehw, | |||||||
| { | { | ||||||
| 	struct nss_dp_dev *dp_dev = netdev_priv(netdev); | 	struct nss_dp_dev *dp_dev = netdev_priv(netdev); | ||||||
| 	struct edma_txdesc_desc *txdesc = NULL; | 	struct edma_txdesc_desc *txdesc = NULL; | ||||||
| 	uint16_t buf_len; | 	uint16_t buf_len = skb_headlen(skb); | ||||||
| 	uint16_t hw_next_to_use, hw_next_to_clean, chk_idx; | 	uint16_t hw_next_to_use, hw_next_to_clean, chk_idx; | ||||||
| 	uint32_t data; | 	uint32_t data; | ||||||
| 	uint32_t store_index = 0; | 	uint32_t store_index = 0; | ||||||
| @@ -560,28 +560,6 @@ enum edma_tx edma_ring_xmit(struct edma_hw *ehw, | |||||||
| 		return EDMA_TX_DESC; | 		return EDMA_TX_DESC; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| #if defined(NSS_DP_EDMA_TX_SMALL_PKT_WAR) |  | ||||||
| 	/* |  | ||||||
| 	 * IPQ807x EDMA hardware can't process the packet if the packet size is |  | ||||||
| 	 * less than EDMA_TX_PKT_MIN_SIZE (33 Byte). So, if the packet size |  | ||||||
| 	 * is indeed less than EDMA_TX_PKT_MIN_SIZE, perform padding |  | ||||||
| 	 * (if possible), otherwise drop the packet. |  | ||||||
| 	 * Using skb_padto() API for padding the packet. This API will drop |  | ||||||
| 	 * the packet if the padding is not possible. |  | ||||||
| 	 */ |  | ||||||
| 	if (unlikely(skb->len < EDMA_TX_PKT_MIN_SIZE)) { |  | ||||||
| 		if (skb_padto(skb, EDMA_TX_PKT_MIN_SIZE)) { |  | ||||||
| 			netdev_dbg(netdev, "padding couldn't happen, skb is freed.\n"); |  | ||||||
| 			netdev->stats.tx_dropped++; |  | ||||||
| 			spin_unlock_bh(&txdesc_ring->tx_lock); |  | ||||||
| 			return EDMA_TX_OK; |  | ||||||
| 		} |  | ||||||
| 		skb->len = EDMA_TX_PKT_MIN_SIZE; |  | ||||||
| 	} |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| 	buf_len = skb_headlen(skb); |  | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Deliver the ptp packet to phy driver for TX timestamping | 	 * Deliver the ptp packet to phy driver for TX timestamping | ||||||
| 	 */ | 	 */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
| @@ -208,10 +208,6 @@ static int nss_dp_attr_set(struct net_device *dev, | |||||||
| 				struct switchdev_trans *trans) | 				struct switchdev_trans *trans) | ||||||
| { | { | ||||||
| 	struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(dev); | 	struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(dev); | ||||||
| 	struct net_device *upper_dev; |  | ||||||
| 	struct vlan_dev_priv *vlan; |  | ||||||
| 	struct list_head *iter; |  | ||||||
| 	uint32_t stp_state = attr->u.stp_state; |  | ||||||
|  |  | ||||||
| 	if (switchdev_trans_ph_prepare(trans)) | 	if (switchdev_trans_ph_prepare(trans)) | ||||||
| 		return 0; | 		return 0; | ||||||
| @@ -222,33 +218,7 @@ static int nss_dp_attr_set(struct net_device *dev, | |||||||
| 		netdev_dbg(dev, "set brport_flags %lu\n", attr->u.brport_flags); | 		netdev_dbg(dev, "set brport_flags %lu\n", attr->u.brport_flags); | ||||||
| 		return 0; | 		return 0; | ||||||
| 	case SWITCHDEV_ATTR_ID_PORT_STP_STATE: | 	case SWITCHDEV_ATTR_ID_PORT_STP_STATE: | ||||||
| 		/* | 		return nss_dp_stp_state_set(dp_priv, attr->u.stp_state); | ||||||
| 		 * The stp state is not changed to FAL_STP_DISABLED if |  | ||||||
| 		 * the net_device (dev) has any vlan configured. Otherwise |  | ||||||
| 		 * traffic on other vlan(s) will not work. |  | ||||||
| 		 * |  | ||||||
| 		 * Note: STP for VLANs is not supported by PPE. |  | ||||||
| 		 */ |  | ||||||
| 		if ((stp_state == BR_STATE_DISABLED) || |  | ||||||
| 			(stp_state == BR_STATE_BLOCKING)) { |  | ||||||
| 			rcu_read_lock(); |  | ||||||
| 			netdev_for_each_upper_dev_rcu(dev, upper_dev, iter) { |  | ||||||
| 				if (!is_vlan_dev(upper_dev)) |  | ||||||
| 					continue; |  | ||||||
|  |  | ||||||
| 				vlan = vlan_dev_priv(upper_dev); |  | ||||||
| 				if (vlan->real_dev == dev) { |  | ||||||
| 					rcu_read_unlock(); |  | ||||||
| 					netdev_dbg(dev, "Do not update stp state to: %u since vlan id: %d is configured on netdevice: %s\n", |  | ||||||
| 							stp_state, vlan->vlan_id, vlan->real_dev->name); |  | ||||||
| 					return 0; |  | ||||||
| 				} |  | ||||||
| 			} |  | ||||||
|  |  | ||||||
| 			rcu_read_unlock(); |  | ||||||
| 		} |  | ||||||
|  |  | ||||||
| 		return nss_dp_stp_state_set(dp_priv, stp_state); |  | ||||||
| 	default: | 	default: | ||||||
| 		return -EOPNOTSUPP; | 		return -EOPNOTSUPP; | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -46,7 +46,7 @@ ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64 | |||||||
| endif | endif | ||||||
| endef | endef | ||||||
|  |  | ||||||
| EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac -I$(STAGING_DIR)/usr/include/qca-nss-dp -I$(STAGING_DIR)/usr/include/qca-ssdk | EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac -I$(STAGING_DIR)/usr/include/qca-nss-dp | ||||||
|  |  | ||||||
| # Keeping default as ipq806x for branches that does not have subtarget framework | # Keeping default as ipq806x for branches that does not have subtarget framework | ||||||
| subtarget:=$(SUBTARGET) | subtarget:=$(SUBTARGET) | ||||||
|   | |||||||
| @@ -8,6 +8,8 @@ obj-m += qca-nss-drv.o | |||||||
| # List the files that belong to the driver in alphabetical order. | # List the files that belong to the driver in alphabetical order. | ||||||
| # | # | ||||||
| qca-nss-drv-objs := \ | qca-nss-drv-objs := \ | ||||||
|  | 			nss_bridge.o \ | ||||||
|  | 			nss_bridge_log.o \ | ||||||
| 			nss_cmn.o \ | 			nss_cmn.o \ | ||||||
| 			nss_core.o \ | 			nss_core.o \ | ||||||
| 			nss_coredump.o \ | 			nss_coredump.o \ | ||||||
| @@ -27,6 +29,16 @@ qca-nss-drv-objs := \ | |||||||
| 			nss_ipv4_stats.o \ | 			nss_ipv4_stats.o \ | ||||||
| 			nss_ipv4_strings.o \ | 			nss_ipv4_strings.o \ | ||||||
| 			nss_ipv4_log.o \ | 			nss_ipv4_log.o \ | ||||||
|  | 			nss_ipv4_reasm.o \ | ||||||
|  | 			nss_ipv4_reasm_stats.o \ | ||||||
|  | 			nss_ipv4_reasm_strings.o \ | ||||||
|  | 			nss_ipv6.o \ | ||||||
|  | 			nss_ipv6_stats.o \ | ||||||
|  | 			nss_ipv6_strings.o \ | ||||||
|  | 			nss_ipv6_log.o \ | ||||||
|  | 			nss_ipv6_reasm.o \ | ||||||
|  | 			nss_ipv6_reasm_stats.o \ | ||||||
|  | 			nss_ipv6_reasm_strings.o \ | ||||||
| 			nss_log.o \ | 			nss_log.o \ | ||||||
| 			nss_lso_rx.o \ | 			nss_lso_rx.o \ | ||||||
| 			nss_lso_rx_stats.o \ | 			nss_lso_rx_stats.o \ | ||||||
| @@ -58,48 +70,21 @@ qca-nss-drv-objs := \ | |||||||
| 			nss_wifi_log.o \ | 			nss_wifi_log.o \ | ||||||
| 			nss_wifi_stats.o \ | 			nss_wifi_stats.o \ | ||||||
| 			nss_wifi_vdev.o \ | 			nss_wifi_vdev.o \ | ||||||
|  | 			nss_wifi_if.o \ | ||||||
|  | 			nss_wifi_if_stats.o \ | ||||||
| 			nss_wifili.o \ | 			nss_wifili.o \ | ||||||
| 			nss_wifili_log.o \ | 			nss_wifili_log.o \ | ||||||
| 			nss_wifili_stats.o \ | 			nss_wifili_stats.o \ | ||||||
| 			nss_wifili_strings.o \ | 			nss_wifili_strings.o \ | ||||||
| 			nss_wifi_mac_db.o | 			nss_wifi_mac_db.o \ | ||||||
|  | 			nss_wifi_ext_vdev.o \ | ||||||
|  | 			nss_wifi_ext_vdev_stats.o \ | ||||||
|  | 			nss_wifi_ext_vdev_log.o | ||||||
|  |  | ||||||
| # Base NSS data plane/HAL support | # Base NSS data plane/HAL support | ||||||
| qca-nss-drv-objs += nss_data_plane/nss_data_plane_common.o | qca-nss-drv-objs += nss_data_plane/nss_data_plane_common.o | ||||||
| qca-nss-drv-objs += nss_hal/nss_hal.o | qca-nss-drv-objs += nss_hal/nss_hal.o | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_BRIDGE_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_BRIDGE_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 		    nss_bridge.o \ |  | ||||||
| 		    nss_bridge_log.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_WIFI_EXT_VDEV_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_WIFI_EXT_VDEV_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 		    nss_wifi_ext_vdev.o \ |  | ||||||
| 		    nss_wifi_ext_vdev_stats.o \ |  | ||||||
| 		    nss_wifi_ext_vdev_log.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_WIFI_MESH_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_WIFI_MESH_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 		    nss_wifi_mesh.o \ |  | ||||||
| 		    nss_wifi_mesh_log.o \ |  | ||||||
| 		    nss_wifi_mesh_stats.o \ |  | ||||||
| 		    nss_wifi_mesh_strings.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_IPV4_REASM_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_IPV4_REASM_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 		    nss_ipv4_reasm.o \ |  | ||||||
| 		    nss_ipv4_reasm_stats.o \ |  | ||||||
| 		    nss_ipv4_reasm_strings.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_L2TP_ENABLE)" "n" | ifneq "$(NSS_DRV_L2TP_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_L2TP_ENABLE | ccflags-y += -DNSS_DRV_L2TP_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| @@ -124,22 +109,6 @@ qca-nss-drv-objs += \ | |||||||
| 			 nss_pvxlan_stats.o | 			 nss_pvxlan_stats.o | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_IPV6_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_IPV6_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 			nss_ipv6.o \ |  | ||||||
| 			nss_ipv6_stats.o \ |  | ||||||
| 			nss_ipv6_strings.o \ |  | ||||||
| 			nss_ipv6_log.o |  | ||||||
| ifneq "$(NSS_DRV_IPV6_REASM_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_IPV6_REASM_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 		    nss_ipv6_reasm.o \ |  | ||||||
| 		    nss_ipv6_reasm_stats.o \ |  | ||||||
| 		    nss_ipv6_reasm_strings.o |  | ||||||
| endif |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_TSTAMP_ENABLE)" "n" | ifneq "$(NSS_DRV_TSTAMP_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_TSTAMP_ENABLE | ccflags-y += -DNSS_DRV_TSTAMP_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| @@ -152,8 +121,7 @@ ccflags-y += -DNSS_DRV_GRE_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 			 nss_gre.o \ | 			 nss_gre.o \ | ||||||
| 			 nss_gre_log.o \ | 			 nss_gre_log.o \ | ||||||
| 			 nss_gre_stats.o \ | 			 nss_gre_stats.o | ||||||
| 			 nss_gre_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_GRE_REDIR_ENABLE)" "n" | ifneq "$(NSS_DRV_GRE_REDIR_ENABLE)" "n" | ||||||
| @@ -164,17 +132,13 @@ qca-nss-drv-objs += \ | |||||||
| 			 nss_gre_redir_lag_ds.o \ | 			 nss_gre_redir_lag_ds.o \ | ||||||
| 			 nss_gre_redir_lag_ds_log.o \ | 			 nss_gre_redir_lag_ds_log.o \ | ||||||
| 			 nss_gre_redir_lag_ds_stats.o \ | 			 nss_gre_redir_lag_ds_stats.o \ | ||||||
| 			 nss_gre_redir_lag_ds_strings.o \ |  | ||||||
| 			 nss_gre_redir_lag_us.o \ | 			 nss_gre_redir_lag_us.o \ | ||||||
| 			 nss_gre_redir_lag_us_log.o \ | 			 nss_gre_redir_lag_us_log.o \ | ||||||
| 			 nss_gre_redir_lag_us_stats.o \ | 			 nss_gre_redir_lag_us_stats.o \ | ||||||
| 			 nss_gre_redir_lag_us_strings.o \ |  | ||||||
| 			 nss_gre_redir_stats.o \ | 			 nss_gre_redir_stats.o \ | ||||||
| 			 nss_gre_redir_strings.o \ |  | ||||||
| 			 nss_gre_redir_mark.o \ | 			 nss_gre_redir_mark.o \ | ||||||
| 			 nss_gre_redir_mark_log.o \ | 			 nss_gre_redir_mark_log.o \ | ||||||
| 			 nss_gre_redir_mark_stats.o \ | 			 nss_gre_redir_mark_stats.o | ||||||
| 			 nss_gre_redir_mark_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_GRE_TUNNEL_ENABLE)" "n" | ifneq "$(NSS_DRV_GRE_TUNNEL_ENABLE)" "n" | ||||||
| @@ -182,8 +146,7 @@ ccflags-y += -DNSS_DRV_GRE_TUNNEL_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 			 nss_gre_tunnel.o \ | 			 nss_gre_tunnel.o \ | ||||||
| 			 nss_gre_tunnel_log.o \ | 			 nss_gre_tunnel_log.o \ | ||||||
| 			 nss_gre_tunnel_stats.o \ | 			 nss_gre_tunnel_stats.o | ||||||
| 			 nss_gre_tunnel_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_CAPWAP_ENABLE)" "n" | ifneq "$(NSS_DRV_CAPWAP_ENABLE)" "n" | ||||||
| @@ -292,8 +255,7 @@ ccflags-y += -DNSS_DRV_CLMAP_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 			 nss_clmap.o \ | 			 nss_clmap.o \ | ||||||
| 			 nss_clmap_log.o \ | 			 nss_clmap_log.o \ | ||||||
| 			 nss_clmap_stats.o \ | 			 nss_clmap_stats.o | ||||||
| 			 nss_clmap_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -310,8 +272,7 @@ ccflags-y += -DNSS_DRV_MATCH_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 			nss_match.o \ | 			nss_match.o \ | ||||||
| 			nss_match_log.o \ | 			nss_match_log.o \ | ||||||
| 			nss_match_stats.o \ | 			nss_match_stats.o | ||||||
| 			nss_match_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_MIRROR_ENABLE)" "n" | ifneq "$(NSS_DRV_MIRROR_ENABLE)" "n" | ||||||
| @@ -319,17 +280,7 @@ ccflags-y += -DNSS_DRV_MIRROR_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 			nss_mirror.o \ | 			nss_mirror.o \ | ||||||
| 			nss_mirror_log.o \ | 			nss_mirror_log.o \ | ||||||
| 			nss_mirror_stats.o \ | 			nss_mirror_stats.o | ||||||
| 			nss_mirror_strings.o |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_UDP_ST_ENABLE)" "n" |  | ||||||
| ccflags-y += -DNSS_DRV_UDP_ST_ENABLE |  | ||||||
| qca-nss-drv-objs += \ |  | ||||||
| 			nss_udp_st.o \ |  | ||||||
| 			nss_udp_st_log.o \ |  | ||||||
| 			nss_udp_st_stats.o \ |  | ||||||
| 			nss_udp_st_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifeq ($(SoC),$(filter $(SoC),ipq806x)) | ifeq ($(SoC),$(filter $(SoC),ipq806x)) | ||||||
| @@ -379,7 +330,6 @@ qca-nss-drv-objs += nss_data_plane/nss_data_plane.o \ | |||||||
| 					nss_ppe.o \ | 					nss_ppe.o \ | ||||||
| 					nss_ppe_log.o \ | 					nss_ppe_log.o \ | ||||||
| 					nss_ppe_stats.o \ | 					nss_ppe_stats.o \ | ||||||
| 					nss_ppe_strings.o \ |  | ||||||
| 					nss_ppe_vp.o \ | 					nss_ppe_vp.o \ | ||||||
| 					nss_ppe_vp_log.o \ | 					nss_ppe_vp_log.o \ | ||||||
| 					nss_ppe_vp_stats.o | 					nss_ppe_vp_stats.o | ||||||
| @@ -391,9 +341,7 @@ ifneq "$(NSS_DRV_IPSEC_ENABLE)" "n" | |||||||
| ccflags-y += -DNSS_DRV_IPSEC_ENABLE | ccflags-y += -DNSS_DRV_IPSEC_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_ipsec_cmn_log.o \ | 		    nss_ipsec_cmn_log.o \ | ||||||
| 		    nss_ipsec_cmn.o \ | 		    nss_ipsec_cmn.o | ||||||
| 		    nss_ipsec_cmn_stats.o \ |  | ||||||
| 		    nss_ipsec_cmn_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_CRYPTO_ENABLE)" "n" | ifneq "$(NSS_DRV_CRYPTO_ENABLE)" "n" | ||||||
| @@ -403,8 +351,6 @@ ccflags-y += -DNSS_DRV_DMA_ENABLE | |||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_crypto_cmn.o \ | 		    nss_crypto_cmn.o \ | ||||||
| 		    nss_crypto_cmn_log.o \ | 		    nss_crypto_cmn_log.o \ | ||||||
| 		    nss_crypto_cmn_stats.o \ |  | ||||||
| 		    nss_crypto_cmn_strings.o \ |  | ||||||
| 		    nss_dma.o \ | 		    nss_dma.o \ | ||||||
| 		    nss_dma_log.o \ | 		    nss_dma_log.o \ | ||||||
| 		    nss_dma_stats.o \ | 		    nss_dma_stats.o \ | ||||||
| @@ -415,26 +361,21 @@ ifneq "$(NSS_DRV_DTLS_ENABLE)" "n" | |||||||
| ccflags-y += -DNSS_DRV_DTLS_ENABLE | ccflags-y += -DNSS_DRV_DTLS_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_dtls_cmn.o \ | 		    nss_dtls_cmn.o \ | ||||||
| 		    nss_dtls_cmn_log.o \ | 		    nss_dtls_cmn_log.o | ||||||
| 		    nss_dtls_cmn_stats.o \ |  | ||||||
| 		    nss_dtls_cmn_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_QVPN_ENABLE)" "n" | ifneq "$(NSS_DRV_QVPN_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_QVPN_ENABLE | ccflags-y += -DNSS_DRV_QVPN_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 	     nss_qvpn.o \ |              nss_qvpn.o \ | ||||||
| 	     nss_qvpn_log.o \ |              nss_qvpn_stats.o \ | ||||||
| 	     nss_qvpn_stats.o \ |              nss_qvpn_log.o | ||||||
| 	     nss_qvpn_strings.o |  | ||||||
| endif | endif | ||||||
| ifneq "$(NSS_DRV_TLS_ENABLE)" "n" | ifneq "$(NSS_DRV_TLS_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_TLS_ENABLE | ccflags-y += -DNSS_DRV_TLS_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		     nss_tls.o \ | 		     nss_tls.o \ | ||||||
| 		     nss_tls_log.o \ | 		     nss_tls_log.o | ||||||
| 		     nss_tls_stats.o \ |  | ||||||
| 		     nss_tls_strings.o |  | ||||||
| endif | endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
| @@ -470,27 +411,21 @@ ifneq "$(NSS_DRV_IPSEC_ENABLE)" "n" | |||||||
| ccflags-y += -DNSS_DRV_IPSEC_ENABLE | ccflags-y += -DNSS_DRV_IPSEC_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_ipsec_cmn_log.o \ | 		    nss_ipsec_cmn_log.o \ | ||||||
| 		    nss_ipsec_cmn.o \ | 		    nss_ipsec_cmn.o | ||||||
| 		    nss_ipsec_cmn_stats.o \ |  | ||||||
| 		    nss_ipsec_cmn_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_CRYPTO_ENABLE)" "n" | ifneq "$(NSS_DRV_CRYPTO_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_CRYPTO_ENABLE | ccflags-y += -DNSS_DRV_CRYPTO_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_crypto_cmn.o \ | 		    nss_crypto_cmn.o \ | ||||||
| 		    nss_crypto_cmn_log.o \ | 		    nss_crypto_cmn_log.o | ||||||
| 		    nss_crypto_cmn_stats.o \ |  | ||||||
| 		    nss_crypto_cmn_strings.o |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifneq "$(NSS_DRV_DTLS_ENABLE)" "n" | ifneq "$(NSS_DRV_DTLS_ENABLE)" "n" | ||||||
| ccflags-y += -DNSS_DRV_DTLS_ENABLE | ccflags-y += -DNSS_DRV_DTLS_ENABLE | ||||||
| qca-nss-drv-objs += \ | qca-nss-drv-objs += \ | ||||||
| 		    nss_dtls_cmn.o \ | 		    nss_dtls_cmn.o \ | ||||||
| 		    nss_dtls_cmn_log.o \ | 		    nss_dtls_cmn_log.o | ||||||
| 		    nss_dtls_cmn_stats.o \ |  | ||||||
| 		    nss_dtls_cmn_strings.o |  | ||||||
| endif | endif | ||||||
| ccflags-y += -I$(obj)/nss_hal/ipq50xx -DNSS_HAL_IPQ50XX_SUPPORT -DNSS_MULTI_H2N_DATA_RING_SUPPORT | ccflags-y += -I$(obj)/nss_hal/ipq50xx -DNSS_HAL_IPQ50XX_SUPPORT -DNSS_MULTI_H2N_DATA_RING_SUPPORT | ||||||
| endif | endif | ||||||
| @@ -498,7 +433,7 @@ endif | |||||||
| ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1 | ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1 | ||||||
| ccflags-y += -I$(obj)/nss_data_plane/hal/include | ccflags-y += -I$(obj)/nss_data_plane/hal/include | ||||||
| ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_REUSE_SUPPORT=1 | ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_REUSE_SUPPORT=1 | ||||||
| ccflags-y += -Wall -Werror | ccflags-y += -Werror | ||||||
|  |  | ||||||
| KERNELVERSION := $(word 1, $(subst ., ,$(KERNELVERSION))).$(word 2, $(subst ., ,$(KERNELVERSION))) | KERNELVERSION := $(word 1, $(subst ., ,$(KERNELVERSION))).$(word 2, $(subst ., ,$(KERNELVERSION))) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										524
									
								
								feeds/ipq807x/qca-nss-drv/src/exports/nss_api_if.h
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										524
									
								
								feeds/ipq807x/qca-nss-drv/src/exports/nss_api_if.h
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -65,6 +65,7 @@ | |||||||
| #include "nss_wifi_vdev.h" | #include "nss_wifi_vdev.h" | ||||||
| #include "nss_n2h.h" | #include "nss_n2h.h" | ||||||
| #include "nss_rps.h" | #include "nss_rps.h" | ||||||
|  | #include "nss_wifi_if.h" | ||||||
| #include "nss_portid.h" | #include "nss_portid.h" | ||||||
| #include "nss_oam.h" | #include "nss_oam.h" | ||||||
| #include "nss_dtls.h" | #include "nss_dtls.h" | ||||||
| @@ -99,10 +100,6 @@ | |||||||
| #include "nss_lso_rx.h" | #include "nss_lso_rx.h" | ||||||
| #include "nss_wifi_mac_db_if.h" | #include "nss_wifi_mac_db_if.h" | ||||||
| #include "nss_wifi_ext_vdev_if.h" | #include "nss_wifi_ext_vdev_if.h" | ||||||
| #include "nss_wifili_if.h" |  | ||||||
| #include "nss_ppe_vp.h" |  | ||||||
| #include "nss_wifi_mesh.h" |  | ||||||
| #include "nss_udp_st.h" |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #endif /*__KERNEL__ */ | #endif /*__KERNEL__ */ | ||||||
| @@ -123,7 +120,7 @@ | |||||||
| #define NSS_MAX_PHYSICAL_INTERFACES 8	/**< Maximum number of physical interfaces. */ | #define NSS_MAX_PHYSICAL_INTERFACES 8	/**< Maximum number of physical interfaces. */ | ||||||
| #define NSS_MAX_VIRTUAL_INTERFACES 16	/**< Maximum number of virtual interfaces. */ | #define NSS_MAX_VIRTUAL_INTERFACES 16	/**< Maximum number of virtual interfaces. */ | ||||||
| #define NSS_MAX_TUNNEL_INTERFACES 4	/**< Maximum number of tunnel interfaces. */ | #define NSS_MAX_TUNNEL_INTERFACES 4	/**< Maximum number of tunnel interfaces. */ | ||||||
| #define NSS_MAX_SPECIAL_INTERFACES 69	/**< Maximum number of special interfaces. */ | #define NSS_MAX_SPECIAL_INTERFACES 68	/**< Maximum number of special interfaces. */ | ||||||
| #define NSS_MAX_WIFI_RADIO_INTERFACES 3	/**< Maximum number of radio interfaces. */ | #define NSS_MAX_WIFI_RADIO_INTERFACES 3	/**< Maximum number of radio interfaces. */ | ||||||
|  |  | ||||||
| /* | /* | ||||||
| @@ -274,12 +271,511 @@ | |||||||
| #define NSS_DMA_INTERFACE (NSS_SPECIAL_IF_START + 66) | #define NSS_DMA_INTERFACE (NSS_SPECIAL_IF_START + 66) | ||||||
| 		/**< Special interface number for the DMA interface. */ | 		/**< Special interface number for the DMA interface. */ | ||||||
| #define NSS_WIFI_EXT_VDEV_INTERFACE (NSS_SPECIAL_IF_START + 67) | #define NSS_WIFI_EXT_VDEV_INTERFACE (NSS_SPECIAL_IF_START + 67) | ||||||
| 		/**< Special interface number for the Wi-Fi extended virtual interface. */ | 		/**< Special interface number for WiFi extended virtual interface. */ | ||||||
| #define NSS_UDP_ST_INTERFACE (NSS_SPECIAL_IF_START + 68) |  | ||||||
| 		/**< Special interface number for the UDP speed test interface. */ |  | ||||||
|  |  | ||||||
| #ifdef __KERNEL__ /* only kernel will use. */ | #ifdef __KERNEL__ /* only kernel will use. */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Wireless Multimedia Extention Access Category to TID. @hideinitializer | ||||||
|  |  */ | ||||||
|  | #define NSS_WIFILI_WME_AC_TO_TID(_ac) (	\ | ||||||
|  | 		((_ac) == NSS_WIFILI_WME_AC_VO) ? 6 : \ | ||||||
|  | 		(((_ac) == NSS_WIFILI_WME_AC_VI) ? 5 : \ | ||||||
|  | 		(((_ac) == NSS_WIFILI_WME_AC_BK) ? 1 : \ | ||||||
|  | 		0))) | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Wireless TID to Wireless Extension Multimedia Access Category. @hideinitializer | ||||||
|  |  */ | ||||||
|  | #define NSS_WIFILI_TID_TO_WME_AC(_tid) (	\ | ||||||
|  | 		(((_tid) == 0) || ((_tid) == 3)) ? NSS_WIFILI_WME_AC_BE : \ | ||||||
|  | 		((((_tid) == 1) || ((_tid) == 2)) ? NSS_WIFILI_WME_AC_BK : \ | ||||||
|  | 		((((_tid) == 4) || ((_tid) == 5)) ? NSS_WIFILI_WME_AC_VI : \ | ||||||
|  | 		NSS_WIFILI_WME_AC_VO))) | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Converts the format of an IPv6 address from Linux to NSS. @hideinitializer | ||||||
|  |  */ | ||||||
|  | #define IN6_ADDR_TO_IPV6_ADDR(ipv6, in6) \ | ||||||
|  | 	{ \ | ||||||
|  | 		((uint32_t *)ipv6)[0] = in6.in6_u.u6_addr32[0]; \ | ||||||
|  | 		((uint32_t *)ipv6)[1] = in6.in6_u.u6_addr32[1]; \ | ||||||
|  | 		((uint32_t *)ipv6)[2] = in6.in6_u.u6_addr32[2]; \ | ||||||
|  | 		((uint32_t *)ipv6)[3] = in6.in6_u.u6_addr32[3]; \ | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Converts the format of an IPv6 address from NSS to Linux. @hideinitializer | ||||||
|  |  */ | ||||||
|  | #define IPV6_ADDR_TO_IN6_ADDR(in6, ipv6) \ | ||||||
|  | 	{ \ | ||||||
|  | 		in6.in6_u.u6_addr32[0] = ((uint32_t *)ipv6)[0]; \ | ||||||
|  | 		in6.in6_u.u6_addr32[1] = ((uint32_t *)ipv6)[1]; \ | ||||||
|  | 		in6.in6_u.u6_addr32[2] = ((uint32_t *)ipv6)[2]; \ | ||||||
|  | 		in6.in6_u.u6_addr32[3] = ((uint32_t *)ipv6)[3]; \ | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Format of an IPv6 address (16 * 8 bits). | ||||||
|  |  */ | ||||||
|  | #define IPV6_ADDR_OCTAL_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Prints an IPv6 address (16 * 8 bits). | ||||||
|  |  */ | ||||||
|  | #define IPV6_ADDR_TO_OCTAL(ipv6) ((uint16_t *)ipv6)[0], ((uint16_t *)ipv6)[1], ((uint16_t *)ipv6)[2], ((uint16_t *)ipv6)[3], ((uint16_t *)ipv6)[4], ((uint16_t *)ipv6)[5], ((uint16_t *)ipv6)[6], ((uint16_t *)ipv6)[7] | ||||||
|  |  | ||||||
|  | /* | ||||||
|  |  * IPv4 rule sync reasons. | ||||||
|  |  */ | ||||||
|  | #define NSS_IPV4_SYNC_REASON_STATS 0	/**< Rule for synchronizing statistics. */ | ||||||
|  | #define NSS_IPV4_SYNC_REASON_FLUSH 1	/**< Rule for flushing a cache entry. */ | ||||||
|  | #define NSS_IPV4_SYNC_REASON_EVICT 2	/**< Rule for evicting a cache entry. */ | ||||||
|  | #define NSS_IPV4_SYNC_REASON_DESTROY 3 | ||||||
|  | 		/**< Rule for destroying a cache entry (requested by the host OS). */ | ||||||
|  | #define NSS_IPV4_SYNC_REASON_PPPOE_DESTROY 4 | ||||||
|  | 		/**< Rule for destroying a cache entry that belongs to a PPPoE session. */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_create | ||||||
|  |  *	Information for an IPv4 flow or connection create rule. | ||||||
|  |  * | ||||||
|  |  * All fields must be passed in host-endian order. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv4_create { | ||||||
|  | 	int32_t src_interface_num; | ||||||
|  | 				/**< Source interface number (virtual or physical). */ | ||||||
|  | 	int32_t dest_interface_num; | ||||||
|  | 				/**< Destination interface number (virtual or physical). */ | ||||||
|  | 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ | ||||||
|  | 	uint32_t flags;		/**< Flags (if any) associated with this rule. */ | ||||||
|  | 	uint32_t from_mtu;	/**< MTU of the incoming interface. */ | ||||||
|  | 	uint32_t to_mtu;	/**< MTU of the outgoing interface. */ | ||||||
|  | 	uint32_t src_ip;	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t src_ip_xlate;	/**< Translated source IP address (used with SNAT). */ | ||||||
|  | 	int32_t src_port_xlate;	/**< Translated source L4 port (used with SNAT). */ | ||||||
|  | 	uint32_t dest_ip;	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip_xlate; | ||||||
|  | 			/**< Translated destination IP address (used with DNAT). */ | ||||||
|  | 	int32_t dest_port_xlate; | ||||||
|  | 			/**< Translated destination L4 port (used with DNAT). */ | ||||||
|  | 	uint8_t src_mac[ETH_ALEN]; | ||||||
|  | 			/**< Source MAC address. */ | ||||||
|  | 	uint8_t dest_mac[ETH_ALEN]; | ||||||
|  | 			/**< Destination MAC address. */ | ||||||
|  | 	uint8_t src_mac_xlate[ETH_ALEN]; | ||||||
|  | 			/**< Translated source MAC address (post-routing). */ | ||||||
|  | 	uint8_t dest_mac_xlate[ETH_ALEN]; | ||||||
|  | 			/**< Translated destination MAC address (post-routing). */ | ||||||
|  | 	uint8_t flow_window_scale;	/**< Window scaling factor (TCP). */ | ||||||
|  | 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ | ||||||
|  | 	uint32_t flow_end;		/**< TCP window end. */ | ||||||
|  | 	uint32_t flow_max_end;		/**< TCP window maximum end. */ | ||||||
|  | 	uint32_t flow_pppoe_if_exist; | ||||||
|  | 			/**< Flow direction: PPPoE interface exist flag. */ | ||||||
|  | 	int32_t flow_pppoe_if_num; | ||||||
|  | 			/**< Flow direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t ingress_vlan_tag;	/**< Ingress VLAN tag expected for this flow. */ | ||||||
|  | 	uint8_t return_window_scale; | ||||||
|  | 			/**< Window scaling factor of the return direction (TCP). */ | ||||||
|  | 	uint32_t return_max_window; | ||||||
|  | 			/**< Maximum window size of the return direction. */ | ||||||
|  | 	uint32_t return_end; | ||||||
|  | 			/**< Flow end for the return direction. */ | ||||||
|  | 	uint32_t return_max_end; | ||||||
|  | 			/**< Flow maximum end for the return direction. */ | ||||||
|  | 	uint32_t return_pppoe_if_exist; | ||||||
|  | 			/**< Return direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t return_pppoe_if_num; | ||||||
|  | 			/**< Return direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t egress_vlan_tag;	/**< Egress VLAN tag expected for this flow. */ | ||||||
|  | 	uint8_t spo_needed;		/**< Indicates whether SPO is required. */ | ||||||
|  | 	uint32_t param_a0;		/**< Custom parameter 0. */ | ||||||
|  | 	uint32_t param_a1;		/**< Custom parameter 1. */ | ||||||
|  | 	uint32_t param_a2;		/**< Custom parameter 2. */ | ||||||
|  | 	uint32_t param_a3;		/**< Custom parameter 3. */ | ||||||
|  | 	uint32_t param_a4;		/**< Custom parameter 4. */ | ||||||
|  | 	uint32_t qos_tag;		/**< Deprecated, will be removed soon. */ | ||||||
|  | 	uint32_t flow_qos_tag;		/**< QoS tag value for the flow direction. */ | ||||||
|  | 	uint32_t return_qos_tag;	/**< QoS tag value for the return direction. */ | ||||||
|  | 	uint8_t dscp_itag;		/**< DSCP marking tag. */ | ||||||
|  | 	uint8_t dscp_imask;		/**< DSCP marking input mask. */ | ||||||
|  | 	uint8_t dscp_omask;		/**< DSCP marking output mask. */ | ||||||
|  | 	uint8_t dscp_oval;		/**< DSCP marking output value. */ | ||||||
|  | 	uint16_t vlan_itag;		/**< VLAN marking tag. */ | ||||||
|  | 	uint16_t vlan_imask;		/**< VLAN marking input mask. */ | ||||||
|  | 	uint16_t vlan_omask;		/**< VLAN marking output mask. */ | ||||||
|  | 	uint16_t vlan_oval;		/**< VLAN marking output value. */ | ||||||
|  | 	uint32_t in_vlan_tag[MAX_VLAN_DEPTH]; | ||||||
|  | 			/**< Ingress VLAN tag expected for this flow. */ | ||||||
|  | 	uint32_t out_vlan_tag[MAX_VLAN_DEPTH]; | ||||||
|  | 			/**< Egress VLAN tag expected for this flow. */ | ||||||
|  | 	uint8_t flow_dscp;		/**< IP DSCP value for the flow direction. */ | ||||||
|  | 	uint8_t return_dscp;		/**< IP DSCP value for the return direction. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /* | ||||||
|  |  * IPv4 connection flags (to be used with nss_ipv4_create::flags). | ||||||
|  |  */ | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_NO_SEQ_CHECK 0x01 | ||||||
|  | 		/**< Rule for not checking sequence numbers. */ | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_BRIDGE_FLOW 0x02 | ||||||
|  | 		/**< Rule that indicates pure bridge flow (no routing is involved). */ | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_ROUTED 0x04	/**< Rule for a routed connection. */ | ||||||
|  |  | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_DSCP_MARKING 0x08	/**< Rule for DSCP marking. */ | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_VLAN_MARKING 0x10	/**< Rule for VLAN marking. */ | ||||||
|  | #define NSS_IPV4_CREATE_FLAG_QOS_VALID 0x20	/**< Rule for QoS is valid. */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_destroy | ||||||
|  |  *	Information for an IPv4 flow or connection destroy rule. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv4_destroy { | ||||||
|  | 	int32_t protocol;	/**< L4 protocol ID. */ | ||||||
|  | 	uint32_t src_ip;	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip;	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /* | ||||||
|  |  * IPv6 rule sync reasons. | ||||||
|  |  */ | ||||||
|  | #define NSS_IPV6_SYNC_REASON_STATS 0	/**< Rule for synchronizing statistics. */ | ||||||
|  | #define NSS_IPV6_SYNC_REASON_FLUSH 1	/**< Rule for flushing a cache entry. */ | ||||||
|  | #define NSS_IPV6_SYNC_REASON_EVICT 2	/**< Rule for evicting a cache entry. */ | ||||||
|  | #define NSS_IPV6_SYNC_REASON_DESTROY 3 | ||||||
|  | 		/**< Rule for destroying a cache entry (requested by the host OS). */ | ||||||
|  | #define NSS_IPV6_SYNC_REASON_PPPOE_DESTROY 4 | ||||||
|  | 		/**< Rule for destroying a cache entry that belongs to a PPPoE session. */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_create | ||||||
|  |  *	Information for an IPv6 flow or connection create rule. | ||||||
|  |  * | ||||||
|  |  * All fields must be passed in host-endian order. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv6_create { | ||||||
|  | 	int32_t src_interface_num; | ||||||
|  | 			/**< Source interface number (virtual or physical). */ | ||||||
|  | 	int32_t dest_interface_num; | ||||||
|  | 			/**< Destination interface number (virtual or physical). */ | ||||||
|  | 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ | ||||||
|  | 	uint32_t flags;		/**< Flags (if any) associated with this rule. */ | ||||||
|  | 	uint32_t from_mtu;	/**< MTU of the incoming interface. */ | ||||||
|  | 	uint32_t to_mtu;	/**< MTU of the outgoing interface. */ | ||||||
|  | 	uint32_t src_ip[4];	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip[4];	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint8_t src_mac[ETH_ALEN];	/**< Source MAC address. */ | ||||||
|  | 	uint8_t dest_mac[ETH_ALEN];	/**< Destination MAC address. */ | ||||||
|  | 	uint8_t flow_window_scale;	/**< Window scaling factor (TCP). */ | ||||||
|  | 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ | ||||||
|  | 	uint32_t flow_end;		/**< TCP window end. */ | ||||||
|  | 	uint32_t flow_max_end;		/**< TCP window maximum end. */ | ||||||
|  | 	uint32_t flow_pppoe_if_exist; | ||||||
|  | 			/**< Flow direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t flow_pppoe_if_num; | ||||||
|  | 			/**< Flow direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t ingress_vlan_tag; | ||||||
|  | 			/**< Ingress VLAN tag expected for this flow. */ | ||||||
|  | 	uint8_t return_window_scale; | ||||||
|  | 			/**< Window scaling factor (TCP) for the return direction. */ | ||||||
|  | 	uint32_t return_max_window; | ||||||
|  | 			/**< Maximum window size (TCP) for the return direction. */ | ||||||
|  | 	uint32_t return_end; | ||||||
|  | 			/**< End for the return direction. */ | ||||||
|  | 	uint32_t return_max_end; | ||||||
|  | 			/**< Maximum end for the return direction. */ | ||||||
|  | 	uint32_t return_pppoe_if_exist; | ||||||
|  | 			/**< Return direction: PPPoE interface exist flag. */ | ||||||
|  | 	int32_t return_pppoe_if_num; | ||||||
|  | 			/**< Return direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t egress_vlan_tag;	/**< Egress VLAN tag expected for this flow. */ | ||||||
|  | 	uint32_t qos_tag;		/**< Deprecated; will be removed soon. */ | ||||||
|  | 	uint32_t flow_qos_tag;		/**< QoS tag value for flow direction. */ | ||||||
|  | 	uint32_t return_qos_tag;	/**< QoS tag value for the return direction. */ | ||||||
|  | 	uint8_t dscp_itag;		/**< DSCP marking tag. */ | ||||||
|  | 	uint8_t dscp_imask;		/**< DSCP marking input mask. */ | ||||||
|  | 	uint8_t dscp_omask;		/**< DSCP marking output mask. */ | ||||||
|  | 	uint8_t dscp_oval;		/**< DSCP marking output value. */ | ||||||
|  | 	uint16_t vlan_itag;		/**< VLAN marking tag. */ | ||||||
|  | 	uint16_t vlan_imask;		/**< VLAN marking input mask. */ | ||||||
|  | 	uint16_t vlan_omask;		/**< VLAN marking output mask. */ | ||||||
|  | 	uint16_t vlan_oval;		/**< VLAN marking output value. */ | ||||||
|  | 	uint32_t in_vlan_tag[MAX_VLAN_DEPTH]; | ||||||
|  | 					/**< Ingress VLAN tag expected for this flow. */ | ||||||
|  | 	uint32_t out_vlan_tag[MAX_VLAN_DEPTH]; | ||||||
|  | 					/**< Egress VLAN tag expected for this flow. */ | ||||||
|  | 	uint8_t flow_dscp;		/**< IP DSCP value for flow direction. */ | ||||||
|  | 	uint8_t return_dscp;		/**< IP DSCP value for the return direction. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /* | ||||||
|  |  * IPv6 connection flags (to be used with nss_ipv6_create::flags. | ||||||
|  |  */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_NO_SEQ_CHECK 0x1 | ||||||
|  | 		/**< Indicates that sequence numbers are not to be checked. */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_BRIDGE_FLOW 0x02 | ||||||
|  | 		/**< Indicates that this is a pure bridge flow (no routing is involved). */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_ROUTED 0x04	/**< Rule is for a routed connection. */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_DSCP_MARKING 0x08	/**< Rule for DSCP marking. */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_VLAN_MARKING 0x10	/**< Rule for VLAN marking. */ | ||||||
|  | #define NSS_IPV6_CREATE_FLAG_QOS_VALID 0x20	/**< Rule for Valid QoS. */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_destroy | ||||||
|  |  *	Information for an IPv6 flow or connection destroy rule. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv6_destroy { | ||||||
|  | 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ | ||||||
|  | 	uint32_t src_ip[4];	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip[4];	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_sync | ||||||
|  |  *	Defines packet statistics for IPv4 and also keeps the connection entry alive. | ||||||
|  |  * | ||||||
|  |  * Statistics are bytes and packets seen over a connection. | ||||||
|  |  * | ||||||
|  |  * The addresses are NON-NAT addresses (i.e., true endpoint | ||||||
|  |  * addressing). | ||||||
|  |  * | ||||||
|  |  * The source (src) creates the connection. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv4_sync { | ||||||
|  | 	uint32_t index;		/**< Slot ID for cache statistics to host OS. */ | ||||||
|  | 			/*TODO: use an opaque information as host and NSS | ||||||
|  | 			  may be using a different mechanism to store rules. */ | ||||||
|  | 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ | ||||||
|  | 	uint32_t src_ip;	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t src_ip_xlate;	/**< Translated source IP address (used with SNAT). */ | ||||||
|  | 	int32_t src_port_xlate;	/**< Translated source L4 port (used with SNAT). */ | ||||||
|  | 	uint32_t dest_ip;	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip_xlate; | ||||||
|  | 			/**< Translated destination IP address (used with DNAT). */ | ||||||
|  | 	int32_t dest_port_xlate; | ||||||
|  | 			/**< Translated destination L4 port (used with DNAT). */ | ||||||
|  | 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ | ||||||
|  | 	uint32_t flow_end;		/**< TCP window end. */ | ||||||
|  | 	uint32_t flow_max_end;		/**< TCP window maximum end. */ | ||||||
|  | 	uint32_t flow_rx_packet_count;	/**< Rx packet count for the flow interface. */ | ||||||
|  | 	uint32_t flow_rx_byte_count;	/**< Rx byte count for the flow interface. */ | ||||||
|  | 	uint32_t flow_tx_packet_count;	/**< Tx packet count for the flow interface. */ | ||||||
|  | 	uint32_t flow_tx_byte_count;	/**< Tx byte count for the flow interface. */ | ||||||
|  | 	uint32_t return_max_window; | ||||||
|  | 			/**< Maximum window size (TCP) for the return direction. */ | ||||||
|  | 	uint32_t return_end; | ||||||
|  | 			/**< End for the return direction. */ | ||||||
|  | 	uint32_t return_max_end; | ||||||
|  | 			/**< Maximum end for the return direction. */ | ||||||
|  | 	uint32_t return_rx_packet_count; | ||||||
|  | 			/**< Rx packet count for the return direction. */ | ||||||
|  | 	uint32_t return_rx_byte_count; | ||||||
|  | 			/**< Rx byte count for the return direction. */ | ||||||
|  | 	uint32_t return_tx_packet_count; | ||||||
|  | 			/**< Tx packet count for the return direction. */ | ||||||
|  | 	uint32_t return_tx_byte_count; | ||||||
|  | 			/**< Tx byte count for the return direction. */ | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Time in Linux jiffies to be added to the current timeout to keep the | ||||||
|  | 	 * connection alive. | ||||||
|  | 	 */ | ||||||
|  | 	unsigned long int delta_jiffies; | ||||||
|  |  | ||||||
|  | 	uint8_t reason;		/**< Reason for synchronization. */ | ||||||
|  | 	uint32_t param_a0;	/**< Custom parameter 0. */ | ||||||
|  | 	uint32_t param_a1;	/**< Custom parameter 1. */ | ||||||
|  | 	uint32_t param_a2;	/**< Custom parameter 2. */ | ||||||
|  | 	uint32_t param_a3;	/**< Custom parameter 3. */ | ||||||
|  | 	uint32_t param_a4;	/**< Custom parameter 4. */ | ||||||
|  |  | ||||||
|  | 	uint8_t flags;		/**< Flags indicating the status of the flow. */ | ||||||
|  | 	uint32_t qos_tag;	/**< QoS value of the flow. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_establish | ||||||
|  |  *	Defines connection-established message parameters for IPv4. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv4_establish { | ||||||
|  | 	uint32_t index;			/**< Slot ID for cache statistics to host OS. */ | ||||||
|  | 			/*TODO: use an opaque information as host and NSS | ||||||
|  | 			  may be using a different mechanism to store rules. */ | ||||||
|  | 	uint8_t protocol;		/**< Protocol number. */ | ||||||
|  | 	uint8_t reserved[3];		/**< Padding for word alignment. */ | ||||||
|  | 	int32_t flow_interface;		/**< Flow interface number. */ | ||||||
|  | 	uint32_t flow_mtu;		/**< MTU for the flow interface. */ | ||||||
|  | 	uint32_t flow_ip;		/**< Flow IP address. */ | ||||||
|  | 	uint32_t flow_ip_xlate;		/**< Translated flow IP address. */ | ||||||
|  | 	uint32_t flow_ident;		/**< Flow identifier (e.g., port). */ | ||||||
|  | 	uint32_t flow_ident_xlate;	/**< Translated flow identifier (e.g., port). */ | ||||||
|  | 	uint16_t flow_mac[3];		/**< Source MAC address for the flow direction. */ | ||||||
|  | 	uint32_t flow_pppoe_if_exist;	/**< Flow direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t flow_pppoe_if_num;	/**< Flow direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t ingress_vlan_tag;	/**< Ingress VLAN tag. */ | ||||||
|  | 	int32_t return_interface;	/**< Return interface number. */ | ||||||
|  | 	uint32_t return_mtu;		/**< MTU for the return interface. */ | ||||||
|  | 	uint32_t return_ip;		/**< Return IP address. */ | ||||||
|  | 	uint32_t return_ip_xlate;	/**< Translated return IP address. */ | ||||||
|  | 	uint32_t return_ident;		/**< Return identier (e.g., port). */ | ||||||
|  | 	uint32_t return_ident_xlate;	/**< Translated return identifier (e.g., port). */ | ||||||
|  | 	uint16_t return_mac[3];		/**< Source MAC address for the return direction. */ | ||||||
|  | 	uint32_t return_pppoe_if_exist;	/**< Return direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t return_pppoe_if_num;	/**< Return direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t egress_vlan_tag;	/**< Egress VLAN tag. */ | ||||||
|  | 	uint8_t flags;			/**< Flags indicating the status of the flow. */ | ||||||
|  | 	uint32_t qos_tag;		/**< QoS value of the flow. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_cb_reason | ||||||
|  |  *	Reasons for an IPv4 callback. | ||||||
|  |  */ | ||||||
|  | enum nss_ipv4_cb_reason { | ||||||
|  | 	NSS_IPV4_CB_REASON_ESTABLISH = 0, | ||||||
|  | 	NSS_IPV4_CB_REASON_SYNC, | ||||||
|  | 	NSS_IPV4_CB_REASON_ESTABLISH_FAIL, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv4_cb_params | ||||||
|  |  *	Message parameters for an IPv4 callback. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv4_cb_params { | ||||||
|  | 	enum nss_ipv4_cb_reason reason;		/**< Reason for the callback. */ | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Message parameters for an IPv4 callback. | ||||||
|  | 	 */ | ||||||
|  | 	union { | ||||||
|  | 		struct nss_ipv4_sync sync; | ||||||
|  | 				/**< Parameters for synchronization. */ | ||||||
|  | 		struct nss_ipv4_establish establish; | ||||||
|  | 				/**< Parameters for establishing a connection. */ | ||||||
|  | 	} params;		/**< Payload of parameters. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_sync | ||||||
|  |  *	Update packet statistics (bytes and packets seen over a connection) and also keep the connection entry alive. | ||||||
|  |  * | ||||||
|  |  * The addresses are NON-NAT addresses (i.e., true endpoint addressing). | ||||||
|  |  * | ||||||
|  |  * The source (src) creates the connection. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv6_sync { | ||||||
|  | 	uint32_t index;		/**< Slot ID for cache statistics to the host OS. */ | ||||||
|  | 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ | ||||||
|  | 	uint32_t src_ip[4];	/**< Source IP address. */ | ||||||
|  | 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t dest_ip[4];	/**< Destination IP address. */ | ||||||
|  | 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ | ||||||
|  | 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ | ||||||
|  | 	uint32_t flow_end;		/**< TCP window end. */ | ||||||
|  | 	uint32_t flow_max_end;		/**< TCP window maximum end. */ | ||||||
|  | 	uint32_t flow_rx_packet_count;	/**< Rx packet count for the flow interface. */ | ||||||
|  | 	uint32_t flow_rx_byte_count;	/**< Rx byte count for the flow interface. */ | ||||||
|  | 	uint32_t flow_tx_packet_count;	/**< Tx packet count for the flow interface. */ | ||||||
|  | 	uint32_t flow_tx_byte_count;	/**< Tx byte count for the flow interface. */ | ||||||
|  | 	uint32_t return_max_window; | ||||||
|  | 			/**< Maximum window size (TCP) for the return direction. */ | ||||||
|  | 	uint32_t return_end; | ||||||
|  | 			/**< End for the return direction. */ | ||||||
|  | 	uint32_t return_max_end; | ||||||
|  | 			/**< Maximum end for the return direction. */ | ||||||
|  | 	uint32_t return_rx_packet_count; | ||||||
|  | 			/**< Rx packet count for the return direction. */ | ||||||
|  | 	uint32_t return_rx_byte_count; | ||||||
|  | 			/**< Rx byte count for the return direction. */ | ||||||
|  | 	uint32_t return_tx_packet_count; | ||||||
|  | 			/**< Tx packet count for the return direction. */ | ||||||
|  | 	uint32_t return_tx_byte_count; | ||||||
|  | 			/**< Tx byte count for the return direction. */ | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Time in Linux jiffies to be added to the current timeout to keep the | ||||||
|  | 	 * connection alive. | ||||||
|  | 	 */ | ||||||
|  | 	unsigned long int delta_jiffies; | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Non-zero when the NA has ceased to accelerate the given connection. | ||||||
|  | 	 */ | ||||||
|  | 	uint8_t final_sync; | ||||||
|  |  | ||||||
|  | 	uint8_t evicted;	/**< Non-zero if the connection is evicted. */ | ||||||
|  |  | ||||||
|  | 	uint8_t flags;		/**< Flags indicating the status of the flow. */ | ||||||
|  | 	uint32_t qos_tag;	/**< QoS value of the flow. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_establish | ||||||
|  |  *	Defines connection-established message parameters for IPv6. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv6_establish { | ||||||
|  | 	uint32_t index;		/**< Slot ID for cache statistics to the host OS. */ | ||||||
|  | 	uint8_t protocol;	/**< Protocol number. */ | ||||||
|  | 	int32_t flow_interface;	/**< Flow interface number. */ | ||||||
|  | 	uint32_t flow_mtu;	/**< MTU for the flow interface. */ | ||||||
|  | 	uint32_t flow_ip[4];	/**< Flow IP address. */ | ||||||
|  | 	uint32_t flow_ident;	/**< Flow identifier (e.g., port). */ | ||||||
|  | 	uint16_t flow_mac[3];	/**< Source MAC address for the flow direction. */ | ||||||
|  | 	uint32_t flow_pppoe_if_exist;	/**< Flow direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t flow_pppoe_if_num;	/**< Flow direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t ingress_vlan_tag;	/**< Ingress VLAN tag. */ | ||||||
|  | 	int32_t return_interface;	/**< Return interface number. */ | ||||||
|  | 	uint32_t return_mtu;		/**< MTU for the return interface. */ | ||||||
|  | 	uint32_t return_ip[4];		/**< Return IP address. */ | ||||||
|  | 	uint32_t return_ident;		/**< Return identier (e.g., port). */ | ||||||
|  | 	uint16_t return_mac[3];		/**< Source MAC address for the return direction. */ | ||||||
|  | 	uint32_t return_pppoe_if_exist;	/**< Return direction: PPPoE interface existence flag. */ | ||||||
|  | 	int32_t return_pppoe_if_num;	/**< Return direction: PPPoE interface number. */ | ||||||
|  | 	uint16_t egress_vlan_tag;	/**< VLAN tag to be inserted for egress direction. */ | ||||||
|  | 	uint8_t flags;			/**< Flags indicating the status of the flow. */ | ||||||
|  | 	uint32_t qos_tag;		/**< QoS value of the flow. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_cb_reason | ||||||
|  |  *	Reasons for an IPv6 callback. | ||||||
|  |  */ | ||||||
|  | enum nss_ipv6_cb_reason { | ||||||
|  | 	NSS_IPV6_CB_REASON_ESTABLISH = 0, | ||||||
|  | 	NSS_IPV6_CB_REASON_SYNC, | ||||||
|  | 	NSS_IPV6_CB_REASON_ESTABLISH_FAIL, | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipv6_cb_params | ||||||
|  |  *	Message parameters for an IPv6 callback. | ||||||
|  |  */ | ||||||
|  | struct nss_ipv6_cb_params { | ||||||
|  | 	enum nss_ipv6_cb_reason reason;		/**< Reason for the callback. */ | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Message parameters for an IPv6 callback. | ||||||
|  | 	 */ | ||||||
|  | 	union { | ||||||
|  | 		struct nss_ipv6_sync sync; | ||||||
|  | 				/**< Parameters for synchronization. */ | ||||||
|  | 		struct nss_ipv6_establish establish; | ||||||
|  | 				/**< Parameters for establishing a connection. */ | ||||||
|  | 	} params;		/**< Callback parameters. */ | ||||||
|  | }; | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * General utilities |  * General utilities | ||||||
|  */ |  */ | ||||||
| @@ -295,6 +791,16 @@ | |||||||
|  */ |  */ | ||||||
| typedef void (*nss_if_rx_msg_callback_t)(void *app_data, struct nss_cmn_msg *msg); | typedef void (*nss_if_rx_msg_callback_t)(void *app_data, struct nss_cmn_msg *msg); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Callback function for IPv4 connection synchronization messages. | ||||||
|  |  * | ||||||
|  |  * @datatypes | ||||||
|  |  * nss_ipv4_cb_params | ||||||
|  |  * | ||||||
|  |  * @param[in] nicb  Pointer to the parameter structure for an NSS IPv4 callback. | ||||||
|  |  */ | ||||||
|  | typedef void (*nss_ipv4_callback_t)(struct nss_ipv4_cb_params *nicb); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_get_state |  * nss_get_state | ||||||
|  *	Gets the NSS state. |  *	Gets the NSS state. | ||||||
|   | |||||||
| @@ -139,8 +139,8 @@ struct nss_capwap_stats_msg { | |||||||
|  |  | ||||||
| 	uint32_t rx_frag_timeout_drops; | 	uint32_t rx_frag_timeout_drops; | ||||||
| 			/**< Packets dropped because of a reassembly timeout. */ | 			/**< Packets dropped because of a reassembly timeout. */ | ||||||
| 	uint32_t rx_n2h_drops; | 	uint32_t rx_queue_full_drops; | ||||||
| 			/**< Packets dropped because of error in packet processing. */ | 			/**< Packets dropped because the queue is full. */ | ||||||
| 	uint32_t rx_n2h_queue_full_drops; | 	uint32_t rx_n2h_queue_full_drops; | ||||||
| 			/**< Packets dropped because the NSS-to-host queue is full. */ | 			/**< Packets dropped because the NSS-to-host queue is full. */ | ||||||
| 	uint32_t rx_csum_drops; | 	uint32_t rx_csum_drops; | ||||||
| @@ -297,14 +297,6 @@ struct nss_capwap_flow_rule_msg { | |||||||
| 	uint32_t flow_id;		/**< Flow identification. */ | 	uint32_t flow_id;		/**< Flow identification. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_capwap_enable_tunnel_msg |  | ||||||
|  *	Structure to update sibling interface number. |  | ||||||
|  */ |  | ||||||
| struct nss_capwap_enable_tunnel_msg { |  | ||||||
| 	uint32_t sibling_if_num; /**< Sibling interface Number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_capwap_msg |  * nss_capwap_msg | ||||||
|  *	Data for sending and receiving CAPWAP messages. |  *	Data for sending and receiving CAPWAP messages. | ||||||
| @@ -330,8 +322,6 @@ struct nss_capwap_msg { | |||||||
| 				/**< Flow rule add message. */ | 				/**< Flow rule add message. */ | ||||||
| 		struct nss_capwap_flow_rule_msg flow_rule_del; | 		struct nss_capwap_flow_rule_msg flow_rule_del; | ||||||
| 				/**< Flow rule delete message. */ | 				/**< Flow rule delete message. */ | ||||||
| 		struct nss_capwap_enable_tunnel_msg enable_tunnel; |  | ||||||
| 				/**< Enable tunnel message. */ |  | ||||||
| 	} msg;			/**< Message payload. */ | 	} msg;			/**< Message payload. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -368,8 +358,8 @@ struct nss_capwap_tunnel_stats { | |||||||
|  |  | ||||||
| 	uint64_t rx_frag_timeout_drops; | 	uint64_t rx_frag_timeout_drops; | ||||||
| 			/**< Packets dropped because of a reassembly timeout. */ | 			/**< Packets dropped because of a reassembly timeout. */ | ||||||
| 	uint64_t rx_n2h_drops; | 	uint64_t rx_queue_full_drops; | ||||||
| 			/**< Packets dropped because of error in processing the packet. */ | 			/**< Packets dropped because the queue is full. */ | ||||||
| 	uint64_t rx_n2h_queue_full_drops; | 	uint64_t rx_n2h_queue_full_drops; | ||||||
| 			/**< Packets dropped because the NSS-to-host queue is full. */ | 			/**< Packets dropped because the NSS-to-host queue is full. */ | ||||||
| 	uint64_t rx_csum_drops; | 	uint64_t rx_csum_drops; | ||||||
| @@ -384,7 +374,6 @@ struct nss_capwap_tunnel_stats { | |||||||
| 	/* | 	/* | ||||||
| 	 * Tx/encap stats | 	 * Tx/encap stats | ||||||
| 	 */ | 	 */ | ||||||
| 	uint64_t tx_dropped_inner;	/**<Packets dropped due to inflow queue full. */ |  | ||||||
| 	uint64_t tx_segments;		/**< Number of segments or fragments. */ | 	uint64_t tx_segments;		/**< Number of segments or fragments. */ | ||||||
| 	uint64_t tx_queue_full_drops; | 	uint64_t tx_queue_full_drops; | ||||||
| 			/**< Packets dropped because the queue is full. */ | 			/**< Packets dropped because the queue is full. */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -67,50 +67,6 @@ typedef enum nss_clmap_error_types { | |||||||
| 	NSS_CLMAP_ERROR_MAX,			/**< Maximum error type. */ | 	NSS_CLMAP_ERROR_MAX,			/**< Maximum error type. */ | ||||||
| } nss_clmap_error_t; | } nss_clmap_error_t; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_clmap_interface_type |  | ||||||
|  *	Client map NSS interface type. |  | ||||||
|  */ |  | ||||||
| enum nss_clmap_interface_type { |  | ||||||
| 	NSS_CLMAP_INTERFACE_TYPE_US, |  | ||||||
| 	NSS_CLMAP_INTERFACE_TYPE_DS, |  | ||||||
| 	NSS_CLMAP_INTERFACE_TYPE_MAX |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_clmap_stats_type |  | ||||||
|  *	Client map statistic counters. |  | ||||||
|  */ |  | ||||||
| enum nss_clmap_stats_type { |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_PKTS,			/**< Number of packets received. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_BYTES,			/**< Number of bytes received. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_TX_PKTS,			/**< Number of packets transmitted. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_TX_BYTES,			/**< Number of bytes transmitted. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_QUEUE_0_DROPPED,		/**< Dropped receive packets 0. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_QUEUE_1_DROPPED,		/**< Dropped receive packets 1. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_QUEUE_2_DROPPED,		/**< Dropped receive packets 2. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_RX_QUEUE_3_DROPPED,		/**< Dropped receive packets 3. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_MACDB_LOOKUP_FAILED,	/**< Dropped due to MAC database look up failed. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_INVALID_PACKET_SIZE,	/**< Dropped due to invalid size packets. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_LOW_HEADROOM,		/**< Dropped due to insufficent headroom. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_NEXT_NODE_QUEUE_FULL,	/**< Dropped due to next node queue full. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_PBUF_ALLOC_FAILED,	/**< Dropped due to buffer allocation failure. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_DROPPED_LINEAR_FAILED,	/**< Dropped due to linear copy failure. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_SHARED_PACKET_CNT,		/**< Shared packet count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_ETHERNET_FRAME_ERROR,		/**< Ethernet frame error count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_CREATE_REQUESTS_CNT,	/**< MAC database create requests count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_CREATE_MAC_EXISTS_CNT,	/**< MAC database create failures, MAC exist count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_CREATE_MAC_TABLE_FULL_CNT, |  | ||||||
| 								/**< MAC database create failures, MAC database full count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_DESTROY_REQUESTS_CNT,	/**< MAC database destroy requests count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_DESTROY_MAC_NOT_FOUND_CNT, |  | ||||||
| 								/**< MAC database destroy failures, MAC not found count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_DESTROY_MAC_UNHASHED_CNT, |  | ||||||
| 								/**< MAC database destroy failures, MAC unhashed count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MACDB_FLUSH_REQUESTS_CNT,	/**< MAC database flush requests count. */ |  | ||||||
| 	NSS_CLMAP_INTERFACE_STATS_MAX,				/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_clmap_stats_msg |  * nss_clmap_stats_msg | ||||||
|  *	Per-interface statistics messages from the NSS firmware. |  *	Per-interface statistics messages from the NSS firmware. | ||||||
| @@ -155,16 +111,6 @@ struct nss_clmap_flush_mac_msg { | |||||||
| 	uint32_t nexthop_ifnum;			/**< Next hop interface number. */ | 	uint32_t nexthop_ifnum;			/**< Next hop interface number. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_clmap_stats_notification |  | ||||||
|  *	Client map transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_clmap_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_CLMAP_INTERFACE_STATS_MAX];	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;					/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_clmap_msg |  * nss_clmap_msg | ||||||
|  *	Data for sending and receiving client map messages. |  *	Data for sending and receiving client map messages. | ||||||
| @@ -355,34 +301,6 @@ extern void nss_clmap_init(void); | |||||||
| extern void nss_clmap_msg_init(struct nss_clmap_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len, | extern void nss_clmap_msg_init(struct nss_clmap_msg *ncm, uint16_t if_num, uint32_t type, uint32_t len, | ||||||
| 								nss_clmap_msg_callback_t cb, void *app_data); | 								nss_clmap_msg_callback_t cb, void *app_data); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_clmap_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_clmap_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_clmap_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_clmap_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014, 2016-2020, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014, 2016-2019, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -27,13 +27,6 @@ | |||||||
|  * @{ |  * @{ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * Interface Number 1 Valid 7 Core 8 Type 16 Index |  | ||||||
|  */ |  | ||||||
| typedef int32_t nss_if_num_t; |  | ||||||
| #define NSS_IF_IS_TYPE_DYNAMIC(if_num)		(if_num != -1) |  | ||||||
| #define NSS_IF_IS_VALID(if_num)		(if_num < NSS_MAX_NET_INTERFACES) |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @struct nss_ctx_instance |  * @struct nss_ctx_instance | ||||||
|  *	Forward declaration for structure that contains instance data for each |  *	Forward declaration for structure that contains instance data for each | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
| @@ -52,43 +52,6 @@ enum nss_dma_msg_error { | |||||||
| 	NSS_DMA_MSG_ERROR_MAX			/**< Maximum error type. */ | 	NSS_DMA_MSG_ERROR_MAX			/**< Maximum error type. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dma_stats_types |  | ||||||
|  *	DMA node statistics. |  | ||||||
|  */ |  | ||||||
| enum nss_dma_stats_types { |  | ||||||
| 	NSS_DMA_STATS_NO_REQ = NSS_STATS_NODE_MAX, |  | ||||||
| 					/**< Request descriptor not available. */ |  | ||||||
| 	NSS_DMA_STATS_NO_DESC,		/**< DMA descriptors not available. */ |  | ||||||
| 	NSS_DMA_STATS_NEXTHOP,		/**< Failed to retrive next hop. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_NEXTHOP_QUEUE, |  | ||||||
| 					/**< Failed to queue next hop. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_LINEAR_SZ,	/**< Failed to get memory for linearization. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_LINEAR_ALLOC,/**< Failed to allocate buffer for linearization. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_LINEAR_NO_SG,/**< Skip linearization due to non-SG packet. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_SPLIT_SZ,	/**< Failed to spliting buffer into multiple buffers. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_SPLIT_ALLOC,	/**< Failed to allocate buffer for split. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_SYNC_ALLOC,	/**< Failed to allocate buffer for sending statistics. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_CTX_ACTIVE,	/**< Failed to queue as the node is not active. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E0,	/**< Failed to process in hardware, error code E0. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E1,	/**< Failed to process in hardware, error code E1. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E2,	/**< Failed to process in hardware, error code E2. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E3,	/**< Failed to process in hardware, error code E3. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E4,	/**< Failed to process in hardware, error code E4. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E5,	/**< Failed to process in hardware, error code E5. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E6,	/**< Failed to process in hardware, error code E6. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E7,	/**< Failed to process in hardware, error code E7. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E8,	/**< Failed to process in hardware, error code E8. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E9,	/**< Failed to process in hardware, error code E9. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E10,	/**< Failed to process in hardware, error code E10. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E11,	/**< Failed to process in hardware, error code E11. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E12,	/**< Failed to process in hardware, error code E12. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E13,	/**< Failed to process in hardware, error code E13. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E14,	/**< Failed to process in hardware, error code E14. */ |  | ||||||
| 	NSS_DMA_STATS_FAIL_HW_E15,	/**< Failed to process in hardware, error code E15. */ |  | ||||||
| 	NSS_DMA_STATS_MAX,		/**< Maximum message type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dma_test_type |  * nss_dma_test_type | ||||||
|  *	DMA Test types. |  *	DMA Test types. | ||||||
| @@ -101,15 +64,6 @@ enum nss_dma_test_type { | |||||||
| 	NSS_DMA_TEST_TYPE_MAX			/**< Maximum test type. */ | 	NSS_DMA_TEST_TYPE_MAX			/**< Maximum test type. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dma_stats_notification |  | ||||||
|  *	DMA transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_dma_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_DMA_STATS_MAX];		/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;				/**< Core ID. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| #ifdef __KERNEL__ /* only kernel will use. */ | #ifdef __KERNEL__ /* only kernel will use. */ | ||||||
| /* | /* | ||||||
|  * Maximum number of HW specific statistics |  * Maximum number of HW specific statistics | ||||||
| @@ -175,6 +129,11 @@ struct nss_dma_msg { | |||||||
|  * nss_dma_register_handler |  * nss_dma_register_handler | ||||||
|  *	Registers the DMA message handler. |  *	Registers the DMA message handler. | ||||||
|  * |  * | ||||||
|  |  * @datatypes | ||||||
|  |  * nss_ctx_instance | ||||||
|  |  * | ||||||
|  |  * @param[in] nss_ctx  Pointer to the NSS context. | ||||||
|  |  * | ||||||
|  * @return |  * @return | ||||||
|  * None. |  * None. | ||||||
|  */ |  */ | ||||||
| @@ -296,34 +255,6 @@ void nss_dma_init(void); | |||||||
|  * Pointer to the NSS core context. |  * Pointer to the NSS core context. | ||||||
|  */ |  */ | ||||||
| extern struct nss_ctx_instance *nss_dma_get_context(void); | extern struct nss_ctx_instance *nss_dma_get_context(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dma_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_dma_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dma_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_dma_stats_register_notifier(struct notifier_block *nb); |  | ||||||
| #endif /*__KERNEL__ */ | #endif /*__KERNEL__ */ | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -74,85 +74,6 @@ enum nss_dtls_cmn_error { | |||||||
| 	NSS_DTLS_CMN_ERROR_MAX, | 	NSS_DTLS_CMN_ERROR_MAX, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dtls_cmn_ctx_stats_types |  | ||||||
|  *	DTLS common context statistics types. |  | ||||||
|  */ |  | ||||||
| enum nss_dtls_cmn_ctx_stats_types { |  | ||||||
| 	NSS_DTLS_CMN_STATS_RX_SINGLE_REC = NSS_STATS_NODE_MAX, |  | ||||||
| 						/**< Received single DTLS record datagrams. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_RX_MULTI_REC,	/**< Received multiple DTLS record datagrams. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_CRYPTO_RESOURCE,/**< Failure in crypto resource allocation. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_CRYPTO_ENQUEUE,	/**< Failure due to full queue in crypto or hardware. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_HEADROOM,	/**< Failure in headroom check. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_TAILROOM,	/**< Failure in tailroom check. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_VER,		/**< Failure in DTLS version check. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_EPOCH,		/**< Failure in DTLS epoch check. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_DTLS_RECORD,	/**< Failure in reading DTLS record. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_CAPWAP,		/**< Failure in CAPWAP classification. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_REPLAY,		/**< Failure in anti-replay check. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_REPLAY_DUP,	/**< Failure in anti-replay; duplicate records. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_REPLAY_WIN,	/**< Failure in anti-replay; packet outside the window. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_QUEUE,		/**< Failure due to full queue in DTLS. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_QUEUE_NEXTHOP,	/**< Failure due to full queue in next hop. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_PBUF_ALLOC,	/**< Failure in pbuf allocation. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_PBUF_LINEAR,	/**< Failure in pbuf linearization. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_PBUF_STATS,	/**< Failure in pbuf allocation for statistics. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_PBUF_ALIGN,	/**< Failure in pbuf alignment. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_CTX_ACTIVE,	/**< Failure in enqueue due to inactive context. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_HWCTX_ACTIVE,	/**< Failure in enqueue due to inactive hardware context. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_CIPHER,		/**< Failure in decrypting the data. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_AUTH,		/**< Failure in authenticating the data. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_SEQ_OVF,	/**< Failure due to sequence number overflow. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_BLK_LEN,	/**< Failure in decapsulation due to bad cipher length. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_FAIL_HASH_LEN,	/**< Failure in decapsulation due to bad hash length. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_LEN_ERROR,		/**< Length error. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_TOKEN_ERROR,		/**< Token error, unknown token command or instruction. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_BYPASS_ERROR,	/**< Token contains too much bypass data. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CONFIG_ERROR,	/**< Invalid command, algorithm, or mode combination. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_ALGO_ERROR,		/**< Unsupported algorithm. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_HASH_OVF_ERROR,	/**< Hash input overflow. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_TTL_ERROR,		/**< TTL or HOP-Limit underflow. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CSUM_ERROR,		/**< Checksum error. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_TIMEOUT_ERROR,	/**< Data timed out. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_0,		/**< Classification failure 0. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_1,		/**< Classification failure 1. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_2,		/**< Classification failure 2. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_3,		/**< Classification failure 3. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_4,		/**< Classification failure 4. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_5,		/**< Classification failure 5. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_6,		/**< Classification failure 6. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_7,		/**< Classification failure 7. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_8,		/**< Classification failure 8. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_9,		/**< Classification failure 9. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_10,	/**< Classification failure 10. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_11,	/**< Classification failure 11. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_12,	/**< Classification failure 12. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_13,	/**< Classification failure 13. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_14,	/**< Classification failure 14. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_15,	/**< Classification failure 15. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_16,	/**< Classification failure 16. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_17,	/**< Classification failure 17. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_18,	/**< Classification failure 18. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_19,	/**< Classification failure 19. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_20,	/**< Classification failure 20. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_21,	/**< Classification failure 21. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_22,	/**< Classification failure 22. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_23,	/**< Classification failure 23. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_24,	/**< Classification failure 24. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_25,	/**< Classification failure 25. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_26,	/**< Classification failure 26. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_27,	/**< Classification failure 27. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_28,	/**< Classification failure 28. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_29,	/**< Classification failure 29. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_30,	/**< Classification failure 30. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_CLE_ERROR_31,	/**< Classification failure 31. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_SEQ_LOW,		/**< Lower 32 bits of current transmit sequence number. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_SEQ_HIGH,		/**< Upper 16 bits of current transmit sequence number. */ |  | ||||||
| 	NSS_DTLS_CMN_STATS_EPOCH,		/**< Current epoch value. */ |  | ||||||
| 	NSS_DTLS_CMN_CTX_STATS_MAX,		/**< Maximum message type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_node_stats |  * nss_dtls_cmn_node_stats | ||||||
|  * 	DTLS node statistics. |  * 	DTLS node statistics. | ||||||
| @@ -262,16 +183,6 @@ struct nss_dtls_cmn_ctx_config_dtls { | |||||||
| 	uint8_t res1;		/**< Reserved for alignment. */ | 	uint8_t res1;		/**< Reserved for alignment. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dtls_cmn_stats_notification |  | ||||||
|  *	DTLS common transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_dtls_cmn_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_DTLS_CMN_CTX_STATS_MAX];		/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;					/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_msg |  * nss_dtls_cmn_msg | ||||||
|  *	Data for sending and receiving DTLS messages. |  *	Data for sending and receiving DTLS messages. | ||||||
| @@ -369,20 +280,6 @@ extern nss_tx_status_t nss_dtls_cmn_tx_msg_sync(struct nss_ctx_instance *nss_ctx | |||||||
| 						enum nss_dtls_cmn_msg_type type, uint16_t len, | 						enum nss_dtls_cmn_msg_type type, uint16_t len, | ||||||
| 						struct nss_dtls_cmn_msg *ndcm, enum nss_dtls_cmn_error *resp); | 						struct nss_dtls_cmn_msg *ndcm, enum nss_dtls_cmn_error *resp); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dtls_cmn_unregister_if |  | ||||||
|  *	Deregisters a DTLS session interface from the NSS. |  | ||||||
|  * |  | ||||||
|  * @param[in] if_num  NSS interface number. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * None. |  | ||||||
|  * |  | ||||||
|  * @dependencies |  | ||||||
|  * The DTLS session interface must have been previously registered. |  | ||||||
|  */ |  | ||||||
| extern void nss_dtls_cmn_unregister_if(uint32_t if_num); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_register_if |  * nss_dtls_cmn_register_if | ||||||
|  *	Registers a DTLS session interface with the NSS for sending and receiving |  *	Registers a DTLS session interface with the NSS for sending and receiving | ||||||
| @@ -412,19 +309,22 @@ extern struct nss_ctx_instance *nss_dtls_cmn_register_if(uint32_t if_num, | |||||||
| 							 void *app_ctx); | 							 void *app_ctx); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_notify_unregister |  * nss_dtls_cmn_unregister_if | ||||||
|  *	Deregisters an event callback. |  *	Deregisters a DTLS session interface from the NSS. | ||||||
|  * |  * | ||||||
|  * @param[in] ifnum  NSS interface number. |  * @param[in] if_num  NSS interface number. | ||||||
|  * |  * | ||||||
|  * @return |  * @return | ||||||
|  * None. |  * None. | ||||||
|  |  * | ||||||
|  |  * @dependencies | ||||||
|  |  * The DTLS session interface must have been previously registered. | ||||||
|  */ |  */ | ||||||
| extern void nss_dtls_cmn_notify_unregister(uint32_t ifnum); | extern void nss_dtls_cmn_unregister_if(uint32_t if_num); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_notify_register |  * nss_dtls_cmn_notify_register | ||||||
|  *	Registers an event callback to handle notification from DTLS firmware package. |  *	Register an event callback to handle notification from DTLS firmware package. | ||||||
|  * |  * | ||||||
|  * @param[in] ifnum     NSS interface number. |  * @param[in] ifnum     NSS interface number. | ||||||
|  * @param[in] ev_cb     Callback for DTLS tunnel message. |  * @param[in] ev_cb     Callback for DTLS tunnel message. | ||||||
| @@ -436,6 +336,17 @@ extern void nss_dtls_cmn_notify_unregister(uint32_t ifnum); | |||||||
| extern struct nss_ctx_instance *nss_dtls_cmn_notify_register(uint32_t ifnum, nss_dtls_cmn_msg_callback_t ev_cb, | extern struct nss_ctx_instance *nss_dtls_cmn_notify_register(uint32_t ifnum, nss_dtls_cmn_msg_callback_t ev_cb, | ||||||
| 							     void *app_data); | 							     void *app_data); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_dtls_cmn_notify_unregister | ||||||
|  |  *	Unregister an event callback. | ||||||
|  |  * | ||||||
|  |  * @param[in] ifnum  NSS interface number. | ||||||
|  |  * | ||||||
|  |  * @return | ||||||
|  |  * None. | ||||||
|  |  */ | ||||||
|  | extern void nss_dtls_cmn_notify_unregister(uint32_t ifnum); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_dtls_cmn_msg_init |  * nss_dtls_cmn_msg_init | ||||||
|  *	Initializes a DTLS message. |  *	Initializes a DTLS message. | ||||||
| @@ -476,34 +387,6 @@ extern struct nss_ctx_instance *nss_dtls_cmn_get_context(void); | |||||||
|  */ |  */ | ||||||
| extern int32_t nss_dtls_cmn_get_ifnum(int32_t if_num); | extern int32_t nss_dtls_cmn_get_ifnum(int32_t if_num); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dtls_cmn_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_dtls_cmn_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_dtls_cmn_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_dtls_cmn_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -40,10 +40,10 @@ | |||||||
| enum nss_dynamic_interface_type { | enum nss_dynamic_interface_type { | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_NONE, | 	NSS_DYNAMIC_INTERFACE_TYPE_NONE, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_GRE_REDIR, | 	NSS_DYNAMIC_INTERFACE_TYPE_GRE_REDIR, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_RESERVED_5, | 	NSS_DYNAMIC_INTERFACE_TYPE_CAPWAP, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_TUNIPIP6_INNER, | 	NSS_DYNAMIC_INTERFACE_TYPE_TUNIPIP6_INNER, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_TUNIPIP6_OUTER, | 	NSS_DYNAMIC_INTERFACE_TYPE_TUNIPIP6_OUTER, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_RESERVED, | 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_VAP, | 	NSS_DYNAMIC_INTERFACE_TYPE_VAP, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_RESERVED_0, | 	NSS_DYNAMIC_INTERFACE_TYPE_RESERVED_0, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_PPPOE, | 	NSS_DYNAMIC_INTERFACE_TYPE_PPPOE, | ||||||
| @@ -105,11 +105,6 @@ enum nss_dynamic_interface_type { | |||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_TLS_OUTER, | 	NSS_DYNAMIC_INTERFACE_TYPE_TLS_OUTER, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_MIRROR, | 	NSS_DYNAMIC_INTERFACE_TYPE_MIRROR, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI_EXT_VDEV_WDS, | 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI_EXT_VDEV_WDS, | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_CAPWAP_HOST_INNER, |  | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_CAPWAP_OUTER, |  | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI_EXT_VDEV_VLAN, |  | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_INNER, |  | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_WIFI_MESH_OUTER, |  | ||||||
| 	NSS_DYNAMIC_INTERFACE_TYPE_MAX | 	NSS_DYNAMIC_INTERFACE_TYPE_MAX | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -84,7 +84,6 @@ enum nss_edma_stats_rx_t { | |||||||
| 	NSS_EDMA_STATS_RX_DESC, | 	NSS_EDMA_STATS_RX_DESC, | ||||||
| 	NSS_EDMA_STATS_RX_QOS_ERR, | 	NSS_EDMA_STATS_RX_QOS_ERR, | ||||||
| 	NSS_EDMA_STATS_RX_SRC_PORT_INVALID, | 	NSS_EDMA_STATS_RX_SRC_PORT_INVALID, | ||||||
| 	NSS_EDMA_STATS_RX_SRC_IF_INVALID, |  | ||||||
| 	NSS_EDMA_STATS_RX_MAX | 	NSS_EDMA_STATS_RX_MAX | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -144,7 +143,6 @@ struct nss_edma_rx_ring_stats { | |||||||
| 	uint32_t desc_cnt;		/**< Number of descriptors processed. */ | 	uint32_t desc_cnt;		/**< Number of descriptors processed. */ | ||||||
| 	uint32_t qos_err;		/**< Number of QoS errors. */ | 	uint32_t qos_err;		/**< Number of QoS errors. */ | ||||||
| 	uint32_t rx_src_port_invalid;	/**< Number of source port invalid errors. */ | 	uint32_t rx_src_port_invalid;	/**< Number of source port invalid errors. */ | ||||||
| 	uint32_t rx_src_if_invalid;	/**< Number of source interface invalid errors. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  **************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -11,7 +11,7 @@ | |||||||
|  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||||
|  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | ||||||
|  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  **************************************************************************** |  ************************************************************************** | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -119,49 +119,47 @@ enum nss_gre_ip_types { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_base_types |  * GRE Base debug statistics | ||||||
|  *	GRE base debug statistics. |  | ||||||
|  */ |  */ | ||||||
| enum nss_gre_base_types { | enum nss_gre_base_debug_types { | ||||||
| 	NSS_GRE_BASE_RX_PACKETS,		/**< Receive packet count. */ | 	GRE_BASE_RX_PACKETS,			/**< Rx packet count. */ | ||||||
| 	NSS_GRE_BASE_RX_DROPPED,		/**< Number of packet dropped at receive. */ | 	GRE_BASE_RX_DROPPED,			/**< Number of packet dropped at Rx. */ | ||||||
| 	NSS_GRE_BASE_EXP_ETH_HDR_MISSING,	/**< Ethernet header missing. */ | 	GRE_BASE_EXP_ETH_HDR_MISSING,		/**< Ethernet header missing. */ | ||||||
| 	NSS_GRE_BASE_EXP_ETH_TYPE_NON_IP,	/**< Packet is not IPV4 or IPV6. */ | 	GRE_BASE_EXP_ETH_TYPE_NON_IP,		/**< Packet is not IPV4 or IPV6. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_UNKNOWN_PROTOCOL,	/**< Packet protocol is unknown. */ | 	GRE_BASE_EXP_IP_UNKNOWN_PROTOCOL,	/**< Packet protocol is unknown. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_HEADER_INCOMPLETE,	/**< Bad IP header. */ | 	GRE_BASE_EXP_IP_HEADER_INCOMPLETE,	/**< Bad IP header. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_BAD_TOTAL_LENGTH,	/**< IP total length is invalid. */ | 	GRE_BASE_EXP_IP_BAD_TOTAL_LENGTH,	/**< IP total lenghth is invalid. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_BAD_CHECKSUM,	/**< IP checksum is bad. */ | 	GRE_BASE_EXP_IP_BAD_CHECKSUM,		/**< IP checksum is bad. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_DATAGRAM_INCOMPLETE,/**< Bad packet. */ | 	GRE_BASE_EXP_IP_DATAGRAM_INCOMPLETE,	/**< Bad packet. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_FRAGMENT,		/**< IP packet is a fragment. */ | 	GRE_BASE_EXP_IP_FRAGMENT,		/**< IP packet is a fragment. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_OPTIONS_INCOMPLETE,	/**< IP option is invalid. */ | 	GRE_BASE_EXP_IP_OPTIONS_INCOMPLETE,	/**< IP option is invalid. */ | ||||||
| 	NSS_GRE_BASE_EXP_IP_WITH_OPTIONS,	/**< IP packet with options. */ | 	GRE_BASE_EXP_IP_WITH_OPTIONS,		/**< IP packet with options. */ | ||||||
| 	NSS_GRE_BASE_EXP_IPV6_UNKNOWN_PROTOCOL,	/**< Protocol is unknown. */ | 	GRE_BASE_EXP_IPV6_UNKNOWN_PROTOCOL,	/**< Protocol is unknown. */ | ||||||
| 	NSS_GRE_BASE_EXP_IPV6_HEADER_INCOMPLETE,/**< Incomplete ipv6 header. */ | 	GRE_BASE_EXP_IPV6_HEADER_INCOMPLETE,	/**< Incomplete ipv6 header. */ | ||||||
| 	NSS_GRE_BASE_EXP_GRE_UNKNOWN_SESSION,	/**< Unknown GRE session. */ | 	GRE_BASE_EXP_GRE_UNKNOWN_SESSION,	/**< Unknown GRE session. */ | ||||||
| 	NSS_GRE_BASE_EXP_GRE_NODE_INACTIVE,	/**< GRE node is inactive. */ | 	GRE_BASE_EXP_GRE_NODE_INACTIVE,		/**< GRE node is inactive. */ | ||||||
| 	NSS_GRE_BASE_DEBUG_MAX,			/**< GRE base debug maximum. */ | 	GRE_BASE_DEBUG_MAX,			/**< GRE base debug max. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /* | ||||||
|  * nss_gre_session_types |  * GRE session Packet drop and exception events. | ||||||
|  *	GRE session packet drop and exception events. |  | ||||||
|  */ |  */ | ||||||
| enum nss_gre_session_types { | enum gre_session_debug_types { | ||||||
| 	NSS_GRE_SESSION_PBUF_ALLOC_FAIL,		/**< Pbuf allocation failure. */ | 	GRE_SESSION_PBUF_ALLOC_FAIL,		/**< Pbuf allocation failure. */ | ||||||
| 	NSS_GRE_SESSION_DECAP_FORWARD_ENQUEUE_FAIL,	/**< Receive forward enqueue failure. */ | 	GRE_SESSION_DECAP_FORWARD_ENQUEUE_FAIL,	/**< Rx forward enqueue failure. */ | ||||||
| 	NSS_GRE_SESSION_ENCAP_FORWARD_ENQUEUE_FAIL,	/**< Transmit forward enqueue failure. */ | 	GRE_SESSION_ENCAP_FORWARD_ENQUEUE_FAIL,	/**< Tx forward enqueue failure. */ | ||||||
| 	NSS_GRE_SESSION_DECAP_TX_FORWARDED,		/**< Number of packets forwarded after decapsulation. */ | 	GRE_SESSION_DECAP_TX_FORWARDED,		/**< Number of packets forwarded after decap. */ | ||||||
| 	NSS_GRE_SESSION_ENCAP_RX_RECEIVED,		/**< Number of packets received for encapsulation. */ | 	GRE_SESSION_ENCAP_RX_RECEIVED,		/**< Number of packets received for encap. */ | ||||||
| 	NSS_GRE_SESSION_ENCAP_RX_DROPPED,		/**< Packets dropped while enqueuing for encapsulation. */ | 	GRE_SESSION_ENCAP_RX_DROPPED,		/**< Packets dropped while enqueuing for encap. */ | ||||||
| 	NSS_GRE_SESSION_ENCAP_RX_LINEAR_FAIL,		/**< Packets dropped during encapsulation linearization. */ | 	GRE_SESSION_ENCAP_RX_LINEAR_FAIL,	/**< Packets dropped during encap linearization. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_KEY_ERROR,		/**< Receive key error. */ | 	GRE_SESSION_EXP_RX_KEY_ERROR,		/**< Rx KEY error. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_SEQ_ERROR,		/**< Receive Sequence number error. */ | 	GRE_SESSION_EXP_RX_SEQ_ERROR,		/**< Rx Sequence number error. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_CS_ERROR,		/**< Receive checksum error */ | 	GRE_SESSION_EXP_RX_CS_ERROR,		/**< Rx checksum error */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_FLAG_MISMATCH,		/**< Receive flag mismatch. */ | 	GRE_SESSION_EXP_RX_FLAG_MISMATCH,	/**< Rx flag mismatch. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_MALFORMED,		/**< Receive packet is malformed. */ | 	GRE_SESSION_EXP_RX_MALFORMED,		/**< Rx packet is malformed. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_INVALID_PROTOCOL,	/**< Receive packet protocol is invalid. */ | 	GRE_SESSION_EXP_RX_INVALID_PROTOCOL,	/**< Rx packet protocol is invalid. */ | ||||||
| 	NSS_GRE_SESSION_EXP_RX_NO_HEADROOM,		/**< Packet does not have enough headroom. */ | 	GRE_SESSION_EXP_RX_NO_HEADROOM,		/**< Packet does not have enough headroom. */ | ||||||
| 	NSS_GRE_SESSION_DEBUG_MAX,			/**< Session debug maximum. */ | 	GRE_SESSION_DEBUG_MAX,			/**< Session debug max. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -209,34 +207,15 @@ struct nss_gre_deconfig_msg { | |||||||
|  * GRE session statistics message |  * GRE session statistics message | ||||||
|  */ |  */ | ||||||
| struct nss_gre_session_stats_msg { | struct nss_gre_session_stats_msg { | ||||||
| 	struct nss_cmn_node_stats node_stats;		/**< Common node statistics. */ | 	struct nss_cmn_node_stats node_stats;	/**< Common node statistics. */ | ||||||
| 	uint32_t stats[NSS_GRE_SESSION_DEBUG_MAX];	/**< Session debug statistics. */ | 	uint32_t stats[GRE_SESSION_DEBUG_MAX];	/**< Session debug statistics. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * GRE base statistics message |  * GRE base statistics message | ||||||
|  */ |  */ | ||||||
| struct nss_gre_base_stats_msg { | struct nss_gre_base_stats_msg { | ||||||
| 	uint32_t stats[NSS_GRE_BASE_DEBUG_MAX];		/**< Base debug statistics. */ | 	uint32_t stats[GRE_BASE_DEBUG_MAX];	/**< Base debug statistics. */ | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_base_stats_notification |  | ||||||
|  *	GRE transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_base_stats_notification { |  | ||||||
| 	uint64_t stats_base_ctx[NSS_GRE_BASE_DEBUG_MAX];	/**< Base debug transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_session_stats_notification |  | ||||||
|  *	GRE transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_session_stats_notification { |  | ||||||
| 	uint64_t stats_session_ctx[NSS_GRE_SESSION_DEBUG_MAX];		/**< Session debug transmission statistics. */ |  | ||||||
| 	uint32_t core_id;						/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;						/**< Interface number. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -459,34 +438,6 @@ extern void nss_gre_register_pkt_callback(nss_gre_pkt_callback_t cb); | |||||||
|  */ |  */ | ||||||
| extern void nss_gre_unregister_pkt_callback(void); | extern void nss_gre_unregister_pkt_callback(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014-2015, 2017-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014-2015, 2017-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -92,60 +92,6 @@ enum nss_gre_redir_tunnel_types { | |||||||
| 	NSS_GRE_REDIR_TUNNEL_TYPE_MAX,		/**< Maximum tunnel type. */ | 	NSS_GRE_REDIR_TUNNEL_TYPE_MAX,		/**< Maximum tunnel type. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_stats_types |  | ||||||
|  *	GRE redirect statistics types. |  | ||||||
|  */ |  | ||||||
| enum nss_gre_redir_stats_types { |  | ||||||
| 	NSS_GRE_REDIR_STATS_TX_DROPS = NSS_STATS_NODE_MAX, |  | ||||||
| 						/**< Dropped transmit packets. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_SJACK_RX_PKTS,	/**< SJACK receive packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_SJACK_TX_PKTS,	/**< SJACK transmit packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_RX_PKTS_0,	/**< Offload receive packet counter 0. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_RX_PKTS_1,	/**< Offload receive packet counter 1. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_RX_PKTS_2,	/**< Offload receive packet counter 2. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_RX_PKTS_3,	/**< Offload receive packet counter 3. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_RX_PKTS_4,	/**< Offload receive packet counter 4. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_TX_PKTS_0,	/**< Offload transmit packet counter 0. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_TX_PKTS_1,	/**< Offload transmit packet counter 1. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_TX_PKTS_2,	/**< Offload transmit packet counter 2. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_TX_PKTS_3,	/**< Offload transmit packet counter 3. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_OFFLOAD_TX_PKTS_4,	/**< Offload transmit packet counter 4. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_US_RX_PKTS, |  | ||||||
| 						/**< Upstream exception receive packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_US_TX_PKTS, |  | ||||||
| 						/**< Upstream exception transmit packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_DS_RX_PKTS, |  | ||||||
| 						/**< Downstream exception receive packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_DS_TX_PKTS, |  | ||||||
| 						/**< Downstream exception transmit packet counter. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_ENCAP_SG_ALLOC_DROP, |  | ||||||
| 						/**< Encapsulation drop counters due to scatter gather buffer allocation failure. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_DECAP_FAIL_DROP, |  | ||||||
| 						/**< Decapsulation drop counters due to invalid IP header. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_DECAP_SPLIT_DROP, |  | ||||||
| 						/**< Decapsulation drop counters due to split flow processing. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_SPLIT_SG_ALLOC_FAIL, |  | ||||||
| 						/**< Split processing fail counter due to scatter gather buffer allocation failure. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_SPLIT_LINEAR_COPY_FAIL, |  | ||||||
| 						/**< Split processing fail counter due to linear copy fail. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_SPLIT_NOT_ENOUGH_TAILROOM, |  | ||||||
| 						/**< Split processing fail counter due to insufficient tailroom. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_DS_INVALID_DST_DROP, |  | ||||||
| 						/**< Downstream exception handling fail counter due to invalid destination. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_DECAP_EAPOL_FRAMES, |  | ||||||
| 						/**< Decapsulation EAPoL frame counters. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_EXCEPTION_DS_INV_APPID, |  | ||||||
| 						/**< Invalid application ID for the transmit completion packets on exception downstream node. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_HEADROOM_UNAVAILABLE, |  | ||||||
| 						/**< Packet headroom unavailable to write metadata. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_TX_COMPLETION_SUCCESS, |  | ||||||
| 						/**< Host enqueue success count for the transmit completion packets. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_TX_COMPLETION_DROP, |  | ||||||
| 						/**< Host enqueue drop count for the transmit completion packets. */ |  | ||||||
| 	NSS_GRE_REDIR_STATS_MAX			/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_inner_configure_msg |  * nss_gre_redir_inner_configure_msg | ||||||
|  *	Message information for configuring GRE inner node. |  *	Message information for configuring GRE inner node. | ||||||
| @@ -300,64 +246,35 @@ struct nss_gre_redir_stats_sync_msg { | |||||||
| 	uint32_t tx_completion_drop;			/**< Host enqueue drop count for the Tx completion packets. */ | 	uint32_t tx_completion_drop;			/**< Host enqueue drop count for the Tx completion packets. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_tun_stats |  | ||||||
|  *	GRE redirect statistics to accumulate all the stats values. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_redir_tun_stats { |  | ||||||
| 	uint64_t rx_packets;		/**< Number of packets received. */ |  | ||||||
| 	uint64_t rx_bytes;		/**< Number of bytes received. */ |  | ||||||
| 	uint64_t tx_packets;		/**< Number of packets transmitted. */ |  | ||||||
| 	uint64_t tx_bytes;		/**< Number of bytes transmitted. */ |  | ||||||
| 	uint64_t rx_dropped[NSS_MAX_NUM_PRI]; |  | ||||||
| 					/**< Packets dropped on receive due to queue full. */ |  | ||||||
| 	uint64_t tx_dropped;		/**< Dropped transmit packets. */ |  | ||||||
| 	uint64_t sjack_rx_packets;	/**< SJACK receive packet counter. */ |  | ||||||
| 	uint64_t sjack_tx_packets;	/**< SJACK transmit packet counter. */ |  | ||||||
| 	uint64_t offl_rx_pkts[NSS_GRE_REDIR_MAX_RADIO];	/**< Offload receive packet counter per radio. */ |  | ||||||
| 	uint64_t offl_tx_pkts[NSS_GRE_REDIR_MAX_RADIO];	/**< Offload transmit packet counter per radio. */ |  | ||||||
| 	uint64_t exception_us_rx;	/**< Upstream exception receive packet counter. */ |  | ||||||
| 	uint64_t exception_us_tx;	/**< Upstream exception transmit packet counter. */ |  | ||||||
| 	uint64_t exception_ds_rx;	/**< Downstream exception receive packet counter. */ |  | ||||||
| 	uint64_t exception_ds_tx;	/**< Downstream exception transmit packet counter. */ |  | ||||||
| 	uint64_t encap_sg_alloc_drop; |  | ||||||
| 					/**< Encapsulation drop counters due to scatter gather buffer allocation failure. */ |  | ||||||
| 	uint64_t decap_fail_drop;	/**< Decapsulation drop counters due to invalid IP header. */ |  | ||||||
| 	uint64_t decap_split_drop;	/**< Decapsulation drop counters due to split flow processing. */ |  | ||||||
| 	uint64_t split_sg_alloc_fail; |  | ||||||
| 					/**< Split processing fail counter due to scatter gather buffer allocation failure. */ |  | ||||||
| 	uint64_t split_linear_copy_fail; |  | ||||||
| 					/**< Split processing fail counter due to linear copy fail. */ |  | ||||||
| 	uint64_t split_not_enough_tailroom; |  | ||||||
| 					/**< Split processing fail counter due to insufficient tailroom. */ |  | ||||||
| 	uint64_t exception_ds_invalid_dst_drop; |  | ||||||
| 					/**< Downstream exception handling fail counter due to invalid destination. */ |  | ||||||
| 	uint64_t decap_eapol_frames;	/**< Decapsulation EAPoL frame counters. */ |  | ||||||
| 	uint64_t exception_ds_inv_appid; |  | ||||||
| 					/**< Invalid application ID for the transmit completion packets on exception downstream node. */ |  | ||||||
| 	uint64_t headroom_unavail;	/**< Packet headroom unavailable to write metadata. */ |  | ||||||
| 	uint64_t tx_completion_success;	/**< Host enqueue success count for the transmit completion packets. */ |  | ||||||
| 	uint64_t tx_completion_drop;	/**< Host enqueue drop count for the transmit completion packets. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_tunnel_stats |  * nss_gre_redir_tunnel_stats | ||||||
|  *	GRE redirect statistics as seen by the HLOS. |  *	GRE redirect statistics as seen by the HLOS. | ||||||
|  */ |  */ | ||||||
| struct nss_gre_redir_tunnel_stats { | struct nss_gre_redir_tunnel_stats { | ||||||
| 	struct net_device *dev;			/**< Net device. */ | 	struct net_device *dev;				/**< Net device. */ | ||||||
| 	struct nss_gre_redir_tun_stats tstats;	/**< Structure to accumulate all the statistics. */ | 	struct nss_cmn_node_stats node_stats;		/**< Common node statistics. */ | ||||||
| 	uint32_t ref_count;			/**< Reference count for statistics. */ | 	uint64_t tx_dropped;				/**< Dropped Tx packets. */ | ||||||
| }; | 	uint64_t sjack_rx_packets;			/**< SJACK Rx packet counter. */ | ||||||
|  | 	uint64_t sjack_tx_packets;			/**< SJACK Tx packet counter. */ | ||||||
| /** | 	uint64_t offl_rx_pkts[NSS_GRE_REDIR_MAX_RADIO];	/**< Offload Rx packet counter per radio. */ | ||||||
|  * nss_gre_redir_stats_notification | 	uint64_t offl_tx_pkts[NSS_GRE_REDIR_MAX_RADIO];	/**< Offload Tx packet counter per radio. */ | ||||||
|  *	GRE redirect transmission statistics structure. | 	uint64_t exception_us_rx;			/**< Upstream exception Rx packet counter. */ | ||||||
|  */ | 	uint64_t exception_us_tx;			/**< Upstream exception Tx packet counter. */ | ||||||
| struct nss_gre_redir_stats_notification { | 	uint64_t exception_ds_rx;			/**< Downstream exception Rx packet counter. */ | ||||||
| 	struct nss_gre_redir_tunnel_stats stats_ctx;	/**< Context transmission statistics. */ | 	uint64_t exception_ds_tx;			/**< Downstream exception Tx packet counter. */ | ||||||
| 	uint32_t core_id;				/**< Core ID. */ | 	uint64_t encap_sg_alloc_drop;			/**< Encapsulation drop counters due to scatter gather buffer allocation failure. */ | ||||||
| 	uint32_t if_num;				/**< Interface number. */ | 	uint64_t decap_fail_drop;			/**< Decapsulation drop counters due to invalid IP header. */ | ||||||
|  | 	uint64_t decap_split_drop;			/**< Decapsulation drop counters due to split flow processing. */ | ||||||
|  | 	uint64_t split_sg_alloc_fail;			/**< Split processing fail counter due to scatter gather buffer allocation failure. */ | ||||||
|  | 	uint64_t split_linear_copy_fail;		/**< Split processing fail counter due to linear copy fail. */ | ||||||
|  | 	uint64_t split_not_enough_tailroom;		/**< Split processing fail counter due to insufficient tailroom. */ | ||||||
|  | 	uint64_t exception_ds_invalid_dst_drop;		/**< Downstream exception handling fail counter due to invalid destination. */ | ||||||
|  | 	uint64_t decap_eapol_frames;			/**< Decapsulation EAPoL frame counters. */ | ||||||
|  | 	uint64_t exception_ds_inv_appid;		/**< Invalid application ID for the Tx completion packets on exception downstream node. */ | ||||||
|  | 	uint64_t headroom_unavail;			/**< Packet headroom unavailable to write metadata. */ | ||||||
|  | 	uint64_t tx_completion_success;			/**< Host enqueue success count for the Tx completion packets. */ | ||||||
|  | 	uint64_t tx_completion_drop;			/**< Host enqueue drop count for the Tx completion packets. */ | ||||||
|  | 	uint32_t ref_count;				/**< Reference count for statistics. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -549,7 +466,7 @@ extern nss_tx_status_t nss_gre_redir_tx_buf_noreuse(struct nss_ctx_instance *nss | |||||||
| 			uint32_t if_num); | 			uint32_t if_num); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_stats_get |  * nss_gre_redir_get_stats | ||||||
|  *	Gets GRE redirect tunnel statistics. |  *	Gets GRE redirect tunnel statistics. | ||||||
|  * |  * | ||||||
|  * @datatypes |  * @datatypes | ||||||
| @@ -561,7 +478,7 @@ extern nss_tx_status_t nss_gre_redir_tx_buf_noreuse(struct nss_ctx_instance *nss | |||||||
|  * @return |  * @return | ||||||
|  * TRUE or FALSE. |  * TRUE or FALSE. | ||||||
|  */ |  */ | ||||||
| extern bool nss_gre_redir_stats_get(int index, struct nss_gre_redir_tunnel_stats *stats); | extern bool nss_gre_redir_get_stats(int index, struct nss_gre_redir_tunnel_stats *stats); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_alloc_and_register_node |  * nss_gre_redir_alloc_and_register_node | ||||||
| @@ -677,34 +594,6 @@ extern struct dentry *nss_gre_redir_get_dentry(void); | |||||||
|  */ |  */ | ||||||
| extern struct device *nss_gre_redir_get_device(void); | extern struct device *nss_gre_redir_get_device(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2018, 2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2018, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -72,39 +72,6 @@ enum nss_gre_redir_lag_ds_message_types { | |||||||
| 	NSS_GRE_REDIR_LAG_DS_MAX_MSG_TYPES, | 	NSS_GRE_REDIR_LAG_DS_MAX_MSG_TYPES, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_ds_stats_types |  | ||||||
|  *	GRE redirect LAG downstream statistics. |  | ||||||
|  */ |  | ||||||
| enum nss_gre_redir_lag_ds_stats_types { |  | ||||||
| 	NSS_GRE_REDIR_LAG_DS_STATS_DST_INVALID = NSS_STATS_NODE_MAX, |  | ||||||
| 							/**< Packets that do not have a valid destination. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_DS_STATS_EXCEPTION_PKT,	/**< Packets that are exceptioned to host. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_DS_STATS_MAX,			/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_us_stats_types |  | ||||||
|  *	GRE redirect LAG upstream statistics. |  | ||||||
|  */ |  | ||||||
| enum nss_gre_redir_lag_us_stats_types { |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_AMSDU_PKTS = NSS_STATS_NODE_MAX, |  | ||||||
| 							/**< Number of AMSDU packets seen. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_AMSDU_PKTS_ENQUEUED,	/**< Number of AMSDU packets enqueued. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_AMSDU_PKTS_EXCEPTIONED, |  | ||||||
| 							/**< Number of AMSDU packets exceptioned. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_EXCEPTIONED,		/**< Number of exceptioned packets. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_FREED,		/**< Freed packets when equeue to NSS to host fails. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_ADD_ATTEMPT,		/**< Add hash attempts. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_ADD_SUCCESS,		/**< Add hash success. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_ADD_FAIL_TABLE_FULL,	/**< Add hash failed due to full table. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_ADD_FAIL_EXISTS,	/**< Add hash failed as entry already exists. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_DEL_ATTEMPT,		/**< Delete hash attempts. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_DEL_SUCCESS,		/**< Delete hash success. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_DEL_FAIL_NOT_FOUND,	/**< Delete hash failed as entry not found in hash table. */ |  | ||||||
| 	NSS_GRE_REDIR_LAG_US_STATS_MAX,			/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_lag_us_hash_mode |  * nss_gre_redir_lag_us_hash_mode | ||||||
|  *	GRE redirect LAG upstream hash modes. |  *	GRE redirect LAG upstream hash modes. | ||||||
| @@ -286,16 +253,6 @@ struct nss_gre_redir_lag_us_tunnel_stats { | |||||||
| 	struct nss_gre_redir_lag_us_cmn_db_stats db_stats;	/**< Common hash statistics. */ | 	struct nss_gre_redir_lag_us_cmn_db_stats db_stats;	/**< Common hash statistics. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_us_stats_notification |  | ||||||
|  *	GRE redirect LAG upstream transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_redir_lag_us_stats_notification { |  | ||||||
| 	struct nss_gre_redir_lag_us_tunnel_stats stats_ctx;	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;					/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_lag_ds_add_sta_msg |  * nss_gre_redir_lag_ds_add_sta_msg | ||||||
|  *	Message to add station in LAG deployment. |  *	Message to add station in LAG deployment. | ||||||
| @@ -363,26 +320,15 @@ struct nss_gre_redir_lag_ds_msg { | |||||||
|  *	Downstream statistics. |  *	Downstream statistics. | ||||||
|  */ |  */ | ||||||
| struct nss_gre_redir_lag_ds_tun_stats { | struct nss_gre_redir_lag_ds_tun_stats { | ||||||
| 	uint64_t rx_packets;		/**< Received packets. */ | 	uint64_t rx_packets;					/**< Received packets. */ | ||||||
| 	uint64_t rx_bytes;		/**< Received bytes. */ | 	uint64_t rx_bytes;					/**< Received bytes. */ | ||||||
| 	uint64_t tx_packets;		/**< Transmit packets. */ | 	uint64_t tx_packets;					/**< Transmit packets. */ | ||||||
| 	uint64_t tx_bytes;		/**< Transmit bytes. */ | 	uint64_t tx_bytes;					/**< Transmit bytes. */ | ||||||
| 	uint64_t rx_dropped[NSS_MAX_NUM_PRI]; | 	uint64_t rx_dropped[NSS_MAX_NUM_PRI];			/**< Packets dropped on receive due to queue full. */ | ||||||
| 					/**< Packets dropped on receive due to queue full. */ | 	uint64_t dst_invalid;					/**< Packets that do not have a valid destination. */ | ||||||
| 	uint64_t dst_invalid;		/**< Packets that do not have a valid destination. */ | 	uint64_t exception_cnt;					/**< Packets that are exceptioned to host. */ | ||||||
| 	uint64_t exception_cnt;		/**< Packets that are exceptioned to host. */ | 	uint32_t ifnum;						/**< NSS interface number. */ | ||||||
| 	uint32_t ifnum;			/**< NSS interface number. */ | 	bool valid;						/**< Valid flag. */ | ||||||
| 	bool valid;			/**< Valid flag. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_ds_stats_notification |  | ||||||
|  *	GRE redirect LAG downstream transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_redir_lag_ds_stats_notification { |  | ||||||
| 	struct nss_gre_redir_lag_ds_tun_stats stats_ctx;	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;					/**< Interface number. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -622,7 +568,7 @@ extern nss_tx_status_t nss_gre_redir_lag_us_tx_msg_sync(struct nss_ctx_instance | |||||||
| extern nss_tx_status_t nss_gre_redir_lag_ds_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_gre_redir_lag_ds_msg *ngrm); | extern nss_tx_status_t nss_gre_redir_lag_ds_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_gre_redir_lag_ds_msg *ngrm); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_lag_us_stats_get |  * nss_gre_redir_lag_us_get_cmn_stats | ||||||
|  *	Fetches common node statistics for upstream GRE Redir LAG. |  *	Fetches common node statistics for upstream GRE Redir LAG. | ||||||
|  * |  * | ||||||
|  * @datatypes |  * @datatypes | ||||||
| @@ -634,10 +580,10 @@ extern nss_tx_status_t nss_gre_redir_lag_ds_tx_msg_sync(struct nss_ctx_instance | |||||||
|  * @return |  * @return | ||||||
|  * True if successful, else false. |  * True if successful, else false. | ||||||
|  */ |  */ | ||||||
| extern bool nss_gre_redir_lag_us_stats_get(struct nss_gre_redir_lag_us_tunnel_stats *cmn_stats, uint32_t index); | extern bool nss_gre_redir_lag_us_get_cmn_stats(struct nss_gre_redir_lag_us_tunnel_stats *cmn_stats, uint32_t index); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_lag_ds_stats_get |  * nss_gre_redir_lag_ds_get_stats | ||||||
|  *	Fetches common node statistics for downstream GRE Redir LAG. |  *	Fetches common node statistics for downstream GRE Redir LAG. | ||||||
|  * |  * | ||||||
|  * @datatypes |  * @datatypes | ||||||
| @@ -649,7 +595,7 @@ extern bool nss_gre_redir_lag_us_stats_get(struct nss_gre_redir_lag_us_tunnel_st | |||||||
|  * @return |  * @return | ||||||
|  * True if successful, else false. |  * True if successful, else false. | ||||||
|  */ |  */ | ||||||
| extern bool nss_gre_redir_lag_ds_stats_get(struct nss_gre_redir_lag_ds_tun_stats *cmn_stats, uint32_t index); | extern bool nss_gre_redir_lag_ds_get_cmn_stats(struct nss_gre_redir_lag_ds_tun_stats *cmn_stats, uint32_t index); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_lag_us_get_context |  * nss_gre_redir_lag_us_get_context | ||||||
| @@ -669,62 +615,6 @@ extern struct nss_ctx_instance *nss_gre_redir_lag_us_get_context(void); | |||||||
|  */ |  */ | ||||||
| extern struct nss_ctx_instance *nss_gre_redir_lag_ds_get_context(void); | extern struct nss_ctx_instance *nss_gre_redir_lag_ds_get_context(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_ds_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_lag_ds_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_ds_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_lag_ds_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_us_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_lag_us_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_lag_us_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_lag_us_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2019, 2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2019, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -25,8 +25,6 @@ | |||||||
| #define NSS_GRE_REDIR_MARK_HLOS_MAGIC 0xaade	/**< Metadata magic set by HLOS. */ | #define NSS_GRE_REDIR_MARK_HLOS_MAGIC 0xaade	/**< Metadata magic set by HLOS. */ | ||||||
| #define NSS_GRE_REDIR_MARK_NSS_MAGIC 0xaadf	/**< Metadata magic set by NSS. */ | #define NSS_GRE_REDIR_MARK_NSS_MAGIC 0xaadf	/**< Metadata magic set by NSS. */ | ||||||
|  |  | ||||||
| extern struct nss_gre_redir_mark_stats gre_mark_stats; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_mark messages |  * nss_gre_redir_mark messages | ||||||
|  *	Message types for GRE redirect mark requests and responses. |  *	Message types for GRE redirect mark requests and responses. | ||||||
| @@ -48,23 +46,6 @@ enum nss_gre_redir_mark_error_types { | |||||||
| 	NSS_GRE_REDIR_MARK_ERROR_TYPE_MAX | 	NSS_GRE_REDIR_MARK_ERROR_TYPE_MAX | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_mark_stats_types |  | ||||||
|  *	GRE redirect mark statistics types. |  | ||||||
|  */ |  | ||||||
| enum nss_gre_redir_mark_stats_types { |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_HLOS_MAGIC_FAILED = NSS_STATS_NODE_MAX, |  | ||||||
| 							/**< HLOS magic fail count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_INV_DST_IF_DROPS,	/**< Invalid transmit interface drop count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_DST_IF_ENQUEUE,	/**< Next egress interface enqueue success count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_DST_IF_ENQUEUE_DROPS,	/**< Next egress interface enqueue drop count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_INV_APPID,		/**< Invalid application ID for the transmit completion packets. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_HEADROOM_UNAVAILABLE,	/**< Packet headroom unavailable to write metadata. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_TX_COMPLETION_SUCCESS,	/**< Transmit completion host enqueue success count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_TX_COMPLETION_DROPS,	/**< Transmit completion host enqueue drop count. */ |  | ||||||
| 	NSS_GRE_REDIR_MARK_STATS_MAX			/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_mark_metadata |  * nss_gre_redir_mark_metadata | ||||||
|  *	HLOS to NSS per packet downstream metadata. |  *	HLOS to NSS per packet downstream metadata. | ||||||
| @@ -74,7 +55,7 @@ struct nss_gre_redir_mark_metadata { | |||||||
| 	uint8_t wifi_tid;		/**< TID value. */ | 	uint8_t wifi_tid;		/**< TID value. */ | ||||||
| 	uint8_t app_id;			/**< Application ID. */ | 	uint8_t app_id;			/**< Application ID. */ | ||||||
| 	uint16_t hw_hash_idx;		/**< Hardware AST hash index value. */ | 	uint16_t hw_hash_idx;		/**< Hardware AST hash index value. */ | ||||||
| 	uint32_t tx_status;		/**< Transmit status. */ | 	uint32_t tx_status;		/**< Tx status. */ | ||||||
| 	uint16_t offset;		/**< Buffer offset from the metadata. */ | 	uint16_t offset;		/**< Buffer offset from the metadata. */ | ||||||
| 	uint16_t magic;			/**< Metadata magic. */ | 	uint16_t magic;			/**< Metadata magic. */ | ||||||
| }; | }; | ||||||
| @@ -86,31 +67,21 @@ struct nss_gre_redir_mark_metadata { | |||||||
| struct nss_gre_redir_mark_stats_sync_msg { | struct nss_gre_redir_mark_stats_sync_msg { | ||||||
| 	struct nss_cmn_node_stats node_stats;	/**< Common node statistics. */ | 	struct nss_cmn_node_stats node_stats;	/**< Common node statistics. */ | ||||||
| 	uint32_t hlos_magic_fail;               /**< HLOS magic fail count. */ | 	uint32_t hlos_magic_fail;               /**< HLOS magic fail count. */ | ||||||
| 	uint32_t invalid_dst_drop;		/**< Invalid transmit interface drop count. */ | 	uint32_t invalid_dst_drop;		/**< Invalid Tx interface drop count. */ | ||||||
| 	uint32_t dst_enqueue_success;		/**< Next egress interface enqueue success count. */ | 	uint32_t dst_enqueue_success;		/**< Next egress interface enqueue success count. */ | ||||||
| 	uint32_t dst_enqueue_drop;		/**< Next egress interface enqueue drop count. */ | 	uint32_t dst_enqueue_drop;		/**< Next egress interface enqueue drop count. */ | ||||||
| 	uint32_t inv_appid;			/**< Invalid application ID for the transmit completion packets. */ | 	uint32_t inv_appid;			/**< Invalid application ID for the Tx completion packets. */ | ||||||
| 	uint32_t headroom_unavail;		/**< Packet headroom unavailable to write metadata. */ | 	uint32_t headroom_unavail;		/**< Packet headroom unavailable to write metadata. */ | ||||||
| 	uint32_t tx_completion_success;		/**< Transmit completion host enqueue success count. */ | 	uint32_t tx_completion_success;		/**< Tx completion host enqueue success count. */ | ||||||
| 	uint32_t tx_completion_drop;		/**< Transmit completion host enqueue drop count. */ | 	uint32_t tx_completion_drop;		/**< Tx completion host enqueue drop count. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_mark_register_cb_msg |  * nss_gre_redir_mark_register_cb_msg | ||||||
|  *	Transmit completion function register configuration message. |  *	Tx completion function register configuration message. | ||||||
|  */ |  */ | ||||||
| struct nss_gre_redir_mark_register_cb_msg { | struct nss_gre_redir_mark_register_cb_msg { | ||||||
| 	uint32_t nss_if_num;	/**< NSS transmit interface number on which callback needs to be registered. */ | 	uint32_t nss_if_num;			/**< NSS Tx interface number on which callback needs to be registered. */ | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_mark_stats_notification |  | ||||||
|  *	GRE redirect mark transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_redir_mark_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_GRE_REDIR_MARK_STATS_MAX];	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;					/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;					/**< Interface number. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -240,7 +211,7 @@ extern nss_tx_status_t nss_gre_redir_mark_tx_msg(struct nss_ctx_instance *nss_ct | |||||||
| extern nss_tx_status_t nss_gre_redir_mark_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_gre_redir_mark_msg *ngrm); | extern nss_tx_status_t nss_gre_redir_mark_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_gre_redir_mark_msg *ngrm); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_mark_stats_get |  * nss_gre_redir_mark_get_stats | ||||||
|  *      Gets GRE redirect mark statistics. |  *      Gets GRE redirect mark statistics. | ||||||
|  * |  * | ||||||
|  * @datatypes |  * @datatypes | ||||||
| @@ -252,7 +223,7 @@ extern nss_tx_status_t nss_gre_redir_mark_tx_msg_sync(struct nss_ctx_instance *n | |||||||
|  * @return |  * @return | ||||||
|  * TRUE or FALSE. |  * TRUE or FALSE. | ||||||
|  */ |  */ | ||||||
| extern bool nss_gre_redir_mark_stats_get(struct nss_gre_redir_mark_stats *stats); | extern bool nss_gre_redir_mark_get_stats(void *stats); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_redir_alloc_and_register_node |  * nss_gre_redir_alloc_and_register_node | ||||||
| @@ -303,34 +274,6 @@ extern struct dentry *nss_gre_redir_mark_get_dentry(void); | |||||||
|  */ |  */ | ||||||
| extern struct device *nss_gre_redir_mark_get_device(void); | extern struct device *nss_gre_redir_mark_get_device(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_mark_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_mark_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_redir_mark_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_redir_mark_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  **************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2016-2018, 2020-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2018,2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -11,7 +11,7 @@ | |||||||
|  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||||
|  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | ||||||
|  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  **************************************************************************** |  ************************************************************************** | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -97,41 +97,6 @@ enum nss_gre_tunnel_error_types { | |||||||
| 	NSS_GRE_TUNNEL_ERR_MAX, | 	NSS_GRE_TUNNEL_ERR_MAX, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  *  nss_gre_tunnel_stats_type |  | ||||||
|  *	GRE tunnel session debug statistic counters. |  | ||||||
|  */ |  | ||||||
| enum nss_gre_tunnel_stats_type { |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_PKTS,			/**< Number of packets received. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_TX_PKTS,			/**< Number of packets transmitted. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_QUEUE_0_DROPPED,	/**< Dropped receive packets 0. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_QUEUE_1_DROPPED,	/**< Dropped receive packets 1. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_QUEUE_2_DROPPED,	/**< Dropped receive packets 2. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_QUEUE_3_DROPPED,	/**< Dropped receive packets 3. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_MALFORMED,		/**< Malformed packet was received. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_INVALID_PROT,		/**< Invalid protocol was received. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_DECAP_QUEUE_FULL,		/**< Decapsulation queue is full. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_SINGLE_REC_DGRAM,	/**< Single fragment was received. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_INVALID_REC_DGRAM,	/**< Invalid fragment was received. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_BUFFER_ALLOC_FAIL,		/**< Buffer memory allocation failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_BUFFER_COPY_FAIL,		/**< Buffer memory copy failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_OUTFLOW_QUEUE_FULL,	/**< Outflow queue is full. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_DROPPED_HROOM,	/**< Packets dropped because of insufficent headroom. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_CBUFFER_ALLOC_FAIL,	/**< Receive crypto buffer allocation failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_CENQUEUE_FAIL,		/**< Receive enqueue-to-crypto failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_DECRYPT_DONE,		/**< Receive decryption is complete. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_FORWARD_ENQUEUE_FAIL,	/**< Receive forward enqueue failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_TX_CBUFFER_ALLOC_FAIL,	/**< Receive crypto buffer allocation failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_TX_CENQUEUE_FAIL,		/**< Transmit enqueue-to-crypto failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_DROPPED_TROOM,	/**< Packets dropped because of insufficent tailroom. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_TX_FORWARD_ENQUEUE_FAIL,	/**< Transmit forward enqueue failed. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_TX_CIPHER_DONE,		/**< Transmit cipher is complete. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_CRYPTO_NOSUPP,		/**< Error count for non-supported crypto packets. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_DROPPED_MH_VERSION,	/**< Receive drop: bad meta header. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_RX_UNALIGNED_PKT,		/**< Counter for unaligned packets. */ |  | ||||||
| 	NSS_GRE_TUNNEL_STATS_SESSION_MAX,			/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_tunnel_di_to_wlan_id |  * nss_gre_tunnel_di_to_wlan_id | ||||||
|  *	Dynamic interface to WLAN ID message structure. |  *	Dynamic interface to WLAN ID message structure. | ||||||
| @@ -186,20 +151,20 @@ struct nss_gre_tunnel_stats { | |||||||
| 	uint32_t rx_dropped_hroom; | 	uint32_t rx_dropped_hroom; | ||||||
| 				/**< Packets dropped because of insufficent headroom. */ | 				/**< Packets dropped because of insufficent headroom. */ | ||||||
| 	uint32_t rx_cbuf_alloc_fail; | 	uint32_t rx_cbuf_alloc_fail; | ||||||
| 				/**< Receive crypto buffer allocation failed. */ | 				/**< Rx crypto buffer allocation failed. */ | ||||||
| 	uint32_t rx_cenqueue_fail;		/**< Receive enqueue-to-crypto failed. */ | 	uint32_t rx_cenqueue_fail;		/**< Rx enqueue-to-crypto failed. */ | ||||||
| 	uint32_t rx_decrypt_done;		/**< Receive decryption is complete. */ | 	uint32_t rx_decrypt_done;		/**< Rx decryption is complete. */ | ||||||
| 	uint32_t rx_forward_enqueue_fail;	/**< Receive forward enqueue failed. */ | 	uint32_t rx_forward_enqueue_fail;	/**< Rx forward enqueue failed. */ | ||||||
| 	uint32_t tx_cbuf_alloc_fail; | 	uint32_t tx_cbuf_alloc_fail; | ||||||
| 				/**< Receive crypto buffer allocation failed. */ | 				/**< Rx crypto buffer allocation failed. */ | ||||||
| 	uint32_t tx_cenqueue_fail;		/**< Transmit enqueue-to-crypto failed. */ | 	uint32_t tx_cenqueue_fail;		/**< Tx enqueue-to-crypto failed. */ | ||||||
| 	uint32_t rx_dropped_troom; | 	uint32_t rx_dropped_troom; | ||||||
| 				/**< Packets dropped because of insufficent tailroom. */ | 				/**< Packets dropped because of insufficent tailroom. */ | ||||||
| 	uint32_t tx_forward_enqueue_fail;	/**< Transmit forward enqueue failed. */ | 	uint32_t tx_forward_enqueue_fail;	/**< Tx forward enqueue failed. */ | ||||||
| 	uint32_t tx_cipher_done;		/**< Transmit cipher is complete. */ | 	uint32_t tx_cipher_done;		/**< Tx cipher is complete. */ | ||||||
| 	uint32_t crypto_nosupp; | 	uint32_t crypto_nosupp; | ||||||
| 				/**< Error count for non-supported crypto packets. */ | 				/**< Error count for non-supported crypto packets. */ | ||||||
| 	uint32_t rx_dropped_mh_ver;		/**< Receive drop: bad meta header. */ | 	uint32_t rx_dropped_mh_ver;		/**< Rx drop: bad meta header. */ | ||||||
| 	uint32_t rx_unaligned_pkt;		/**< Counter for unaligned packets. */ | 	uint32_t rx_unaligned_pkt;		/**< Counter for unaligned packets. */ | ||||||
| #if defined(NSS_HAL_IPQ807x_SUPPORT) | #if defined(NSS_HAL_IPQ807x_SUPPORT) | ||||||
| 	uint32_t crypto_resp_error[NSS_CRYPTO_CMN_RESP_ERROR_MAX]; | 	uint32_t crypto_resp_error[NSS_CRYPTO_CMN_RESP_ERROR_MAX]; | ||||||
| @@ -207,17 +172,6 @@ struct nss_gre_tunnel_stats { | |||||||
| #endif | #endif | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_tunnel_stats_notification |  | ||||||
|  *	GRE tunnel transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_gre_tunnel_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_GRE_TUNNEL_STATS_SESSION_MAX + NSS_CRYPTO_CMN_RESP_ERROR_MAX]; |  | ||||||
| 							/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;				/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;				/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_gre_tunnel_msg |  * nss_gre_tunnel_msg | ||||||
|  *	Data for sending and receiving GRE tunnel messages. |  *	Data for sending and receiving GRE tunnel messages. | ||||||
| @@ -393,34 +347,6 @@ extern nss_tx_status_t nss_gre_tunnel_inquiry( | |||||||
| 		struct nss_gre_tunnel_configure *inquiry_info, | 		struct nss_gre_tunnel_configure *inquiry_info, | ||||||
| 		nss_gre_tunnel_msg_callback_t cb, void *app_data); | 		nss_gre_tunnel_msg_callback_t cb, void *app_data); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_tunnel_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_tunnel_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_gre_tunnel_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_gre_tunnel_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -53,8 +53,6 @@ enum nss_if_message_types { | |||||||
| 	NSS_IF_SET_IGS_NODE, | 	NSS_IF_SET_IGS_NODE, | ||||||
| 	NSS_IF_CLEAR_IGS_NODE, | 	NSS_IF_CLEAR_IGS_NODE, | ||||||
| 	NSS_IF_RESET_NEXTHOP, | 	NSS_IF_RESET_NEXTHOP, | ||||||
| 	NSS_IF_PPE_PORT_CREATE, |  | ||||||
| 	NSS_IF_PPE_PORT_DESTROY, |  | ||||||
| 	NSS_IF_MAX_MSG_TYPES = 9999, | 	NSS_IF_MAX_MSG_TYPES = 9999, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -199,14 +197,6 @@ struct nss_if_igs_config { | |||||||
| 	int32_t igs_num;	/**< Ingress shaper interface number. */ | 	int32_t igs_num;	/**< Ingress shaper interface number. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_if_ppe_port_create |  | ||||||
|  *	Message to create PPE port. |  | ||||||
|  */ |  | ||||||
| struct nss_if_ppe_port_create { |  | ||||||
| 	int32_t ppe_port_num;	/**< PPE port number returned by NSS. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_if_msgs |  * nss_if_msgs | ||||||
|  *	Information for physical NSS interface command messages. |  *	Information for physical NSS interface command messages. | ||||||
| @@ -240,8 +230,6 @@ union nss_if_msgs { | |||||||
| 			/**< Set nexthop of interface. */ | 			/**< Set nexthop of interface. */ | ||||||
| 	struct nss_if_igs_config config_igs; | 	struct nss_if_igs_config config_igs; | ||||||
| 			/**< Configure an ingress shaper interface. */ | 			/**< Configure an ingress shaper interface. */ | ||||||
| 	struct nss_if_ppe_port_create ppe_port_create; |  | ||||||
| 			/**< Create a PPE port. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -383,70 +371,6 @@ nss_tx_status_t nss_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32_t if | |||||||
|  */ |  */ | ||||||
| nss_tx_status_t nss_if_reset_nexthop(struct nss_ctx_instance *nss_ctx, uint32_t if_num); | nss_tx_status_t nss_if_reset_nexthop(struct nss_ctx_instance *nss_ctx, uint32_t if_num); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_if_change_mtu |  | ||||||
|  *	Change the MTU of the interface. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  * nss_ctx_instance |  | ||||||
|  * |  | ||||||
|  * @param[in] nss_ctx  Pointer to the NSS context. |  | ||||||
|  * @param[in] if_num   NSS interface number. |  | ||||||
|  * @param[in] mtu      New MTU. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * Status of the transmit operation. |  | ||||||
|  */ |  | ||||||
| nss_tx_status_t nss_if_change_mtu(struct nss_ctx_instance *nss_ctx, nss_if_num_t if_num, uint16_t mtu); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_if_change_mac_addr |  | ||||||
|  *	Change the MAC address of the interface. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  * nss_ctx_instance |  | ||||||
|  * |  | ||||||
|  * @param[in] nss_ctx  Pointer to the NSS context. |  | ||||||
|  * @param[in] if_num   NSS interface number. |  | ||||||
|  * @param[in] mac_addr New MAC address. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * Status of the transmit operation. |  | ||||||
|  */ |  | ||||||
| nss_tx_status_t nss_if_change_mac_addr(struct nss_ctx_instance *nss_ctx, nss_if_num_t if_num, uint8_t *mac_addr); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_if_vsi_unassign |  | ||||||
|  *	Detach the VSI ID from the given interface. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  * nss_ctx_instance |  | ||||||
|  * |  | ||||||
|  * @param[in] nss_ctx  Pointer to the NSS context. |  | ||||||
|  * @param[in] if_num   NSS interface number. |  | ||||||
|  * @param[in] vsi      VSI ID. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * Status of the transmit operation. |  | ||||||
|  */ |  | ||||||
| nss_tx_status_t nss_if_vsi_unassign(struct nss_ctx_instance *nss_ctx, nss_if_num_t if_num, uint32_t vsi); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_if_vsi_assign |  | ||||||
|  *	Attach the VSI ID to the given interface. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  * nss_ctx_instance |  | ||||||
|  * |  | ||||||
|  * @param[in] nss_ctx  Pointer to the NSS context. |  | ||||||
|  * @param[in] if_num   NSS interface number. |  | ||||||
|  * @param[in] vsi      VSI ID. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * Status of the transmit operation. |  | ||||||
|  */ |  | ||||||
| nss_tx_status_t nss_if_vsi_assign(struct nss_ctx_instance *nss_ctx, nss_if_num_t if_num, uint32_t vsi); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -106,37 +106,6 @@ enum nss_ipsec_cmn_ctx_type { | |||||||
| 	NSS_IPSEC_CMN_CTX_TYPE_MAX | 	NSS_IPSEC_CMN_CTX_TYPE_MAX | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_stats_types |  | ||||||
|  *	IPsec common statistics types. |  | ||||||
|  */ |  | ||||||
| enum nss_ipsec_cmn_stats_types { |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_HEADROOM = NSS_STATS_NODE_MAX, |  | ||||||
| 						/**< Failure in headroom check. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_TAILROOM,	/**< Failure in tailroom check. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_REPLAY,	/**< Failure in anti-replay check. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_REPLAY_DUP,	/**< Failure in anti-replay; duplicate records. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_REPLAY_WIN,	/**< Failure in anti-replay; packet outside the window. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_PBUF_CRYPTO,	/**< Failure in crypto pbuf allocation. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_QUEUE,		/**< Failure due to queue full in IPsec. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_QUEUE_CRYPTO,	/**< Failure due to queue full in crypto. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_QUEUE_NEXTHOP,	/**< Failure due to queue full in next hop. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_PBUF_ALLOC,	/**< Failure in pbuf allocation. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_PBUF_LINEAR,	/**< Failure in pbuf linearization. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_PBUF_STATS,	/**< Failure in pbuf allocation for statistics. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_PBUF_ALIGN,	/**< Failure in pbuf access due to non-word alignmnt */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_CIPHER,	/**< Failure in decrypting the data. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_AUTH,		/**< Failure in authenticating the data. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_SEQ_OVF,	/**< Failure due to sequence number rollover. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_BLK_LEN,	/**< Failure in decapsulation due to bad cipher block length. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_HASH_LEN,	/**< Failure in decapsulation due to bad hash block length. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_TRANSFORM,	/**< Failure in transformation; general error. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_CRYPTO,	/**< Failure in crypto transformation. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_FAIL_CLE,		/**< Failure in classification; general failure. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_IS_STOPPED,		/**< Indicates if SA is stopped; for example: sequence overflow. */ |  | ||||||
| 	NSS_IPSEC_CMN_STATS_MAX,		/**< Maximum statistics type. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipsec_cmn_flow_tuple |  * nss_ipsec_cmn_flow_tuple | ||||||
|  *	IPsec tuple for creating flow entries. |  *	IPsec tuple for creating flow entries. | ||||||
| @@ -367,16 +336,6 @@ struct nss_ipsec_cmn_mdata { | |||||||
| 	} data;						/**< Metadata payload. */ | 	} data;						/**< Metadata payload. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_stats_notification |  | ||||||
|  *	IPsec common transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_ipsec_cmn_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_IPSEC_CMN_STATS_MAX];	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;				/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;				/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipsec_cmn_msg |  * nss_ipsec_cmn_msg | ||||||
|  *	Message structure for NSS IPsec messages. |  *	Message structure for NSS IPsec messages. | ||||||
| @@ -465,23 +424,6 @@ extern struct nss_ctx_instance *nss_ipsec_cmn_get_context(void); | |||||||
|  */ |  */ | ||||||
| extern uint32_t nss_ipsec_cmn_get_ifnum_with_coreid(int32_t ifnum); | extern uint32_t nss_ipsec_cmn_get_ifnum_with_coreid(int32_t ifnum); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_unregister_if |  | ||||||
|  *	Deregisters an IPSEC tunnel interface from the NSS. |  | ||||||
|  * |  | ||||||
|  * @param[in] if_num  NSS interface number. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * None. |  | ||||||
|  * |  | ||||||
|  * @dependencies |  | ||||||
|  * The tunnel interface must have been previously registered. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * True if successful, else false. |  | ||||||
|  */ |  | ||||||
| extern bool nss_ipsec_cmn_unregister_if(uint32_t if_num); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipsec_cmn_register_if |  * nss_ipsec_cmn_register_if | ||||||
|  *	Registers the IPsec interface with the NSS for sending and |  *	Registers the IPsec interface with the NSS for sending and | ||||||
| @@ -509,6 +451,39 @@ extern struct nss_ctx_instance *nss_ipsec_cmn_register_if(uint32_t if_num, struc | |||||||
| 						nss_ipsec_cmn_msg_callback_t cb_msg, | 						nss_ipsec_cmn_msg_callback_t cb_msg, | ||||||
| 						uint32_t features, enum nss_dynamic_interface_type type, void *app_data); | 						uint32_t features, enum nss_dynamic_interface_type type, void *app_data); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipsec_cmn_unregister_if | ||||||
|  |  *	Deregisters a IPSEC tunnel interface from the NSS. | ||||||
|  |  * | ||||||
|  |  * @param[in] if_num  NSS interface number. | ||||||
|  | . * | ||||||
|  |  * @return | ||||||
|  |  * None. | ||||||
|  |  * | ||||||
|  |  * @dependencies | ||||||
|  |  * The tunnel interface must have been previously registered. | ||||||
|  |  * | ||||||
|  |  * @return | ||||||
|  |  * True if successful, else false. | ||||||
|  |  */ | ||||||
|  | extern bool nss_ipsec_cmn_unregister_if(uint32_t if_num); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_ipsec_cmn_notify_register | ||||||
|  |  *	Register an event callback to handle notification from IPsec firmware package. | ||||||
|  |  * | ||||||
|  |  * @datatypes | ||||||
|  |  * nss_ipsec_cmn_msg_callback_t \n | ||||||
|  |  * | ||||||
|  |  * @param[in] ifnum     NSS interface number. | ||||||
|  |  * @param[in] cb        Callback for IPsec message. | ||||||
|  |  * @param[in] app_data  Pointer to the application context. | ||||||
|  |  * | ||||||
|  |  * @return | ||||||
|  |  * Pointer to NSS core context. | ||||||
|  |  */ | ||||||
|  | extern struct nss_ctx_instance *nss_ipsec_cmn_notify_register(uint32_t ifnum, nss_ipsec_cmn_msg_callback_t cb, void *app_data); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipsec_cmn_notify_unregister |  * nss_ipsec_cmn_notify_unregister | ||||||
|  *	Deregisters the message notifier from the HLOS driver. |  *	Deregisters the message notifier from the HLOS driver. | ||||||
| @@ -527,22 +502,6 @@ extern struct nss_ctx_instance *nss_ipsec_cmn_register_if(uint32_t if_num, struc | |||||||
|  */ |  */ | ||||||
| extern void nss_ipsec_cmn_notify_unregister(struct nss_ctx_instance *ctx, uint32_t if_num); | extern void nss_ipsec_cmn_notify_unregister(struct nss_ctx_instance *ctx, uint32_t if_num); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_notify_register |  | ||||||
|  *	Registers an event callback to handle notifications from the IPsec firmware package. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  * nss_ipsec_cmn_msg_callback_t \n |  | ||||||
|  * |  | ||||||
|  * @param[in] ifnum     NSS interface number. |  | ||||||
|  * @param[in] cb        Callback for IPsec message. |  | ||||||
|  * @param[in] app_data  Pointer to the application context. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * Pointer to the NSS core context. |  | ||||||
|  */ |  | ||||||
| extern struct nss_ctx_instance *nss_ipsec_cmn_notify_register(uint32_t ifnum, nss_ipsec_cmn_msg_callback_t cb, void *app_data); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipsec_cmn_msg_init |  * nss_ipsec_cmn_msg_init | ||||||
|  *	Initializes an IPsec message. |  *	Initializes an IPsec message. | ||||||
| @@ -656,34 +615,6 @@ extern bool nss_ipsec_cmn_ppe_port_config(struct nss_ctx_instance *ctx, struct n | |||||||
|  */ |  */ | ||||||
| bool nss_ipsec_cmn_ppe_mtu_update(struct nss_ctx_instance *ctx, uint32_t if_num, uint16_t mtu, uint16_t mru); | bool nss_ipsec_cmn_ppe_mtu_update(struct nss_ctx_instance *ctx, uint32_t if_num, uint16_t mtu, uint16_t mru); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_ipsec_cmn_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipsec_cmn_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_ipsec_cmn_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -31,111 +31,6 @@ | |||||||
|  * @{ |  * @{ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * IPv4 connection flags (to be used with nss_ipv4_create::flags). |  | ||||||
|  */ |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_NO_SEQ_CHECK 0x01 |  | ||||||
| 		/**< Rule for not checking sequence numbers. */ |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_BRIDGE_FLOW 0x02 |  | ||||||
| 		/**< Rule that indicates pure bridge flow (no routing is involved). */ |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_ROUTED 0x04	/**< Rule for a routed connection. */ |  | ||||||
|  |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_DSCP_MARKING 0x08	/**< Rule for DSCP marking. */ |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_VLAN_MARKING 0x10	/**< Rule for VLAN marking. */ |  | ||||||
| #define NSS_IPV4_CREATE_FLAG_QOS_VALID 0x20	/**< Rule for QoS is valid. */ |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv4_create |  | ||||||
|  *	Information for an IPv4 flow or connection create rule. |  | ||||||
|  * |  | ||||||
|  * All fields must be passed in host-endian order. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv4_create { |  | ||||||
| 	int32_t src_interface_num; |  | ||||||
| 				/**< Source interface number (virtual or physical). */ |  | ||||||
| 	int32_t dest_interface_num; |  | ||||||
| 				/**< Destination interface number (virtual or physical). */ |  | ||||||
| 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ |  | ||||||
| 	uint32_t flags;		/**< Flags (if any) associated with this rule. */ |  | ||||||
| 	uint32_t from_mtu;	/**< MTU of the incoming interface. */ |  | ||||||
| 	uint32_t to_mtu;	/**< MTU of the outgoing interface. */ |  | ||||||
| 	uint32_t src_ip;	/**< Source IP address. */ |  | ||||||
| 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint32_t src_ip_xlate;	/**< Translated source IP address (used with SNAT). */ |  | ||||||
| 	int32_t src_port_xlate;	/**< Translated source L4 port (used with SNAT). */ |  | ||||||
| 	uint32_t dest_ip;	/**< Destination IP address. */ |  | ||||||
| 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint32_t dest_ip_xlate; |  | ||||||
| 			/**< Translated destination IP address (used with DNAT). */ |  | ||||||
| 	int32_t dest_port_xlate; |  | ||||||
| 			/**< Translated destination L4 port (used with DNAT). */ |  | ||||||
| 	uint8_t src_mac[ETH_ALEN]; |  | ||||||
| 			/**< Source MAC address. */ |  | ||||||
| 	uint8_t dest_mac[ETH_ALEN]; |  | ||||||
| 			/**< Destination MAC address. */ |  | ||||||
| 	uint8_t src_mac_xlate[ETH_ALEN]; |  | ||||||
| 			/**< Translated source MAC address (post-routing). */ |  | ||||||
| 	uint8_t dest_mac_xlate[ETH_ALEN]; |  | ||||||
| 			/**< Translated destination MAC address (post-routing). */ |  | ||||||
| 	uint8_t flow_window_scale;	/**< Window scaling factor (TCP). */ |  | ||||||
| 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ |  | ||||||
| 	uint32_t flow_end;		/**< TCP window end. */ |  | ||||||
| 	uint32_t flow_max_end;		/**< TCP window maximum end. */ |  | ||||||
| 	uint32_t flow_pppoe_if_exist; |  | ||||||
| 			/**< Flow direction: PPPoE interface exist flag. */ |  | ||||||
| 	int32_t flow_pppoe_if_num; |  | ||||||
| 			/**< Flow direction: PPPoE interface number. */ |  | ||||||
| 	uint16_t ingress_vlan_tag;	/**< Ingress VLAN tag expected for this flow. */ |  | ||||||
| 	uint8_t return_window_scale; |  | ||||||
| 			/**< Window scaling factor of the return direction (TCP). */ |  | ||||||
| 	uint32_t return_max_window; |  | ||||||
| 			/**< Maximum window size of the return direction. */ |  | ||||||
| 	uint32_t return_end; |  | ||||||
| 			/**< Flow end for the return direction. */ |  | ||||||
| 	uint32_t return_max_end; |  | ||||||
| 			/**< Flow maximum end for the return direction. */ |  | ||||||
| 	uint32_t return_pppoe_if_exist; |  | ||||||
| 			/**< Return direction: PPPoE interface existence flag. */ |  | ||||||
| 	int32_t return_pppoe_if_num; |  | ||||||
| 			/**< Return direction: PPPoE interface number. */ |  | ||||||
| 	uint16_t egress_vlan_tag;	/**< Egress VLAN tag expected for this flow. */ |  | ||||||
| 	uint8_t spo_needed;		/**< Indicates whether SPO is required. */ |  | ||||||
| 	uint32_t param_a0;		/**< Custom parameter 0. */ |  | ||||||
| 	uint32_t param_a1;		/**< Custom parameter 1. */ |  | ||||||
| 	uint32_t param_a2;		/**< Custom parameter 2. */ |  | ||||||
| 	uint32_t param_a3;		/**< Custom parameter 3. */ |  | ||||||
| 	uint32_t param_a4;		/**< Custom parameter 4. */ |  | ||||||
| 	uint32_t qos_tag;		/**< Deprecated, will be removed soon. */ |  | ||||||
| 	uint32_t flow_qos_tag;		/**< QoS tag value for the flow direction. */ |  | ||||||
| 	uint32_t return_qos_tag;	/**< QoS tag value for the return direction. */ |  | ||||||
| 	uint8_t dscp_itag;		/**< DSCP marking tag. */ |  | ||||||
| 	uint8_t dscp_imask;		/**< DSCP marking input mask. */ |  | ||||||
| 	uint8_t dscp_omask;		/**< DSCP marking output mask. */ |  | ||||||
| 	uint8_t dscp_oval;		/**< DSCP marking output value. */ |  | ||||||
| 	uint16_t vlan_itag;		/**< VLAN marking tag. */ |  | ||||||
| 	uint16_t vlan_imask;		/**< VLAN marking input mask. */ |  | ||||||
| 	uint16_t vlan_omask;		/**< VLAN marking output mask. */ |  | ||||||
| 	uint16_t vlan_oval;		/**< VLAN marking output value. */ |  | ||||||
| 	uint32_t in_vlan_tag[MAX_VLAN_DEPTH]; |  | ||||||
| 			/**< Ingress VLAN tag expected for this flow. */ |  | ||||||
| 	uint32_t out_vlan_tag[MAX_VLAN_DEPTH]; |  | ||||||
| 			/**< Egress VLAN tag expected for this flow. */ |  | ||||||
| 	uint8_t flow_dscp;		/**< IP DSCP value for the flow direction. */ |  | ||||||
| 	uint8_t return_dscp;		/**< IP DSCP value for the return direction. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv4_destroy |  | ||||||
|  *	Information for an IPv4 flow or connection destroy rule. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv4_destroy { |  | ||||||
| 	int32_t protocol;	/**< L4 protocol ID. */ |  | ||||||
| 	uint32_t src_ip;	/**< Source IP address. */ |  | ||||||
| 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint32_t dest_ip;	/**< Destination IP address. */ |  | ||||||
| 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv4_message_types |  * nss_ipv4_message_types | ||||||
|  *	IPv4 bridge and routing rule message types. |  *	IPv4 bridge and routing rule message types. | ||||||
| @@ -216,12 +111,6 @@ enum nss_ipv4_stats_types { | |||||||
| 		/**< Number of IPv4 multicast connection destroy requests that missed the cache. */ | 		/**< Number of IPv4 multicast connection destroy requests that missed the cache. */ | ||||||
| 	NSS_IPV4_STATS_MC_CONNECTION_FLUSHES, | 	NSS_IPV4_STATS_MC_CONNECTION_FLUSHES, | ||||||
| 		/**< Number of IPv4 multicast connection flushes. */ | 		/**< Number of IPv4 multicast connection flushes. */ | ||||||
| 	NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM, |  | ||||||
| 		/**< Number of IPv4 mirror connection requests with an invalid interface number. */ |  | ||||||
| 	NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE, |  | ||||||
| 		/**< Number of IPv4 mirror connection requests with an invalid interface type. */ |  | ||||||
| 	NSS_IPV4_STATS_MIRROR_FAILURES, |  | ||||||
| 		/**< Number of IPv4 mirror failures. */ |  | ||||||
| 	NSS_IPV4_STATS_MAX, | 	NSS_IPV4_STATS_MAX, | ||||||
| 		/**< Maximum message type. */ | 		/**< Maximum message type. */ | ||||||
| }; | }; | ||||||
| @@ -286,7 +175,6 @@ enum nss_ipv4_stats_types { | |||||||
| 		/**< Ingress shaping fields are valid. */ | 		/**< Ingress shaping fields are valid. */ | ||||||
| #define NSS_IPV4_RULE_CREATE_IDENTIFIER_VALID 0x1000 | #define NSS_IPV4_RULE_CREATE_IDENTIFIER_VALID 0x1000 | ||||||
| 		/**< Identifier is valid. */ | 		/**< Identifier is valid. */ | ||||||
| #define NSS_IPV4_RULE_CREATE_MIRROR_VALID 0x2000	/**< Mirror fields are valid. */ |  | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Multicast command rule flags |  * Multicast command rule flags | ||||||
| @@ -349,15 +237,6 @@ enum nss_ipv4_stats_types { | |||||||
| #define NSS_IPV4_RETURN_IDENTIFIER_VALID 0x02 | #define NSS_IPV4_RETURN_IDENTIFIER_VALID 0x02 | ||||||
| 		/**< Identifier for return direction is valid. */ | 		/**< Identifier for return direction is valid. */ | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * Mirror valid flags (to be used with the valid field of nss_ipv4_mirror_rule structure) |  | ||||||
|  */ |  | ||||||
| #define NSS_IPV4_MIRROR_FLOW_VALID 0x01 |  | ||||||
| 		/**< Mirror interface number for the flow direction is valid. */ |  | ||||||
| #define NSS_IPV4_MIRROR_RETURN_VALID 0x02 |  | ||||||
| 		/**< Mirror interface number for the return direction is valid. */ |  | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv4_5tuple |  * nss_ipv4_5tuple | ||||||
|  *	Common 5-tuple information. |  *	Common 5-tuple information. | ||||||
| @@ -531,16 +410,6 @@ struct nss_ipv4_identifier_rule { | |||||||
| 		/**< Identifier for return direction. */ | 		/**< Identifier for return direction. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv4_mirror_rule |  | ||||||
|  *	Mirror rule structure. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv4_mirror_rule { |  | ||||||
| 	uint32_t valid;			/**< Mirror validity flags. */ |  | ||||||
| 	nss_if_num_t flow_ifnum;	/**< Flow mirror interface number. */ |  | ||||||
| 	nss_if_num_t return_ifnum;	/**< Return mirror interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv4_error_response_types |  * nss_ipv4_error_response_types | ||||||
|  *	Error types for IPv4 messages. |  *	Error types for IPv4 messages. | ||||||
| @@ -609,8 +478,6 @@ struct nss_ipv4_rule_create_msg { | |||||||
| 			/**< Ingress shaping related accleration parameters. */ | 			/**< Ingress shaping related accleration parameters. */ | ||||||
| 	struct nss_ipv4_identifier_rule identifier; | 	struct nss_ipv4_identifier_rule identifier; | ||||||
| 			/**< Rule for adding identifier. */ | 			/**< Rule for adding identifier. */ | ||||||
| 	struct nss_ipv4_mirror_rule mirror_rule; |  | ||||||
| 			/**< Mirror rule parameter. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -954,16 +821,6 @@ struct nss_ipv4_node_sync { | |||||||
|  |  | ||||||
| 	uint32_t ipv4_mc_connection_flushes; | 	uint32_t ipv4_mc_connection_flushes; | ||||||
| 			/**< Number of multicast connection flushes. */ | 			/**< Number of multicast connection flushes. */ | ||||||
|  |  | ||||||
| 	uint32_t ipv4_connection_create_invalid_mirror_ifnum; |  | ||||||
| 			/**< Number of create request failed with an invalid mirror interface number. */ |  | ||||||
|  |  | ||||||
| 	uint32_t ipv4_connection_create_invalid_mirror_iftype; |  | ||||||
| 			/**< Number of create request failed with an invalid mirror interface type. */ |  | ||||||
|  |  | ||||||
| 	uint32_t ipv4_mirror_failures; |  | ||||||
| 			/**< Mirror packet failed. */ |  | ||||||
|  |  | ||||||
| 	uint32_t exception_events[NSS_IPV4_EXCEPTION_EVENT_MAX]; | 	uint32_t exception_events[NSS_IPV4_EXCEPTION_EVENT_MAX]; | ||||||
| 			/**< Number of exception events. */ | 			/**< Number of exception events. */ | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -27,125 +27,6 @@ | |||||||
|  * @{ |  * @{ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Converts the format of an IPv6 address from Linux to NSS. @hideinitializer |  | ||||||
|  */ |  | ||||||
| #define IN6_ADDR_TO_IPV6_ADDR(ipv6, in6) \ |  | ||||||
| 	{ \ |  | ||||||
| 		((uint32_t *)ipv6)[0] = in6.in6_u.u6_addr32[0]; \ |  | ||||||
| 		((uint32_t *)ipv6)[1] = in6.in6_u.u6_addr32[1]; \ |  | ||||||
| 		((uint32_t *)ipv6)[2] = in6.in6_u.u6_addr32[2]; \ |  | ||||||
| 		((uint32_t *)ipv6)[3] = in6.in6_u.u6_addr32[3]; \ |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Converts the format of an IPv6 address from NSS to Linux. @hideinitializer |  | ||||||
|  */ |  | ||||||
| #define IPV6_ADDR_TO_IN6_ADDR(in6, ipv6) \ |  | ||||||
| 	{ \ |  | ||||||
| 		in6.in6_u.u6_addr32[0] = ((uint32_t *)ipv6)[0]; \ |  | ||||||
| 		in6.in6_u.u6_addr32[1] = ((uint32_t *)ipv6)[1]; \ |  | ||||||
| 		in6.in6_u.u6_addr32[2] = ((uint32_t *)ipv6)[2]; \ |  | ||||||
| 		in6.in6_u.u6_addr32[3] = ((uint32_t *)ipv6)[3]; \ |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Format of an IPv6 address (16 * 8 bits). |  | ||||||
|  */ |  | ||||||
| #define IPV6_ADDR_OCTAL_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Prints an IPv6 address (16 * 8 bits). |  | ||||||
|  */ |  | ||||||
| #define IPV6_ADDR_TO_OCTAL(ipv6) ((uint16_t *)ipv6)[0], ((uint16_t *)ipv6)[1], ((uint16_t *)ipv6)[2], ((uint16_t *)ipv6)[3], ((uint16_t *)ipv6)[4], ((uint16_t *)ipv6)[5], ((uint16_t *)ipv6)[6], ((uint16_t *)ipv6)[7] |  | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * IPv6 connection flags (to be used with nss_ipv6_create::flags. |  | ||||||
|  */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_NO_SEQ_CHECK 0x1 |  | ||||||
| 		/**< Indicates that sequence numbers are not to be checked. */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_BRIDGE_FLOW 0x02 |  | ||||||
| 		/**< Indicates that this is a pure bridge flow (no routing is involved). */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_ROUTED 0x04	/**< Rule is for a routed connection. */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_DSCP_MARKING 0x08	/**< Rule for DSCP marking. */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_VLAN_MARKING 0x10	/**< Rule for VLAN marking. */ |  | ||||||
| #define NSS_IPV6_CREATE_FLAG_QOS_VALID 0x20	/**< Rule for Valid QoS. */ |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv6_create |  | ||||||
|  *	Information for an IPv6 flow or connection create rule. |  | ||||||
|  * |  | ||||||
|  * All fields must be passed in host-endian order. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv6_create { |  | ||||||
| 	int32_t src_interface_num; |  | ||||||
| 			/**< Source interface number (virtual or physical). */ |  | ||||||
| 	int32_t dest_interface_num; |  | ||||||
| 			/**< Destination interface number (virtual or physical). */ |  | ||||||
| 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ |  | ||||||
| 	uint32_t flags;		/**< Flags (if any) associated with this rule. */ |  | ||||||
| 	uint32_t from_mtu;	/**< MTU of the incoming interface. */ |  | ||||||
| 	uint32_t to_mtu;	/**< MTU of the outgoing interface. */ |  | ||||||
| 	uint32_t src_ip[4];	/**< Source IP address. */ |  | ||||||
| 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint32_t dest_ip[4];	/**< Destination IP address. */ |  | ||||||
| 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint8_t src_mac[ETH_ALEN];	/**< Source MAC address. */ |  | ||||||
| 	uint8_t dest_mac[ETH_ALEN];	/**< Destination MAC address. */ |  | ||||||
| 	uint8_t flow_window_scale;	/**< Window scaling factor (TCP). */ |  | ||||||
| 	uint32_t flow_max_window;	/**< Maximum window size (TCP). */ |  | ||||||
| 	uint32_t flow_end;		/**< TCP window end. */ |  | ||||||
| 	uint32_t flow_max_end;		/**< TCP window maximum end. */ |  | ||||||
| 	uint32_t flow_pppoe_if_exist; |  | ||||||
| 			/**< Flow direction: PPPoE interface existence flag. */ |  | ||||||
| 	int32_t flow_pppoe_if_num; |  | ||||||
| 			/**< Flow direction: PPPoE interface number. */ |  | ||||||
| 	uint16_t ingress_vlan_tag; |  | ||||||
| 			/**< Ingress VLAN tag expected for this flow. */ |  | ||||||
| 	uint8_t return_window_scale; |  | ||||||
| 			/**< Window scaling factor (TCP) for the return direction. */ |  | ||||||
| 	uint32_t return_max_window; |  | ||||||
| 			/**< Maximum window size (TCP) for the return direction. */ |  | ||||||
| 	uint32_t return_end; |  | ||||||
| 			/**< End for the return direction. */ |  | ||||||
| 	uint32_t return_max_end; |  | ||||||
| 			/**< Maximum end for the return direction. */ |  | ||||||
| 	uint32_t return_pppoe_if_exist; |  | ||||||
| 			/**< Return direction: PPPoE interface exist flag. */ |  | ||||||
| 	int32_t return_pppoe_if_num; |  | ||||||
| 			/**< Return direction: PPPoE interface number. */ |  | ||||||
| 	uint16_t egress_vlan_tag;	/**< Egress VLAN tag expected for this flow. */ |  | ||||||
| 	uint32_t qos_tag;		/**< Deprecated; will be removed soon. */ |  | ||||||
| 	uint32_t flow_qos_tag;		/**< QoS tag value for flow direction. */ |  | ||||||
| 	uint32_t return_qos_tag;	/**< QoS tag value for the return direction. */ |  | ||||||
| 	uint8_t dscp_itag;		/**< DSCP marking tag. */ |  | ||||||
| 	uint8_t dscp_imask;		/**< DSCP marking input mask. */ |  | ||||||
| 	uint8_t dscp_omask;		/**< DSCP marking output mask. */ |  | ||||||
| 	uint8_t dscp_oval;		/**< DSCP marking output value. */ |  | ||||||
| 	uint16_t vlan_itag;		/**< VLAN marking tag. */ |  | ||||||
| 	uint16_t vlan_imask;		/**< VLAN marking input mask. */ |  | ||||||
| 	uint16_t vlan_omask;		/**< VLAN marking output mask. */ |  | ||||||
| 	uint16_t vlan_oval;		/**< VLAN marking output value. */ |  | ||||||
| 	uint32_t in_vlan_tag[MAX_VLAN_DEPTH]; |  | ||||||
| 					/**< Ingress VLAN tag expected for this flow. */ |  | ||||||
| 	uint32_t out_vlan_tag[MAX_VLAN_DEPTH]; |  | ||||||
| 					/**< Egress VLAN tag expected for this flow. */ |  | ||||||
| 	uint8_t flow_dscp;		/**< IP DSCP value for flow direction. */ |  | ||||||
| 	uint8_t return_dscp;		/**< IP DSCP value for the return direction. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv6_destroy |  | ||||||
|  *	Information for an IPv6 flow or connection destroy rule. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv6_destroy { |  | ||||||
| 	int32_t protocol;	/**< L4 protocol (e.g., TCP or UDP). */ |  | ||||||
| 	uint32_t src_ip[4];	/**< Source IP address. */ |  | ||||||
| 	int32_t src_port;	/**< Source L4 port (e.g., TCP or UDP port). */ |  | ||||||
| 	uint32_t dest_ip[4];	/**< Destination IP address. */ |  | ||||||
| 	int32_t dest_port;	/**< Destination L4 port (e.g., TCP or UDP port). */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv6_stats_types |  * nss_ipv6_stats_types | ||||||
|  *	IPv6 node statistics. |  *	IPv6 node statistics. | ||||||
| @@ -195,14 +76,6 @@ enum nss_ipv6_stats_types { | |||||||
| 					/**< Number of IPv6 multicast connection destroy requests that missed the cache. */ | 					/**< Number of IPv6 multicast connection destroy requests that missed the cache. */ | ||||||
| 	NSS_IPV6_STATS_MC_CONNECTION_FLUSHES, | 	NSS_IPV6_STATS_MC_CONNECTION_FLUSHES, | ||||||
| 					/**< Number of IPv6 multicast connection flushes. */ | 					/**< Number of IPv6 multicast connection flushes. */ | ||||||
| 	NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM, |  | ||||||
| 		/**< Number of IPv6 mirror connection requests with an invalid interface number. */ |  | ||||||
| 	NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE, |  | ||||||
| 		/**< Number of IPv6 mirror connection requests with an invalid interface type. */ |  | ||||||
|  |  | ||||||
| 	NSS_IPV6_STATS_MIRROR_FAILURES, |  | ||||||
| 		/**< Number of IPv6 mirror failures. */ |  | ||||||
|  |  | ||||||
| 	NSS_IPV6_STATS_MAX, | 	NSS_IPV6_STATS_MAX, | ||||||
| 					/**< Maximum message type. */ | 					/**< Maximum message type. */ | ||||||
| }; | }; | ||||||
| @@ -296,7 +169,6 @@ enum nss_ipv6_dscp_map_actions { | |||||||
| 		/**< Destination MAC address fields are valid. */ | 		/**< Destination MAC address fields are valid. */ | ||||||
| #define NSS_IPV6_RULE_CREATE_IGS_VALID 0x800	/**< Ingress shaping fields are valid. */ | #define NSS_IPV6_RULE_CREATE_IGS_VALID 0x800	/**< Ingress shaping fields are valid. */ | ||||||
| #define NSS_IPV6_RULE_CREATE_IDENTIFIER_VALID 0x1000	/**< Identifier is valid. */ | #define NSS_IPV6_RULE_CREATE_IDENTIFIER_VALID 0x1000	/**< Identifier is valid. */ | ||||||
| #define NSS_IPV6_RULE_CREATE_MIRROR_VALID 0x2000	/**< Mirror fields are valid. */ |  | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Multicast command rule flags |  * Multicast command rule flags | ||||||
| @@ -357,14 +229,6 @@ enum nss_ipv6_dscp_map_actions { | |||||||
| #define NSS_IPV6_RETURN_IDENTIFIER_VALID 0x02 | #define NSS_IPV6_RETURN_IDENTIFIER_VALID 0x02 | ||||||
| 		/**< Identifier for return direction is valid. */ | 		/**< Identifier for return direction is valid. */ | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * Mirror valid flags (to be used with the valid field of nss_ipv6_mirror_rule structure) |  | ||||||
|  */ |  | ||||||
| #define NSS_IPV6_MIRROR_FLOW_VALID 0x01 |  | ||||||
| 		/**< Mirror interface number for the flow direction is valid. */ |  | ||||||
| #define NSS_IPV6_MIRROR_RETURN_VALID 0x02 |  | ||||||
| 		/**< Mirror interface number for the return direction is valid. */ |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv6_exception_events |  * nss_ipv6_exception_events | ||||||
|  *	Exception events from an IPv6 bridge or route handler. |  *	Exception events from an IPv6 bridge or route handler. | ||||||
| @@ -596,16 +460,6 @@ struct nss_ipv6_identifier_rule { | |||||||
| 		/**< Identifier for return direction. */ | 		/**< Identifier for return direction. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ipv6_mirror_rule |  | ||||||
|  *	Mirror rule structure. |  | ||||||
|  */ |  | ||||||
| struct nss_ipv6_mirror_rule { |  | ||||||
| 	uint32_t valid;			/**< Mirror validity flags. */ |  | ||||||
| 	nss_if_num_t flow_ifnum;	/**< Flow mirror interface number. */ |  | ||||||
| 	nss_if_num_t return_ifnum;	/**< Return mirror interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_ipv6_error_response_types |  * nss_ipv6_error_response_types | ||||||
|  *	Error types for IPv6 messages. |  *	Error types for IPv6 messages. | ||||||
| @@ -702,8 +556,6 @@ struct nss_ipv6_rule_create_msg { | |||||||
| 			/**< Ingress shaping related accleration parameters. */ | 			/**< Ingress shaping related accleration parameters. */ | ||||||
| 	struct nss_ipv6_identifier_rule identifier; | 	struct nss_ipv6_identifier_rule identifier; | ||||||
| 			/**< Rule for adding identifier. */ | 			/**< Rule for adding identifier. */ | ||||||
| 	struct nss_ipv6_mirror_rule mirror_rule; |  | ||||||
| 			/**< Mirror rule parameter. */ |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -949,16 +801,6 @@ struct nss_ipv6_node_sync { | |||||||
|  |  | ||||||
| 	uint32_t ipv6_mc_connection_flushes; | 	uint32_t ipv6_mc_connection_flushes; | ||||||
| 			/**< Number of multicast connection flushes. */ | 			/**< Number of multicast connection flushes. */ | ||||||
|  |  | ||||||
| 	uint32_t ipv6_connection_create_invalid_mirror_ifnum; |  | ||||||
| 			/**< Number of create request failed with an invalid mirror interface number. */ |  | ||||||
|  |  | ||||||
| 	uint32_t ipv6_connection_create_invalid_mirror_iftype; |  | ||||||
| 			/**< Number of create request failed with an invalid mirror interface type. */ |  | ||||||
|  |  | ||||||
| 	uint32_t ipv6_mirror_failures; |  | ||||||
| 			/**< Mirror packet failed. */ |  | ||||||
|  |  | ||||||
| 	uint32_t exception_events[NSS_IPV6_EXCEPTION_EVENT_MAX]; | 	uint32_t exception_events[NSS_IPV6_EXCEPTION_EVENT_MAX]; | ||||||
| 			/**< Number of exception events. */ | 			/**< Number of exception events. */ | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -36,16 +36,6 @@ | |||||||
|  */ |  */ | ||||||
| #define NSS_MAX_MAP_T_DYNAMIC_INTERFACES 4 | #define NSS_MAX_MAP_T_DYNAMIC_INTERFACES 4 | ||||||
|  |  | ||||||
| #define NSS_MAPT_MDATA_FLAG_DF_BIT  (1 << 0) |  | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * mapt meta data |  | ||||||
|  */ |  | ||||||
| struct nss_map_t_mdata { |  | ||||||
| 	uint16_t flags; |  | ||||||
| 	uint16_t res[6]; |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_map_t_msg_types |  * nss_map_t_msg_types | ||||||
|  *	Message types for MAP-T requests and responses. |  *	Message types for MAP-T requests and responses. | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2020, The Linux Foundation. All rights reserved. | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
| @@ -78,20 +78,6 @@ enum nss_mirror_error_type { | |||||||
| 	NSS_MIRROR_ERROR_TYPE_MAX,			/**< Maximum message type. */ | 	NSS_MIRROR_ERROR_TYPE_MAX,			/**< Maximum message type. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_mirror_stats |  | ||||||
|  *	Mirror interface debug statistics. |  | ||||||
|  */ |  | ||||||
| enum nss_mirror_stats { |  | ||||||
| 	NSS_MIRROR_STATS_PKTS,			/**< Number of packets exceptioned to host. */ |  | ||||||
| 	NSS_MIRROR_STATS_BYTES,			/**< Number of bytes exceptioned to host. */ |  | ||||||
| 	NSS_MIRROR_STATS_TX_SEND_FAIL,		/**< Transmit send failures. */ |  | ||||||
| 	NSS_MIRROR_STATS_DEST_LOOKUP_FAIL,	/**< Destination lookup failures. */ |  | ||||||
| 	NSS_MIRROR_STATS_MEM_ALLOC_FAIL,	/**< Memory allocation failures. */ |  | ||||||
| 	NSS_MIRROR_STATS_COPY_FAIL,		/**< Copy failures. */ |  | ||||||
| 	NSS_MIRROR_STATS_MAX			/**< Maximum statistics count. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_mirror_configure_msg |  * nss_mirror_configure_msg | ||||||
|  *	Mirror interface configuration information. |  *	Mirror interface configuration information. | ||||||
| @@ -133,16 +119,6 @@ struct nss_mirror_stats_sync_msg { | |||||||
| 	struct nss_mirror_node_stats mirror_stats;	/**< Debug statistics for mirror. */ | 	struct nss_mirror_node_stats mirror_stats;	/**< Debug statistics for mirror. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_mirror_stats_notification |  | ||||||
|  *	Mirror transmission statistics structure. |  | ||||||
|  */ |  | ||||||
| struct nss_mirror_stats_notification { |  | ||||||
| 	uint64_t stats_ctx[NSS_MIRROR_STATS_MAX];	/**< Context transmission statistics. */ |  | ||||||
| 	uint32_t core_id;				/**< Core ID. */ |  | ||||||
| 	uint32_t if_num;				/**< Interface number. */ |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_mirror_msg |  * nss_mirror_msg | ||||||
|  *	Data for sending and receiving mirror interface messages. |  *	Data for sending and receiving mirror interface messages. | ||||||
| @@ -229,17 +205,6 @@ extern nss_tx_status_t nss_mirror_tx_msg(struct nss_ctx_instance *nss_ctx, struc | |||||||
|  */ |  */ | ||||||
| extern nss_tx_status_t nss_mirror_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_mirror_msg *msg); | extern nss_tx_status_t nss_mirror_tx_msg_sync(struct nss_ctx_instance *nss_ctx, struct nss_mirror_msg *msg); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_mirror_unregister_if |  | ||||||
|  *	Deregisters a mirror interface from the NSS. |  | ||||||
|  * |  | ||||||
|  * @param[in] if_num  NSS interface number. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * None. |  | ||||||
|  */ |  | ||||||
| extern void nss_mirror_unregister_if(uint32_t if_num); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_mirror_register_if |  * nss_mirror_register_if | ||||||
|  *	Registers a mirror interface with the NSS for sending and receiving messages. |  *	Registers a mirror interface with the NSS for sending and receiving messages. | ||||||
| @@ -263,6 +228,17 @@ extern struct nss_ctx_instance *nss_mirror_register_if(uint32_t if_num, | |||||||
| 		nss_mirror_msg_callback_t event_callback, | 		nss_mirror_msg_callback_t event_callback, | ||||||
| 		struct net_device *netdev, uint32_t features); | 		struct net_device *netdev, uint32_t features); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * nss_mirror_unregister_if | ||||||
|  |  *	Deregisters a mirror interface from the NSS. | ||||||
|  |  * | ||||||
|  |  * @param[in] if_num  NSS interface number. | ||||||
|  |  * | ||||||
|  |  * @return | ||||||
|  |  * None. | ||||||
|  |  */ | ||||||
|  | extern void nss_mirror_unregister_if(uint32_t if_num); | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * nss_mirror_verify_if_num |  * nss_mirror_verify_if_num | ||||||
|  *	Verify whether the interface is an mirror interface or not. |  *	Verify whether the interface is an mirror interface or not. | ||||||
| @@ -283,34 +259,6 @@ extern bool nss_mirror_verify_if_num(uint32_t if_num); | |||||||
|  */ |  */ | ||||||
| extern void nss_mirror_register_handler(void); | extern void nss_mirror_register_handler(void); | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_mirror_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_mirror_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_mirror_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_mirror_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @} |  * @} | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  ************************************************************************** |  ************************************************************************** | ||||||
|  * Copyright (c) 2016-2018, 2020-2021, The Linux Foundation. All rights reserved. |  * Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved. | ||||||
|  * Permission to use, copy, modify, and/or distribute this software for |  * Permission to use, copy, modify, and/or distribute this software for | ||||||
|  * any purpose with or without fee is hereby granted, provided that the |  * any purpose with or without fee is hereby granted, provided that the | ||||||
|  * above copyright notice and this permission notice appear in all copies. |  * above copyright notice and this permission notice appear in all copies. | ||||||
| @@ -22,8 +22,6 @@ | |||||||
| #ifndef _NSS_PPE_H_ | #ifndef _NSS_PPE_H_ | ||||||
| #define _NSS_PPE_H_ | #define _NSS_PPE_H_ | ||||||
|  |  | ||||||
| typedef int32_t nss_ppe_port_t; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @addtogroup nss_ppe_subsystem |  * @addtogroup nss_ppe_subsystem | ||||||
|  * @{ |  * @{ | ||||||
| @@ -58,34 +56,6 @@ enum nss_ppe_sc_type { | |||||||
| 	NSS_PPE_SC_MAX,			/**< Maximum service code. */ | 	NSS_PPE_SC_MAX,			/**< Maximum service code. */ | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ppe_stats_unregister_notifier |  | ||||||
|  *	Deregisters a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_ppe_stats_unregister_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * nss_ppe_stats_register_notifier |  | ||||||
|  *	Registers a statistics notifier. |  | ||||||
|  * |  | ||||||
|  * @datatypes |  | ||||||
|  *	notifier_block |  | ||||||
|  * |  | ||||||
|  * @param[in] nb Notifier block. |  | ||||||
|  * |  | ||||||
|  * @return |  | ||||||
|  * 0 on success or non-zero on failure. |  | ||||||
|  */ |  | ||||||
| extern int nss_ppe_stats_register_notifier(struct notifier_block *nb); |  | ||||||
|  |  | ||||||
| /** @} */ /* end_addtogroup nss_ppe_subsystem */ | /** @} */ /* end_addtogroup nss_ppe_subsystem */ | ||||||
|  |  | ||||||
| #endif /* _NSS_PPE_H_ */ | #endif /* _NSS_PPE_H_ */ | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user