Compare commits
182 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6dd058ff1 | ||
|
|
a8bbadefaf | ||
|
|
caf6177269 | ||
|
|
0c5aa06824 | ||
|
|
949f0dd900 | ||
|
|
15bb8c3461 | ||
|
|
1db1d6b729 | ||
|
|
0be61f5268 | ||
|
|
b205996838 | ||
|
|
9d206fa4dd | ||
|
|
1f7ca00f45 | ||
|
|
448883d45d | ||
|
|
6a5ee91aa1 | ||
|
|
5be1746bbd | ||
|
|
1209f4c2f0 | ||
|
|
721cd12977 | ||
|
|
804b511fa3 | ||
|
|
f68568c2ab | ||
|
|
a798decbc7 | ||
|
|
dd689d9d24 | ||
|
|
12f16fb68a | ||
|
|
a8938ee909 | ||
|
|
892fdbb966 | ||
|
|
29e16763f5 | ||
|
|
b5cb9442f4 | ||
|
|
995a843c84 | ||
|
|
3b28d4231c | ||
|
|
a76f816d04 | ||
|
|
67603f2a9e | ||
|
|
40d838ff6b | ||
|
|
064779f9c2 | ||
|
|
30d8cc5eab | ||
|
|
f5fbde4c11 | ||
|
|
edcc069409 | ||
|
|
fff279f4a7 | ||
|
|
7f06e5f7f2 | ||
|
|
64261da739 | ||
|
|
1d206bcd71 | ||
|
|
18a5301858 | ||
|
|
de6c207899 | ||
|
|
3267c28531 | ||
|
|
7125dd1654 | ||
|
|
3f4a88db29 | ||
|
|
66cf99e2e1 | ||
|
|
eb8cae5391 | ||
|
|
39c00a9bdd | ||
|
|
2e05d5a036 | ||
|
|
7cf6696120 | ||
|
|
0c9a28e9e0 | ||
|
|
8d858460fe | ||
|
|
8715c83b9d | ||
|
|
17c880c005 | ||
|
|
d3af1f168b | ||
|
|
d7d319a6d2 | ||
|
|
eccc9ff34c | ||
|
|
294ae1013b | ||
|
|
f9e0e9d841 | ||
|
|
739fd7532f | ||
|
|
175c24ea94 | ||
|
|
25f66d9c49 | ||
|
|
491b784141 | ||
|
|
32e60759e6 | ||
|
|
7e8f2a2d6a | ||
|
|
47a7e9ae6f | ||
|
|
c744089871 | ||
|
|
c694aa3326 | ||
|
|
6114723dd1 | ||
|
|
6fce758996 | ||
|
|
6e54cb5d37 | ||
|
|
002f71defd | ||
|
|
a5e4185f46 | ||
|
|
d113f64e8e | ||
|
|
9fd73fb55a | ||
|
|
faf8290e53 | ||
|
|
f6932e9bd5 | ||
|
|
6a12ecbd6d | ||
|
|
57a6d97ddf | ||
|
|
5c1af46f28 | ||
|
|
14f80a8449 | ||
|
|
058ba4a7d1 | ||
|
|
738b1b7593 | ||
|
|
49092a2ff3 | ||
|
|
f8282da11e | ||
|
|
3b5862cf41 | ||
|
|
34d2883b9d | ||
|
|
1e8449591f | ||
|
|
e63b8443ab | ||
|
|
66b063905d | ||
|
|
f6a41570a5 | ||
|
|
9f213a85e2 | ||
|
|
bc99ce5b22 | ||
|
|
c7333b03e1 | ||
|
|
5dc8c8fedd | ||
|
|
4ba71021c9 | ||
|
|
93e9ad63c9 | ||
|
|
6e74276e97 | ||
|
|
ece4ab706c | ||
|
|
116d3ccfd7 | ||
|
|
bb19c0e1d8 | ||
|
|
81b17ed8cc | ||
|
|
e6ba105d6e | ||
|
|
9c081a938f | ||
|
|
efd2313a5b | ||
|
|
3efa783aa9 | ||
|
|
83b9155a3e | ||
|
|
77536f5c7d | ||
|
|
9773b2a49e | ||
|
|
4e570b7b08 | ||
|
|
509363ba58 | ||
|
|
cbe73ea33d | ||
|
|
32621086c3 | ||
|
|
2541ca616d | ||
|
|
0e967b37fe | ||
|
|
5e69c097f7 | ||
|
|
8e12360fcf | ||
|
|
3d93d2cea5 | ||
|
|
a4f065a646 | ||
|
|
122e0c7fed | ||
|
|
7d7e55705c | ||
|
|
c874aa40c2 | ||
|
|
13bd05efd7 | ||
|
|
909f9881fb | ||
|
|
d1e165884e | ||
|
|
7853a2498f | ||
|
|
da9ffd2add | ||
|
|
3b5d11ebc6 | ||
|
|
f167cd2979 | ||
|
|
25d01b26a1 | ||
|
|
714401cbed | ||
|
|
17daee647c | ||
|
|
0982198339 | ||
|
|
9aeea00793 | ||
|
|
5c237602f0 | ||
|
|
33d2539582 | ||
|
|
34b2606570 | ||
|
|
181f885645 | ||
|
|
79e5b24967 | ||
|
|
86d3a78e29 | ||
|
|
8e7c12b684 | ||
|
|
cd7ba71c76 | ||
|
|
cd5e23b104 | ||
|
|
84451d680c | ||
|
|
c35f7f23db | ||
|
|
ae4a8f858e | ||
|
|
a0314a2020 | ||
|
|
23c86d44bc | ||
|
|
f67f60b809 | ||
|
|
3c00c15667 | ||
|
|
f86f8e5684 | ||
|
|
08281831be | ||
|
|
cc9a7cea38 | ||
|
|
16ae19997b | ||
|
|
191f7620f5 | ||
|
|
a49f023eb7 | ||
|
|
afc4bc891e | ||
|
|
74940653d4 | ||
|
|
4c2eaeca94 | ||
|
|
0d4c9bde61 | ||
|
|
e4682b37f9 | ||
|
|
365c259b1d | ||
|
|
a17a86ff20 | ||
|
|
908e869689 | ||
|
|
1f530a6e85 | ||
|
|
2c5685d3eb | ||
|
|
d5d1db00ec | ||
|
|
75de35302c | ||
|
|
d6e3a5cece | ||
|
|
3c4de29ee3 | ||
|
|
c857abfeb4 | ||
|
|
891bf5b61d | ||
|
|
e252dd0177 | ||
|
|
b4f56cda2b | ||
|
|
c3b16df57f | ||
|
|
5db2c76e3e | ||
|
|
9ce7a7e4e1 | ||
|
|
14895598fb | ||
|
|
ed7ac00beb | ||
|
|
8d995b3bd7 | ||
|
|
23ad680a34 | ||
|
|
dbbf5c2a1d | ||
|
|
e8896779da | ||
|
|
1da9099f0f |
@@ -45,15 +45,15 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens
|
||||
```
|
||||
|
||||
Note:
|
||||
- For the for love of god please do __not__ use ROOT user to build your image.
|
||||
- Do everything as an unprivileged user, not root, without sudo.
|
||||
- Using CPUs based on other architectures should be fine to compile ImmortalWrt, but more hacks are needed - No warranty at all.
|
||||
- You must __not__ have spaces in PATH or in the work folders on the drive.
|
||||
- You must __not__ have spaces or non-ascii characters in PATH or in the work folders on the drive.
|
||||
- If you're using Windows Subsystem for Linux (or WSL), removing Windows folders from PATH is required, please see [Build system setup WSL](https://openwrt.org/docs/guide-developer/build-system/wsl) documentation.
|
||||
- Using macOS as the host build OS is __not__ recommended. No warranty at all. You can get tips from [Build system setup macOS](https://openwrt.org/docs/guide-developer/build-system/buildroot.exigence.macosx) documentation.
|
||||
- For more details, please see [Build system setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) documentation.
|
||||
|
||||
### Quickstart
|
||||
1. Run `git clone -b <branch> --single-branch https://github.com/immortalwrt/immortalwrt` to clone the source code.
|
||||
1. Run `git clone -b <branch> --single-branch --filter=blob:none https://github.com/immortalwrt/immortalwrt` to clone the source code.
|
||||
2. Run `cd immortalwrt` to enter source directory.
|
||||
3. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default
|
||||
4. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/
|
||||
@@ -86,6 +86,6 @@ ImmortalWrt is licensed under [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-o
|
||||
<tr>
|
||||
<td><a href="https://dlercloud.com/"><img src="https://user-images.githubusercontent.com/22235437/111103249-f9ec6e00-8588-11eb-9bfc-67cc55574555.png" width="183" height="52" border="0" alt="Dler Cloud"></a></td>
|
||||
<td><a href="https://www.jetbrains.com/"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.png" width="120" height="120" border="0" alt="JetBrains Black Box Logo logo"></a></td>
|
||||
<td><a href="https://osdn.net/"><img src="https://osdn.net/sflogo.php?group_id=13647&type=2" width="125" height="39" border="0" alt="OSDN"></a></td>
|
||||
<td><a href="https://sourceforge.net/"><img src="https://sourceforge.net/sflogo.php?type=17&group_id=3663829" alt="SourceForge" width=200></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^b5f328296fa427a8bf4bc7e42a51a08b5897af9e
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^4094fcb084b71d625d538c0c98e72b15347282f2
|
||||
src-git-full routing https://github.com/openwrt/routing.git^0621622dc5653127f5656010905f71daebf85ad0
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^875609b5207a9d59b923b9ae86b45013a6aacb8c
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^8d55064f3994f2d6c83246ffe5e90e595a64b216
|
||||
src-git-full routing https://github.com/openwrt/routing.git^d79f2b57ebeddabe72f0a099e12aa81e9598adc5
|
||||
src-git-full telephony https://github.com/openwrt/telephony.git^920fbc5c0a2e4badf51bceff42e9a1e3eb693462
|
||||
|
||||
@@ -203,7 +203,7 @@ define DownloadMethod/rawgit
|
||||
cd $(TMP_DIR)/dl && \
|
||||
rm -rf $(SUBDIR) && \
|
||||
[ \! -d $(SUBDIR) ] && \
|
||||
git clone $(OPTS) $(URL) $(SUBDIR) && \
|
||||
git clone --filter=blob:none $(OPTS) $(URL) $(SUBDIR) && \
|
||||
(cd $(SUBDIR) && git checkout $(VERSION) && \
|
||||
git submodule update --init --recursive) && \
|
||||
echo "Packing checkout..." && \
|
||||
|
||||
@@ -338,6 +338,13 @@ define Build/qemu-image
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-mmc
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/qsdk-ipq-factory-nand
|
||||
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
|
||||
$@.its ubi $@
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.4 = .230
|
||||
LINUX_KERNEL_HASH-5.4.230 = a74fd32ccc1025b72f3ba7183208761f7c6190fb96e8f484f6d543a5a183e62f
|
||||
LINUX_VERSION-5.4 = .255
|
||||
LINUX_KERNEL_HASH-5.4.255 = 34d5ed902f47d90f27b9d5d6b8db0d3fa660834111f9452e166d920968a4a061
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.4)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.7)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19892-a6dce2ceb7)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r20074-a8bbadefaf)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.4)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.7)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt)
|
||||
|
||||
@@ -92,6 +92,10 @@ $(curdir)/index: FORCE
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
|
||||
sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \
|
||||
echo '}}' >> index.json; \
|
||||
sed -i 's/, }}/}}/' index.json; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
|
||||
@@ -49,6 +49,7 @@ generate_static_network() {
|
||||
uci -q batch <<-EOF
|
||||
delete network.globals
|
||||
set network.globals='globals'
|
||||
set network.globals.ula_prefix='auto'
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.4"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.7"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -7,9 +7,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git
|
||||
PKG_SOURCE_DATE:=2022-03-15
|
||||
PKG_SOURCE_VERSION:=0625aad74d1f5b6f9c068955ad3fd7f6df635e50
|
||||
PKG_MIRROR_HASH:=0602e0e4f101ead206940eccca832b75191905c1e81290340a89b07dbee7a6ce
|
||||
PKG_SOURCE_DATE:=2022-12-08
|
||||
PKG_SOURCE_VERSION:=4435700d18a791dca0d8d767e5414dfac9df4451
|
||||
PKG_MIRROR_HASH:=6062ce611d7222eb3b9768bb4944ff1c7bcf26b997280adf5ea8d7afe83f28a8
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -31,6 +31,9 @@ ubootenv_mtdinfo () {
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
askey,rt4230w-rev6)
|
||||
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x40000" "0x20000"
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
ubootenv_add_uci_config "/dev/mtd11" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
|
||||
@@ -47,7 +47,9 @@ zte,mf283plus)
|
||||
h3c,tx1800-plus|\
|
||||
h3c,tx1801-plus|\
|
||||
h3c,tx1806|\
|
||||
jcg,q20)
|
||||
jcg,q20|\
|
||||
jcg,q20-lzma-loader|\
|
||||
jcg,q20-pb-boot)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
hootoo,ht-tm05|\
|
||||
|
||||
@@ -72,6 +72,18 @@ define U-Boot/orangepi-r1-plus-lts-rk3328
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/roc-cc-rk3328
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=ROC-RK3328-CC
|
||||
BUILD_DEVICES:= \
|
||||
firefly_roc-rk3328-cc
|
||||
DEPENDS:=+PACKAGE_u-boot-roc-cc-rk3328:arm-trusted-firmware-rk3328
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk322xh_bl31_v1.46.elf
|
||||
OF_PLATDATA:=$(1)
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
|
||||
# RK3399 boards
|
||||
|
||||
@@ -86,6 +98,17 @@ define U-Boot/nanopi-r4s-rk3399
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4se-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=NanoPi R4SE
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4se
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi-r4se-rk3399:arm-trusted-firmware-rk3399
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
|
||||
ATF:=rk3399_bl31_v1.35.elf
|
||||
USE_RKBIN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/rock-pi-4-rk3399
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=Rock Pi 4
|
||||
@@ -108,12 +131,14 @@ endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
nanopi-r4s-rk3399 \
|
||||
nanopi-r4se-rk3399 \
|
||||
rock-pi-4-rk3399 \
|
||||
rockpro64-rk3399 \
|
||||
nanopi-r2c-rk3328 \
|
||||
nanopi-r2s-rk3328 \
|
||||
orangepi-r1-plus-rk3328 \
|
||||
orangepi-r1-plus-lts-rk3328
|
||||
orangepi-r1-plus-lts-rk3328 \
|
||||
roc-cc-rk3328
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
|
||||
--- a/configs/rockpro64-rk3399_defconfig
|
||||
+++ b/configs/rockpro64-rk3399_defconfig
|
||||
@@ -12,7 +12,6 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
@@ -12,7 +12,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64"
|
||||
CONFIG_DEBUG_UART=y
|
||||
-CONFIG_USE_PREBOOT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
rk3328-rock-pi-e.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||
@@ -0,0 +1,1 @@
|
||||
@@ -0,0 +1 @@
|
||||
+#include "rk3328-nanopi-r2s-u-boot.dtsi"
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus.dts
|
||||
@@ -55,7 +55,7 @@
|
||||
+};
|
||||
--- a/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
+++ b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||
@@ -12,6 +12,13 @@ F: configs/nanopi-r2s-rk3328_defconfig
|
||||
@@ -12,6 +12,13 @@ F: configs/nanopi-r2s-rk3328_defcon
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||
F: arch/arm/dts/rk3328-nanopi-r2s.dts
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index d3e89ca3ba..d5f64ac432 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -108,6 +108,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
|
||||
@@ -10,9 +8,6 @@ index d3e89ca3ba..d5f64ac432 100644
|
||||
rk3328-nanopi-r2s.dtb \
|
||||
rk3328-orangepi-r1-plus.dtb \
|
||||
rk3328-roc-cc.dtb \
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 0000000000..c2e86d0f0e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi
|
||||
@@ -0,0 +1,7 @@
|
||||
@@ -23,9 +18,6 @@ index 0000000000..c2e86d0f0e
|
||||
+ */
|
||||
+
|
||||
+#include "rk3328-nanopi-r2s-u-boot.dtsi"
|
||||
diff --git a/arch/arm/dts/rk3328-nanopi-r2c.dts b/arch/arm/dts/rk3328-nanopi-r2c.dts
|
||||
new file mode 100644
|
||||
index 0000000000..adf91a0306
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3328-nanopi-r2c.dts
|
||||
@@ -0,0 +1,47 @@
|
||||
@@ -76,9 +68,6 @@ index 0000000000..adf91a0306
|
||||
+&wan_led {
|
||||
+ label = "nanopi-r2c:green:wan";
|
||||
+};
|
||||
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..7bc7a3274f
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r2c-rk3328_defconfig
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -137,6 +137,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399-nanopi-m4b.dtb \
|
||||
rk3399-nanopi-neo4.dtb \
|
||||
rk3399-nanopi-r4s.dtb \
|
||||
+ rk3399-nanopi-r4se.dtb \
|
||||
rk3399-orangepi.dtb \
|
||||
rk3399-pinebook-pro.dtb \
|
||||
rk3399-puma-haikou.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-nanopi-r4se-u-boot.dtsi
|
||||
@@ -0,0 +1,3 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+
|
||||
+#include "rk3399-nanopi-r4s-u-boot.dtsi"
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3399-nanopi-r4se.dts
|
||||
@@ -0,0 +1,17 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3399-nanopi-r4s.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R4SE";
|
||||
+ compatible = "friendlyarm,nanopi-r4se", "rockchip,rk3399";
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/nanopi-r4se-rk3399_defconfig
|
||||
@@ -0,0 +1,62 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_OFFSET=0x3F8000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4se"
|
||||
+CONFIG_ROCKCHIP_RK3399=y
|
||||
+CONFIG_TARGET_EVB_RK3399=y
|
||||
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-r4se.dtb"
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_STACK_R=y
|
||||
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
|
||||
+CONFIG_TPL=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_TIME=y
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_ETH_DESIGNWARE=y
|
||||
+CONFIG_GMAC_ROCKCHIP=y
|
||||
+CONFIG_PMIC_RK8XX=y
|
||||
+CONFIG_REGULATOR_PWM=y
|
||||
+CONFIG_REGULATOR_RK8XX=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_RAM_RK3399_LPDDR4=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYSRESET=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_DWC3=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_KEYBOARD=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_DISPLAY=y
|
||||
+CONFIG_VIDEO_ROCKCHIP=y
|
||||
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
+CONFIG_SPL_TINY_MEMSET=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* DO NOT MODIFY
|
||||
*
|
||||
* Declares externs for all device/uclass instances.
|
||||
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||
*/
|
||||
|
||||
#include <dm/device-internal.h>
|
||||
#include <dm/uclass-internal.h>
|
||||
|
||||
/* driver declarations - these allow DM_DRIVER_GET() to be used */
|
||||
extern U_BOOT_DRIVER(rockchip_rk3328_cru);
|
||||
extern U_BOOT_DRIVER(rockchip_rk3328_dmc);
|
||||
extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc);
|
||||
extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc);
|
||||
extern U_BOOT_DRIVER(ns16550_serial);
|
||||
extern U_BOOT_DRIVER(rockchip_rk3328_grf);
|
||||
|
||||
/* uclass driver declarations - needed for DM_UCLASS_DRIVER_REF() */
|
||||
extern UCLASS_DRIVER(clk);
|
||||
extern UCLASS_DRIVER(mmc);
|
||||
extern UCLASS_DRIVER(ram);
|
||||
extern UCLASS_DRIVER(serial);
|
||||
extern UCLASS_DRIVER(syscon);
|
||||
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* DO NOT MODIFY
|
||||
*
|
||||
* Declares the U_BOOT_DRIVER() records and platform data.
|
||||
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||
*/
|
||||
|
||||
/* Allow use of U_BOOT_DRVINFO() in this file */
|
||||
#define DT_PLAT_C
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <dt-structs.h>
|
||||
|
||||
/*
|
||||
* driver_info declarations, ordered by 'struct driver_info' linker_list idx:
|
||||
*
|
||||
* idx driver_info driver
|
||||
* --- -------------------- --------------------
|
||||
* 0: clock_controller_at_ff440000 rockchip_rk3328_cru
|
||||
* 1: dmc rockchip_rk3328_dmc
|
||||
* 2: mmc_at_ff500000 rockchip_rk3288_dw_mshc
|
||||
* 3: mmc_at_ff520000 rockchip_rk3288_dw_mshc
|
||||
* 4: serial_at_ff130000 ns16550_serial
|
||||
* 5: syscon_at_ff100000 rockchip_rk3328_grf
|
||||
* --- -------------------- --------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Node /clock-controller@ff440000 index 0
|
||||
* driver rockchip_rk3328_cru parent None
|
||||
*/
|
||||
static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
|
||||
.reg = {0xff440000, 0x1000},
|
||||
.rockchip_grf = 0x3a,
|
||||
};
|
||||
U_BOOT_DRVINFO(clock_controller_at_ff440000) = {
|
||||
.name = "rockchip_rk3328_cru",
|
||||
.plat = &dtv_clock_controller_at_ff440000,
|
||||
.plat_size = sizeof(dtv_clock_controller_at_ff440000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Node /dmc index 1
|
||||
* driver rockchip_rk3328_dmc parent None
|
||||
*/
|
||||
static struct dtd_rockchip_rk3328_dmc dtv_dmc = {
|
||||
.reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
|
||||
0xff720000, 0x1000, 0xff798000, 0x1000},
|
||||
.rockchip_sdram_params = {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0,
|
||||
0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15,
|
||||
0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0,
|
||||
0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8,
|
||||
0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8,
|
||||
0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104,
|
||||
0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114,
|
||||
0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184,
|
||||
0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240,
|
||||
0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff,
|
||||
0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c,
|
||||
0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
|
||||
0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
|
||||
0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
|
||||
0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||
0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
|
||||
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||
0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||
0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
|
||||
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
|
||||
0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
|
||||
0x77, 0x77, 0x79, 0x9},
|
||||
};
|
||||
U_BOOT_DRVINFO(dmc) = {
|
||||
.name = "rockchip_rk3328_dmc",
|
||||
.plat = &dtv_dmc,
|
||||
.plat_size = sizeof(dtv_dmc),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Node /mmc@ff500000 index 2
|
||||
* driver rockchip_rk3288_dw_mshc parent None
|
||||
*/
|
||||
static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = {
|
||||
.bus_width = 0x4,
|
||||
.cap_mmc_highspeed = true,
|
||||
.cap_sd_highspeed = true,
|
||||
.clocks = {
|
||||
{0, {317}},
|
||||
{0, {33}},
|
||||
{0, {74}},
|
||||
{0, {78}},},
|
||||
.disable_wp = true,
|
||||
.fifo_depth = 0x100,
|
||||
.interrupts = {0x0, 0xc, 0x4},
|
||||
.max_frequency = 0x8f0d180,
|
||||
.pinctrl_0 = {0x47, 0x48, 0x49, 0x4a},
|
||||
.pinctrl_names = "default",
|
||||
.reg = {0xff500000, 0x4000},
|
||||
.sd_uhs_sdr104 = true,
|
||||
.sd_uhs_sdr12 = true,
|
||||
.sd_uhs_sdr25 = true,
|
||||
.sd_uhs_sdr50 = true,
|
||||
.u_boot_spl_fifo_mode = true,
|
||||
.vmmc_supply = 0x4b,
|
||||
.vqmmc_supply = 0x1e,
|
||||
};
|
||||
U_BOOT_DRVINFO(mmc_at_ff500000) = {
|
||||
.name = "rockchip_rk3288_dw_mshc",
|
||||
.plat = &dtv_mmc_at_ff500000,
|
||||
.plat_size = sizeof(dtv_mmc_at_ff500000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Node /mmc@ff520000 index 3
|
||||
* driver rockchip_rk3288_dw_mshc parent None
|
||||
*/
|
||||
static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff520000 = {
|
||||
.bus_width = 0x8,
|
||||
.cap_mmc_highspeed = true,
|
||||
.clocks = {
|
||||
{0, {319}},
|
||||
{0, {35}},
|
||||
{0, {76}},
|
||||
{0, {80}},},
|
||||
.fifo_depth = 0x100,
|
||||
.interrupts = {0x0, 0xe, 0x4},
|
||||
.max_frequency = 0x8f0d180,
|
||||
.mmc_ddr_1_8v = true,
|
||||
.mmc_hs200_1_8v = true,
|
||||
.non_removable = true,
|
||||
.pinctrl_0 = {0x4c, 0x4d, 0x4e, 0x0},
|
||||
.pinctrl_names = "default",
|
||||
.reg = {0xff520000, 0x4000},
|
||||
.u_boot_spl_fifo_mode = true,
|
||||
.vmmc_supply = 0x1c,
|
||||
.vqmmc_supply = 0x1d,
|
||||
};
|
||||
U_BOOT_DRVINFO(mmc_at_ff520000) = {
|
||||
.name = "rockchip_rk3288_dw_mshc",
|
||||
.plat = &dtv_mmc_at_ff520000,
|
||||
.plat_size = sizeof(dtv_mmc_at_ff520000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Node /serial@ff130000 index 4
|
||||
* driver ns16550_serial parent None
|
||||
*/
|
||||
static struct dtd_ns16550_serial dtv_serial_at_ff130000 = {
|
||||
.clock_frequency = 0x16e3600,
|
||||
.clocks = {
|
||||
{0, {40}},
|
||||
{0, {212}},},
|
||||
.dma_names = {"tx", "rx"},
|
||||
.dmas = {0x10, 0x6, 0x10, 0x7},
|
||||
.interrupts = {0x0, 0x39, 0x4},
|
||||
.pinctrl_0 = 0x26,
|
||||
.pinctrl_names = "default",
|
||||
.reg = {0xff130000, 0x100},
|
||||
.reg_io_width = 0x4,
|
||||
.reg_shift = 0x2,
|
||||
};
|
||||
U_BOOT_DRVINFO(serial_at_ff130000) = {
|
||||
.name = "ns16550_serial",
|
||||
.plat = &dtv_serial_at_ff130000,
|
||||
.plat_size = sizeof(dtv_serial_at_ff130000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* Node /syscon@ff100000 index 5
|
||||
* driver rockchip_rk3328_grf parent None
|
||||
*/
|
||||
static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
|
||||
.reg = {0xff100000, 0x1000},
|
||||
};
|
||||
U_BOOT_DRVINFO(syscon_at_ff100000) = {
|
||||
.name = "rockchip_rk3328_grf",
|
||||
.plat = &dtv_syscon_at_ff100000,
|
||||
.plat_size = sizeof(dtv_syscon_at_ff100000),
|
||||
.parent_idx = -1,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* DO NOT MODIFY
|
||||
*
|
||||
* Defines the structs used to hold devicetree data.
|
||||
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <linux/libfdt.h>
|
||||
struct dtd_ns16550_serial {
|
||||
fdt32_t clock_frequency;
|
||||
struct phandle_1_arg clocks[2];
|
||||
const char * dma_names[2];
|
||||
fdt32_t dmas[4];
|
||||
fdt32_t interrupts[3];
|
||||
fdt32_t pinctrl_0;
|
||||
const char * pinctrl_names;
|
||||
fdt64_t reg[2];
|
||||
fdt32_t reg_io_width;
|
||||
fdt32_t reg_shift;
|
||||
};
|
||||
struct dtd_rockchip_rk3288_dw_mshc {
|
||||
fdt32_t bus_width;
|
||||
bool cap_mmc_highspeed;
|
||||
bool cap_sd_highspeed;
|
||||
struct phandle_1_arg clocks[4];
|
||||
bool disable_wp;
|
||||
fdt32_t fifo_depth;
|
||||
fdt32_t interrupts[3];
|
||||
fdt32_t max_frequency;
|
||||
bool mmc_ddr_1_8v;
|
||||
bool mmc_hs200_1_8v;
|
||||
bool non_removable;
|
||||
fdt32_t pinctrl_0[4];
|
||||
const char * pinctrl_names;
|
||||
fdt64_t reg[2];
|
||||
bool sd_uhs_sdr104;
|
||||
bool sd_uhs_sdr12;
|
||||
bool sd_uhs_sdr25;
|
||||
bool sd_uhs_sdr50;
|
||||
bool u_boot_spl_fifo_mode;
|
||||
fdt32_t vmmc_supply;
|
||||
fdt32_t vqmmc_supply;
|
||||
};
|
||||
struct dtd_rockchip_rk3328_cru {
|
||||
fdt64_t reg[2];
|
||||
fdt32_t rockchip_grf;
|
||||
};
|
||||
struct dtd_rockchip_rk3328_dmc {
|
||||
fdt64_t reg[12];
|
||||
fdt32_t rockchip_sdram_params[196];
|
||||
};
|
||||
struct dtd_rockchip_rk3328_grf {
|
||||
fdt64_t reg[2];
|
||||
};
|
||||
@@ -43,13 +43,16 @@ define Package/autocore/install/Default
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) ./files/generic/cpuinfo $(1)/sbin/
|
||||
$(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
||||
$(CP) ./files/generic/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
||||
|
||||
ifeq ($(filter ipq%, $(TARGETID)),)
|
||||
$(INSTALL_BIN) ./files/generic/ethinfo $(1)/sbin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/status/include
|
||||
$(INSTALL_DATA) ./files/generic/21_ethinfo.js $(1)/www/luci-static/resources/view/status/include/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/autocore-arm/install
|
||||
|
||||
@@ -20,6 +20,7 @@ define Package/automount
|
||||
MAINTAINER:=Lean
|
||||
DEPENDS:= \
|
||||
+block-mount \
|
||||
+e2fsprogs \
|
||||
+kmod-usb-storage \
|
||||
+kmod-usb-storage-extras \
|
||||
+!TARGET_ramips:kmod-usb-storage-uas \
|
||||
|
||||
@@ -22,6 +22,7 @@ define Package/default-settings
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=LuCI support for Default Settings
|
||||
DEPENDS:=+luci
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+luci-lib-base
|
||||
endef
|
||||
@@ -29,7 +30,7 @@ endef
|
||||
define Package/default-settings-chn
|
||||
$(Package/default-settings)
|
||||
TITLE+= (Optimize for CHN users)
|
||||
DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans
|
||||
DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans +luci-i18n-base-zh-cn
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci set luci.main.lang=auto
|
||||
uci commit luci
|
||||
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
|
||||
|
||||
uci set fstab.@global[0].anon_mount=1
|
||||
uci commit fstab
|
||||
if ! uci -q get system.@imm_init[0].lang > "/dev/null"; then
|
||||
uci -q set luci.main.lang="auto"
|
||||
uci -q commit luci
|
||||
|
||||
rm -f /www/luci-static/resources/view/status/include/50_dsl.js
|
||||
rm -f /www/luci-static/resources/view/status/include/70_ddns.js
|
||||
rm -f /www/luci-static/resources/view/status/include/80_minidlna.js
|
||||
rm -f /www/luci-static/resources/view/status/include/80_upnp.js
|
||||
uci -q set system.@imm_init[0].lang="1"
|
||||
uci -q commit system
|
||||
fi
|
||||
|
||||
ln -sf /sbin/ip /usr/bin/ip
|
||||
if ! uci -q get system.@imm_init[0].anon_mount > "/dev/null"; then
|
||||
uci -q set fstab.@global[0].anon_mount="1"
|
||||
uci -q commit fstab
|
||||
|
||||
[ -f '/bin/bash' ] && sed -i 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd
|
||||
[ -f '/etc/openwrt_banner' ] && mv '/etc/openwrt_banner' '/etc/banner'
|
||||
uci -q set system.@imm_init[0].anon_mount="1"
|
||||
uci -q commit system
|
||||
fi
|
||||
|
||||
sed -i '/option disabled/d' /etc/config/wireless
|
||||
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
|
||||
wifi up
|
||||
ln -sf "/sbin/ip" "/usr/bin/ip"
|
||||
|
||||
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
||||
echo 'log-facility=/dev/null' >> /etc/dnsmasq.conf
|
||||
[ ! -e "/bin/bash" ] || sed -i "s|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g" "/etc/passwd"
|
||||
|
||||
rm -rf /tmp/luci-modulecache/
|
||||
rm -f /tmp/luci-indexcache
|
||||
sed -i "/log-facility/d" "/etc/dnsmasq.conf"
|
||||
echo "log-facility=/dev/null" >> "/etc/dnsmasq.conf"
|
||||
|
||||
rm -rf "/tmp/luci-modulecache"
|
||||
rm -f "/tmp/luci-indexcache"
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF
|
||||
set system.@system[0].timezone='CST-8'
|
||||
set system.@system[0].zonename='Asia/Shanghai'
|
||||
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
|
||||
|
||||
delete system.ntp.server
|
||||
add_list system.ntp.server='ntp.tencent.com'
|
||||
add_list system.ntp.server='ntp1.aliyun.com'
|
||||
add_list system.ntp.server='ntp.ntsc.ac.cn'
|
||||
add_list system.ntp.server='cn.ntp.org.cn'
|
||||
EOF
|
||||
uci commit system
|
||||
if ! uci -q get system.@imm_init[0].system_chn > "/dev/null"; then
|
||||
uci -q batch <<-EOF
|
||||
set system.@system[0].timezone="CST-8"
|
||||
set system.@system[0].zonename="Asia/Shanghai"
|
||||
|
||||
sed -i 's,downloads.immortalwrt.org,mirrors.vsean.net/openwrt,g' /etc/opkg/distfeeds.conf
|
||||
delete system.ntp.server
|
||||
add_list system.ntp.server="ntp.tencent.com"
|
||||
add_list system.ntp.server="ntp1.aliyun.com"
|
||||
add_list system.ntp.server="ntp.ntsc.ac.cn"
|
||||
add_list system.ntp.server="cn.ntp.org.cn"
|
||||
|
||||
set system.@imm_init[0].system_chn="1"
|
||||
commit system
|
||||
EOF
|
||||
fi
|
||||
|
||||
sed -i.bak "s,downloads.immortalwrt.org,mirrors.vsean.net/openwrt,g" "/etc/opkg/distfeeds.conf"
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
if [ "$ACTION" != "ifup" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
config_load network
|
||||
config_get tunnelid $INTERFACE tunnelid
|
||||
config_get username $INTERFACE username
|
||||
config_get password $INTERFACE password
|
||||
config_get tunnelid "$INTERFACE" tunnelid
|
||||
config_get username "$INTERFACE" username
|
||||
config_get password "$INTERFACE" password
|
||||
|
||||
if [ "$tunnelid" != "" ]; then
|
||||
wget -O - https://$username:$password@ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid --no-check-certificate
|
||||
wget -O - "https://$username:$password@ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid"
|
||||
fi
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci set dhcp.lan.ra='hybrid'
|
||||
uci set dhcp.lan.ndp='hybrid'
|
||||
uci set dhcp.lan.dhcpv6='hybrid'
|
||||
uci set dhcp.lan.ra_management='1'
|
||||
uci commit dhcp
|
||||
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
|
||||
uci -q get system.@imm_init[0].ipv6 > "/dev/null" && exit 0
|
||||
|
||||
uci -q set dhcp.lan.ra="hybrid"
|
||||
uci -q set dhcp.lan.ndp="hybrid"
|
||||
uci -q set dhcp.lan.dhcpv6="hybrid"
|
||||
uci -q set dhcp.lan.ra_management="1"
|
||||
uci -q commit dhcp
|
||||
|
||||
uci -q set system.@imm_init[0].ipv6="1"
|
||||
uci -q commit system
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=intel-microcode
|
||||
PKG_VERSION:=20220809
|
||||
PKG_VERSION:=20230808
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/
|
||||
PKG_HASH:=4cf6c3638bb52d9d45c1916af866fd0929628a6f459daac3edfd369149e9c665
|
||||
PKG_SOURCE_URL:=@DEBIAN/pool/non-free-firmware/i/intel-microcode/
|
||||
PKG_HASH:=29e77c275b3f60a691832c0844f70effbd94a4594d04af21e0c2e6e0c1ac1894
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
|
||||
|
||||
PKG_BUILD_DEPENDS:=iucode-tool/host
|
||||
|
||||
@@ -7,6 +7,13 @@ define Package/ibt-firmware/install
|
||||
endef
|
||||
$(eval $(call BuildPackage,ibt-firmware))
|
||||
|
||||
Package/iwlwifi-firmware-ax200 = $(call Package/firmware-default,Intel AX200 firmware)
|
||||
define Package/iwlwifi-firmware-ax200/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-cc-a0-62.ucode $(1)/lib/firmware
|
||||
endef
|
||||
$(eval $(call BuildPackage,iwlwifi-firmware-ax200))
|
||||
|
||||
Package/iwl3945-firmware = $(call Package/firmware-default,Intel IWL3945 firmware)
|
||||
define Package/iwl3945-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
|
||||
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=i40e
|
||||
PKG_VERSION:=2.22.8
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2.23.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@IMMORTALWRT
|
||||
PKG_HASH:=938eac24067e385d6e7e47788c7a1c47987bbe0ed36f3360809cbaa8caf85c6b
|
||||
PKG_SOURCE_URL:=@SF/e1000/i40e%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=7d5a107a49e0c2cede2facba93086dde6fa5cbf529a92dbe57c5407b62d3c31d
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
@@ -37,6 +37,17 @@ define KernelPackage/i40e-vendor/description
|
||||
Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
|
||||
28
package/kernel/i40e/patches/100-dcb-condition.patch
Normal file
28
package/kernel/i40e/patches/100-dcb-condition.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- a/src/i40e_virtchnl_pf.c
|
||||
+++ b/src/i40e_virtchnl_pf.c
|
||||
@@ -6661,7 +6661,6 @@ int i40e_get_vf_stats(struct net_device
|
||||
#endif /* HAVE_VF_STATS */
|
||||
#endif /* IFLA_VF_MAX */
|
||||
#ifdef HAVE_NDO_SET_VF_LINK_STATE
|
||||
-#ifdef CONFIG_DCB
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
/**
|
||||
* i40e_configure_vf_link
|
||||
@@ -6739,6 +6738,7 @@ error_out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_DCB
|
||||
/**
|
||||
* i40e_enable_vf_queues
|
||||
* @vsi: PCI device information struct
|
||||
@@ -6792,8 +6792,8 @@ int i40e_enable_vf_queues(struct i40e_vs
|
||||
err_out:
|
||||
return ret;
|
||||
}
|
||||
-#endif /* PCI_IOV */
|
||||
#endif /* CONFIG_DCB */
|
||||
+#endif /* PCI_IOV */
|
||||
/**
|
||||
* i40e_get_vlan_anti_spoof
|
||||
* @pdev: PCI device information struct
|
||||
58
package/kernel/iavf/Makefile
Normal file
58
package/kernel/iavf/Makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=iavf
|
||||
PKG_VERSION:=4.9.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/e1000/iavf%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=6bf25bd7179b5bca1b10168f57ca4ce9fe54d08574e8d7613fad7c15800c7f71
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/iavf-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) Ethernet Adaptive Virtual Function support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-i40e-vendor
|
||||
CONFLICTS:=kmod-iavf
|
||||
FILES:=$(PKG_BUILD_DIR)/src/iavf.ko
|
||||
AUTOLOAD:=$(call AutoProbe,iavf)
|
||||
endef
|
||||
|
||||
define KernelPackage/iavf-vendor/description
|
||||
Kernel modules for Intel XL710,
|
||||
X710, X722, XXV710, and all devices advertising support for
|
||||
Intel Ethernet Adaptive Virtual Function devices.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
NEED_AUX_BUS=2 \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,iavf-vendor))
|
||||
55
package/kernel/ice/Makefile
Normal file
55
package/kernel/ice/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ice
|
||||
PKG_VERSION:=1.12.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/e1000/ice%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=55a7fb96c516c178180e07451beb621997148301f1b1be0bc52bf970850bc5cc
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ice-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) Ethernet Controller E810 Family support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp @TARGET_x86
|
||||
CONFLICTS:=kmod-ice
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ice.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ice)
|
||||
endef
|
||||
|
||||
define KernelPackage/ice-vendor/description
|
||||
Kernel modules for Intel(R) Ethernet Controller E810 Series
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ice-vendor))
|
||||
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=igb
|
||||
PKG_VERSION:=5.13.7
|
||||
PKG_VERSION:=5.14.16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@IMMORTALWRT
|
||||
PKG_HASH:=4ccae73110f3c871a17b7cc6df7dbdf6295fc90f4941e8b2978a471c2fec83cb
|
||||
PKG_SOURCE_URL:=@SF/e1000/igb%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=59969b19ce0286f4dc8143895ecff16ac18de30e71a5afc8ed73cc16af219db3
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
@@ -25,7 +25,7 @@ define KernelPackage/igb-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-i2c-core +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core @TARGET_x86
|
||||
CONFLICTS:=kmod-igb
|
||||
FILES:=$(PKG_BUILD_DIR)/src/igb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,igb)
|
||||
@@ -35,6 +35,17 @@ define KernelPackage/igb-vendor/description
|
||||
Kernel modules for Intel(R) 82575/82576 PCI-Express Gigabit Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/src/igb_main.c
|
||||
+++ b/src/igb_main.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
#include <linux/pm_runtime.h>
|
||||
#endif /* CONFIG_PM_RUNTIME */
|
||||
+#include <linux/ctype.h>
|
||||
|
||||
#include <linux/if_bridge.h>
|
||||
#include "igb.h"
|
||||
56
package/kernel/ixgbe/Makefile
Normal file
56
package/kernel/ixgbe/Makefile
Normal file
@@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ixgbe
|
||||
PKG_VERSION:=5.19.6
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/e1000/ixgbe%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=a844f1fea8064e30b276792455c3b286c1d7af26731e8f865d4a4e9ed1dcf4ab
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ixgbe-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-libphy @TARGET_x86
|
||||
CONFLICTS:=kmod-ixgbe
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ixgbe.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ixgbe)
|
||||
endef
|
||||
|
||||
define KernelPackage/ixgbe-vendor/description
|
||||
Kernel modules for Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
CONFIG_IXGBE=m \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ixgbe-vendor))
|
||||
11
package/kernel/ixgbe/patches/010-VXLAN_HEADROOM-header.patch
Normal file
11
package/kernel/ixgbe/patches/010-VXLAN_HEADROOM-header.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/ixgbe_main.c
|
||||
+++ b/src/ixgbe_main.c
|
||||
@@ -9869,7 +9869,7 @@ static void ixgbe_atr(struct ixgbe_ring
|
||||
struct ixgbe_adapter *adapter = q_vector->adapter;
|
||||
|
||||
if (unlikely(skb_tail_pointer(skb) < hdr.network +
|
||||
- VXLAN_HEADROOM))
|
||||
+ vxlan_headroom(0)))
|
||||
return;
|
||||
|
||||
/* verify the port is recognized as VXLAN or GENEVE*/
|
||||
56
package/kernel/ixgbevf/Makefile
Normal file
56
package/kernel/ixgbevf/Makefile
Normal file
@@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ixgbevf
|
||||
PKG_VERSION:=4.18.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/e1000/ixgbevf%20stable/$(PKG_VERSION)/
|
||||
PKG_HASH:=90f6cd614008839b6fc748ae0f4ad3503435f8b788318d4f40cfc83c7029025e
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/ixgbevf-vendor
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Intel(R) 82599 Virtual Function Ethernet support (vendor driver)
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ixgbe-vendor
|
||||
CONFLICTS:=kmod-ixgbevf
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ixgbevf.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ixgbevf)
|
||||
endef
|
||||
|
||||
define KernelPackage/ixgbevf-vendor/description
|
||||
Kernel modules for Intel(R) 82599 Virtual Function Ethernet adapters.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
KSRC=$(LINUX_DIR) \
|
||||
OUT=kcompat_generated_defs.h \
|
||||
CONFFILE=$(LINUX_DIR)/include/generated/autoconf.h \
|
||||
bash kcompat-generator.sh ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
CONFIG_IXGBEVF=m \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ixgbevf-vendor))
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <linux/atm.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/version.h>
|
||||
#ifdef CONFIG_XFRM
|
||||
#include <net/xfrm.h>
|
||||
#endif
|
||||
@@ -199,7 +200,12 @@ static inline void mailbox_aal_rx_handler(void);
|
||||
static irqreturn_t mailbox_irq_handler(int, void *);
|
||||
static inline void mailbox_signal(unsigned int, int);
|
||||
static void do_ppe_tasklet(unsigned long);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0);
|
||||
#else
|
||||
DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* QSB & HTU setting functions
|
||||
|
||||
@@ -127,7 +127,11 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DSL Data LED
|
||||
@@ -511,7 +515,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
int ndev;
|
||||
|
||||
|
||||
@@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
static inline struct sk_buff* alloc_skb_rx(void);
|
||||
static inline struct sk_buff* alloc_skb_tx(unsigned int);
|
||||
@@ -125,7 +129,12 @@ static char *g_net_dev_name[1] = {"dsl0"};
|
||||
|
||||
static int g_ptm_prio_queue_map[8];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0);
|
||||
#else
|
||||
static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet);
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
|
||||
@@ -451,7 +460,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
ASSERT(dev == g_net_dev[0], "incorrect device");
|
||||
|
||||
|
||||
51
package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
Normal file
51
package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
|
||||
*/
|
||||
static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
struct sched_param sched_params;
|
||||
-
|
||||
sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
|
||||
sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
||||
+#else
|
||||
+ sched_set_fifo_low(current);
|
||||
+#endif
|
||||
}
|
||||
#endif /* LINUX_2_6 */
|
||||
|
||||
@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
|
||||
*/
|
||||
IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
|
||||
struct sched_param sched_params;
|
||||
IFX_int32_t ret;
|
||||
|
||||
@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
|
||||
}
|
||||
|
||||
return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
|
||||
+#else
|
||||
+ sched_set_fifo_low(current);
|
||||
+ return IFX_SUCCESS;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--- a/src/drv_tapi_kpi.c
|
||||
+++ b/src/drv_tapi_kpi.c
|
||||
@@ -134,7 +134,12 @@ extern IFX_int32_t block_ingre
|
||||
/* ========================================================================== */
|
||||
static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
|
||||
#ifdef KPI_TASKLET
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
|
||||
+ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
|
||||
DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
||||
+#else
|
||||
+DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
|
||||
+#endif
|
||||
#endif /* KPI_TASKLET */
|
||||
static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
|
||||
static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);
|
||||
@@ -744,6 +744,22 @@ endef
|
||||
$(eval $(call KernelPackage,iavf))
|
||||
|
||||
|
||||
define KernelPackage/ice
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Intel(R) Ethernet Controller E810 Series support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp
|
||||
KCONFIG:=CONFIG_ICE
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ice/ice.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ice)
|
||||
endef
|
||||
|
||||
define KernelPackage/ice/description
|
||||
Kernel modules for Intel(R) Ethernet Controller E810 Series
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ice))
|
||||
|
||||
|
||||
define KernelPackage/b44
|
||||
TITLE:=Broadcom 44xx driver
|
||||
KCONFIG:=CONFIG_B44
|
||||
@@ -1180,12 +1196,13 @@ define KernelPackage/mlx5-core
|
||||
CONFIG_MLX5_EN_IPSEC=n \
|
||||
CONFIG_MLX5_EN_RXNFC=y \
|
||||
CONFIG_MLX5_EN_TLS=n \
|
||||
CONFIG_MLX5_ESWITCH=n \
|
||||
CONFIG_MLX5_ESWITCH=y \
|
||||
CONFIG_MLX5_FPGA=n \
|
||||
CONFIG_MLX5_FPGA_IPSEC=n \
|
||||
CONFIG_MLX5_FPGA_TLS=n \
|
||||
CONFIG_MLX5_MPFS=y \
|
||||
CONFIG_MLX5_SW_STEERING=n \
|
||||
CONFIG_MLX5_CLS_ACT=n \
|
||||
CONFIG_MLX5_TC_CT=n \
|
||||
CONFIG_MLX5_TLS=n
|
||||
AUTOLOAD:=$(call AutoProbe,mlx5_core)
|
||||
@@ -1198,6 +1215,50 @@ endef
|
||||
$(eval $(call KernelPackage,mlx5-core))
|
||||
|
||||
|
||||
define KernelPackage/qlcnic
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core
|
||||
TITLE:=QLogic QLE8240 and QLE8242 device support
|
||||
KCONFIG:= \
|
||||
CONFIG_QLCNIC \
|
||||
CONFIG_QLCNIC_HWMON=y \
|
||||
CONFIG_QLCNIC_SRIOV=y
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/qlogic/qlcnic/qlcnic.ko
|
||||
AUTOLOAD:=$(call AutoProbe,qlcnic)
|
||||
endef
|
||||
|
||||
define KernelPackage/qlcnic/description
|
||||
This driver supports QLogic QLE8240 and QLE8242 Converged Ethernet
|
||||
devices.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qlcnic))
|
||||
|
||||
|
||||
define KernelPackage/qede
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-lib-crc8 +kmod-lib-zlib-inflate
|
||||
TITLE:=QLogic FastLinQ 10/25/40/100Gb Ethernet NIC device support
|
||||
KCONFIG:= \
|
||||
CONFIG_QED \
|
||||
CONFIG_QED_SRIOV=y \
|
||||
CONFIG_QEDE \
|
||||
CONFIG_QEDF=n \
|
||||
CONFIG_QEDI=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/qlogic/qed/qed.ko \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/qlogic/qede/qede.ko
|
||||
AUTOLOAD:=$(call AutoProbe,qed qede)
|
||||
endef
|
||||
|
||||
define KernelPackage/qede/description
|
||||
This driver supports QLogic FastLinQ 25/40/100Gb Ethernet NIC
|
||||
devices.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qede))
|
||||
|
||||
|
||||
define KernelPackage/sfp
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=SFP cage support
|
||||
|
||||
@@ -689,7 +689,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_gact 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_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)))
|
||||
@@ -711,7 +711,6 @@ define KernelPackage/sched-core
|
||||
CONFIG_NET_CLS_FLOW \
|
||||
CONFIG_NET_CLS_FW \
|
||||
CONFIG_NET_CLS_ROUTE4 \
|
||||
CONFIG_NET_CLS_TCINDEX \
|
||||
CONFIG_NET_CLS_U32 \
|
||||
CONFIG_NET_ACT_GACT \
|
||||
CONFIG_NET_ACT_MIRRED \
|
||||
|
||||
@@ -174,7 +174,7 @@ detect_mac80211() {
|
||||
set wireless.radio${devidx}.channel=${channel}
|
||||
set wireless.radio${devidx}.band=${mode_band}
|
||||
set wireless.radio${devidx}.htmode=$htmode
|
||||
set wireless.radio${devidx}.country=US
|
||||
set wireless.radio${devidx}.country=CN
|
||||
set wireless.radio${devidx}.disabled=0
|
||||
|
||||
set wireless.default_radio${devidx}=wifi-iface
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3443,6 +3443,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3383,6 +3383,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ v13:
|
||||
WCN36XX=
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
@@ -132,7 +132,7 @@ v13:
|
||||
|
||||
unsigned int ath10k_debug_mask;
|
||||
EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
@@ -65,6 +66,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -64,6 +65,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
@@ -140,7 +140,7 @@ v13:
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -138,6 +140,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
@@ -148,7 +148,7 @@ v13:
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -355,6 +358,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -354,6 +357,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
@@ -156,7 +156,7 @@ v13:
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -397,6 +401,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -396,6 +400,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
@@ -164,7 +164,7 @@ v13:
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -446,6 +451,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -445,6 +450,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
@@ -172,7 +172,7 @@ v13:
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -3158,6 +3164,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -3098,6 +3104,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3416,9 +3426,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -3356,9 +3366,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ v13:
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3464,6 +3483,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3404,6 +3423,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
@@ -221,7 +221,7 @@ v13:
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1256,6 +1257,13 @@ struct ath10k {
|
||||
@@ -1250,6 +1251,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -1312,6 +1312,10 @@ struct ath10k {
|
||||
@@ -1306,6 +1306,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
@@ -5032,6 +5032,7 @@ static void ath10k_mac_setup_ht_vht_cap(
|
||||
if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
|
||||
band = &ar->mac.sbands[NL80211_BAND_2GHZ];
|
||||
band->ht_cap = ht_cap;
|
||||
|
||||
@@ -111,7 +111,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
#define TXCTL_CREDITS 2
|
||||
|
||||
static void pkt_align(struct sk_buff *p, int len, int align)
|
||||
@@ -4140,7 +4144,7 @@ int brcmf_sdio_get_fwname(struct device
|
||||
@@ -4141,7 +4145,7 @@ int brcmf_sdio_get_fwname(struct device
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return -ENOMEM;
|
||||
@@ -4196,6 +4200,9 @@ static const struct brcmf_bus_ops brcmf_
|
||||
@@ -4197,6 +4201,9 @@ static const struct brcmf_bus_ops brcmf_
|
||||
#define BRCMF_SDIO_FW_CODE 0
|
||||
#define BRCMF_SDIO_FW_NVRAM 1
|
||||
|
||||
@@ -130,7 +130,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
struct brcmf_fw_request *fwreq)
|
||||
{
|
||||
@@ -4211,6 +4218,22 @@ static void brcmf_sdio_firmware_callback
|
||||
@@ -4212,6 +4219,22 @@ static void brcmf_sdio_firmware_callback
|
||||
|
||||
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
||||
|
||||
@@ -153,7 +153,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -4419,7 +4442,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
||||
@@ -4420,7 +4443,7 @@ brcmf_sdio_prepare_fw_request(struct brc
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
@@ -162,7 +162,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return NULL;
|
||||
@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
@@ -4438,6 +4461,9 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
struct brcmf_sdio *bus;
|
||||
struct workqueue_struct *wq;
|
||||
struct brcmf_fw_request *fwreq;
|
||||
@@ -172,7 +172,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
@@ -4520,6 +4546,21 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
|
||||
|
||||
brcmf_dbg(INFO, "completed!!\n");
|
||||
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Wed, 29 Mar 2023 16:46:26 +0200
|
||||
Subject: [PATCH] wifi: ieee80211: correctly mark FTM frames non-bufferable
|
||||
|
||||
The checks of whether or not a frame is bufferable were not
|
||||
taking into account that some action frames aren't, such as
|
||||
FTM. Check this, which requires some changes to the function
|
||||
ieee80211_is_bufferable_mmpdu() since we need the whole skb
|
||||
for the checks now.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
@@ -551,8 +551,9 @@ static void iwl_mvm_skb_prepare_status(s
|
||||
|
||||
static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
|
||||
struct ieee80211_tx_info *info,
|
||||
- struct ieee80211_hdr *hdr)
|
||||
+ struct sk_buff *skb)
|
||||
{
|
||||
+ struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
struct iwl_mvm_vif *mvmvif =
|
||||
iwl_mvm_vif_from_mac80211(info->control.vif);
|
||||
__le16 fc = hdr->frame_control;
|
||||
@@ -571,7 +572,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st
|
||||
* reason 7 ("Class 3 frame received from nonassociated STA").
|
||||
*/
|
||||
if (ieee80211_is_mgmt(fc) &&
|
||||
- (!ieee80211_is_bufferable_mmpdu(fc) ||
|
||||
+ (!ieee80211_is_bufferable_mmpdu(skb) ||
|
||||
ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
|
||||
return mvm->probe_queue;
|
||||
|
||||
@@ -689,7 +690,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
|
||||
else
|
||||
sta_id = mvmvif->mcast_sta.sta_id;
|
||||
|
||||
- queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, hdr);
|
||||
+ queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info, skb);
|
||||
} else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) {
|
||||
queue = mvm->snif_queue;
|
||||
sta_id = mvm->snif_sta.sta_id;
|
||||
--- a/include/linux/ieee80211.h
|
||||
+++ b/include/linux/ieee80211.h
|
||||
@@ -738,20 +738,6 @@ static inline bool ieee80211_is_any_null
|
||||
}
|
||||
|
||||
/**
|
||||
- * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
|
||||
- * @fc: frame control field in little-endian byteorder
|
||||
- */
|
||||
-static inline bool ieee80211_is_bufferable_mmpdu(__le16 fc)
|
||||
-{
|
||||
- /* IEEE 802.11-2012, definition of "bufferable management frame";
|
||||
- * note that this ignores the IBSS special case. */
|
||||
- return ieee80211_is_mgmt(fc) &&
|
||||
- (ieee80211_is_action(fc) ||
|
||||
- ieee80211_is_disassoc(fc) ||
|
||||
- ieee80211_is_deauth(fc));
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
* ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set
|
||||
* @seq_ctrl: frame sequence control bytes in little-endian byteorder
|
||||
*/
|
||||
@@ -3672,6 +3658,44 @@ static inline u8 *ieee80211_get_DA(struc
|
||||
}
|
||||
|
||||
/**
|
||||
+ * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
|
||||
+ * @skb: the skb to check, starting with the 802.11 header
|
||||
+ */
|
||||
+static inline bool ieee80211_is_bufferable_mmpdu(struct sk_buff *skb)
|
||||
+{
|
||||
+ struct ieee80211_mgmt *mgmt = (void *)skb->data;
|
||||
+ __le16 fc = mgmt->frame_control;
|
||||
+
|
||||
+ /*
|
||||
+ * IEEE 802.11 REVme D2.0 definition of bufferable MMPDU;
|
||||
+ * note that this ignores the IBSS special case.
|
||||
+ */
|
||||
+ if (!ieee80211_is_mgmt(fc))
|
||||
+ return false;
|
||||
+
|
||||
+ if (ieee80211_is_disassoc(fc) || ieee80211_is_deauth(fc))
|
||||
+ return true;
|
||||
+
|
||||
+ if (!ieee80211_is_action(fc))
|
||||
+ return false;
|
||||
+
|
||||
+ if (skb->len < offsetofend(typeof(*mgmt), u.action.u.ftm.action_code))
|
||||
+ return true;
|
||||
+
|
||||
+ /* action frame - additionally check for non-bufferable FTM */
|
||||
+
|
||||
+ if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&
|
||||
+ mgmt->u.action.category != WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION)
|
||||
+ return true;
|
||||
+
|
||||
+ if (mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM_REQUEST ||
|
||||
+ mgmt->u.action.u.ftm.action_code == WLAN_PUB_ACTION_FTM)
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* _ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame
|
||||
* @hdr: the frame (buffer must include at least the first octet of payload)
|
||||
*/
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -487,7 +487,7 @@ ieee80211_tx_h_unicast_ps_buf(struct iee
|
||||
int ac = skb_get_queue_mapping(tx->skb);
|
||||
|
||||
if (ieee80211_is_mgmt(hdr->frame_control) &&
|
||||
- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
|
||||
+ !ieee80211_is_bufferable_mmpdu(tx->skb)) {
|
||||
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
|
||||
return TX_CONTINUE;
|
||||
}
|
||||
@@ -1282,7 +1282,7 @@ static struct txq_info *ieee80211_get_tx
|
||||
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
|
||||
unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
|
||||
if ((!ieee80211_is_mgmt(hdr->frame_control) ||
|
||||
- ieee80211_is_bufferable_mmpdu(hdr->frame_control) ||
|
||||
+ ieee80211_is_bufferable_mmpdu(skb) ||
|
||||
vif->type == NL80211_IFTYPE_STATION) &&
|
||||
sta && sta->uploaded) {
|
||||
/*
|
||||
@@ -0,0 +1,36 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 11:42:12 +0100
|
||||
Subject: [PATCH] wifi: mac80211: flush queues on STA removal
|
||||
|
||||
When we remove a station, we first make it unreachable,
|
||||
then we (must) remove its keys, and then remove the
|
||||
station itself. Depending on the hardware design, if
|
||||
we have hardware crypto at all, frames still sitting
|
||||
on hardware queues may then be transmitted without a
|
||||
valid key, possibly unencrypted or with a fixed key.
|
||||
|
||||
Fix this by flushing the queues when removing stations
|
||||
so this cannot happen.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1070,6 +1070,14 @@ static void __sta_info_destroy_part2(str
|
||||
WARN_ON_ONCE(ret);
|
||||
}
|
||||
|
||||
+ /* Flush queues before removing keys, as that might remove them
|
||||
+ * from hardware, and then depending on the offload method, any
|
||||
+ * frames sitting on hardware queues might be sent out without
|
||||
+ * any encryption at all.
|
||||
+ */
|
||||
+ if (local->ops->set_key)
|
||||
+ ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+
|
||||
/* now keys can no longer be reached */
|
||||
ieee80211_free_sta_keys(local, sta);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 12:02:58 +0100
|
||||
Subject: [PATCH] wifi: iwlwifi: mvm: support flush on AP interfaces
|
||||
|
||||
Support TX flush on AP interfaces so that we will do a
|
||||
proper flush for frames on the queue before keys are
|
||||
removed.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
@@ -4817,9 +4817,6 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
return;
|
||||
}
|
||||
|
||||
- if (vif->type != NL80211_IFTYPE_STATION)
|
||||
- return;
|
||||
-
|
||||
/* Make sure we're done with the deferred traffic before flushing */
|
||||
flush_work(&mvm->add_stream_wk);
|
||||
|
||||
@@ -4837,9 +4834,6 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
if (mvmsta->vif != vif)
|
||||
continue;
|
||||
|
||||
- /* make sure only TDLS peers or the AP are flushed */
|
||||
- WARN_ON(i != mvmvif->ap_sta_id && !sta->tdls);
|
||||
-
|
||||
if (drop) {
|
||||
if (iwl_mvm_flush_sta(mvm, mvmsta, false))
|
||||
IWL_ERR(mvm, "flush request fail\n");
|
||||
@@ -0,0 +1,91 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 11:53:51 +0100
|
||||
Subject: [PATCH] wifi: mac80211: add flush_sta method
|
||||
|
||||
Some drivers like iwlwifi might have per-STA queues, so we
|
||||
may want to flush/drop just those queues rather than all
|
||||
when removing a station. Add a separate method for that.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -3688,6 +3688,10 @@ struct ieee80211_prep_tx_info {
|
||||
* Note that vif can be NULL.
|
||||
* The callback can sleep.
|
||||
*
|
||||
+ * @flush_sta: Flush or drop all pending frames from the hardware queue(s) for
|
||||
+ * the given station, as it's about to be removed.
|
||||
+ * The callback can sleep.
|
||||
+ *
|
||||
* @channel_switch: Drivers that need (or want) to offload the channel
|
||||
* switch operation for CSAs received from the AP may implement this
|
||||
* callback. They must then call ieee80211_chswitch_done() to indicate
|
||||
@@ -4116,6 +4120,8 @@ struct ieee80211_ops {
|
||||
#endif
|
||||
void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop);
|
||||
+ void (*flush_sta)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_sta *sta);
|
||||
void (*channel_switch)(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_channel_switch *ch_switch);
|
||||
--- a/net/mac80211/driver-ops.h
|
||||
+++ b/net/mac80211/driver-ops.h
|
||||
@@ -639,6 +639,21 @@ static inline void drv_flush(struct ieee
|
||||
trace_drv_return_void(local);
|
||||
}
|
||||
|
||||
+static inline void drv_flush_sta(struct ieee80211_local *local,
|
||||
+ struct ieee80211_sub_if_data *sdata,
|
||||
+ struct sta_info *sta)
|
||||
+{
|
||||
+ might_sleep();
|
||||
+
|
||||
+ if (sdata && !check_sdata_in_driver(sdata))
|
||||
+ return;
|
||||
+
|
||||
+ trace_drv_flush_sta(local, sdata, &sta->sta);
|
||||
+ if (local->ops->flush_sta)
|
||||
+ local->ops->flush_sta(&local->hw, &sdata->vif, &sta->sta);
|
||||
+ trace_drv_return_void(local);
|
||||
+}
|
||||
+
|
||||
static inline void drv_channel_switch(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_channel_switch *ch_switch)
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1075,8 +1075,12 @@ static void __sta_info_destroy_part2(str
|
||||
* frames sitting on hardware queues might be sent out without
|
||||
* any encryption at all.
|
||||
*/
|
||||
- if (local->ops->set_key)
|
||||
- ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+ if (local->ops->set_key) {
|
||||
+ if (local->ops->flush_sta)
|
||||
+ drv_flush_sta(local, sta->sdata, sta);
|
||||
+ else
|
||||
+ ieee80211_flush_queues(local, sta->sdata, false);
|
||||
+ }
|
||||
|
||||
/* now keys can no longer be reached */
|
||||
ieee80211_free_sta_keys(local, sta);
|
||||
--- a/net/mac80211/trace.h
|
||||
+++ b/net/mac80211/trace.h
|
||||
@@ -1140,6 +1140,13 @@ TRACE_EVENT(drv_flush,
|
||||
)
|
||||
);
|
||||
|
||||
+DEFINE_EVENT(sta_event, drv_flush_sta,
|
||||
+ TP_PROTO(struct ieee80211_local *local,
|
||||
+ struct ieee80211_sub_if_data *sdata,
|
||||
+ struct ieee80211_sta *sta),
|
||||
+ TP_ARGS(local, sdata, sta)
|
||||
+);
|
||||
+
|
||||
TRACE_EVENT(drv_channel_switch,
|
||||
TP_PROTO(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
@@ -0,0 +1,53 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 13 Mar 2023 12:05:35 +0100
|
||||
Subject: [PATCH] wifi: iwlwifi: mvm: support new flush_sta method
|
||||
|
||||
For iwlwifi this is simple to implement, and on newer hardware
|
||||
it's an improvement since we have per-station queues.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
|
||||
@@ -4853,6 +4853,31 @@ static void iwl_mvm_mac_flush(struct iee
|
||||
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
|
||||
}
|
||||
|
||||
+static void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_vif *vif,
|
||||
+ struct ieee80211_sta *sta)
|
||||
+{
|
||||
+ struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
+ int i;
|
||||
+
|
||||
+ mutex_lock(&mvm->mutex);
|
||||
+ for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) {
|
||||
+ struct iwl_mvm_sta *mvmsta;
|
||||
+ struct ieee80211_sta *tmp;
|
||||
+
|
||||
+ tmp = rcu_dereference_protected(mvm->fw_id_to_mac_id[i],
|
||||
+ lockdep_is_held(&mvm->mutex));
|
||||
+ if (tmp != sta)
|
||||
+ continue;
|
||||
+
|
||||
+ mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
+
|
||||
+ if (iwl_mvm_flush_sta(mvm, mvmsta, false))
|
||||
+ IWL_ERR(mvm, "flush request fail\n");
|
||||
+ }
|
||||
+ mutex_unlock(&mvm->mutex);
|
||||
+}
|
||||
+
|
||||
static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
struct survey_info *survey)
|
||||
{
|
||||
@@ -5366,6 +5391,7 @@ const struct ieee80211_ops iwl_mvm_hw_op
|
||||
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
|
||||
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
|
||||
.flush = iwl_mvm_mac_flush,
|
||||
+ .flush_sta = iwl_mvm_mac_flush_sta,
|
||||
.sched_scan_start = iwl_mvm_mac_sched_scan_start,
|
||||
.sched_scan_stop = iwl_mvm_mac_sched_scan_stop,
|
||||
.set_key = iwl_mvm_mac_set_key,
|
||||
@@ -5,31 +5,31 @@
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
have_80mhz = true;
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1769,7 +1769,8 @@ static int ieee80211_build_preq_ies_band
|
||||
@@ -1925,7 +1925,8 @@ static int ieee80211_build_preq_ies_band
|
||||
/* Check if any channel in this sband supports at least 80 MHz */
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
have_80mhz = true;
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -4824,7 +4824,8 @@ static int ieee80211_prep_channel(struct
|
||||
@@ -5122,7 +5122,8 @@ static int ieee80211_prep_channel(struct
|
||||
have_80mhz = false;
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
|
||||
- IEEE80211_CHAN_NO_80MHZ))
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &&
|
||||
+ IEEE80211_CHAN_NO_80MHZ) &
|
||||
+ (sband->band != NL80211_BAND_2GHZ))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
To: Jakub Kicinski <kubakici@wp.pl>
|
||||
Cc: Kalle Valo <kvalo@kernel.org>,
|
||||
"David S . Miller" <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
Lintel Huang <lintel.huang@gmail.com>,
|
||||
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Subject: [PATCH] wifi: mt7601u: Add AP mode support
|
||||
Date: Tue, 26 Jul 2022 00:16:03 +0800 [thread overview]
|
||||
Message-ID: <20220725161603.15201-1-amadeus@jmu.edu.cn> (raw)
|
||||
|
||||
Add AP mode support to mt7601u chipset.
|
||||
Simply tested it with firmware version
|
||||
201302052146 and it seems working fine.
|
||||
|
||||
Run-tested-by: Lintel Huang <lintel.huang@gmail.com>
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
---
|
||||
drivers/net/wireless/mediatek/mt7601u/init.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/wireless/mediatek/mt7601u/init.c
|
||||
+++ b/drivers/net/wireless/mediatek/mt7601u/init.c
|
||||
@@ -609,7 +609,8 @@ int mt7601u_register_device(struct mt760
|
||||
SET_IEEE80211_PERM_ADDR(hw, dev->macaddr);
|
||||
|
||||
wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
|
||||
- wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
|
||||
+ wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
||||
+ BIT(NL80211_IFTYPE_AP);
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
|
||||
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
@@ -0,0 +1,314 @@
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -702,6 +702,8 @@ struct ieee80211_bss_conf {
|
||||
u32 unsol_bcast_probe_resp_interval;
|
||||
bool s1g;
|
||||
struct cfg80211_bitrate_mask beacon_tx_rate;
|
||||
+
|
||||
+ bool csa_active;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1672,6 +1674,46 @@ enum ieee80211_offload_flags {
|
||||
};
|
||||
|
||||
/**
|
||||
+ * struct ieee80211_vif_cfg - interface configuration
|
||||
+ * @assoc: association status
|
||||
+ * @ibss_joined: indicates whether this station is part of an IBSS or not
|
||||
+ * @ibss_creator: indicates if a new IBSS network is being created
|
||||
+ * @ps: power-save mode (STA only). This flag is NOT affected by
|
||||
+ * offchannel/dynamic_ps operations.
|
||||
+ * @aid: association ID number, valid only when @assoc is true
|
||||
+ * @arp_addr_list: List of IPv4 addresses for hardware ARP filtering. The
|
||||
+ * may filter ARP queries targeted for other addresses than listed here.
|
||||
+ * The driver must allow ARP queries targeted for all address listed here
|
||||
+ * to pass through. An empty list implies no ARP queries need to pass.
|
||||
+ * @arp_addr_cnt: Number of addresses currently on the list. Note that this
|
||||
+ * may be larger than %IEEE80211_BSS_ARP_ADDR_LIST_LEN (the arp_addr_list
|
||||
+ * array size), it's up to the driver what to do in that case.
|
||||
+ * @ssid: The SSID of the current vif. Valid in AP and IBSS mode.
|
||||
+ * @ssid_len: Length of SSID given in @ssid.
|
||||
+ * @s1g: BSS is S1G BSS (affects Association Request format).
|
||||
+ * @idle: This interface is idle. There's also a global idle flag in the
|
||||
+ * hardware config which may be more appropriate depending on what
|
||||
+ * your driver/device needs to do.
|
||||
+ * @ap_addr: AP MLD address, or BSSID for non-MLO connections
|
||||
+ * (station mode only)
|
||||
+ */
|
||||
+struct ieee80211_vif_cfg {
|
||||
+ /* association related data */
|
||||
+ bool assoc, ibss_joined;
|
||||
+ bool ibss_creator;
|
||||
+ bool ps;
|
||||
+ u16 aid;
|
||||
+
|
||||
+ __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN];
|
||||
+ int arp_addr_cnt;
|
||||
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
|
||||
+ size_t ssid_len;
|
||||
+ bool s1g;
|
||||
+ bool idle;
|
||||
+ u8 ap_addr[ETH_ALEN] __aligned(2);
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
* struct ieee80211_vif - per-interface data
|
||||
*
|
||||
* Data in this structure is continually present for driver
|
||||
@@ -1725,6 +1767,7 @@ enum ieee80211_offload_flags {
|
||||
*/
|
||||
struct ieee80211_vif {
|
||||
enum nl80211_iftype type;
|
||||
+ struct ieee80211_vif_cfg cfg;
|
||||
struct ieee80211_bss_conf bss_conf;
|
||||
u8 addr[ETH_ALEN] __aligned(2);
|
||||
bool p2p;
|
||||
@@ -2045,6 +2088,80 @@ struct ieee80211_sta_txpwr {
|
||||
};
|
||||
|
||||
/**
|
||||
+ * struct ieee80211_sta_aggregates - info that is aggregated from active links
|
||||
+ *
|
||||
+ * Used for any per-link data that needs to be aggregated and updated in the
|
||||
+ * main &struct ieee80211_sta when updated or the active links change.
|
||||
+ *
|
||||
+ * @max_amsdu_len: indicates the maximal length of an A-MSDU in bytes.
|
||||
+ * This field is always valid for packets with a VHT preamble.
|
||||
+ * For packets with a HT preamble, additional limits apply:
|
||||
+ *
|
||||
+ * * If the skb is transmitted as part of a BA agreement, the
|
||||
+ * A-MSDU maximal size is min(max_amsdu_len, 4065) bytes.
|
||||
+ * * If the skb is not part of a BA agreement, the A-MSDU maximal
|
||||
+ * size is min(max_amsdu_len, 7935) bytes.
|
||||
+ *
|
||||
+ * Both additional HT limits must be enforced by the low level
|
||||
+ * driver. This is defined by the spec (IEEE 802.11-2012 section
|
||||
+ * 8.3.2.2 NOTE 2).
|
||||
+ * @max_rc_amsdu_len: Maximum A-MSDU size in bytes recommended by rate control.
|
||||
+ * @max_tid_amsdu_len: Maximum A-MSDU size in bytes for this TID
|
||||
+ */
|
||||
+struct ieee80211_sta_aggregates {
|
||||
+ u16 max_amsdu_len;
|
||||
+
|
||||
+ u16 max_rc_amsdu_len;
|
||||
+ u16 max_tid_amsdu_len[IEEE80211_NUM_TIDS];
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * struct ieee80211_link_sta - station Link specific info
|
||||
+ * All link specific info for a STA link for a non MLD STA(single)
|
||||
+ * or a MLD STA(multiple entries) are stored here.
|
||||
+ *
|
||||
+ * @sta: reference to owning STA
|
||||
+ * @addr: MAC address of the Link STA. For non-MLO STA this is same as the addr
|
||||
+ * in ieee80211_sta. For MLO Link STA this addr can be same or different
|
||||
+ * from addr in ieee80211_sta (representing MLD STA addr)
|
||||
+ * @link_id: the link ID for this link STA (0 for deflink)
|
||||
+ * @smps_mode: current SMPS mode (off, static or dynamic)
|
||||
+ * @supp_rates: Bitmap of supported rates
|
||||
+ * @ht_cap: HT capabilities of this STA; restricted to our own capabilities
|
||||
+ * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities
|
||||
+ * @he_cap: HE capabilities of this STA
|
||||
+ * @he_6ghz_capa: on 6 GHz, holds the HE 6 GHz band capabilities
|
||||
+ * @eht_cap: EHT capabilities of this STA
|
||||
+ * @bandwidth: current bandwidth the station can receive with
|
||||
+ * @rx_nss: in HT/VHT, the maximum number of spatial streams the
|
||||
+ * station can receive at the moment, changed by operating mode
|
||||
+ * notifications and capabilities. The value is only valid after
|
||||
+ * the station moves to associated state.
|
||||
+ * @txpwr: the station tx power configuration
|
||||
+ *
|
||||
+ */
|
||||
+struct ieee80211_link_sta {
|
||||
+ struct ieee80211_sta *sta;
|
||||
+
|
||||
+ u8 addr[ETH_ALEN];
|
||||
+ u8 link_id;
|
||||
+ enum ieee80211_smps_mode smps_mode;
|
||||
+
|
||||
+ u32 supp_rates[NUM_NL80211_BANDS];
|
||||
+ struct ieee80211_sta_ht_cap ht_cap;
|
||||
+ struct ieee80211_sta_vht_cap vht_cap;
|
||||
+ struct ieee80211_sta_he_cap he_cap;
|
||||
+ struct ieee80211_he_6ghz_capa he_6ghz_capa;
|
||||
+ struct ieee80211_sta_eht_cap eht_cap;
|
||||
+
|
||||
+ struct ieee80211_sta_aggregates agg;
|
||||
+
|
||||
+ u8 rx_nss;
|
||||
+ enum ieee80211_sta_rx_bandwidth bandwidth;
|
||||
+ struct ieee80211_sta_txpwr txpwr;
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
* struct ieee80211_sta - station table entry
|
||||
*
|
||||
* A station table entry represents a station we are possibly
|
||||
@@ -2136,6 +2253,10 @@ struct ieee80211_sta {
|
||||
struct ieee80211_sta_txpwr txpwr;
|
||||
|
||||
struct ieee80211_txq *txq[IEEE80211_NUM_TIDS + 1];
|
||||
+
|
||||
+ u16 valid_links;
|
||||
+ struct ieee80211_link_sta deflink;
|
||||
+ struct ieee80211_link_sta __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS];
|
||||
|
||||
/* must be last */
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
--- a/include/linux/ieee80211.h
|
||||
+++ b/include/linux/ieee80211.h
|
||||
@@ -1902,6 +1902,73 @@ struct ieee80211_he_mu_edca_param_ac_rec
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
+ * struct ieee80211_eht_mcs_nss_supp_20mhz_only - EHT 20MHz only station max
|
||||
+ * supported NSS for per MCS.
|
||||
+ *
|
||||
+ * For each field below, bits 0 - 3 indicate the maximal number of spatial
|
||||
+ * streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams
|
||||
+ * for Tx.
|
||||
+ *
|
||||
+ * @rx_tx_mcs7_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 0 - 7.
|
||||
+ * @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 8 - 9.
|
||||
+ * @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 10 - 11.
|
||||
+ * @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 12 - 13.
|
||||
+ */
|
||||
+struct ieee80211_eht_mcs_nss_supp_20mhz_only {
|
||||
+ u8 rx_tx_mcs7_max_nss;
|
||||
+ u8 rx_tx_mcs9_max_nss;
|
||||
+ u8 rx_tx_mcs11_max_nss;
|
||||
+ u8 rx_tx_mcs13_max_nss;
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * struct ieee80211_eht_mcs_nss_supp_bw - EHT max supported NSS per MCS (except
|
||||
+ * 20MHz only stations).
|
||||
+ *
|
||||
+ * For each field below, bits 0 - 3 indicate the maximal number of spatial
|
||||
+ * streams for Rx, and bits 4 - 7 indicate the maximal number of spatial streams
|
||||
+ * for Tx.
|
||||
+ *
|
||||
+ * @rx_tx_mcs9_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 0 - 9.
|
||||
+ * @rx_tx_mcs11_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 10 - 11.
|
||||
+ * @rx_tx_mcs13_max_nss: indicates the maximum number of spatial streams
|
||||
+ * supported for reception and the maximum number of spatial streams
|
||||
+ * supported for transmission for MCS 12 - 13.
|
||||
+ */
|
||||
+struct ieee80211_eht_mcs_nss_supp_bw {
|
||||
+ u8 rx_tx_mcs9_max_nss;
|
||||
+ u8 rx_tx_mcs11_max_nss;
|
||||
+ u8 rx_tx_mcs13_max_nss;
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * struct ieee80211_eht_cap_elem_fixed - EHT capabilities fixed data
|
||||
+ *
|
||||
+ * This structure is the "EHT Capabilities element" fixed fields as
|
||||
+ * described in P802.11be_D2.0 section 9.4.2.313.
|
||||
+ *
|
||||
+ * @mac_cap_info: MAC capabilities, see IEEE80211_EHT_MAC_CAP*
|
||||
+ * @phy_cap_info: PHY capabilities, see IEEE80211_EHT_PHY_CAP*
|
||||
+ */
|
||||
+struct ieee80211_eht_cap_elem_fixed {
|
||||
+ u8 mac_cap_info[2];
|
||||
+ u8 phy_cap_info[9];
|
||||
+} __packed;
|
||||
+
|
||||
+
|
||||
+/**
|
||||
* struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element
|
||||
*
|
||||
* This structure is the "MU EDCA Parameter Set element" fields as
|
||||
@@ -2214,6 +2281,12 @@ int ieee80211_get_vht_max_nss(struct iee
|
||||
#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US 0x80
|
||||
#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED 0xc0
|
||||
#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK 0xc0
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x0
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x1
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x3
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 6
|
||||
+#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0xc0
|
||||
|
||||
#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01
|
||||
|
||||
@@ -4006,4 +4079,7 @@ enum ieee80211_range_params_max_total_lt
|
||||
IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_UNSPECIFIED,
|
||||
};
|
||||
|
||||
+/* multi-link device */
|
||||
+#define IEEE80211_MLD_MAX_NUM_LINKS 15
|
||||
+
|
||||
#endif /* LINUX_IEEE80211_H */
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -348,6 +348,31 @@ struct ieee80211_sta_vht_cap {
|
||||
#define IEEE80211_HE_PPE_THRES_MAX_LEN 25
|
||||
|
||||
/**
|
||||
+ * struct ieee80211_eht_mcs_nss_supp - EHT max supported NSS per MCS
|
||||
+ *
|
||||
+ * See P802.11be_D1.3 Table 9-401k - "Subfields of the Supported EHT-MCS
|
||||
+ * and NSS Set field"
|
||||
+ *
|
||||
+ * @only_20mhz: MCS/NSS support for 20 MHz-only STA.
|
||||
+ * @bw: MCS/NSS support for 80, 160 and 320 MHz
|
||||
+ * @bw._80: MCS/NSS support for BW <= 80 MHz
|
||||
+ * @bw._160: MCS/NSS support for BW = 160 MHz
|
||||
+ * @bw._320: MCS/NSS support for BW = 320 MHz
|
||||
+ */
|
||||
+struct ieee80211_eht_mcs_nss_supp {
|
||||
+ union {
|
||||
+ struct ieee80211_eht_mcs_nss_supp_20mhz_only only_20mhz;
|
||||
+ struct {
|
||||
+ struct ieee80211_eht_mcs_nss_supp_bw _80;
|
||||
+ struct ieee80211_eht_mcs_nss_supp_bw _160;
|
||||
+ struct ieee80211_eht_mcs_nss_supp_bw _320;
|
||||
+ } __packed bw;
|
||||
+ } __packed;
|
||||
+} __packed;
|
||||
+
|
||||
+#define IEEE80211_EHT_PPE_THRES_MAX_LEN 32
|
||||
+
|
||||
+/**
|
||||
* struct ieee80211_sta_he_cap - STA's HE capabilities
|
||||
*
|
||||
* This structure describes most essential parameters needed
|
||||
@@ -366,6 +391,24 @@ struct ieee80211_sta_he_cap {
|
||||
};
|
||||
|
||||
/**
|
||||
+ * struct ieee80211_sta_eht_cap - STA's EHT capabilities
|
||||
+ *
|
||||
+ * This structure describes most essential parameters needed
|
||||
+ * to describe 802.11be EHT capabilities for a STA.
|
||||
+ *
|
||||
+ * @has_eht: true iff EHT data is valid.
|
||||
+ * @eht_cap_elem: Fixed portion of the eht capabilities element.
|
||||
+ * @eht_mcs_nss_supp: The supported NSS/MCS combinations.
|
||||
+ * @eht_ppe_thres: Holds the PPE Thresholds data.
|
||||
+ */
|
||||
+struct ieee80211_sta_eht_cap {
|
||||
+ bool has_eht;
|
||||
+ struct ieee80211_eht_cap_elem_fixed eht_cap_elem;
|
||||
+ struct ieee80211_eht_mcs_nss_supp eht_mcs_nss_supp;
|
||||
+ u8 eht_ppe_thres[IEEE80211_EHT_PPE_THRES_MAX_LEN];
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
* struct ieee80211_sband_iftype_data - sband data per interface type
|
||||
*
|
||||
* This structure encapsulates sband data that is relevant for the
|
||||
@@ -1,16 +1,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mt76
|
||||
PKG_RELEASE=4
|
||||
PKG_RELEASE=5
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-11-12
|
||||
PKG_SOURCE_VERSION:=4bf2607362fc64fc4cb7d662feb736b7536c0811
|
||||
PKG_MIRROR_HASH:=fd4291ac89e14750073cc8c345772883d756bf32cf19fc7205fa344b5b3b91d0
|
||||
PKG_SOURCE_DATE:=2022-12-22
|
||||
PKG_SOURCE_VERSION:=5b509e80384ab019ac11aa90c81ec0dbb5b0d7f2
|
||||
PKG_MIRROR_HASH:=6fc25df4d28becd010ff4971b23731c08b53e69381a9e4c868091899712f78a9
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
@@ -221,16 +221,21 @@ endef
|
||||
define KernelPackage/mt7915e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7915e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7915e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615 wireless driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT
|
||||
DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko
|
||||
endef
|
||||
|
||||
@@ -450,7 +455,7 @@ define KernelPackage/mt7915e/install
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921e/install
|
||||
define KernelPackage/mt7921-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \
|
||||
@@ -485,6 +490,7 @@ $(eval $(call KernelPackage,mt7663-usb-sdio))
|
||||
$(eval $(call KernelPackage,mt7663u))
|
||||
$(eval $(call KernelPackage,mt7663s))
|
||||
$(eval $(call KernelPackage,mt7915e))
|
||||
$(eval $(call KernelPackage,mt7921-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-common))
|
||||
$(eval $(call KernelPackage,mt7921u))
|
||||
$(eval $(call KernelPackage,mt7921s))
|
||||
|
||||
1535
package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch
Normal file
1535
package/kernel/mt76/patches/001-Revert-sync-with-upstream.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,296 @@
|
||||
From dab03e40b8c614d18dfeec054767275de25ff8ab Mon Sep 17 00:00:00 2001
|
||||
From: coolsnowwolf <coolsnowwolf@gmail.com>
|
||||
Date: Tue, 20 Dec 2022 23:01:27 +0800
|
||||
Subject: [PATCH 2/2] Revert "wifi: mt76: mt7921: introduce chanctx support"
|
||||
|
||||
This reverts commit 2575de3aea332837a0784629b11146efa1c55e58.
|
||||
---
|
||||
mt7921/init.c | 33 +++-----------
|
||||
mt7921/mac.c | 8 ++++
|
||||
mt7921/main.c | 111 ++----------------------------------------------
|
||||
mt7921/mt7921.h | 1 -
|
||||
mt7921/pci.c | 7 ---
|
||||
mt7921/sdio.c | 7 ---
|
||||
mt7921/usb.c | 7 ---
|
||||
7 files changed, 17 insertions(+), 157 deletions(-)
|
||||
|
||||
--- a/mt7921/init.c
|
||||
+++ b/mt7921/init.c
|
||||
@@ -26,27 +26,6 @@ static const struct ieee80211_iface_comb
|
||||
.max_interfaces = MT7921_MAX_INTERFACES,
|
||||
.num_different_channels = 1,
|
||||
.beacon_int_infra_match = true,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static const struct ieee80211_iface_limit if_limits_chanctx[] = {
|
||||
- {
|
||||
- .max = 2,
|
||||
- .types = BIT(NL80211_IFTYPE_STATION),
|
||||
- },
|
||||
- {
|
||||
- .max = 1,
|
||||
- .types = BIT(NL80211_IFTYPE_AP),
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-static const struct ieee80211_iface_combination if_comb_chanctx[] = {
|
||||
- {
|
||||
- .limits = if_limits_chanctx,
|
||||
- .n_limits = ARRAY_SIZE(if_limits_chanctx),
|
||||
- .max_interfaces = 2,
|
||||
- .num_different_channels = 2,
|
||||
- .beacon_int_infra_match = false,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -88,19 +67,17 @@ mt7921_init_wiphy(struct ieee80211_hw *h
|
||||
hw->sta_data_size = sizeof(struct mt7921_sta);
|
||||
hw->vif_data_size = sizeof(struct mt7921_vif);
|
||||
|
||||
- if (dev->fw_features & MT7921_FW_CAP_CNM) {
|
||||
+ if (dev->fw_features & MT7921_FW_CAP_CNM)
|
||||
wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
- wiphy->iface_combinations = if_comb_chanctx;
|
||||
- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb_chanctx);
|
||||
- } else {
|
||||
+ else
|
||||
wiphy->flags &= ~WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
- wiphy->iface_combinations = if_comb;
|
||||
- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
|
||||
- }
|
||||
+
|
||||
+ wiphy->iface_combinations = if_comb;
|
||||
wiphy->flags &= ~(WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_4ADDR_AP |
|
||||
WIPHY_FLAG_4ADDR_STATION);
|
||||
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
||||
BIT(NL80211_IFTYPE_AP);
|
||||
+ wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
|
||||
wiphy->max_remain_on_channel_duration = 5000;
|
||||
wiphy->max_scan_ie_len = MT76_CONNAC_SCAN_IE_LEN;
|
||||
wiphy->max_scan_ssids = 4;
|
||||
--- a/mt7921/mac.c
|
||||
+++ b/mt7921/mac.c
|
||||
@@ -168,6 +168,14 @@ static void
|
||||
mt7921_get_status_freq_info(struct mt7921_dev *dev, struct mt76_phy *mphy,
|
||||
struct mt76_rx_status *status, u8 chfreq)
|
||||
{
|
||||
+ if (!test_bit(MT76_HW_SCANNING, &mphy->state) &&
|
||||
+ !test_bit(MT76_HW_SCHED_SCANNING, &mphy->state) &&
|
||||
+ !test_bit(MT76_STATE_ROC, &mphy->state)) {
|
||||
+ status->freq = mphy->chandef.chan->center_freq;
|
||||
+ status->band = mphy->chandef.chan->band;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (chfreq > 180) {
|
||||
status->band = NL80211_BAND_6GHZ;
|
||||
chfreq = (chfreq - 181) * 4 + 1;
|
||||
--- a/mt7921/main.c
|
||||
+++ b/mt7921/main.c
|
||||
@@ -851,7 +851,7 @@ void mt7921_mac_sta_assoc(struct mt76_de
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
|
||||
mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid,
|
||||
- true, mvif->ctx);
|
||||
+ true, NULL);
|
||||
|
||||
mt7921_mac_wtbl_update(dev, msta->wcid.idx,
|
||||
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
|
||||
@@ -884,7 +884,7 @@ void mt7921_mac_sta_remove(struct mt76_d
|
||||
if (!sta->tdls)
|
||||
mt76_connac_mcu_uni_add_bss(&dev->mphy, vif,
|
||||
&mvif->sta.wcid, false,
|
||||
- mvif->ctx);
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->sta_poll_lock);
|
||||
@@ -1644,7 +1644,7 @@ mt7921_start_ap(struct ieee80211_hw *hw,
|
||||
mt7921_mutex_acquire(dev);
|
||||
|
||||
err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid,
|
||||
- true, mvif->ctx);
|
||||
+ true, NULL);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -1676,105 +1676,12 @@ mt7921_stop_ap(struct ieee80211_hw *hw,
|
||||
goto out;
|
||||
|
||||
mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false,
|
||||
- mvif->ctx);
|
||||
+ NULL);
|
||||
|
||||
out:
|
||||
mt7921_mutex_release(dev);
|
||||
}
|
||||
|
||||
-static int
|
||||
-mt7921_add_chanctx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_chanctx_conf *ctx)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-mt7921_remove_chanctx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_chanctx_conf *ctx)
|
||||
-{
|
||||
-}
|
||||
-
|
||||
-static void mt7921_ctx_iter(void *priv, u8 *mac,
|
||||
- struct ieee80211_vif *vif)
|
||||
-{
|
||||
- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
- struct ieee80211_chanctx_conf *ctx = priv;
|
||||
-
|
||||
- if (ctx != mvif->ctx)
|
||||
- return;
|
||||
-
|
||||
- mt76_connac_mcu_uni_set_chctx(mvif->phy->mt76, &mvif->mt76, ctx);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-mt7921_change_chanctx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_chanctx_conf *ctx,
|
||||
- u32 changed)
|
||||
-{
|
||||
- struct mt7921_phy *phy = mt7921_hw_phy(hw);
|
||||
-
|
||||
- mt7921_mutex_acquire(phy->dev);
|
||||
- ieee80211_iterate_active_interfaces(phy->mt76->hw,
|
||||
- IEEE80211_IFACE_ITER_ACTIVE,
|
||||
- mt7921_ctx_iter, ctx);
|
||||
- mt7921_mutex_release(phy->dev);
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-mt7921_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- struct ieee80211_bss_conf *link_conf,
|
||||
- struct ieee80211_chanctx_conf *ctx)
|
||||
-{
|
||||
- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
- struct mt7921_dev *dev = mt7921_hw_dev(hw);
|
||||
-
|
||||
- mutex_lock(&dev->mt76.mutex);
|
||||
- mvif->ctx = ctx;
|
||||
- mutex_unlock(&dev->mt76.mutex);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-mt7921_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- struct ieee80211_bss_conf *link_conf,
|
||||
- struct ieee80211_chanctx_conf *ctx)
|
||||
-{
|
||||
- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
- struct mt7921_dev *dev = mt7921_hw_dev(hw);
|
||||
-
|
||||
- mutex_lock(&dev->mt76.mutex);
|
||||
- mvif->ctx = NULL;
|
||||
- mutex_unlock(&dev->mt76.mutex);
|
||||
-}
|
||||
-
|
||||
-static void mt7921_mgd_prepare_tx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- struct ieee80211_prep_tx_info *info)
|
||||
-{
|
||||
- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
- struct mt7921_dev *dev = mt7921_hw_dev(hw);
|
||||
- u16 duration = info->duration ? info->duration :
|
||||
- jiffies_to_msecs(HZ);
|
||||
-
|
||||
- mt7921_mutex_acquire(dev);
|
||||
- mt7921_set_roc(mvif->phy, mvif, mvif->ctx->def.chan, duration,
|
||||
- MT7921_ROC_REQ_JOIN);
|
||||
- mt7921_mutex_release(dev);
|
||||
-}
|
||||
-
|
||||
-static void mt7921_mgd_complete_tx(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- struct ieee80211_prep_tx_info *info)
|
||||
-{
|
||||
- struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
-
|
||||
- mt7921_abort_roc(mvif->phy, mvif);
|
||||
-}
|
||||
-
|
||||
const struct ieee80211_ops mt7921_ops = {
|
||||
.tx = mt7921_tx,
|
||||
.start = mt7921_start,
|
||||
@@ -1827,13 +1734,6 @@ const struct ieee80211_ops mt7921_ops =
|
||||
.set_sar_specs = mt7921_set_sar_specs,
|
||||
.remain_on_channel = mt7921_remain_on_channel,
|
||||
.cancel_remain_on_channel = mt7921_cancel_remain_on_channel,
|
||||
- .add_chanctx = mt7921_add_chanctx,
|
||||
- .remove_chanctx = mt7921_remove_chanctx,
|
||||
- .change_chanctx = mt7921_change_chanctx,
|
||||
- .assign_vif_chanctx = mt7921_assign_vif_chanctx,
|
||||
- .unassign_vif_chanctx = mt7921_unassign_vif_chanctx,
|
||||
- .mgd_prepare_tx = mt7921_mgd_prepare_tx,
|
||||
- .mgd_complete_tx = mt7921_mgd_complete_tx,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(mt7921_ops);
|
||||
|
||||
--- a/mt7921/mt7921.h
|
||||
+++ b/mt7921/mt7921.h
|
||||
@@ -171,7 +171,6 @@ struct mt7921_vif {
|
||||
struct ewma_rssi rssi;
|
||||
|
||||
struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS];
|
||||
- struct ieee80211_chanctx_conf *ctx;
|
||||
};
|
||||
|
||||
struct mib_stats {
|
||||
--- a/mt7921/pci.c
|
||||
+++ b/mt7921/pci.c
|
||||
@@ -297,13 +297,6 @@ static int mt7921_pci_probe(struct pci_d
|
||||
if (!(features & MT7921_FW_CAP_CNM)) {
|
||||
ops->remain_on_channel = NULL;
|
||||
ops->cancel_remain_on_channel = NULL;
|
||||
- ops->add_chanctx = NULL;
|
||||
- ops->remove_chanctx = NULL;
|
||||
- ops->change_chanctx = NULL;
|
||||
- ops->assign_vif_chanctx = NULL;
|
||||
- ops->unassign_vif_chanctx = NULL;
|
||||
- ops->mgd_prepare_tx = NULL;
|
||||
- ops->mgd_complete_tx = NULL;
|
||||
}
|
||||
|
||||
mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), ops, &drv_ops);
|
||||
--- a/mt7921/sdio.c
|
||||
+++ b/mt7921/sdio.c
|
||||
@@ -140,13 +140,6 @@ static int mt7921s_probe(struct sdio_fun
|
||||
if (!(features & MT7921_FW_CAP_CNM)) {
|
||||
ops->remain_on_channel = NULL;
|
||||
ops->cancel_remain_on_channel = NULL;
|
||||
- ops->add_chanctx = NULL;
|
||||
- ops->remove_chanctx = NULL;
|
||||
- ops->change_chanctx = NULL;
|
||||
- ops->assign_vif_chanctx = NULL;
|
||||
- ops->unassign_vif_chanctx = NULL;
|
||||
- ops->mgd_prepare_tx = NULL;
|
||||
- ops->mgd_complete_tx = NULL;
|
||||
}
|
||||
|
||||
mdev = mt76_alloc_device(&func->dev, sizeof(*dev), ops, &drv_ops);
|
||||
--- a/mt7921/usb.c
|
||||
+++ b/mt7921/usb.c
|
||||
@@ -218,13 +218,6 @@ static int mt7921u_probe(struct usb_inte
|
||||
if (!(features & MT7921_FW_CAP_CNM)) {
|
||||
ops->remain_on_channel = NULL;
|
||||
ops->cancel_remain_on_channel = NULL;
|
||||
- ops->add_chanctx = NULL;
|
||||
- ops->remove_chanctx = NULL;
|
||||
- ops->change_chanctx = NULL;
|
||||
- ops->assign_vif_chanctx = NULL;
|
||||
- ops->unassign_vif_chanctx = NULL;
|
||||
- ops->mgd_prepare_tx = NULL;
|
||||
- ops->mgd_complete_tx = NULL;
|
||||
}
|
||||
|
||||
ops->stop = mt7921u_stop;
|
||||
@@ -1,4 +1,4 @@
|
||||
From fcddb155b538beb0ca7614260a1323d64bfc656a Mon Sep 17 00:00:00 2001
|
||||
From 62468f0b5a72e506915cf50176b701626767e353 Mon Sep 17 00:00:00 2001
|
||||
From: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
|
||||
Date: Mon, 23 Nov 2020 10:46:37 +0800
|
||||
Subject: [PATCH] mt76: allow VHT rate on 2.4GHz
|
||||
@@ -7,13 +7,12 @@ Allow chips that support 11ac to use 256QAM on 2.4GHz
|
||||
|
||||
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
---
|
||||
mac80211.c | 10 +++++-----
|
||||
mt7615/init.c | 2 ++
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
mac80211.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -275,7 +275,7 @@ static void mt76_init_stream_cap(struct
|
||||
@@ -281,7 +281,7 @@ static void mt76_init_stream_cap(struct
|
||||
void mt76_set_stream_caps(struct mt76_phy *phy, bool vht)
|
||||
{
|
||||
if (phy->cap.has_2ghz)
|
||||
@@ -22,7 +21,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
if (phy->cap.has_5ghz)
|
||||
mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht);
|
||||
if (phy->cap.has_6ghz)
|
||||
@@ -342,13 +342,13 @@ mt76_init_sband(struct mt76_phy *phy, st
|
||||
@@ -348,13 +348,13 @@ mt76_init_sband(struct mt76_phy *phy, st
|
||||
|
||||
static int
|
||||
mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates,
|
||||
@@ -38,7 +37,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -496,7 +496,7 @@ int mt76_register_phy(struct mt76_phy *p
|
||||
@@ -506,7 +506,7 @@ int mt76_register_phy(struct mt76_phy *p
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
@@ -47,7 +46,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -621,7 +621,7 @@ int mt76_register_device(struct mt76_dev
|
||||
@@ -644,7 +644,7 @@ int mt76_register_device(struct mt76_dev
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
@@ -56,14 +55,3 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
--- a/mt7615/init.c
|
||||
+++ b/mt7615/init.c
|
||||
@@ -409,6 +409,8 @@ mt7615_init_wiphy(struct ieee80211_hw *h
|
||||
hw->max_tx_fragments = MT_HW_TXP_MAX_BUF_NUM;
|
||||
|
||||
phy->mt76->sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
+ phy->mt76->sband_2g.sband.vht_cap.cap |=
|
||||
+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
|
||||
phy->mt76->sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
phy->mt76->sband_5g.sband.vht_cap.cap |=
|
||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
|
||||
11
package/kernel/mt76/patches/110-api_update.patch
Normal file
11
package/kernel/mt76/patches/110-api_update.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/tx.c
|
||||
+++ b/tx.c
|
||||
@@ -325,7 +325,7 @@ mt76_tx(struct mt76_phy *phy, struct iee
|
||||
if ((dev->drv->drv_flags & MT_DRV_HW_MGMT_TXQ) &&
|
||||
!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
|
||||
!ieee80211_is_data(hdr->frame_control) &&
|
||||
- !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
|
||||
+ !ieee80211_is_bufferable_mmpdu(skb)) {
|
||||
qid = MT_TXQ_PSD;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 22 Mar 2023 10:17:49 +0100
|
||||
Subject: [PATCH] wifi: mt76: ignore key disable commands
|
||||
|
||||
This helps avoid cleartext leakage of already queued or powersave buffered
|
||||
packets, when a reassoc triggers the key deletion.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/mt7603/main.c
|
||||
+++ b/mt7603/main.c
|
||||
@@ -512,15 +512,15 @@ mt7603_set_key(struct ieee80211_hw *hw,
|
||||
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
- if (cmd == SET_KEY) {
|
||||
- key->hw_key_idx = wcid->idx;
|
||||
- wcid->hw_key_idx = idx;
|
||||
- } else {
|
||||
+ if (cmd != SET_KEY) {
|
||||
if (idx == wcid->hw_key_idx)
|
||||
wcid->hw_key_idx = -1;
|
||||
|
||||
- key = NULL;
|
||||
+ return 0;
|
||||
}
|
||||
+
|
||||
+ key->hw_key_idx = wcid->idx;
|
||||
+ wcid->hw_key_idx = idx;
|
||||
mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
|
||||
return mt7603_wtbl_set_key(dev, wcid->idx, key);
|
||||
--- a/mt7615/mac.c
|
||||
+++ b/mt7615/mac.c
|
||||
@@ -1193,8 +1193,7 @@ EXPORT_SYMBOL_GPL(mt7615_mac_enable_rtsc
|
||||
static int
|
||||
mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
struct ieee80211_key_conf *key,
|
||||
- enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- enum set_key_cmd cmd)
|
||||
+ enum mt76_cipher_type cipher, u16 cipher_mask)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx) + 30 * 4;
|
||||
u8 data[32] = {};
|
||||
@@ -1203,27 +1202,18 @@ mt7615_mac_wtbl_update_key(struct mt7615
|
||||
return -EINVAL;
|
||||
|
||||
mt76_rr_copy(dev, addr, data, sizeof(data));
|
||||
- if (cmd == SET_KEY) {
|
||||
- if (cipher == MT_CIPHER_TKIP) {
|
||||
- /* Rx/Tx MIC keys are swapped */
|
||||
- memcpy(data, key->key, 16);
|
||||
- memcpy(data + 16, key->key + 24, 8);
|
||||
- memcpy(data + 24, key->key + 16, 8);
|
||||
- } else {
|
||||
- if (cipher_mask == BIT(cipher))
|
||||
- memcpy(data, key->key, key->keylen);
|
||||
- else if (cipher != MT_CIPHER_BIP_CMAC_128)
|
||||
- memcpy(data, key->key, 16);
|
||||
- if (cipher == MT_CIPHER_BIP_CMAC_128)
|
||||
- memcpy(data + 16, key->key, 16);
|
||||
- }
|
||||
+ if (cipher == MT_CIPHER_TKIP) {
|
||||
+ /* Rx/Tx MIC keys are swapped */
|
||||
+ memcpy(data, key->key, 16);
|
||||
+ memcpy(data + 16, key->key + 24, 8);
|
||||
+ memcpy(data + 24, key->key + 16, 8);
|
||||
} else {
|
||||
+ if (cipher_mask == BIT(cipher))
|
||||
+ memcpy(data, key->key, key->keylen);
|
||||
+ else if (cipher != MT_CIPHER_BIP_CMAC_128)
|
||||
+ memcpy(data, key->key, 16);
|
||||
if (cipher == MT_CIPHER_BIP_CMAC_128)
|
||||
- memset(data + 16, 0, 16);
|
||||
- else if (cipher_mask)
|
||||
- memset(data, 0, 16);
|
||||
- if (!cipher_mask)
|
||||
- memset(data, 0, sizeof(data));
|
||||
+ memcpy(data + 16, key->key, 16);
|
||||
}
|
||||
|
||||
mt76_wr_copy(dev, addr, data, sizeof(data));
|
||||
@@ -1234,7 +1224,7 @@ mt7615_mac_wtbl_update_key(struct mt7615
|
||||
static int
|
||||
mt7615_mac_wtbl_update_pk(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- int keyidx, enum set_key_cmd cmd)
|
||||
+ int keyidx)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx), w0, w1;
|
||||
|
||||
@@ -1253,9 +1243,7 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
|
||||
else
|
||||
w0 &= ~MT_WTBL_W0_RX_IK_VALID;
|
||||
|
||||
- if (cmd == SET_KEY &&
|
||||
- (cipher != MT_CIPHER_BIP_CMAC_128 ||
|
||||
- cipher_mask == BIT(cipher))) {
|
||||
+ if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) {
|
||||
w0 &= ~MT_WTBL_W0_KEY_IDX;
|
||||
w0 |= FIELD_PREP(MT_WTBL_W0_KEY_IDX, keyidx);
|
||||
}
|
||||
@@ -1272,19 +1260,10 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
|
||||
|
||||
static void
|
||||
mt7615_mac_wtbl_update_cipher(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
- enum mt76_cipher_type cipher, u16 cipher_mask,
|
||||
- enum set_key_cmd cmd)
|
||||
+ enum mt76_cipher_type cipher, u16 cipher_mask)
|
||||
{
|
||||
u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx);
|
||||
|
||||
- if (!cipher_mask) {
|
||||
- mt76_clear(dev, addr + 2 * 4, MT_WTBL_W2_KEY_TYPE);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (cmd != SET_KEY)
|
||||
- return;
|
||||
-
|
||||
if (cipher == MT_CIPHER_BIP_CMAC_128 &&
|
||||
cipher_mask & ~BIT(MT_CIPHER_BIP_CMAC_128))
|
||||
return;
|
||||
@@ -1295,8 +1274,7 @@ mt7615_mac_wtbl_update_cipher(struct mt7
|
||||
|
||||
int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd)
|
||||
+ struct ieee80211_key_conf *key)
|
||||
{
|
||||
enum mt76_cipher_type cipher;
|
||||
u16 cipher_mask = wcid->cipher;
|
||||
@@ -1306,19 +1284,14 @@ int __mt7615_mac_wtbl_set_key(struct mt7
|
||||
if (cipher == MT_CIPHER_NONE)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
- cipher_mask |= BIT(cipher);
|
||||
- else
|
||||
- cipher_mask &= ~BIT(cipher);
|
||||
-
|
||||
- mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask, cmd);
|
||||
- err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask,
|
||||
- cmd);
|
||||
+ cipher_mask |= BIT(cipher);
|
||||
+ mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask);
|
||||
+ err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, cipher_mask,
|
||||
- key->keyidx, cmd);
|
||||
+ key->keyidx);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -1329,13 +1302,12 @@ int __mt7615_mac_wtbl_set_key(struct mt7
|
||||
|
||||
int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd)
|
||||
+ struct ieee80211_key_conf *key)
|
||||
{
|
||||
int err;
|
||||
|
||||
spin_lock_bh(&dev->mt76.lock);
|
||||
- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
spin_unlock_bh(&dev->mt76.lock);
|
||||
|
||||
return err;
|
||||
--- a/mt7615/main.c
|
||||
+++ b/mt7615/main.c
|
||||
@@ -391,18 +391,17 @@ static int mt7615_set_key(struct ieee802
|
||||
|
||||
if (cmd == SET_KEY)
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
if (mt76_is_mmio(&dev->mt76))
|
||||
- err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
else
|
||||
- err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
|
||||
+ err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
|
||||
|
||||
out:
|
||||
mt7615_mutex_release(dev);
|
||||
--- a/mt7615/mt7615.h
|
||||
+++ b/mt7615/mt7615.h
|
||||
@@ -491,11 +491,9 @@ int mt7615_mac_write_txwi(struct mt7615_
|
||||
void mt7615_mac_set_timing(struct mt7615_phy *phy);
|
||||
int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
|
||||
struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd);
|
||||
+ struct ieee80211_key_conf *key);
|
||||
int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
|
||||
- struct ieee80211_key_conf *key,
|
||||
- enum set_key_cmd cmd);
|
||||
+ struct ieee80211_key_conf *key);
|
||||
void mt7615_mac_reset_work(struct work_struct *work);
|
||||
u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid);
|
||||
|
||||
--- a/mt76x02_util.c
|
||||
+++ b/mt76x02_util.c
|
||||
@@ -454,20 +454,20 @@ int mt76x02_set_key(struct ieee80211_hw
|
||||
msta = sta ? (struct mt76x02_sta *)sta->drv_priv : NULL;
|
||||
wcid = msta ? &msta->wcid : &mvif->group_wcid;
|
||||
|
||||
- if (cmd == SET_KEY) {
|
||||
- key->hw_key_idx = wcid->idx;
|
||||
- wcid->hw_key_idx = idx;
|
||||
- if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
|
||||
- key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
|
||||
- wcid->sw_iv = true;
|
||||
- }
|
||||
- } else {
|
||||
+ if (cmd != SET_KEY) {
|
||||
if (idx == wcid->hw_key_idx) {
|
||||
wcid->hw_key_idx = -1;
|
||||
wcid->sw_iv = false;
|
||||
}
|
||||
|
||||
- key = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ key->hw_key_idx = wcid->idx;
|
||||
+ wcid->hw_key_idx = idx;
|
||||
+ if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
|
||||
+ key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
|
||||
+ wcid->sw_iv = true;
|
||||
}
|
||||
mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
|
||||
--- a/mt7915/main.c
|
||||
+++ b/mt7915/main.c
|
||||
@@ -399,16 +399,15 @@ static int mt7915_set_key(struct ieee802
|
||||
mt7915_mcu_add_bss_info(phy, vif, true);
|
||||
}
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
+ if (cmd == SET_KEY) {
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ } else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
|
||||
key, MCU_EXT_CMD(STA_REC_UPDATE),
|
||||
&msta->wcid, cmd);
|
||||
--- a/mt7921/main.c
|
||||
+++ b/mt7921/main.c
|
||||
@@ -568,16 +568,15 @@ static int mt7921_set_key(struct ieee802
|
||||
|
||||
mt7921_mutex_acquire(dev);
|
||||
|
||||
- if (cmd == SET_KEY)
|
||||
+ if (cmd == SET_KEY) {
|
||||
*wcid_keyidx = idx;
|
||||
- else if (idx == *wcid_keyidx)
|
||||
- *wcid_keyidx = -1;
|
||||
- else
|
||||
+ } else {
|
||||
+ if (idx == *wcid_keyidx)
|
||||
+ *wcid_keyidx = -1;
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
- mt76_wcid_key_setup(&dev->mt76, wcid,
|
||||
- cmd == SET_KEY ? key : NULL);
|
||||
-
|
||||
+ mt76_wcid_key_setup(&dev->mt76, wcid, key);
|
||||
err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
|
||||
key, MCU_UNI_CMD(STA_REC_UPDATE),
|
||||
&msta->wcid, cmd);
|
||||
@@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.011.00-1
|
||||
PKG_VERSION:=9.010.01-2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=750a05c05f318fc5e1e05e6b2d1f61a76fffa3133eae1bf9ce5ff6d03ae29cb7
|
||||
PKG_HASH:=b3e1b36578ba92a775049535e7434a9fc46710a721846c3706aca3d265db8cb9
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
|
||||
22
package/kernel/r8152/patches/010-kernel-5.4.252.patch
Normal file
22
package/kernel/r8152/patches/010-kernel-5.4.252.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/compatibility.h
|
||||
+++ b/compatibility.h
|
||||
@@ -21,7 +21,6 @@
|
||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
|
||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
|
||||
#define PHY_MAC_INTERRUPT PHY_IGNORE_INTERRUPT
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
@@ -608,11 +607,6 @@
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) */
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) */
|
||||
- static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
|
||||
- {
|
||||
- memcpy(dev->dev_addr, addr, 6);
|
||||
- }
|
||||
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */
|
||||
|
||||
#ifndef FALSE
|
||||
#define TRUE 1
|
||||
21
package/kernel/rtl8189es/patches/030-kernel-5.4.252.patch
Normal file
21
package/kernel/rtl8189es/patches/030-kernel-5.4.252.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/include/osdep_service_linux.h
|
||||
+++ b/include/osdep_service_linux.h
|
||||
@@ -220,18 +220,6 @@ typedef void *timer_hdl_context;
|
||||
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
|
||||
#endif
|
||||
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||
-/* Porting from linux kernel commits
|
||||
-48eab831ae8b9f7002a533fa4235eed63ea1f1a3
|
||||
-3f6cffb8604b537e3d7ea040d7f4368689638eaf
|
||||
-adeef3e32146a8d2a73c399dc6f5d76a449131b1
|
||||
-*/
|
||||
-static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
|
||||
-{
|
||||
- memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
typedef unsigned long systime;
|
||||
typedef struct tasklet_struct _tasklet;
|
||||
|
||||
17
package/kernel/rtl8192eu/patches/040-kernel-5.4.252.patch
Normal file
17
package/kernel/rtl8192eu/patches/040-kernel-5.4.252.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
--- a/include/osdep_service_linux.h
|
||||
+++ b/include/osdep_service_linux.h
|
||||
@@ -217,14 +217,6 @@ typedef void *timer_hdl_context;
|
||||
|
||||
typedef unsigned long systime;
|
||||
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||
-/* Porting from linux kernel v5.15-rc1 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 */
|
||||
-static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
|
||||
-{
|
||||
- memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22))
|
||||
/* Porting from linux kernel, for compatible with old kernel. */
|
||||
static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=t
|
||||
PKG_BUGFIX:=v
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@@ -28,7 +28,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
|
||||
PKG_HASH:=d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -338,6 +338,7 @@ define Build/Configure
|
||||
--libdir=lib \
|
||||
--openssldir=/etc/ssl \
|
||||
--cross-compile-prefix="$(TARGET_CROSS)" \
|
||||
$(TARGET_CFLAGS) \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
$(TARGET_LDFLAGS) \
|
||||
$(OPENSSL_OPTIONS) && \
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
|
||||
PKG_MIRROR_HASH:=7c443cac02a734dd312c65618f4de17248d188317f30a9fac192c1503b3d5c05
|
||||
PKG_SOURCE_DATE:=2021-05-14
|
||||
PKG_SOURCE_VERSION:=6a6011df3429ffa5958d12b1327eeda4fd9daa47
|
||||
PKG_MIRROR_HASH:=16c6c97f45d9737fb40628ea22ae347541a1e37d8d1576e04ffbaa5fc92f3b6d
|
||||
PKG_SOURCE_DATE:=2023-04-13
|
||||
PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_BUILD_DEPENDS:=ustream-ssl
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.5.4-stable
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=5.6.3-stable
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=b7ee150e49def77c765bc02aac92ddeb0bebefd4cb12aa263d8f95e405221fb8
|
||||
PKG_HASH:=2e74a397fa797c2902d7467d500de904907666afb4ff80f6464f6efd5afb114a
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
@@ -151,6 +151,33 @@ CONFIGURE_ARGS += \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_ECC448),enable,disable)-curve448 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn
|
||||
|
||||
define Package/libwolfsslcpu-crypto/preinst-aarch64
|
||||
#!/bin/sh
|
||||
exec >&2
|
||||
printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
|
||||
if [ -n "$${IPKG_INSTROOT}" ]; then
|
||||
printf "...[offline]... "
|
||||
eval "$$(grep '^DISTRIB_TARGET=' "$${IPKG_INSTROOT}/etc/openwrt_release")"
|
||||
echo "$${DISTRIB_TARGET}" | grep '^bcm27xx/.*' > /dev/null && {
|
||||
echo "not supported"
|
||||
echo "Error: Target $${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
|
||||
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
|
||||
echo "not supported"
|
||||
echo "Error: Arm v8-A Cryptographic Extension not supported."
|
||||
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||
echo "Contents of /proc/cpuinfo:"
|
||||
cat /proc/cpuinfo
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
echo OK
|
||||
exit 0
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),regular)
|
||||
CONFIGURE_ARGS += \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \
|
||||
@@ -160,9 +187,7 @@ CONFIGURE_ARGS += \
|
||||
else ifdef CONFIG_aarch64
|
||||
CONFIGURE_ARGS += --enable-armasm
|
||||
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
|
||||
WOLFSSL_NOASM_REGEX:=^bcm27xx/.*
|
||||
Package/libwolfsslcpu-crypto/preinst=\
|
||||
$(subst @@WOLFSSL_NOASM_REGEX@@,$(WOLFSSL_NOASM_REGEX),$(file <preinst.arm-ce))
|
||||
Package/libwolfsslcpu-crypto/preinst=$(Package/libwolfsslcpu-crypto/preinst-aarch64)
|
||||
else ifdef CONFIG_TARGET_x86_64
|
||||
CONFIGURE_ARGS += --enable-intelasm
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 41d248461bd9ad44193a4806ecb5361513e8944e Mon Sep 17 00:00:00 2001
|
||||
From: jordan <jordan@wolfssl.com>
|
||||
Date: Tue, 27 Jun 2023 13:18:25 -0500
|
||||
Subject: [PATCH] fix detection of cut tool in configure.ac
|
||||
|
||||
---
|
||||
configure.ac | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -8723,10 +8723,11 @@ echo "extern \"C\" {" >> $OPTION_FILE
|
||||
echo "#endif" >> $OPTION_FILE
|
||||
echo "" >> $OPTION_FILE
|
||||
|
||||
-# check for supported command to trim option with
|
||||
+# Check for supported command to trim option with.
|
||||
+# note: cut requires an argument to exit with success.
|
||||
if colrm >/dev/null 2>&1 </dev/null; then
|
||||
TRIM="colrm 3"
|
||||
-elif cut >/dev/null 2>&1 </dev/null; then
|
||||
+elif cut --version >/dev/null 2>&1 </dev/null; then
|
||||
TRIM="cut -c1-2"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find colrm or cut to make options file])
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/wolfssl/wolfcrypt/settings.h
|
||||
+++ b/wolfssl/wolfcrypt/settings.h
|
||||
@@ -2496,7 +2496,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
@@ -2630,7 +2630,7 @@ extern void uITRON4_free(void *p) ;
|
||||
|
||||
/* warning for not using harden build options (default with ./configure) */
|
||||
-#ifndef WC_NO_HARDEN
|
||||
/* do not warn if big integer support is disabled */
|
||||
-#if !defined(WC_NO_HARDEN) && !defined(NO_BIG_INT)
|
||||
+#if 0
|
||||
#if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \
|
||||
(defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
exec >&2
|
||||
printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
|
||||
if [ -n "${IPKG_INSTROOT}" ]; then
|
||||
printf "...[offline]... "
|
||||
eval "$(grep '^DISTRIB_TARGET=' "${IPKG_INSTROOT}/etc/openwrt_release")"
|
||||
### @@WOLFSSL_NOASM_REGEX@@ is expanded from WOLFSSL_NOASM_REGEX in the Makefile
|
||||
echo "${DISTRIB_TARGET}" | grep '@@WOLFSSL_NOASM_REGEX@@' > /dev/null && {
|
||||
echo "not supported"
|
||||
echo "Error: Target ${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
|
||||
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
|
||||
echo "not supported"
|
||||
echo "Error: Arm v8-A Cryptographic Extension not supported."
|
||||
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||
echo "Contents of /proc/cpuinfo:"
|
||||
cat /proc/cpuinfo
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
echo OK
|
||||
exit 0
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netifd
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
Date: Fri, 24 Feb 2023 13:28:52 +0800
|
||||
Subject: [PATCH] Revert "device: add support for configuring device link
|
||||
speed/duplex"
|
||||
|
||||
Fixes auto-negotiate for out-of-tree ethernet drivers.
|
||||
|
||||
This reverts commit 1eb0fafaa9865b729509a7d47ecf1f05c2c0595c.
|
||||
---
|
||||
device.c | 14 --------------
|
||||
device.h | 6 ------
|
||||
system-linux.c | 52 --------------------------------------------------
|
||||
3 files changed, 72 deletions(-)
|
||||
|
||||
--- a/device.c
|
||||
+++ b/device.c
|
||||
@@ -61,8 +61,6 @@ static const struct blobmsg_policy dev_a
|
||||
[DEV_ATTR_DROP_UNSOLICITED_NA] = { .name = "drop_unsolicited_na", .type = BLOBMSG_TYPE_BOOL },
|
||||
[DEV_ATTR_ARP_ACCEPT] = { .name = "arp_accept", .type = BLOBMSG_TYPE_BOOL },
|
||||
[DEV_ATTR_AUTH] = { .name = "auth", .type = BLOBMSG_TYPE_BOOL },
|
||||
- [DEV_ATTR_SPEED] = { .name = "speed", .type = BLOBMSG_TYPE_INT32 },
|
||||
- [DEV_ATTR_DUPLEX] = { .name = "duplex", .type = BLOBMSG_TYPE_BOOL },
|
||||
};
|
||||
|
||||
const struct uci_blob_param_list device_attr_list = {
|
||||
@@ -278,8 +276,6 @@ device_merge_settings(struct device *dev
|
||||
n->arp_accept = s->flags & DEV_OPT_ARP_ACCEPT ?
|
||||
s->arp_accept : os->arp_accept;
|
||||
n->auth = s->flags & DEV_OPT_AUTH ? s->auth : os->auth;
|
||||
- n->speed = s->flags & DEV_OPT_SPEED ? s->speed : os->speed;
|
||||
- n->duplex = s->flags & DEV_OPT_DUPLEX ? s->duplex : os->duplex;
|
||||
n->flags = s->flags | os->flags | os->valid_flags;
|
||||
}
|
||||
|
||||
@@ -454,16 +450,6 @@ device_init_settings(struct device *dev,
|
||||
s->flags |= DEV_OPT_AUTH;
|
||||
}
|
||||
|
||||
- if ((cur = tb[DEV_ATTR_SPEED])) {
|
||||
- s->speed = blobmsg_get_u32(cur);
|
||||
- s->flags |= DEV_OPT_SPEED;
|
||||
- }
|
||||
-
|
||||
- if ((cur = tb[DEV_ATTR_DUPLEX])) {
|
||||
- s->duplex = blobmsg_get_bool(cur);
|
||||
- s->flags |= DEV_OPT_DUPLEX;
|
||||
- }
|
||||
-
|
||||
device_set_disabled(dev, disabled);
|
||||
}
|
||||
|
||||
--- a/device.h
|
||||
+++ b/device.h
|
||||
@@ -60,8 +60,6 @@ enum {
|
||||
DEV_ATTR_DROP_UNSOLICITED_NA,
|
||||
DEV_ATTR_ARP_ACCEPT,
|
||||
DEV_ATTR_AUTH,
|
||||
- DEV_ATTR_SPEED,
|
||||
- DEV_ATTR_DUPLEX,
|
||||
__DEV_ATTR_MAX,
|
||||
};
|
||||
|
||||
@@ -124,8 +122,6 @@ enum {
|
||||
DEV_OPT_DROP_GRATUITOUS_ARP = (1ULL << 27),
|
||||
DEV_OPT_DROP_UNSOLICITED_NA = (1ULL << 28),
|
||||
DEV_OPT_ARP_ACCEPT = (1ULL << 29),
|
||||
- DEV_OPT_SPEED = (1ULL << 30),
|
||||
- DEV_OPT_DUPLEX = (1ULL << 31),
|
||||
};
|
||||
|
||||
/* events broadcasted to all users of a device */
|
||||
@@ -201,8 +197,6 @@ struct device_settings {
|
||||
bool drop_unsolicited_na;
|
||||
bool arp_accept;
|
||||
bool auth;
|
||||
- unsigned int speed;
|
||||
- bool duplex;
|
||||
};
|
||||
|
||||
/*
|
||||
--- a/system-linux.c
|
||||
+++ b/system-linux.c
|
||||
@@ -1715,57 +1715,6 @@ int system_vlandev_del(struct device *vl
|
||||
return system_link_del(vlandev->ifname);
|
||||
}
|
||||
|
||||
-static void
|
||||
-system_set_ethtool_settings(struct device *dev, struct device_settings *s)
|
||||
-{
|
||||
- struct ethtool_cmd ecmd = {
|
||||
- .cmd = ETHTOOL_GSET,
|
||||
- };
|
||||
- struct ifreq ifr = {
|
||||
- .ifr_data = (caddr_t)&ecmd,
|
||||
- };
|
||||
- static const struct {
|
||||
- int speed;
|
||||
- uint8_t bit_half;
|
||||
- uint8_t bit_full;
|
||||
- } speed_mask[] = {
|
||||
- { 10, ETHTOOL_LINK_MODE_10baseT_Half_BIT, ETHTOOL_LINK_MODE_10baseT_Full_BIT },
|
||||
- { 100, ETHTOOL_LINK_MODE_100baseT_Half_BIT, ETHTOOL_LINK_MODE_100baseT_Full_BIT },
|
||||
- { 1000, ETHTOOL_LINK_MODE_1000baseT_Half_BIT, ETHTOOL_LINK_MODE_1000baseT_Full_BIT },
|
||||
- };
|
||||
- uint32_t adv;
|
||||
- int i;
|
||||
-
|
||||
- strncpy(ifr.ifr_name, dev->ifname, sizeof(ifr.ifr_name) - 1);
|
||||
-
|
||||
- if (ioctl(sock_ioctl, SIOCETHTOOL, &ifr) != 0)
|
||||
- return;
|
||||
-
|
||||
- adv = ecmd.supported;
|
||||
- for (i = 0; i < ARRAY_SIZE(speed_mask); i++) {
|
||||
- if (s->flags & DEV_OPT_DUPLEX) {
|
||||
- int bit = s->duplex ? speed_mask[i].bit_half : speed_mask[i].bit_full;
|
||||
- adv &= ~(1 << bit);
|
||||
- }
|
||||
-
|
||||
- if (!(s->flags & DEV_OPT_SPEED) ||
|
||||
- s->speed == speed_mask[i].speed)
|
||||
- continue;
|
||||
-
|
||||
- adv &= ~(1 << speed_mask[i].bit_full);
|
||||
- adv &= ~(1 << speed_mask[i].bit_half);
|
||||
- }
|
||||
-
|
||||
-
|
||||
- if (ecmd.autoneg && ecmd.advertising == adv)
|
||||
- return;
|
||||
-
|
||||
- ecmd.autoneg = 1;
|
||||
- ecmd.advertising = adv;
|
||||
- ecmd.cmd = ETHTOOL_SSET;
|
||||
- ioctl(sock_ioctl, SIOCETHTOOL, &ifr);
|
||||
-}
|
||||
-
|
||||
void
|
||||
system_if_get_settings(struct device *dev, struct device_settings *s)
|
||||
{
|
||||
@@ -1989,7 +1938,6 @@ system_if_apply_settings(struct device *
|
||||
system_set_drop_unsolicited_na(dev, s->drop_unsolicited_na ? "1" : "0");
|
||||
if (apply_mask & DEV_OPT_ARP_ACCEPT)
|
||||
system_set_arp_accept(dev, s->arp_accept ? "1" : "0");
|
||||
- system_set_ethtool_settings(dev, s);
|
||||
}
|
||||
|
||||
int system_if_up(struct device *dev)
|
||||
@@ -24,12 +24,12 @@ hostapd_append_wep_key() {
|
||||
[1234])
|
||||
for idx in 1 2 3 4; do
|
||||
local zidx
|
||||
zidx=$(($idx - 1))
|
||||
zidx="$(($idx - 1))"
|
||||
json_get_var ckey "key${idx}"
|
||||
[ -n "$ckey" ] && \
|
||||
append $var "wep_key${zidx}=$(prepare_key_wep "$ckey")" "$N$T"
|
||||
done
|
||||
wep_keyidx=$((key - 1))
|
||||
wep_keyidx="$((key - 1))"
|
||||
;;
|
||||
*)
|
||||
append $var "wep_key0=$(prepare_key_wep "$key")" "$N$T"
|
||||
@@ -790,7 +790,7 @@ hostapd_set_bss_options() {
|
||||
;;
|
||||
esac
|
||||
|
||||
local auth_algs=$((($auth_mode_shared << 1) | $auth_mode_open))
|
||||
local auth_algs="$((($auth_mode_shared << 1) | $auth_mode_open))"
|
||||
append bss_conf "auth_algs=${auth_algs:-1}" "$N"
|
||||
append bss_conf "wpa=$wpa" "$N"
|
||||
[ -n "$wpa_pairwise" ] && append bss_conf "wpa_pairwise=$wpa_pairwise" "$N"
|
||||
@@ -1159,7 +1159,7 @@ hostapd_set_bss_options() {
|
||||
append bss_conf "$val" "$N"
|
||||
done
|
||||
|
||||
bss_md5sum=$(echo $bss_conf | md5sum | cut -d" " -f1)
|
||||
bss_md5sum="$(echo $bss_conf | md5sum | cut -d" " -f1)"
|
||||
append bss_conf "config_id=$bss_md5sum" "$N"
|
||||
|
||||
append "$var" "$bss_conf" "$N"
|
||||
@@ -1181,7 +1181,7 @@ hostapd_set_log_options() {
|
||||
set_default log_iapp 1
|
||||
set_default log_mlme 1
|
||||
|
||||
local log_mask=$(( \
|
||||
local log_mask="$(( \
|
||||
($log_80211 << 0) | \
|
||||
($log_8021x << 1) | \
|
||||
($log_radius << 2) | \
|
||||
@@ -1189,7 +1189,7 @@ hostapd_set_log_options() {
|
||||
($log_driver << 4) | \
|
||||
($log_iapp << 5) | \
|
||||
($log_mlme << 6) \
|
||||
))
|
||||
))"
|
||||
|
||||
append "$var" "logger_syslog=$log_mask" "$N"
|
||||
append "$var" "logger_syslog_level=$log_level" "$N"
|
||||
@@ -1375,11 +1375,11 @@ wpa_supplicant_add_network() {
|
||||
|
||||
key_mgmt="$wpa_key_mgmt"
|
||||
|
||||
if [ ${#key} -eq 64 ]; then
|
||||
passphrase="psk=${key}"
|
||||
if [ "$_w_mode" = "mesh" ] || [ "$auth_type" = "sae" ]; then
|
||||
passphrase="sae_password=\"${key}\""
|
||||
else
|
||||
if [ "$_w_mode" = "mesh" ]; then
|
||||
passphrase="sae_password=\"${key}\""
|
||||
if [ ${#key} -eq 64 ]; then
|
||||
passphrase="psk=${key}"
|
||||
else
|
||||
passphrase="psk=\"${key}\""
|
||||
fi
|
||||
|
||||
@@ -1084,6 +1084,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
}
|
||||
|
||||
__hostapd_bss_mgmt_enable(hapd, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=comgt
|
||||
PKG_VERSION:=0.32
|
||||
PKG_RELEASE:=33
|
||||
PKG_RELEASE:=35
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
|
||||
PKG_SOURCE_URL:=@SF/comgt
|
||||
@@ -79,6 +79,7 @@ define Package/comgt/install
|
||||
$(INSTALL_DATA) ./files/getcarrier.gcom $(1)/etc/gcom/getcarrier.gcom
|
||||
$(INSTALL_DATA) ./files/getcnum.gcom $(1)/etc/gcom/getcnum.gcom
|
||||
$(INSTALL_DATA) ./files/getimsi.gcom $(1)/etc/gcom/getimsi.gcom
|
||||
$(INSTALL_DATA) ./files/runcommand.gcom $(1)/etc/gcom/runcommand.gcom
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/tty
|
||||
$(INSTALL_CONF) ./files/3g.usb $(1)/etc/hotplug.d/tty/30-3g
|
||||
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
||||
@@ -96,7 +97,6 @@ endef
|
||||
define Package/comgt-ncm/install
|
||||
$(INSTALL_DIR) $(1)/etc/gcom
|
||||
$(INSTALL_DATA) ./files/ncm.json $(1)/etc/gcom/ncm.json
|
||||
$(INSTALL_DATA) ./files/runcommand.gcom $(1)/etc/gcom/runcommand.gcom
|
||||
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
||||
$(INSTALL_BIN) ./files/ncm.sh $(1)/lib/netifd/proto/ncm.sh
|
||||
endef
|
||||
|
||||
@@ -72,6 +72,8 @@ proto_3g_setup() {
|
||||
*) CODE="2,2";;
|
||||
esac
|
||||
export MODE="AT^SYSCFG=${CODE},3FFFFFFF,2,4"
|
||||
elif echo "$cardinfo" | grep -q "MikroTik"; then
|
||||
COMMAND="AT+CFUN=1" gcom -d "$device" -s /etc/gcom/runcommand.gcom || return 1
|
||||
fi
|
||||
|
||||
if [ -n "$pincode" ]; then
|
||||
|
||||
@@ -74,5 +74,55 @@
|
||||
"connect": "AT+CGACT=1,${profile}",
|
||||
"finalize": "AT+CGDATA=\\\"M-MBIM\\\",${profile},1",
|
||||
"disconnect": "AT+CGACT=0,${profile}"
|
||||
},
|
||||
"quectel": {
|
||||
"initialize": [
|
||||
"AT+CFUN=1"
|
||||
],
|
||||
"configure": [
|
||||
"at+qicsgp=${profile},${context_type},\\\"${apn}\\\",\\\"${username}\\\",\\\"${password}\\\",0"
|
||||
],
|
||||
"modes": {
|
||||
"lte": "AT+QCFG=\\\"nwscanmode\\\",3",
|
||||
"umts": "AT+QCFG=\\\"nwscanmode\\\",2",
|
||||
"gsm": "AT+QCFG=\\\"nwscanmode\\\",1",
|
||||
"auto": "AT+QCFG=\\\"nwscanmode\\\",0"
|
||||
},
|
||||
"connect": "AT+qnetdevctl=1,${profile},1",
|
||||
"disconnect": "AT+qnetdevctl=0,${profile},0"
|
||||
},
|
||||
"\"zte": {
|
||||
"initialize": [
|
||||
"AT+CFUN=1"
|
||||
],
|
||||
"configure": [
|
||||
"AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",\\\"\\\",0,0",
|
||||
"AT+ZGPCOAUTH=${profile},\\\"${username}\\\",\\\"${password}\\\",0"
|
||||
],
|
||||
"connect": "AT+ZGACT=1,${profile}",
|
||||
"disconnect": "AT+ZGACT=0,${profile}"
|
||||
},
|
||||
"\"marvell\"": {
|
||||
"initialize": [
|
||||
"AT+CFUN=1"
|
||||
],
|
||||
"configure": [
|
||||
"AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",\\\"\\\",0,0",
|
||||
"AT+ZGPCOAUTH=${profile},\\\"${username}\\\",\\\"${password}\\\",0"
|
||||
],
|
||||
"connect": "AT+ZGACT=1,${profile}",
|
||||
"disconnect": "AT+ZGACT=0,${profile}"
|
||||
},
|
||||
"\"mikrotik\"": {
|
||||
"configure": [
|
||||
"AT+CFUN=4",
|
||||
"AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",0",
|
||||
"AT+ZDHCPLEASE=10",
|
||||
"AT+CFUN=1"
|
||||
],
|
||||
"waitforconnect": "\\\"+ZCONSTAT: 1,${context_type}\\\",\\\"+ZGIPDNS: ${context_type}\\\"",
|
||||
"connect": "AT+ZGACT=1,${context_type}",
|
||||
"finalize": "AT+ZDHCPLEASE=0",
|
||||
"disconnect": "AT+ZGACT=0,1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ proto_ncm_setup() {
|
||||
local device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
|
||||
json_get_vars device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
|
||||
|
||||
local context_type
|
||||
|
||||
[ "$metric" = "" ] && metric="0"
|
||||
|
||||
[ -n "$profile" ] || profile=1
|
||||
@@ -37,6 +39,10 @@ proto_ncm_setup() {
|
||||
pdptype=$(echo "$pdptype" | awk '{print toupper($0)}')
|
||||
[ "$pdptype" = "IP" -o "$pdptype" = "IPV6" -o "$pdptype" = "IPV4V6" ] || pdptype="IP"
|
||||
|
||||
[ "$pdptype" = "IPV4V6" ] && context_type=3
|
||||
[ -z "$context_type" -a "$pdptype" = "IPV6" ] && context_type=2
|
||||
[ -n "$context_type" ] || context_type=1
|
||||
|
||||
[ -n "$ctl_device" ] && device=$ctl_device
|
||||
|
||||
[ -n "$device" ] || {
|
||||
@@ -71,10 +77,25 @@ proto_ncm_setup() {
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -n "$delay" ] && sleep "$delay"
|
||||
|
||||
manufacturer=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk 'NF && $0 !~ /AT\+CGMI/ { sub(/\+CGMI: /,""); print tolower($1); exit; }')
|
||||
[ $? -ne 0 -o -z "$manufacturer" ] && {
|
||||
start=$(date +%s)
|
||||
while true; do
|
||||
manufacturer=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk 'NF && $0 !~ /AT\+CGMI/ { sub(/\+CGMI: /,""); print tolower($1); exit; }')
|
||||
[ "$manufacturer" = "error" ] && {
|
||||
manufacturer=""
|
||||
}
|
||||
[ -n "$manufacturer" ] && {
|
||||
break
|
||||
}
|
||||
[ -z "$delay" ] && {
|
||||
break
|
||||
}
|
||||
sleep 1
|
||||
elapsed=$(($(date +%s) - start))
|
||||
[ "$elapsed" -gt "$delay" ] && {
|
||||
break
|
||||
}
|
||||
done
|
||||
[ -z "$manufacturer" ] && {
|
||||
echo "Failed to get modem information"
|
||||
proto_notify_error "$interface" GETINFO_FAILED
|
||||
return 1
|
||||
|
||||
@@ -7,17 +7,20 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ca-certificates
|
||||
PKG_VERSION:=20211016
|
||||
PKG_VERSION:=20230311
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
||||
PKG_HASH:=2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88
|
||||
PKG_HASH:=83de934afa186e279d1ed08ea0d73f5cf43a6fbfb5f00874b6db3711c64576f3
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TAR_OPTIONS+= --strip-components 1
|
||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
define Package/ca-certificates
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
@@ -34,13 +37,6 @@ define Package/ca-bundle
|
||||
PROVIDES:=ca-certs
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(DECOMPRESS_CMD) $(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Build/Patch)
|
||||
endef
|
||||
|
||||
MAKE_PATH := work
|
||||
|
||||
define Build/Install
|
||||
mkdir -p \
|
||||
$(PKG_INSTALL_DIR)/usr/sbin \
|
||||
|
||||
@@ -18,8 +18,8 @@ Reported-by: Chen Minqiang <ptpt52@gmail.com>
|
||||
Reported-by: Shane Synan <digitalcircuit36939@gmail.com>
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
--- a/work/mozilla/certdata2pem.py
|
||||
+++ b/work/mozilla/certdata2pem.py
|
||||
--- a/mozilla/certdata2pem.py
|
||||
+++ b/mozilla/certdata2pem.py
|
||||
@@ -21,16 +21,12 @@
|
||||
# USA.
|
||||
|
||||
@@ -42,8 +42,8 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
|
||||
continue
|
||||
-
|
||||
- cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
|
||||
- if cert.not_valid_after < datetime.datetime.now():
|
||||
- cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
|
||||
- if cert.not_valid_after < datetime.datetime.utcnow():
|
||||
- print('!'*74)
|
||||
- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
|
||||
- print('!'*74)
|
||||
|
||||
@@ -10,8 +10,6 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
uxc.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/uxc.c b/uxc.c
|
||||
index eb40eb2..b22d838 100644
|
||||
--- a/uxc.c
|
||||
+++ b/uxc.c
|
||||
@@ -80,6 +80,8 @@ static struct blob_buf conf;
|
||||
@@ -31,6 +29,3 @@ index eb40eb2..b22d838 100644
|
||||
int signal = SIGTERM;
|
||||
int c;
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 24f6bc4322754a753e4e3e413659d542fa798c7b Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Meier <philipp.meier@westermo.com>
|
||||
Date: Tue, 8 Nov 2022 14:38:37 +0100
|
||||
Subject: [PATCH] jail: correctly check for null pointer
|
||||
|
||||
Handle case where opts.sysctl is not used.
|
||||
|
||||
Signed-off-by: Philipp Meier <philipp.meier@westermo.com>
|
||||
---
|
||||
jail/jail.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/jail/jail.c
|
||||
+++ b/jail/jail.c
|
||||
@@ -213,6 +213,10 @@ static void free_hooklist(struct hook_ex
|
||||
|
||||
static void free_sysctl(void) {
|
||||
struct sysctl_val *cur;
|
||||
+
|
||||
+ if (!opts.sysctl)
|
||||
+ return;
|
||||
+
|
||||
cur = *opts.sysctl;
|
||||
|
||||
while (cur) {
|
||||
@@ -0,0 +1,45 @@
|
||||
From 93b2c2d5ed4ca369a9ea48163024125b958212b5 Mon Sep 17 00:00:00 2001
|
||||
From: Yuteng Zhong <zonyitoo@qq.com>
|
||||
Date: Sun, 9 Oct 2022 22:53:27 +0800
|
||||
Subject: [PATCH] jail: ignore missing .dynamic sect
|
||||
|
||||
A static-linked binary doesn't have a .dynamic section, but when
|
||||
starting ujail with -r or -w will automatically search for PT_DYNAMIC in
|
||||
ELF and exit with failure if it is not found.
|
||||
|
||||
github issue: https://github.com/openwrt/openwrt/issues/10933
|
||||
|
||||
Signed-off-by: Yuteng Zhong <zonyitoo@qq.com>
|
||||
---
|
||||
jail/elf.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/jail/elf.c
|
||||
+++ b/jail/elf.c
|
||||
@@ -240,18 +240,18 @@ int elf_load_deps(const char *path, cons
|
||||
|
||||
gcc_mips64_bug_work_around = 1;
|
||||
#endif
|
||||
- if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) {
|
||||
- ERROR("failed to load the .load section from %s\n", path);
|
||||
- return -1;
|
||||
+ if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) {
|
||||
+ add_path_and_deps(map+interp_offset, 1, -1, 0);
|
||||
}
|
||||
|
||||
- if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) {
|
||||
- ERROR("failed to load the .dynamic section from %s\n", path);
|
||||
- return -1;
|
||||
+ if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) {
|
||||
+ DEBUG("failed to load the .load section from %s\n", path);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) {
|
||||
- add_path_and_deps(map+interp_offset, 1, -1, 0);
|
||||
+ if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) {
|
||||
+ DEBUG("failed to load the .dynamic section from %s\n", path);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int clazz = map[EI_CLASS];
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
|
||||
PKG_SOURCE_DATE:=2020-01-21
|
||||
PKG_SOURCE_VERSION:=c7f7b6b65b82eda4675b42d8cd28d76ea7aebf1a
|
||||
PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f3
|
||||
PKG_SOURCE_DATE:=2023-07-25
|
||||
PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4
|
||||
PKG_MIRROR_HASH:=427d4228fd65cf4320b8c212e710b86bcbfcdd4239f4e67132b3b471f7437202
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=
|
||||
@@ -38,6 +38,11 @@ define Package/urngd/description
|
||||
Jitter RNGd provides a source of sufficient entropy.
|
||||
endef
|
||||
|
||||
ifdef CONFIG_USE_GLIBC
|
||||
TARGET_CFLAGS += -U_FORTIFY_SOURCE
|
||||
TARGET_LDFLAGS += -lpthread
|
||||
endif
|
||||
|
||||
define Package/urngd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
diff --git a/urngd.c b/urngd.c
|
||||
index 35ccdec..410d300 100644
|
||||
--- a/urngd.c
|
||||
+++ b/urngd.c
|
||||
@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urngd *u)
|
||||
@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urng
|
||||
static void low_entropy_cb(struct uloop_fd *ufd, unsigned int events)
|
||||
{
|
||||
struct urngd *u = container_of(ufd, struct urngd, rnd_fd);
|
||||
@@ -17,3 +15,4 @@ index 35ccdec..410d300 100644
|
||||
+ }
|
||||
}
|
||||
|
||||
static void urngd_done(struct urngd *u)
|
||||
|
||||
@@ -1600,18 +1600,18 @@
|
||||
+ * (and doing them).
|
||||
+ */
|
||||
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||
+ lua_Integer v= ib+ic; /* may overflow */
|
||||
+ if (ib>0 && ic>0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
||||
+ else if (ib<0 && ic<0) { if (v >= 0) return 0; }
|
||||
+ *r= v;
|
||||
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||
+ if (ic>0) { if (ib > LUA_INTEGER_MAX - ic) return 0; /*overflow, use floats*/ }
|
||||
+ else { if (ib < LUA_INTEGER_MIN - ic) return 0; }
|
||||
+ *r = ib + ic;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||
+ lua_Integer v= ib-ic; /* may overflow */
|
||||
+ if (ib>=0 && ic<0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
||||
+ else if (ib<0 && ic>0) { if (v >= 0) return 0; }
|
||||
+ *r= v;
|
||||
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||
+ if (ic>0) { if (ib < LUA_INTEGER_MIN + ic) return 0; /*overflow, use floats*/ }
|
||||
+ else { if (ib > LUA_INTEGER_MAX + ic) return 0; }
|
||||
+ *r = ib - ic;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -1589,18 +1589,18 @@
|
||||
+ * (and doing them).
|
||||
+ */
|
||||
+int try_addint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||
+ lua_Integer v= ib+ic; /* may overflow */
|
||||
+ if (ib>0 && ic>0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
||||
+ else if (ib<0 && ic<0) { if (v >= 0) return 0; }
|
||||
+ *r= v;
|
||||
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||
+ if (ic>0) { if (ib > LUA_INTEGER_MAX - ic) return 0; /*overflow, use floats*/ }
|
||||
+ else { if (ib < LUA_INTEGER_MIN - ic) return 0; }
|
||||
+ *r = ib + ic;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int try_subint( lua_Integer *r, lua_Integer ib, lua_Integer ic ) {
|
||||
+ lua_Integer v= ib-ic; /* may overflow */
|
||||
+ if (ib>=0 && ic<0) { if (v < 0) return 0; /*overflow, use floats*/ }
|
||||
+ else if (ib<0 && ic>0) { if (v >= 0) return 0; }
|
||||
+ *r= v;
|
||||
+ /* Signed int overflow is undefined behavior, so catch it without causing it. */
|
||||
+ if (ic>0) { if (ib < LUA_INTEGER_MIN + ic) return 0; /*overflow, use floats*/ }
|
||||
+ else { if (ib > LUA_INTEGER_MAX + ic) return 0; }
|
||||
+ *r = ib - ic;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -5,11 +5,13 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/wtarreau/mhz.git
|
||||
PKG_SOURCE_DATE:=2022-08-18
|
||||
PKG_SOURCE_VERSION:=6ec38cbb1371d20078a7a5059dd9faa5b281b2d9
|
||||
PKG_MIRROR_HASH:=37559cc8b5e08d23c09878d63cf81ea8d123be45408f3e76e1dc042766a746a7
|
||||
PKG_SOURCE_DATE:=2023-06-17
|
||||
PKG_SOURCE_VERSION:=11aac2399780a1f7ea9f007b14af0464797d5cf1
|
||||
PKG_MIRROR_HASH:=b3ea0c9e6f111755c4207addef0ea210ace86bc6910c959c6fc489026897676f
|
||||
|
||||
PKG_MAINTAINER:=Robert Marko <robimarko@gmail.com>
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -20,9 +22,13 @@ define Package/mhz
|
||||
URL:=https://github.com/wtarreau/mhz
|
||||
endef
|
||||
|
||||
define Package/mhz/description
|
||||
Tool to mathematically calculate the current CPU frequency.
|
||||
endef
|
||||
|
||||
define Package/mhz/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mhz $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mhz $(1)/usr/sbin/mhz
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mhz))
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From d55f7b578eb2126d2e4a7f045321f6ba7df3800a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 30 Aug 2023 20:31:07 +0200
|
||||
Subject: [PATCH] Makefile: allow overriding CC and CFLAGS
|
||||
|
||||
For OpenWrt and Buildroot which support really large amount of different
|
||||
architectures and cores it is sometimes required to pass our own CFLAGS.
|
||||
This is especially true if hardening options are to be respected.
|
||||
|
||||
Also, for cross-compiling CC should be respected as currently it is
|
||||
working since both OpenWrt and Buildroot symlink gcc to the cross compiler.
|
||||
|
||||
So, lets set the current values as defaults but allow them to be overriden.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-CC := gcc
|
||||
-CFLAGS := -O3 -Wall -fomit-frame-pointer
|
||||
+CC ?= gcc
|
||||
+CFLAGS ?= -O3 -Wall -fomit-frame-pointer
|
||||
|
||||
all: mhz
|
||||
|
||||
@@ -302,8 +302,8 @@ foreach my $mirror (@ARGV) {
|
||||
# push @mirrors, 'https://mirror01.download.immortalwrt.eu.org';
|
||||
push @mirrors, 'https://mirror2.immortalwrt.org/sources';
|
||||
push @mirrors, 'https://mirror.immortalwrt.org/sources';
|
||||
push @mirrors, 'https://sources-cdn.immortalwrt.org';
|
||||
push @mirrors, 'https://sources.immortalwrt.org';
|
||||
push @mirrors, 'https://sources.cdn.immortalwrt.org';
|
||||
push @mirrors, 'https://sources.cdn.openwrt.org';
|
||||
push @mirrors, 'https://sources.openwrt.org';
|
||||
push @mirrors, 'https://mirror2.openwrt.org/sources';
|
||||
|
||||
@@ -164,9 +164,9 @@ my %update_method = (
|
||||
'controldir' => ".git",
|
||||
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
|
||||
'src-git-full' => {
|
||||
'init' => "git clone '%s' '%s'",
|
||||
'init_branch' => "git clone --branch '%s' '%s' '%s'",
|
||||
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
||||
'init' => "git clone --filter=blob:none '%s' '%s'",
|
||||
'init_branch' => "git clone --filter=blob:none --branch '%s' '%s' '%s'",
|
||||
'init_commit' => "git clone --filter=blob:none '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
||||
'update' => "git pull --ff-only",
|
||||
'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
|
||||
'post_update' => "git submodule update --init --recursive",
|
||||
|
||||
@@ -47,6 +47,7 @@ Building images:
|
||||
make image EXTRA_IMAGE_NAME="<string>" # Add this to the output image filename (sanitized)
|
||||
make image DISABLED_SERVICES="<svc1> [<svc2> [<svc3> ..]]" # Which services in /etc/init.d/ should be disabled
|
||||
make image ADD_LOCAL_KEY=1 # store locally generated signing key in built images
|
||||
make image ROOTFS_PARTSIZE="<size>" # override the default rootfs partition size in MegaBytes
|
||||
|
||||
Print manifest:
|
||||
List "all" packages which get installed into the image.
|
||||
@@ -243,7 +244,8 @@ image:
|
||||
$(if $(FILES),USER_FILES="$(FILES)") \
|
||||
$(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \
|
||||
$(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)") \
|
||||
$(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)"))
|
||||
$(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)") \
|
||||
$(if $(ROOTFS_PARTSIZE),CONFIG_TARGET_ROOTFS_PARTSIZE="$(ROOTFS_PARTSIZE)"))
|
||||
|
||||
manifest: FORCE
|
||||
$(MAKE) -s _check_profile
|
||||
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
for (i = 0; i < PPC4XX_NUM_SD; i++) {
|
||||
dev->sdr[i].ptr = dev->scatter_buffer_pa +
|
||||
PPC4XX_SD_BUFFER_SIZE * i;
|
||||
@@ -1439,16 +1440,15 @@ static int crypto4xx_probe(struct platfo
|
||||
@@ -1437,16 +1438,15 @@ static int crypto4xx_probe(struct platfo
|
||||
spin_lock_init(&core_dev->lock);
|
||||
INIT_LIST_HEAD(&core_dev->dev->alg_list);
|
||||
ratelimit_default_init(&core_dev->dev->aead_ratelimit);
|
||||
@@ -89,7 +89,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
goto err_build_sdr;
|
||||
|
||||
/* Init tasklet for bottom half processing */
|
||||
@@ -1493,7 +1493,6 @@ err_iomap:
|
||||
@@ -1491,7 +1491,6 @@ err_iomap:
|
||||
err_build_sdr:
|
||||
crypto4xx_destroy_sdr(core_dev->dev);
|
||||
crypto4xx_destroy_gdr(core_dev->dev);
|
||||
|
||||
@@ -23,7 +23,7 @@ produce a noisy warning.
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us
|
||||
@@ -431,10 +431,14 @@ static int xhci_try_enable_msi(struct us
|
||||
free_irq(hcd->irq, hcd);
|
||||
hcd->irq = 0;
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
+subsys_initcall(ar5312_gpio_init);
|
||||
--- a/arch/mips/Kconfig
|
||||
+++ b/arch/mips/Kconfig
|
||||
@@ -190,6 +190,7 @@ config ATH25
|
||||
@@ -191,6 +191,7 @@ config ATH25
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
|
||||
@@ -46,7 +46,7 @@ Cc: linux-mips@vger.kernel.org
|
||||
|
||||
--- a/arch/mips/kernel/setup.c
|
||||
+++ b/arch/mips/kernel/setup.c
|
||||
@@ -538,11 +538,88 @@ static void __init check_kernel_sections
|
||||
@@ -541,11 +541,88 @@ static void __init check_kernel_sections
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ Cc: linux-mips@vger.kernel.org
|
||||
|
||||
/*
|
||||
* arch_mem_init - initialize memory management subsystem
|
||||
@@ -570,48 +647,12 @@ static void __init arch_mem_init(char **
|
||||
@@ -573,48 +650,12 @@ static void __init arch_mem_init(char **
|
||||
{
|
||||
extern void plat_mem_setup(void);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user