Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -1,4 +1,4 @@
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^b603fb5f198ef513216fb8e21ef909321f1fad19
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^94f026b4e9aeea0caa460e190dbb40c77c15b3e6
|
||||
src-git-full packages https://github.com/immortalwrt/packages.git^78236a450b95e62d515cfe8ae26345c6ab7e4580
|
||||
src-git-full luci https://github.com/immortalwrt/luci.git^09e14b2b116e3f59b9d8e40448841b368e525aef
|
||||
src-git-full routing https://github.com/openwrt/routing.git^8071852b4556a02533cacb7a0f6a432df3507302
|
||||
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 = .236
|
||||
LINUX_KERNEL_HASH-5.4.236 = ccc892faa96f2580bde683f1063c271dc196b5a462e9980912e4c188b7154951
|
||||
LINUX_VERSION-5.4 = .242
|
||||
LINUX_KERNEL_HASH-5.4.242 = 142f9aed1c9f2e409dd72c5c490ad824dddf31f955ed2097d5989c4b5074fc28
|
||||
|
||||
@@ -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.5)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.6)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19951-da9ffd2add)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r20007-6e54cb5d37)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.5)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/21.02.6)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt)
|
||||
|
||||
@@ -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.5"
|
||||
default "https://downloads.immortalwrt.org/releases/21.02.6"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -29,7 +29,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
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -1,11 +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,7 @@ extern IFX_int32_t block_ingre
|
||||
@@ -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
|
||||
-DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
||||
+#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);
|
||||
|
||||
@@ -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,
|
||||
@@ -158,7 +158,7 @@
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
--- a/include/linux/ieee80211.h
|
||||
+++ b/include/linux/ieee80211.h
|
||||
@@ -1916,6 +1916,73 @@ struct ieee80211_he_mu_edca_param_ac_rec
|
||||
@@ -1902,6 +1902,73 @@ struct ieee80211_he_mu_edca_param_ac_rec
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
@@ -232,7 +232,7 @@
|
||||
* struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element
|
||||
*
|
||||
* This structure is the "MU EDCA Parameter Set element" fields as
|
||||
@@ -2228,6 +2295,12 @@ int ieee80211_get_vht_max_nss(struct iee
|
||||
@@ -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
|
||||
@@ -245,7 +245,7 @@
|
||||
|
||||
#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x01
|
||||
|
||||
@@ -3982,4 +4055,7 @@ enum ieee80211_range_params_max_total_lt
|
||||
@@ -4006,4 +4079,7 @@ enum ieee80211_range_params_max_total_lt
|
||||
IEEE80211_RANGE_PARAMS_MAX_TOTAL_LTF_UNSPECIFIED,
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
@@ -11,7 +11,7 @@ PKG_NAME:=openssl
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=t
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_USE_MIPS16:=0
|
||||
ENGINES_DIR=engines-1.1
|
||||
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
From 879f7080d7e141f415c79eaa3a8ac4a3dad0348b Mon Sep 17 00:00:00 2001
|
||||
From: Pauli <pauli@openssl.org>
|
||||
Date: Wed, 8 Mar 2023 15:28:20 +1100
|
||||
Subject: [PATCH] x509: excessive resource use verifying policy constraints
|
||||
|
||||
A security vulnerability has been identified in all supported versions
|
||||
of OpenSSL related to the verification of X.509 certificate chains
|
||||
that include policy constraints. Attackers may be able to exploit this
|
||||
vulnerability by creating a malicious certificate chain that triggers
|
||||
exponential use of computational resources, leading to a denial-of-service
|
||||
(DoS) attack on affected systems.
|
||||
|
||||
Fixes CVE-2023-0464
|
||||
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20569)
|
||||
|
||||
diff --git a/crypto/x509v3/pcy_local.h b/crypto/x509v3/pcy_local.h
|
||||
index 5daf78de45..344aa06765 100644
|
||||
--- a/crypto/x509v3/pcy_local.h
|
||||
+++ b/crypto/x509v3/pcy_local.h
|
||||
@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st {
|
||||
};
|
||||
|
||||
struct X509_POLICY_TREE_st {
|
||||
+ /* The number of nodes in the tree */
|
||||
+ size_t node_count;
|
||||
+ /* The maximum number of nodes in the tree */
|
||||
+ size_t node_maximum;
|
||||
+
|
||||
/* This is the tree 'level' data */
|
||||
X509_POLICY_LEVEL *levels;
|
||||
int nlevel;
|
||||
@@ -159,7 +164,8 @@ X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
|
||||
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_DATA *data,
|
||||
X509_POLICY_NODE *parent,
|
||||
- X509_POLICY_TREE *tree);
|
||||
+ X509_POLICY_TREE *tree,
|
||||
+ int extra_data);
|
||||
void policy_node_free(X509_POLICY_NODE *node);
|
||||
int policy_node_match(const X509_POLICY_LEVEL *lvl,
|
||||
const X509_POLICY_NODE *node, const ASN1_OBJECT *oid);
|
||||
diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c
|
||||
index e2d7b15322..d574fb9d66 100644
|
||||
--- a/crypto/x509v3/pcy_node.c
|
||||
+++ b/crypto/x509v3/pcy_node.c
|
||||
@@ -59,10 +59,15 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_DATA *data,
|
||||
X509_POLICY_NODE *parent,
|
||||
- X509_POLICY_TREE *tree)
|
||||
+ X509_POLICY_TREE *tree,
|
||||
+ int extra_data)
|
||||
{
|
||||
X509_POLICY_NODE *node;
|
||||
|
||||
+ /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */
|
||||
+ if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum)
|
||||
+ return NULL;
|
||||
+
|
||||
node = OPENSSL_zalloc(sizeof(*node));
|
||||
if (node == NULL) {
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
@@ -70,7 +75,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
node->data = data;
|
||||
node->parent = parent;
|
||||
- if (level) {
|
||||
+ if (level != NULL) {
|
||||
if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) {
|
||||
if (level->anyPolicy)
|
||||
goto node_error;
|
||||
@@ -90,7 +95,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
}
|
||||
|
||||
- if (tree) {
|
||||
+ if (extra_data) {
|
||||
if (tree->extra_data == NULL)
|
||||
tree->extra_data = sk_X509_POLICY_DATA_new_null();
|
||||
if (tree->extra_data == NULL){
|
||||
@@ -103,6 +108,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
}
|
||||
|
||||
+ tree->node_count++;
|
||||
if (parent)
|
||||
parent->nchild++;
|
||||
|
||||
diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c
|
||||
index 6e8322cbc5..6c7fd35405 100644
|
||||
--- a/crypto/x509v3/pcy_tree.c
|
||||
+++ b/crypto/x509v3/pcy_tree.c
|
||||
@@ -13,6 +13,18 @@
|
||||
|
||||
#include "pcy_local.h"
|
||||
|
||||
+/*
|
||||
+ * If the maximum number of nodes in the policy tree isn't defined, set it to
|
||||
+ * a generous default of 1000 nodes.
|
||||
+ *
|
||||
+ * Defining this to be zero means unlimited policy tree growth which opens the
|
||||
+ * door on CVE-2023-0464.
|
||||
+ */
|
||||
+
|
||||
+#ifndef OPENSSL_POLICY_TREE_NODES_MAX
|
||||
+# define OPENSSL_POLICY_TREE_NODES_MAX 1000
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Enable this to print out the complete policy tree at various point during
|
||||
* evaluation.
|
||||
@@ -168,6 +180,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
return X509_PCY_TREE_INTERNAL;
|
||||
}
|
||||
|
||||
+ /* Limit the growth of the tree to mitigate CVE-2023-0464 */
|
||||
+ tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX;
|
||||
+
|
||||
/*
|
||||
* http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3.
|
||||
*
|
||||
@@ -184,7 +199,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
level = tree->levels;
|
||||
if ((data = policy_data_new(NULL, OBJ_nid2obj(NID_any_policy), 0)) == NULL)
|
||||
goto bad_tree;
|
||||
- if (level_add_node(level, data, NULL, tree) == NULL) {
|
||||
+ if (level_add_node(level, data, NULL, tree, 1) == NULL) {
|
||||
policy_data_free(data);
|
||||
goto bad_tree;
|
||||
}
|
||||
@@ -243,7 +258,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
* Return value: 1 on success, 0 otherwise
|
||||
*/
|
||||
static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
- X509_POLICY_DATA *data)
|
||||
+ X509_POLICY_DATA *data,
|
||||
+ X509_POLICY_TREE *tree)
|
||||
{
|
||||
X509_POLICY_LEVEL *last = curr - 1;
|
||||
int i, matched = 0;
|
||||
@@ -253,13 +269,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i);
|
||||
|
||||
if (policy_node_match(last, node, data->valid_policy)) {
|
||||
- if (level_add_node(curr, data, node, NULL) == NULL)
|
||||
+ if (level_add_node(curr, data, node, tree, 0) == NULL)
|
||||
return 0;
|
||||
matched = 1;
|
||||
}
|
||||
}
|
||||
if (!matched && last->anyPolicy) {
|
||||
- if (level_add_node(curr, data, last->anyPolicy, NULL) == NULL)
|
||||
+ if (level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -272,7 +288,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
* Return value: 1 on success, 0 otherwise.
|
||||
*/
|
||||
static int tree_link_nodes(X509_POLICY_LEVEL *curr,
|
||||
- const X509_POLICY_CACHE *cache)
|
||||
+ const X509_POLICY_CACHE *cache,
|
||||
+ X509_POLICY_TREE *tree)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -280,7 +297,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
|
||||
X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i);
|
||||
|
||||
/* Look for matching nodes in previous level */
|
||||
- if (!tree_link_matching_nodes(curr, data))
|
||||
+ if (!tree_link_matching_nodes(curr, data, tree))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -311,7 +328,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
|
||||
/* Curr may not have anyPolicy */
|
||||
data->qualifier_set = cache->anyPolicy->qualifier_set;
|
||||
data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
|
||||
- if (level_add_node(curr, data, node, tree) == NULL) {
|
||||
+ if (level_add_node(curr, data, node, tree, 1) == NULL) {
|
||||
policy_data_free(data);
|
||||
return 0;
|
||||
}
|
||||
@@ -373,7 +390,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr,
|
||||
}
|
||||
/* Finally add link to anyPolicy */
|
||||
if (last->anyPolicy &&
|
||||
- level_add_node(curr, cache->anyPolicy, last->anyPolicy, NULL) == NULL)
|
||||
+ level_add_node(curr, cache->anyPolicy, last->anyPolicy, tree, 0) == NULL)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -555,7 +572,7 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree,
|
||||
extra->qualifier_set = anyPolicy->data->qualifier_set;
|
||||
extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS
|
||||
| POLICY_DATA_FLAG_EXTRA_NODE;
|
||||
- node = level_add_node(NULL, extra, anyPolicy->parent, tree);
|
||||
+ node = level_add_node(NULL, extra, anyPolicy->parent, tree, 1);
|
||||
}
|
||||
if (!tree->user_policies) {
|
||||
tree->user_policies = sk_X509_POLICY_NODE_new_null();
|
||||
@@ -582,7 +599,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree)
|
||||
|
||||
for (i = 1; i < tree->nlevel; i++, curr++) {
|
||||
cache = policy_cache_set(curr->cert);
|
||||
- if (!tree_link_nodes(curr, cache))
|
||||
+ if (!tree_link_nodes(curr, cache, tree))
|
||||
return X509_PCY_TREE_INTERNAL;
|
||||
|
||||
if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY)
|
||||
@@ -0,0 +1,48 @@
|
||||
From b013765abfa80036dc779dd0e50602c57bb3bf95 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Caswell <matt@openssl.org>
|
||||
Date: Tue, 7 Mar 2023 16:52:55 +0000
|
||||
Subject: [PATCH] Ensure that EXFLAG_INVALID_POLICY is checked even in leaf
|
||||
certs
|
||||
|
||||
Even though we check the leaf cert to confirm it is valid, we
|
||||
later ignored the invalid flag and did not notice that the leaf
|
||||
cert was bad.
|
||||
|
||||
Fixes: CVE-2023-0465
|
||||
|
||||
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20588)
|
||||
|
||||
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
|
||||
index 925fbb5412..1dfe4f9f31 100644
|
||||
--- a/crypto/x509/x509_vfy.c
|
||||
+++ b/crypto/x509/x509_vfy.c
|
||||
@@ -1649,18 +1649,25 @@ static int check_policy(X509_STORE_CTX *ctx)
|
||||
}
|
||||
/* Invalid or inconsistent extensions */
|
||||
if (ret == X509_PCY_TREE_INVALID) {
|
||||
- int i;
|
||||
+ int i, cbcalled = 0;
|
||||
|
||||
/* Locate certificates with bad extensions and notify callback. */
|
||||
- for (i = 1; i < sk_X509_num(ctx->chain); i++) {
|
||||
+ for (i = 0; i < sk_X509_num(ctx->chain); i++) {
|
||||
X509 *x = sk_X509_value(ctx->chain, i);
|
||||
|
||||
if (!(x->ex_flags & EXFLAG_INVALID_POLICY))
|
||||
continue;
|
||||
+ cbcalled = 1;
|
||||
if (!verify_cb_cert(ctx, x, i,
|
||||
X509_V_ERR_INVALID_POLICY_EXTENSION))
|
||||
return 0;
|
||||
}
|
||||
+ if (!cbcalled) {
|
||||
+ /* Should not be able to get here */
|
||||
+ X509err(X509_F_CHECK_POLICY, ERR_R_INTERNAL_ERROR);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* The callback ignored the error so we return success */
|
||||
return 1;
|
||||
}
|
||||
if (ret == X509_PCY_TREE_FAILURE) {
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ DEFAULT_PACKAGES += \
|
||||
kmod-usb-hid \
|
||||
kmod-sound-core kmod-sound-arm-bcm2835 \
|
||||
kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
||||
partx-utils mkf2fs e2fsprogs \
|
||||
partx-utils mkf2fs automount \
|
||||
autocore-arm luci-app-cpufreq
|
||||
|
||||
KERNELNAME:=Image dtbs
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -1964,7 +1968,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1970,7 +1974,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(skb);
|
||||
skb_trim(skb, skb->len - 4); /* remove fcs */
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1982,7 +1987,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1988,7 +1993,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(ax_skb);
|
||||
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2471,6 +2471,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2435,6 +2435,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
int ret = 0;
|
||||
unsigned long timeout;
|
||||
u8 sig;
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
buf |= HW_CFG_LRST_;
|
||||
@@ -2524,6 +2529,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2488,6 +2493,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
buf |= HW_CFG_MEF_;
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
ret = lan78xx_write_reg(dev, HW_CFG, buf);
|
||||
|
||||
ret = lan78xx_read_reg(dev, USB_CFG0, &buf);
|
||||
@@ -2579,6 +2587,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2543,6 +2551,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2653,6 +2653,22 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2617,6 +2617,22 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
|
||||
{
|
||||
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
|
||||
@@ -2935,8 +2944,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
@@ -2899,8 +2908,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
if (DEFAULT_RX_CSUM_ENABLE)
|
||||
dev->net->features |= NETIF_F_RXCSUM;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2185,6 +2185,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
@@ -2153,6 +2153,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
mii_adv_to_linkmode_adv_t(fc, mii_adv);
|
||||
linkmode_or(phydev->advertising, fc, phydev->advertising);
|
||||
|
||||
@@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
if (phydev->mdio.dev.of_node) {
|
||||
u32 reg;
|
||||
int len;
|
||||
@@ -2662,22 +2678,6 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2626,22 +2642,6 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
|
||||
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
|
||||
{
|
||||
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
|
||||
@@ -3778,7 +3783,12 @@ static int lan78xx_probe(struct usb_inte
|
||||
@@ -3742,7 +3747,12 @@ static int lan78xx_probe(struct usb_inte
|
||||
netdev->max_mtu = MAX_SINGLE_PACKET_SIZE;
|
||||
netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2190,7 +2190,7 @@ static int lan78xx_phy_init(struct lan78
|
||||
@@ -2158,7 +2158,7 @@ static int lan78xx_phy_init(struct lan78
|
||||
mii_adv_to_linkmode_adv_t(fc, mii_adv);
|
||||
linkmode_or(phydev->advertising, fc, phydev->advertising);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing.
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -3179,7 +3179,7 @@ static int rx_submit(struct lan78xx_net
|
||||
@@ -3143,7 +3143,7 @@ static int rx_submit(struct lan78xx_net
|
||||
size_t size = dev->rx_urb_size;
|
||||
int ret = 0;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -1487,6 +1487,103 @@ command_cleanup:
|
||||
@@ -1491,6 +1491,103 @@ command_cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5402,6 +5499,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5406,6 +5503,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
||||
@@ -382,7 +382,7 @@ Cc: linux-rockchip@lists.infradead.org
|
||||
|
||||
--- a/drivers/pci/pci.h
|
||||
+++ b/drivers/pci/pci.h
|
||||
@@ -626,11 +626,15 @@ static inline void pci_release_bus_of_no
|
||||
@@ -634,11 +634,15 @@ static inline void pci_release_bus_of_no
|
||||
#if defined(CONFIG_OF_ADDRESS)
|
||||
int devm_of_pci_get_host_bridge_resources(struct device *dev,
|
||||
unsigned char busno, unsigned char bus_max,
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -1183,6 +1183,9 @@ static int lan78xx_link_reset(struct lan
|
||||
@@ -1179,6 +1179,9 @@ static int lan78xx_link_reset(struct lan
|
||||
if (unlikely(ret < 0))
|
||||
return -EIO;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ KERNELNAME:=Image dtbs
|
||||
DEFAULT_PACKAGES += \
|
||||
bcm4908img fdt-utils uboot-envtools \
|
||||
kmod-gpio-button-hotplug \
|
||||
kmod-usb-ohci kmod-usb2 kmod-usb3
|
||||
kmod-usb-ohci kmod-usb2 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
From e567e58d6819adc002c57b81e16b88da24d3b4aa Mon Sep 17 00:00:00 2001
|
||||
From: Pierre Gondois <pierre.gondois@arm.com>
|
||||
Date: Tue, 22 Nov 2022 17:32:07 +0100
|
||||
Subject: [PATCH] arm64: dts: Update cache properties for broadcom
|
||||
|
||||
The DeviceTree Specification v0.3 specifies that the cache node
|
||||
'compatible' and 'cache-level' properties are 'required'. Cf.
|
||||
s3.8 Multi-level and Shared Cache Nodes
|
||||
The 'cache-unified' property should be present if one of the
|
||||
properties for unified cache is present ('cache-size', ...).
|
||||
|
||||
Update the Device Trees accordingly.
|
||||
|
||||
Acked-by: William Zhang <william.zhang@broadcom.com>
|
||||
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
||||
Link: https://lore.kernel.org/r/20221122163208.3810985-3-pierre.gondois@arm.com
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 1 +
|
||||
arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 ++++
|
||||
9 files changed, 12 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
l2: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
|
||||
@@ -50,6 +50,7 @@
|
||||
};
|
||||
L2_0: l2-cache0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
CLUSTER0_L2: l2-cache@0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
|
||||
@@ -108,18 +108,22 @@
|
||||
|
||||
CLUSTER0_L2: l2-cache@0 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
|
||||
CLUSTER1_L2: l2-cache@100 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
|
||||
CLUSTER2_L2: l2-cache@200 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
|
||||
CLUSTER3_L2: l2-cache@300 {
|
||||
compatible = "cache";
|
||||
+ cache-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,367 @@
|
||||
From f5d83b714e304d5f3229da434af2eeea033c4f5d Mon Sep 17 00:00:00 2001
|
||||
From: William Zhang <william.zhang@broadcom.com>
|
||||
Date: Mon, 6 Feb 2023 22:58:15 -0800
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: Add spi controller node
|
||||
|
||||
Add support for HSSPI controller in ARMv8 chip dts files.
|
||||
|
||||
Signed-off-by: William Zhang <william.zhang@broadcom.com>
|
||||
Link: https://lore.kernel.org/r/20230207065826.285013-5-william.zhang@broadcom.com
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
.../boot/dts/broadcom/bcmbca/bcm4908.dtsi | 18 +++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm4912.dtsi | 20 +++++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm63146.dtsi | 19 ++++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm63158.dtsi | 19 ++++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm6813.dtsi | 20 +++++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm6856.dtsi | 18 +++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 18 +++++++++++++++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm94908.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm94912.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm963146.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm963158.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm96813.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm96856.dts | 4 ++++
|
||||
.../boot/dts/broadcom/bcmbca/bcm96858.dts | 4 ++++
|
||||
14 files changed, 160 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -107,6 +107,12 @@
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "periph";
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <400000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
soc {
|
||||
@@ -531,6 +537,18 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
+ hsspi: spi@1000{
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm4908-hsspi", "brcm,bcmbca-hsspi-v1.0";
|
||||
+ reg = <0x1000 0x600>;
|
||||
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
nand-controller@1800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
|
||||
@@ -79,6 +79,7 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
uart_clk: uart-clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -86,6 +87,12 @@
|
||||
clock-div = <4>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <200000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -117,6 +124,19 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0xff800000 0x800000>;
|
||||
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm4912-hsspi", "brcm,bcmbca-hsspi-v1.1";
|
||||
+ reg = <0x1000 0x600>, <0x2610 0x4>;
|
||||
+ reg-names = "hsspi", "spim-ctrl";
|
||||
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
uart0: serial@12000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
reg = <0x12000 0x1000>;
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
|
||||
@@ -60,6 +60,7 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
uart_clk: uart-clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -67,6 +68,12 @@
|
||||
clock-div = <4>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <200000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -99,6 +106,18 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0xff800000 0x800000>;
|
||||
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm63146-hsspi", "brcm,bcmbca-hsspi-v1.0";
|
||||
+ reg = <0x1000 0x600>;
|
||||
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
uart0: serial@12000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
reg = <0x12000 0x1000>;
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
|
||||
@@ -79,6 +79,7 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
uart_clk: uart-clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -86,6 +87,12 @@
|
||||
clock-div = <4>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <400000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -117,6 +124,18 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0xff800000 0x800000>;
|
||||
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm63158-hsspi", "brcm,bcmbca-hsspi-v1.0";
|
||||
+ reg = <0x1000 0x600>;
|
||||
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
uart0: serial@12000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
reg = <0x12000 0x1000>;
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
|
||||
@@ -79,6 +79,7 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
uart_clk: uart-clk {
|
||||
compatible = "fixed-factor-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -86,6 +87,12 @@
|
||||
clock-div = <4>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <200000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -117,6 +124,19 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x0 0xff800000 0x800000>;
|
||||
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm6813-hsspi", "brcm,bcmbca-hsspi-v1.1";
|
||||
+ reg = <0x1000 0x600>, <0x2610 0x4>;
|
||||
+ reg-names = "hsspi", "spim-ctrl";
|
||||
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
uart0: serial@12000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
reg = <0x12000 0x1000>;
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
|
||||
@@ -60,6 +60,12 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <400000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -100,5 +106,17 @@
|
||||
clock-names = "refclk";
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm6856-hsspi", "brcm,bcmbca-hsspi-v1.0";
|
||||
+ reg = <0x1000 0x600>;
|
||||
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
|
||||
@@ -78,6 +78,12 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
+
|
||||
+ hsspi_pll: hsspi-pll {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <400000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
psci {
|
||||
@@ -137,5 +143,17 @@
|
||||
clock-names = "refclk";
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ hsspi: spi@1000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm6858-hsspi", "brcm,bcmbca-hsspi-v1.0";
|
||||
+ reg = <0x1000 0x600>;
|
||||
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&hsspi_pll &hsspi_pll>;
|
||||
+ clock-names = "hsspi", "pll";
|
||||
+ num-cs = <8>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts
|
||||
@@ -28,3 +28,7 @@
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&hsspi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,33 @@
|
||||
From 5cca02449490e767289bda38db1577e2c375c084 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:43:58 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt
|
||||
name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes:
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: interrupt-names:0: 'nand_ctlrdy' was expected
|
||||
From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: Unevaluated properties are not allowed ('interrupt-names' was unexpected)
|
||||
From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144400.21689-1-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -556,7 +556,7 @@
|
||||
reg = <0x1800 0x600>, <0x2000 0x10>;
|
||||
reg-names = "nand", "nand-int-base";
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "nand";
|
||||
+ interrupt-names = "nand_ctlrdy";
|
||||
status = "okay";
|
||||
|
||||
nandcs: nand@0 {
|
||||
@@ -0,0 +1,66 @@
|
||||
From 23be9f68f933adee8163b8efc9c6bff71410cc7c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:43:59 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes:
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: leds@800: 'led-lan@19', 'led-power@11', 'led-wan-red@12', 'led-wan-white@15', 'led-wps@14' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
|
||||
From schema: Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144400.21689-2-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
.../dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
|
||||
@@ -120,7 +120,7 @@
|
||||
};
|
||||
|
||||
&leds {
|
||||
- led-power@11 {
|
||||
+ led@11 {
|
||||
reg = <0x11>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
@@ -130,7 +130,7 @@
|
||||
pinctrl-0 = <&pins_led_17_a>;
|
||||
};
|
||||
|
||||
- led-wan-red@12 {
|
||||
+ led@12 {
|
||||
reg = <0x12>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
@@ -139,7 +139,7 @@
|
||||
pinctrl-0 = <&pins_led_18_a>;
|
||||
};
|
||||
|
||||
- led-wps@14 {
|
||||
+ led@14 {
|
||||
reg = <0x14>;
|
||||
function = LED_FUNCTION_WPS;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
@@ -148,7 +148,7 @@
|
||||
pinctrl-0 = <&pins_led_20_a>;
|
||||
};
|
||||
|
||||
- led-wan-white@15 {
|
||||
+ led@15 {
|
||||
reg = <0x15>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
@@ -157,7 +157,7 @@
|
||||
pinctrl-0 = <&pins_led_21_a>;
|
||||
};
|
||||
|
||||
- led-lan@19 {
|
||||
+ led@19 {
|
||||
reg = <0x19>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
@@ -0,0 +1,30 @@
|
||||
From f16a8294dd7a02c7ad042cd2e3acc5ea06698dc1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:44:00 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes:
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: syscon@280000: $nodename:0: 'syscon@280000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
|
||||
From schema: schemas/simple-bus.yaml
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144400.21689-3-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -260,7 +260,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
- procmon: syscon@280000 {
|
||||
+ procmon: bus@280000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x280000 0x1000>;
|
||||
ranges;
|
||||
@@ -0,0 +1,81 @@
|
||||
From 477cad715de1dfc256a20da3ed83b62f3cb2944d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:45:18 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often
|
||||
have LEDs indicating state of selected USB ports. Describe those SoC USB
|
||||
ports to allow using them as LED trigger sources.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144520.21816-1-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
.../boot/dts/broadcom/bcmbca/bcm4908.dtsi | 39 +++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -148,6 +148,19 @@
|
||||
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usb_phy PHY_TYPE_USB2>;
|
||||
status = "disabled";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ehci_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ ehci_port2: port@2 {
|
||||
+ reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
ohci: usb@c400 {
|
||||
@@ -156,6 +169,19 @@
|
||||
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usb_phy PHY_TYPE_USB2>;
|
||||
status = "disabled";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ohci_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ ohci_port2: port@2 {
|
||||
+ reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
xhci: usb@d000 {
|
||||
@@ -164,6 +190,19 @@
|
||||
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usb_phy PHY_TYPE_USB3>;
|
||||
status = "disabled";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ xhci_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ xhci_port2: port@2 {
|
||||
+ reg = <2>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
bus@80000 {
|
||||
@@ -0,0 +1,38 @@
|
||||
From 889e53ccccc29ff4bf8d4c89cca34e8768845747 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:45:19 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB
|
||||
LED triggers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This device has 2 USB LEDs meant to be triggered by devices in relevant
|
||||
USB ports.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144520.21816-2-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
.../arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
|
||||
@@ -58,12 +58,16 @@
|
||||
function = "usb2";
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led-usb3 {
|
||||
function = "usb3";
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led-wifi {
|
||||
@@ -0,0 +1,41 @@
|
||||
From e6d356b146b75f1f77621aab7950a1eb550859f9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 28 Feb 2023 15:45:20 +0100
|
||||
Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB
|
||||
LED triggers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This device has 2 USB LEDs meant to be triggered by devices in relevant
|
||||
USB ports.
|
||||
|
||||
While at it fix typo in USB LED name.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/all/20230228144520.21816-3-zajec5@gmail.com/
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
.../dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
|
||||
@@ -64,12 +64,16 @@
|
||||
function = "usb2";
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led-usb3 {
|
||||
- function = "usbd3";
|
||||
+ function = "usb3";
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
+ trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led-brightness {
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
|
||||
@@ -297,7 +297,7 @@
|
||||
@@ -343,7 +343,7 @@
|
||||
gpio0: gpio-controller@500 {
|
||||
compatible = "brcm,bcm6345-gpio";
|
||||
reg-names = "dirout", "dat";
|
||||
|
||||
@@ -40,7 +40,7 @@ it on BCM4708 family.
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -158,6 +158,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
@@ -159,6 +159,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ it on BCM4708 family.
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd
|
||||
@@ -612,10 +655,20 @@ static int xhci_init(struct usb_hcd *hcd
|
||||
|
||||
static int xhci_run_finished(struct xhci_hcd *xhci)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ it on BCM4708 family.
|
||||
xhci->shared_hcd->state = HC_STATE_RUNNING;
|
||||
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
|
||||
|
||||
@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci
|
||||
@@ -625,6 +678,10 @@ static int xhci_run_finished(struct xhci
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
||||
"Finished xhci_run for USB3 roothub");
|
||||
return 0;
|
||||
|
||||
@@ -232,7 +232,7 @@ Tested-by: Yu Zhao <yuzhao@chromium.org>
|
||||
SetPageWorkingset(new_page);
|
||||
--- a/mm/swapfile.c
|
||||
+++ b/mm/swapfile.c
|
||||
@@ -715,6 +715,7 @@ static void add_to_avail_list(struct swa
|
||||
@@ -716,6 +716,7 @@ static void add_to_avail_list(struct swa
|
||||
static void swap_range_free(struct swap_info_struct *si, unsigned long offset,
|
||||
unsigned int nr_entries)
|
||||
{
|
||||
@@ -240,7 +240,7 @@ Tested-by: Yu Zhao <yuzhao@chromium.org>
|
||||
unsigned long end = offset + nr_entries - 1;
|
||||
void (*swap_slot_free_notify)(struct block_device *, unsigned long);
|
||||
|
||||
@@ -740,6 +741,7 @@ static void swap_range_free(struct swap_
|
||||
@@ -741,6 +742,7 @@ static void swap_range_free(struct swap_
|
||||
swap_slot_free_notify(si->bdev, offset);
|
||||
offset++;
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ Commit-Queue: Yu Zhao <yuzhao@chromium.org>
|
||||
#if defined(CONFIG_NUMA_BALANCING) && !defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS)
|
||||
--- a/mm/swapfile.c
|
||||
+++ b/mm/swapfile.c
|
||||
@@ -2702,6 +2702,8 @@ SYSCALL_DEFINE1(swapoff, const char __us
|
||||
@@ -2703,6 +2703,8 @@ SYSCALL_DEFINE1(swapoff, const char __us
|
||||
err = 0;
|
||||
atomic_inc(&proc_poll_event);
|
||||
wake_up_interruptible(&proc_poll_wait);
|
||||
@@ -579,7 +579,7 @@ Commit-Queue: Yu Zhao <yuzhao@chromium.org>
|
||||
|
||||
out_dput:
|
||||
filp_close(victim, NULL);
|
||||
@@ -3328,6 +3330,8 @@ SYSCALL_DEFINE2(swapon, const char __use
|
||||
@@ -3329,6 +3331,8 @@ SYSCALL_DEFINE2(swapon, const char __use
|
||||
mutex_unlock(&swapon_mutex);
|
||||
atomic_inc(&proc_poll_event);
|
||||
wake_up_interruptible(&proc_poll_wait);
|
||||
|
||||
@@ -260,7 +260,7 @@ Commit-Queue: Yu Zhao <yuzhao@chromium.org>
|
||||
/* forking complete and child started to run, tell ptracer */
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -3468,6 +3468,7 @@ context_switch(struct rq *rq, struct tas
|
||||
@@ -3471,6 +3471,7 @@ context_switch(struct rq *rq, struct tas
|
||||
* finish_task_switch()'s mmdrop().
|
||||
*/
|
||||
switch_mm_irqs_off(prev->active_mm, next->mm, next);
|
||||
@@ -268,7 +268,7 @@ Commit-Queue: Yu Zhao <yuzhao@chromium.org>
|
||||
|
||||
if (!prev->mm) { // from kernel
|
||||
/* will mmdrop() in finish_task_switch(). */
|
||||
@@ -6283,6 +6284,7 @@ void idle_task_exit(void)
|
||||
@@ -6286,6 +6287,7 @@ void idle_task_exit(void)
|
||||
|
||||
if (mm != &init_mm) {
|
||||
switch_mm(mm, &init_mm, current);
|
||||
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -347,6 +347,7 @@ struct napi_struct {
|
||||
@@ -349,6 +349,7 @@ struct napi_struct {
|
||||
struct list_head dev_list;
|
||||
struct hlist_node napi_hash_node;
|
||||
unsigned int napi_id;
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -357,6 +358,7 @@ enum {
|
||||
@@ -359,6 +360,7 @@ enum {
|
||||
NAPI_STATE_HASHED, /* In NAPI hash (busy polling possible) */
|
||||
NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */
|
||||
NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -367,6 +369,7 @@ enum {
|
||||
@@ -369,6 +371,7 @@ enum {
|
||||
NAPIF_STATE_HASHED = BIT(NAPI_STATE_HASHED),
|
||||
NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL),
|
||||
NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL),
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
enum gro_result {
|
||||
@@ -511,20 +514,7 @@ bool napi_hash_del(struct napi_struct *n
|
||||
@@ -513,20 +516,7 @@ bool napi_hash_del(struct napi_struct *n
|
||||
*/
|
||||
void napi_disable(struct napi_struct *n);
|
||||
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/**
|
||||
* napi_synchronize - wait until NAPI is not running
|
||||
@@ -1790,6 +1780,8 @@ enum netdev_ml_priv_type {
|
||||
@@ -1792,6 +1782,8 @@ enum netdev_ml_priv_type {
|
||||
*
|
||||
* @wol_enabled: Wake-on-LAN is enabled
|
||||
*
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
* FIXME: cleanup struct net_device such that network protocol info
|
||||
* moves out.
|
||||
*/
|
||||
@@ -2082,6 +2074,7 @@ struct net_device {
|
||||
@@ -2084,6 +2076,7 @@ struct net_device {
|
||||
struct lock_class_key addr_list_lock_key;
|
||||
bool proto_down;
|
||||
unsigned wol_enabled:1;
|
||||
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
+ == ==================================
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -505,6 +505,8 @@ static inline bool napi_complete(struct
|
||||
@@ -507,6 +507,8 @@ static inline bool napi_complete(struct
|
||||
*/
|
||||
bool napi_hash_del(struct napi_struct *napi);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -359,6 +359,7 @@ enum {
|
||||
@@ -361,6 +361,7 @@ enum {
|
||||
NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */
|
||||
NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */
|
||||
NAPI_STATE_THREADED, /* The poll is performed inside its own thread*/
|
||||
@@ -35,7 +35,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -370,6 +371,7 @@ enum {
|
||||
@@ -372,6 +373,7 @@ enum {
|
||||
NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL),
|
||||
NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL),
|
||||
NAPIF_STATE_THREADED = BIT(NAPI_STATE_THREADED),
|
||||
|
||||
@@ -202,7 +202,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -4878,7 +4878,8 @@ static struct mv88e6xxx_chip *mv88e6xxx_
|
||||
@@ -4883,7 +4883,8 @@ static struct mv88e6xxx_chip *mv88e6xxx_
|
||||
}
|
||||
|
||||
static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
|
||||
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -4929,6 +4929,80 @@ static int mv88e6xxx_port_mdb_del(struct
|
||||
@@ -4934,6 +4934,80 @@ static int mv88e6xxx_port_mdb_del(struct
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
|
||||
bool unicast, bool multicast)
|
||||
{
|
||||
@@ -4983,6 +5057,8 @@ static const struct dsa_switch_ops mv88e
|
||||
@@ -4988,6 +5062,8 @@ static const struct dsa_switch_ops mv88e
|
||||
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
|
||||
.port_mdb_add = mv88e6xxx_port_mdb_add,
|
||||
.port_mdb_del = mv88e6xxx_port_mdb_del,
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -4996,7 +4996,7 @@ static void mv88e6xxx_port_mirror_del(st
|
||||
@@ -5001,7 +5001,7 @@ static void mv88e6xxx_port_mirror_del(st
|
||||
if (chip->info->ops->set_egress_port(chip,
|
||||
direction,
|
||||
dsa_upstream_port(ds,
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
|
||||
--- a/drivers/scsi/scsi.c
|
||||
+++ b/drivers/scsi/scsi.c
|
||||
@@ -465,10 +465,14 @@ void scsi_attach_vpd(struct scsi_device
|
||||
@@ -472,10 +472,14 @@ void scsi_attach_vpd(struct scsi_device
|
||||
return;
|
||||
|
||||
for (i = 4; i < vpd_buf->len; i++) {
|
||||
|
||||
@@ -56,9 +56,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
} \
|
||||
\
|
||||
/* __*init sections */ \
|
||||
@@ -905,6 +915,8 @@
|
||||
EXIT_TEXT \
|
||||
EXIT_DATA \
|
||||
@@ -917,6 +927,8 @@
|
||||
/DISCARD/ : { \
|
||||
EXIT_DISCARDS \
|
||||
EXIT_CALL \
|
||||
+ SYMTAB_DISCARD \
|
||||
+ SYMTAB_DISCARD_GPL \
|
||||
|
||||
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
device, it has to decide which ones to send first, which ones to
|
||||
--- a/net/sched/sch_api.c
|
||||
+++ b/net/sched/sch_api.c
|
||||
@@ -2283,7 +2283,7 @@ static int __init pktsched_init(void)
|
||||
@@ -2286,7 +2286,7 @@ static int __init pktsched_init(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2492,6 +2492,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
@@ -2497,6 +2497,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
if (dsa_is_cpu_port(ds, port))
|
||||
reg = 0;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1547,6 +1547,7 @@ enum netdev_priv_flags {
|
||||
@@ -1549,6 +1549,7 @@ enum netdev_priv_flags {
|
||||
IFF_FAILOVER_SLAVE = 1<<28,
|
||||
IFF_L3MDEV_RX_HANDLER = 1<<29,
|
||||
IFF_LIVE_RENAME_OK = 1<<30,
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
|
||||
@@ -1579,6 +1580,7 @@ enum netdev_priv_flags {
|
||||
@@ -1581,6 +1582,7 @@ enum netdev_priv_flags {
|
||||
#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
|
||||
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
|
||||
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* Specifies the type of the struct net_device::ml_priv pointer */
|
||||
enum netdev_ml_priv_type {
|
||||
@@ -1889,6 +1891,11 @@ struct net_device {
|
||||
@@ -1891,6 +1893,11 @@ struct net_device {
|
||||
const struct tlsdev_ops *tlsdev_ops;
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
const struct header_ops *header_ops;
|
||||
|
||||
unsigned int flags;
|
||||
@@ -1971,6 +1978,10 @@ struct net_device {
|
||||
@@ -1973,6 +1980,10 @@ struct net_device {
|
||||
struct mpls_dev __rcu *mpls_ptr;
|
||||
#endif
|
||||
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
*/
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -2694,6 +2694,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
@@ -2695,6 +2695,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/**
|
||||
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
|
||||
* @skb: buffer to alter
|
||||
@@ -2825,16 +2829,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
@@ -2826,16 +2830,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -2770,6 +2770,7 @@ int wake_up_state(struct task_struct *p,
|
||||
@@ -2773,6 +2773,7 @@ int wake_up_state(struct task_struct *p,
|
||||
{
|
||||
return try_to_wake_up(p, state, 0);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
struct list_head *br_ip_list);
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -828,6 +828,10 @@ struct sk_buff {
|
||||
@@ -829,6 +829,10 @@ struct sk_buff {
|
||||
__u8 scm_io_uring:1;
|
||||
__u8 gro_skip:1;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/usb/qmi_wwan.c
|
||||
+++ b/drivers/net/usb/qmi_wwan.c
|
||||
@@ -1366,6 +1366,7 @@ static const struct usb_device_id produc
|
||||
@@ -1367,6 +1367,7 @@ static const struct usb_device_id produc
|
||||
{QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */
|
||||
{QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
|
||||
{QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */
|
||||
|
||||
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/mtd/ubi/build.c
|
||||
+++ b/drivers/mtd/ubi/build.c
|
||||
@@ -1168,6 +1168,73 @@ static struct mtd_info * __init open_mtd
|
||||
@@ -1177,6 +1177,73 @@ static struct mtd_info * __init open_mtd
|
||||
return mtd;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
static int __init ubi_init(void)
|
||||
{
|
||||
int err, i, k;
|
||||
@@ -1251,6 +1318,12 @@ static int __init ubi_init(void)
|
||||
@@ -1260,6 +1327,12 @@ static int __init ubi_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -929,6 +929,13 @@ struct devlink;
|
||||
@@ -931,6 +931,13 @@ struct devlink;
|
||||
struct tlsdev_ops;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
/*
|
||||
* This structure defines the management hooks for network devices.
|
||||
* The following hooks can be defined; unless noted otherwise, they are
|
||||
@@ -1161,6 +1168,10 @@ struct tlsdev_ops;
|
||||
@@ -1163,6 +1170,10 @@ struct tlsdev_ops;
|
||||
* int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
|
||||
* u16 flags);
|
||||
*
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
* int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
|
||||
* Called to change device carrier. Soft-devices (like dummy, team, etc)
|
||||
* which do not represent real hardware may define this to allow their
|
||||
@@ -1408,6 +1419,8 @@ struct net_device_ops {
|
||||
@@ -1410,6 +1421,8 @@ struct net_device_ops {
|
||||
int (*ndo_bridge_dellink)(struct net_device *dev,
|
||||
struct nlmsghdr *nlh,
|
||||
u16 flags);
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -930,6 +930,7 @@ struct tlsdev_ops;
|
||||
@@ -932,6 +932,7 @@ struct tlsdev_ops;
|
||||
|
||||
|
||||
struct flow_offload;
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
enum flow_offload_type {
|
||||
FLOW_OFFLOAD_ADD = 0,
|
||||
@@ -1168,8 +1169,15 @@ enum flow_offload_type {
|
||||
@@ -1170,8 +1171,15 @@ enum flow_offload_type {
|
||||
* int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
|
||||
* u16 flags);
|
||||
*
|
||||
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
* Adds/deletes flow entry to/from net device flowtable.
|
||||
*
|
||||
* int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
|
||||
@@ -1419,8 +1427,11 @@ struct net_device_ops {
|
||||
@@ -1421,8 +1429,11 @@ struct net_device_ops {
|
||||
int (*ndo_bridge_dellink)(struct net_device *dev,
|
||||
struct nlmsghdr *nlh,
|
||||
u16 flags);
|
||||
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -2660,7 +2660,7 @@ static inline int pskb_network_may_pull(
|
||||
@@ -2661,7 +2661,7 @@ static inline int pskb_network_may_pull(
|
||||
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
|
||||
*/
|
||||
#ifndef NET_SKB_PAD
|
||||
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1934,6 +1934,8 @@ struct net_device {
|
||||
@@ -1936,6 +1936,8 @@ struct net_device {
|
||||
struct netdev_hw_addr_list mc;
|
||||
struct netdev_hw_addr_list dev_addrs;
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#endif
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -826,6 +826,7 @@ struct sk_buff {
|
||||
@@ -827,6 +827,7 @@ struct sk_buff {
|
||||
__u8 decrypted:1;
|
||||
#endif
|
||||
__u8 scm_io_uring:1;
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -2663,6 +2663,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
||||
@@ -2668,6 +2668,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
||||
|
||||
chip->ds = ds;
|
||||
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -5083,6 +5083,7 @@ static int mv88e6xxx_register_switch(str
|
||||
@@ -5088,6 +5088,7 @@ static int mv88e6xxx_register_switch(str
|
||||
ds->ops = &mv88e6xxx_switch_ops;
|
||||
ds->ageing_time_min = chip->info->age_time_coeff;
|
||||
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
|
||||
|
||||
@@ -19,7 +19,6 @@ DEFAULT_PACKAGES += \
|
||||
kmod-leds-gpio kmod-gpio-button-hotplug swconfig \
|
||||
kmod-ath10k-ct wpad-openssl \
|
||||
kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \
|
||||
e2fsprogs uboot-envtools \
|
||||
autocore-arm luci-app-cpufreq
|
||||
uboot-envtools automount autocore-arm luci-app-cpufreq
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -112,6 +112,16 @@
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
regulator-usb-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "USB_VBUS";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
gpio = <&tlmm 68 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -280,7 +290,7 @@
|
||||
pins = "gpio55", "gpio56", "gpio57",
|
||||
"gpio60", "gpio62", "gpio63",
|
||||
"gpio64", "gpio65", "gpio66",
|
||||
"gpio67", "gpio68", "gpio69";
|
||||
"gpio67", "gpio69";
|
||||
function = "qpic";
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ Reviewed-by: Grant Grundler <grundler@chromium.org>
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -774,6 +774,16 @@ struct xps_map {
|
||||
@@ -776,6 +776,16 @@ struct xps_map {
|
||||
#define XPS_MIN_MAP_ALLOC ((L1_CACHE_ALIGN(offsetof(struct xps_map, queues[1])) \
|
||||
- sizeof(struct xps_map)) / sizeof(u16))
|
||||
|
||||
@@ -41,7 +41,7 @@ Reviewed-by: Grant Grundler <grundler@chromium.org>
|
||||
/*
|
||||
* This structure holds all XPS maps for device. Maps are indexed by CPU.
|
||||
*/
|
||||
@@ -1377,6 +1387,9 @@ struct net_device_ops {
|
||||
@@ -1379,6 +1389,9 @@ struct net_device_ops {
|
||||
const struct sk_buff *skb,
|
||||
u16 rxq_index,
|
||||
u32 flow_id);
|
||||
|
||||
@@ -21,6 +21,6 @@ DEFAULT_PACKAGES += \
|
||||
kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-phy-qcom-ipq806x-usb kmod-usb3 kmod-usb-dwc3-qcom \
|
||||
kmod-ath10k-ct wpad-openssl uboot-envtools \
|
||||
autocore-arm luci-app-cpufreq
|
||||
automount autocore-arm luci-app-cpufreq
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -66,6 +66,13 @@ qcom,ipq8064-db149)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
|
||||
;;
|
||||
ruijie,rg-mtfi-m520)
|
||||
hw_mac_addr=$(mtd_get_mac_ascii PRODUCTINFO ethaddr)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "6@eth1" "5:wan" "0@eth0"
|
||||
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
||||
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)"
|
||||
;;
|
||||
tplink,ad7200)
|
||||
ucidef_add_switch "switch0" \
|
||||
"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
|
||||
|
||||
@@ -7,6 +7,22 @@
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
case "$board" in
|
||||
ruijie,rg-mtfi-m520)
|
||||
caldata_extract "ART" 0x1000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 2)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath10k/cal-pci-0001:01:00.0.bin")
|
||||
case "$board" in
|
||||
ruijie,rg-mtfi-m520)
|
||||
caldata_extract "ART" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 3)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath10k/pre-cal-pci-0000:01:00.0.bin")
|
||||
case $board in
|
||||
askey,rt4230w-rev6 |\
|
||||
|
||||
@@ -8,6 +8,11 @@ preinit_set_mac_address() {
|
||||
ip link set dev eth0 address "${lan_mac}"
|
||||
ip link set dev eth1 address "${wan_mac}"
|
||||
;;
|
||||
ruijie,rg-mtfi-m520)
|
||||
base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr)
|
||||
ip link set dev eth0 address $(macaddr_add "$base_mac" 1)
|
||||
ip link set dev eth1 address $(macaddr_add "$base_mac" 2)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ platform_do_upgrade() {
|
||||
linksys,ea8500)
|
||||
platform_do_upgrade_linksys "$1"
|
||||
;;
|
||||
ruijie,rg-mtfi-m520)
|
||||
ruijie_do_upgrade "$1"
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
PART_NAME="os-image:rootfs"
|
||||
|
||||
54
target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh
Normal file
54
target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2016 lede-project.org
|
||||
#
|
||||
|
||||
ruijie_do_flash() {
|
||||
local tar_file=$1
|
||||
local kernel=$2
|
||||
local rootfs=$3
|
||||
|
||||
# keep sure its unbound
|
||||
losetup --detach-all || {
|
||||
echo Failed to detach all loop devices. Skip this try.
|
||||
reboot -f
|
||||
}
|
||||
|
||||
# use the first found directory in the tar archive
|
||||
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
board_dir=${board_dir%/}
|
||||
|
||||
echo "flashing kernel to $kernel"
|
||||
tar xf $tar_file ${board_dir}/kernel -O > $kernel
|
||||
|
||||
echo "flashing rootfs to $rootfs"
|
||||
tar xf $tar_file ${board_dir}/root -O > $rootfs
|
||||
|
||||
# Cleanup
|
||||
losetup -d /dev/loop0 >/dev/null 2>&1
|
||||
sync
|
||||
umount -a
|
||||
reboot -f
|
||||
}
|
||||
|
||||
ruijie_do_upgrade() {
|
||||
local tar_file="$1"
|
||||
local board=$(board_name)
|
||||
local kernel=
|
||||
local rootfs=
|
||||
|
||||
case "$board" in
|
||||
ruijie,rg-mtfi-m520)
|
||||
kernel="/dev/mmcblk0p2"
|
||||
rootfs="/dev/mmcblk0p3"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
ruijie_do_flash $tar_file $kernel $rootfs
|
||||
|
||||
nand_do_upgrade "$1"
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -188,6 +188,8 @@ CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qcom-ipq8064-v2.0.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Ruijie RG-MTFi-M520";
|
||||
compatible = "ruijie,rg-mtfi-m520", "qcom,ipq8064";
|
||||
|
||||
memory@0 {
|
||||
reg = <0x42000000 0x7e000000>;
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
aliases {
|
||||
mdio-gpio0 = &mdio0;
|
||||
sdcc1 = &sdcc1;
|
||||
|
||||
led-boot = &led_sys;
|
||||
led-failsafe = &led_sys;
|
||||
led-running = &led_sys;
|
||||
led-upgrade = &led_sys;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait noinitrd";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_sys: sys {
|
||||
label = "green:sys";
|
||||
gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
button_pins: button_pins {
|
||||
mux {
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0_pins: mdio0_pins {
|
||||
clk {
|
||||
pins = "gpio1";
|
||||
input-disable;
|
||||
};
|
||||
};
|
||||
|
||||
rgmii2_pins: rgmii2_pins {
|
||||
tx {
|
||||
pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32";
|
||||
input-disable;
|
||||
};
|
||||
};
|
||||
|
||||
sdcc1_pins: sdcc1_pinmux {
|
||||
mux {
|
||||
pins = "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
|
||||
"gpio43", "gpio44", "gpio45", "gpio46", "gpio47";
|
||||
function = "sdc1";
|
||||
};
|
||||
|
||||
cmd {
|
||||
pins = "gpio45";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
data {
|
||||
pins = "gpio38", "gpio39", "gpio40", "gpio41",
|
||||
"gpio43", "gpio44", "gpio46", "gpio47";
|
||||
drive-strength = <10>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
clk {
|
||||
pins = "gpio42";
|
||||
drive-strength = <16>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi_pins: spi_pins {
|
||||
cs {
|
||||
pins = "gpio20";
|
||||
drive-strength = <12>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi2 {
|
||||
qcom,mode = <GSBI_PROT_I2C_UART>;
|
||||
status = "okay";
|
||||
|
||||
i2c@124a0000 {
|
||||
status = "okay";
|
||||
|
||||
lm75@48 {
|
||||
compatible = "lm75";
|
||||
reg = <0x48>;
|
||||
};
|
||||
|
||||
pcf8563: rtc@51 {
|
||||
compatible = "nxp,pcf8563";
|
||||
reg = <0x51>;
|
||||
};
|
||||
|
||||
gpio_ext: tca9539@74 {
|
||||
compatible = "ti,tca9539";
|
||||
reg = <0x74>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsbi5 {
|
||||
qcom,mode = <GSBI_PROT_SPI>;
|
||||
status = "okay";
|
||||
|
||||
spi4: spi@1a280000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "s25fl256s1";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
|
||||
SBL1@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x0 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
MIBIB@10000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x10000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
SBL2@20000 {
|
||||
label = "SBL2";
|
||||
reg = <0x20000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
SBL3@40000 {
|
||||
label = "SBL3";
|
||||
reg = <0x40000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
DDRCONFIG@70000 {
|
||||
label = "DDRCONFIG";
|
||||
reg = <0x70000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
PRODUCTINFO@80000 {
|
||||
label = "PRODUCTINFO";
|
||||
reg = <0x80000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
TZ@90000 {
|
||||
label = "TZ";
|
||||
reg = <0x90000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
RPM@c0000 {
|
||||
label = "RPM";
|
||||
reg = <0xc0000 0x20000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
APPSBL@e0000 {
|
||||
label = "APPSBL";
|
||||
reg = <0xe0000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
APPSBLENV@160000 {
|
||||
label = "APPSBLENV";
|
||||
reg = <0x160000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
BOOTCONFIG@170000 {
|
||||
label = "BOOTCONFIG";
|
||||
reg = <0x170000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ART@180000 {
|
||||
label = "ART";
|
||||
reg = <0x180000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sata_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&pcie0_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&pcie1_pins>;
|
||||
pinctrl-names = "default";
|
||||
max-link-speed = <1>;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x000e4 0x6a545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
};
|
||||
|
||||
phy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
phy-mode = "rgmii";
|
||||
qcom,id = <1>;
|
||||
|
||||
pinctrl-0 = <&rgmii2_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
phy-mode = "sgmii";
|
||||
qcom,id = <2>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&amba {
|
||||
sdcc1: sdcc@12400000 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&sdcc1_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&adm_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&CPU_SPC {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -345,6 +345,23 @@ define Device/qcom_ipq8064-db149
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-db149
|
||||
|
||||
define Device/ruijie_rg-mtfi-m520
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := RG-MTFi-M520
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
KERNEL_SIZE := 4096k
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE)
|
||||
KERNEL_NAME := zImage
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := qsdk-ipq-factory-mmc
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs kmod-hwmon-lm75 \
|
||||
kmod-fs-f2fs kmod-rtc-pcf8563 losetup mkf2fs
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-mtfi-m520
|
||||
|
||||
define Device/tplink_ad7200
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user