Compare commits
144 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bae54687c7 | ||
|
|
399f9a1db3 | ||
|
|
df030ed6f3 | ||
|
|
6e561fe0a1 | ||
|
|
1d9f6d389e | ||
|
|
dced292d68 | ||
|
|
28cf53e6bd | ||
|
|
10cc5fcd00 | ||
|
|
87fbb5085d | ||
|
|
a2a67804fc | ||
|
|
ace013101c | ||
|
|
8e75eed617 | ||
|
|
4d4d260f5b | ||
|
|
5fedd23972 | ||
|
|
bc8745a607 | ||
|
|
22db6381b2 | ||
|
|
0895ba3696 | ||
|
|
56c3f7c22c | ||
|
|
c8f8074d29 | ||
|
|
66055df3e0 | ||
|
|
dd4b05ee8a | ||
|
|
984e3705d3 | ||
|
|
d8de9f4a6f | ||
|
|
4d7ad37891 | ||
|
|
e3bb35811e | ||
|
|
0b48b832a9 | ||
|
|
7ee813b3ef | ||
|
|
af6a852ced | ||
|
|
cec02193d5 | ||
|
|
ca0c2363c2 | ||
|
|
3d3dad61b2 | ||
|
|
d7765c488c | ||
|
|
601bbdda6a | ||
|
|
56675166e8 | ||
|
|
7542e7927b | ||
|
|
b886948692 | ||
|
|
74581b02b2 | ||
|
|
8766fed5cd | ||
|
|
64b38f3bd5 | ||
|
|
89759ee4bb | ||
|
|
50135a03a6 | ||
|
|
4446346fdd | ||
|
|
b1ddf0a859 | ||
|
|
c0217ef8f8 | ||
|
|
1d14e0abfc | ||
|
|
4ebd60b083 | ||
|
|
13193cb070 | ||
|
|
02e3845890 | ||
|
|
a7f749ded4 | ||
|
|
b2008404ab | ||
|
|
18fc86a0f5 | ||
|
|
1201a69664 | ||
|
|
d6da0952ab | ||
|
|
7f58fc14d8 | ||
|
|
ed3f182d63 | ||
|
|
6cbc100762 | ||
|
|
be4824977b | ||
|
|
15e6259231 | ||
|
|
59ad77faba | ||
|
|
1d83e4c5ed | ||
|
|
f79ab96312 | ||
|
|
b0f991d03c | ||
|
|
8f714af40b | ||
|
|
7a79b154af | ||
|
|
d19a3c70de | ||
|
|
21ce07e56a | ||
|
|
42668c51f5 | ||
|
|
3b85719b62 | ||
|
|
461102d99c | ||
|
|
b1858ffbf3 | ||
|
|
912acb6c09 | ||
|
|
7e42fdcafe | ||
|
|
4fa16c1e24 | ||
|
|
a0ebff651d | ||
|
|
8e5e62416f | ||
|
|
fd6e077ddf | ||
|
|
bad01d4806 | ||
|
|
190a5ca7a9 | ||
|
|
ed23a0d285 | ||
|
|
cc938b18a8 | ||
|
|
ee3efefc5e | ||
|
|
7447eeac91 | ||
|
|
b6a3289948 | ||
|
|
53e4ddfa7c | ||
|
|
9588844df8 | ||
|
|
96fcadbba8 | ||
|
|
b8e54164ce | ||
|
|
4e7be5f8b0 | ||
|
|
c98848dfa4 | ||
|
|
5773538c90 | ||
|
|
c4c43c64aa | ||
|
|
d811a09524 | ||
|
|
5a8588e360 | ||
|
|
06571d1ba3 | ||
|
|
f4954e319e | ||
|
|
a07a531329 | ||
|
|
bf5a49d6f9 | ||
|
|
e860b75a5c | ||
|
|
3c11b8bb63 | ||
|
|
cbac782014 | ||
|
|
bd79a16674 | ||
|
|
4d33716f96 | ||
|
|
561d534adb | ||
|
|
fe8c1fdd24 | ||
|
|
9b5d38187e | ||
|
|
403af43fd4 | ||
|
|
6a877053dd | ||
|
|
c615bcf438 | ||
|
|
a79157f257 | ||
|
|
4d0dc5e15e | ||
|
|
68d5ed7526 | ||
|
|
7d6366dcd7 | ||
|
|
d1de7d3c92 | ||
|
|
ee233aab6a | ||
|
|
cce5b49de4 | ||
|
|
a591f9cd14 | ||
|
|
868b12b200 | ||
|
|
6fadcee50b | ||
|
|
aff4e6c356 | ||
|
|
c241885687 | ||
|
|
5e7fc895f2 | ||
|
|
e4625c37c4 | ||
|
|
621ae59865 | ||
|
|
07cb7cb885 | ||
|
|
f99dffcaca | ||
|
|
5c8519b3ab | ||
|
|
6edde2b502 | ||
|
|
2e064182bf | ||
|
|
c4dc5dbd33 | ||
|
|
e5233fa70e | ||
|
|
1478f641bd | ||
|
|
1fd6c9b67f | ||
|
|
f791ec1f6d | ||
|
|
56a84b3c47 | ||
|
|
ae9981f794 | ||
|
|
e5e667eac8 | ||
|
|
0fc833f310 | ||
|
|
eea6071d07 | ||
|
|
53942ba877 | ||
|
|
17cdd89ae2 | ||
|
|
79f506ba62 | ||
|
|
7c31d7dd83 | ||
|
|
79e9020dbe | ||
|
|
1e6d2fcc57 |
@@ -1,4 +1,4 @@
|
||||
src-git packages https://github.com/immortalwrt/packages.git^fb1a9c0a222465ffe660d385ce18d1ca70b65f3a
|
||||
src-git luci https://github.com/immortalwrt/luci.git^ac5290ab0e56ddb0870f5bf6bac3006f03534057
|
||||
src-git routing https://github.com/openwrt/routing.git^a82e34d5e402ec77fd5facc1349352cacda2d0f8
|
||||
src-git packages https://github.com/immortalwrt/packages.git^9d567f8ed5f99833e4bffe734e047d0a01b57ce5
|
||||
src-git luci https://github.com/immortalwrt/luci.git^d4189db0d76c02e24087298327ec40a59fcfb2aa
|
||||
src-git routing https://github.com/openwrt/routing.git^e351d1e623e9ef2ab78f28cb1ce8d271d28c902d
|
||||
src-git telephony https://github.com/openwrt/telephony.git^98c8a5aa4624312ed758e2e2b6d4039050a1649d
|
||||
|
||||
@@ -44,7 +44,7 @@ define autoreconf
|
||||
touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \
|
||||
$(AM_TOOL_PATHS) \
|
||||
LIBTOOLIZE='$(STAGING_DIR_HOST)/bin/libtoolize --install' \
|
||||
$(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \
|
||||
$(STAGING_DIR_HOST)/bin/autoreconf -v -f -i \
|
||||
$(if $(word 2,$(3)),--no-recursive) \
|
||||
-B $(STAGING_DIR_HOST)/share/aclocal \
|
||||
$(patsubst %,-I %,$(5)) \
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .162
|
||||
LINUX_KERNEL_HASH-5.15.162 = 91bfc0ea152ce7b102a0b79d35a7c92843874ebf085c99d2ba8b4d85e62b1a7c
|
||||
LINUX_VERSION-5.15 = .167
|
||||
LINUX_KERNEL_HASH-5.15.167 = b1751f18ece3df08d502dd87a9ab1a317dc0f9486355bf8ee62ba6af0b35da30
|
||||
|
||||
@@ -20,7 +20,7 @@ define Package/Default
|
||||
PROVIDES:=
|
||||
EXTRA_DEPENDS:=
|
||||
MAINTAINER:=$(PKG_MAINTAINER)
|
||||
SOURCE:=$(patsubst $(TOPDIR)/%,%,$(CURDIR))
|
||||
SOURCE:=$(patsubst $(TOPDIR)/%,%,$(patsubst $(TOPDIR)/package/%,feeds/base/%,$(CURDIR)))
|
||||
ifneq ($(PKG_VERSION),)
|
||||
ifneq ($(PKG_RELEASE),)
|
||||
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
|
||||
@@ -37,7 +37,7 @@ ac_cv_func_rindex=yes
|
||||
ac_cv_func_setlocale=yes
|
||||
ac_cv_func_setgrent_void=yes
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
ac_cv_func_setresuid=no
|
||||
ac_cv_func_setresuid=yes
|
||||
ac_cv_func_setvbuf_reversed=no
|
||||
ac_cv_func_stat_empty_string_bug=no
|
||||
ac_cv_func_stat_ignores_trailing_slash=no
|
||||
|
||||
@@ -77,7 +77,8 @@ _ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))
|
||||
|
||||
prepare-tmpinfo: FORCE
|
||||
@+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK)
|
||||
mkdir -p tmp/info
|
||||
mkdir -p tmp/info feeds
|
||||
[ -e $(TOPDIR)/feeds/base ] || ln -sf $(TOPDIR)/package $(TOPDIR)/feeds/base
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
|
||||
for type in package target; do \
|
||||
|
||||
@@ -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),23.05.3)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.4)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r27917-81a1f98d5b)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r28061-399f9a1db3)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/23.05.3)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.immortalwrt.org/releases/23.05.4)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt)
|
||||
|
||||
@@ -9,7 +9,7 @@ missing_lines() {
|
||||
IFS=":"
|
||||
while read line; do
|
||||
set -- $line
|
||||
grep -q "^$1:" "$file2" || echo "$*"
|
||||
grep -q "^$1:" "$file2" || echo "$line"
|
||||
done < "$file1"
|
||||
IFS="$oIFS"
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.immortalwrt.org/releases/23.05.3"
|
||||
default "https://downloads.immortalwrt.org/releases/23.05.4"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
@@ -13,8 +13,11 @@ board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
abt,asr3000|\
|
||||
cmcc,a10|\
|
||||
h3c,magic-nx30-pro|\
|
||||
imou,lc-hx3001|\
|
||||
jcg,q30|\
|
||||
konka,komi-a31|\
|
||||
netcore,n60|\
|
||||
nokia,ea0326gmp|\
|
||||
qihoo,360t7|\
|
||||
|
||||
22
package/boot/uboot-envtools/files/rockchip_armv8
Normal file
22
package/boot/uboot-envtools/files/rockchip_armv8
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Copyright (C) 2024 OpenWrt.org
|
||||
#
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
lyt,t68m)
|
||||
ubootenv_add_uci_config "/dev/mmcblk0" "0x3f8000" "0x8000"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config
|
||||
|
||||
exit 0
|
||||
@@ -214,6 +214,18 @@ define U-Boot/mt7981_abt_asr3000
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_a10
|
||||
NAME:=CMCC A10
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=cmcc_a10
|
||||
UBOOT_CONFIG:=mt7981_cmcc_a10
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_cmcc_rax3000m-emmc
|
||||
NAME:=CMCC RAX3000M
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -250,6 +262,18 @@ define U-Boot/mt7981_h3c_magic-nx30-pro
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_imou_lc-hx3001
|
||||
NAME:=Imou LC-HX3001
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=imou_lc-hx3001
|
||||
UBOOT_CONFIG:=mt7981_imou_lc-hx3001
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_jcg_q30
|
||||
NAME:=JCG Q30
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -262,6 +286,18 @@ define U-Boot/mt7981_jcg_q30
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_konka_komi-a31
|
||||
NAME:=Konka KOMI A31
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=konka_komi-a31
|
||||
UBOOT_CONFIG:=mt7981_konka_komi-a31
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_nokia_ea0326gmp
|
||||
NAME:=Nokia EA0326GMP
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -643,10 +679,13 @@ UBOOT_TARGETS := \
|
||||
ravpower_rp-wd009 \
|
||||
mt7629_rfb \
|
||||
mt7981_abt_asr3000 \
|
||||
mt7981_cmcc_a10 \
|
||||
mt7981_cmcc_rax3000m-emmc \
|
||||
mt7981_cmcc_rax3000m-nand \
|
||||
mt7981_h3c_magic-nx30-pro \
|
||||
mt7981_imou_lc-hx3001 \
|
||||
mt7981_jcg_q30 \
|
||||
mt7981_konka_komi-a31 \
|
||||
mt7981_nokia_ea0326gmp \
|
||||
mt7981_rfb-spim-nand \
|
||||
mt7981_rfb-emmc \
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootargs=root=/dev/mmcblk0p65
|
||||
+bootargs=root=/dev/mmcblk0p65 rootwait
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
|
||||
+bootconf=config-1#mt7981b-cmcc-rax3000m-emmc
|
||||
+bootdelay=0
|
||||
|
||||
328
package/boot/uboot-mediatek/patches/454-add-konka_komi-a31.patch
Normal file
328
package/boot/uboot-mediatek/patches/454-add-konka_komi-a31.patch
Normal file
@@ -0,0 +1,328 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_konka_komi-a31_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-konka-komi-a31"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-konka-komi-a31.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="konka_komi-a31_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-konka-komi-a31.dts
|
||||
@@ -0,0 +1,158 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Konka KOMI A31";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-mesh {
|
||||
+ label = "mesh";
|
||||
+ linux,code = <BTN_9>;
|
||||
+ linux,input-type = <EV_SW>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ green_led: led-0 {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ red_led: led-2 {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/konka_komi-a31_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=immortalwrt-mediatek-filogic-konka_komi-a31-initramfs-recovery.itb
|
||||
+bootfile_bl2=immortalwrt-mediatek-filogic-konka_komi-a31-preloader.bin
|
||||
+bootfile_fip=immortalwrt-mediatek-filogic-konka_komi-a31-bl31-uboot.fip
|
||||
+bootfile_upg=immortalwrt-mediatek-filogic-konka_komi-a31-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=red:status
|
||||
+bootled_rec=blue:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
327
package/boot/uboot-mediatek/patches/456-add-cmcc_a10.patch
Normal file
327
package/boot/uboot-mediatek/patches/456-add-cmcc_a10.patch
Normal file
@@ -0,0 +1,327 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_cmcc_a10_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-a10"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cmcc-a10.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="cmcc_a10_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-cmcc-a10.dts
|
||||
@@ -0,0 +1,157 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "CMCC A10";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-wps {
|
||||
+ label = "wps";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led-0 {
|
||||
+ label = "blue:status";
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ running_led: led-1 {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ boot_led: led-2 {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x100000 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/cmcc_a10_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=immortalwrt-mediatek-filogic-cmcc_a10-initramfs-recovery.itb
|
||||
+bootfile_bl2=immortalwrt-mediatek-filogic-cmcc_a10-preloader.bin
|
||||
+bootfile_fip=immortalwrt-mediatek-filogic-cmcc_a10-bl31-uboot.fip
|
||||
+bootfile_upg=immortalwrt-mediatek-filogic-cmcc_a10-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=red:status
|
||||
+bootled_rec=blue:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
341
package/boot/uboot-mediatek/patches/458-add-imou_lc-hx3001.patch
Normal file
341
package/boot/uboot-mediatek/patches/458-add-imou_lc-hx3001.patch
Normal file
@@ -0,0 +1,341 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_imou_lc-hx3001_defconfig
|
||||
@@ -0,0 +1,107 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-imou-lc-hx3001"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-imou-lc-hx3001.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="imou_lc-hx3001_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-imou-lc-hx3001.dts
|
||||
@@ -0,0 +1,171 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Imou LC-HX3001";
|
||||
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button-mesh {
|
||||
+ label = "mesh";
|
||||
+ linux,code = <BTN_9>;
|
||||
+ linux,input-type = <EV_SW>;
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ power_led: led-0 {
|
||||
+ label = "green:power";
|
||||
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ led-1 {
|
||||
+ label = "green:wan";
|
||||
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ led-2 {
|
||||
+ label = "red:wan";
|
||||
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ led-3 {
|
||||
+ label = "green:lan";
|
||||
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ led-4 {
|
||||
+ label = "green:wlan";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x00000 0x0100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x0100000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x0200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ compatible = "linux,ubi";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/imou_lc-hx3001_env
|
||||
@@ -0,0 +1,54 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=immortalwrt-mediatek-filogic-imou_lc-hx3001-initramfs-recovery.itb
|
||||
+bootfile_bl2=immortalwrt-mediatek-filogic-imou_lc-hx3001-preloader.bin
|
||||
+bootfile_fip=immortalwrt-mediatek-filogic-imou_lc-hx3001-bl31-uboot.fip
|
||||
+bootfile_upg=immortalwrt-mediatek-filogic-imou_lc-hx3001-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=green:power
|
||||
+bootled_rec=green:power
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@@ -27,56 +27,56 @@ endef
|
||||
|
||||
# RK3328 boards
|
||||
|
||||
define U-Boot/Default/rk3328
|
||||
define U-Boot/rk3328/Default
|
||||
BUILD_SUBTARGET:=armv8
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3328
|
||||
ATF:=$(RK3328_ATF)
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r2c-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=NanoPi R2C
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2c
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r2c-plus-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=NanoPi R2C Plus
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2c-plus
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r2s-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=NanoPi R2S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r2s
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi-r1-plus-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=Orange Pi R1 Plus
|
||||
BUILD_DEVICES:= \
|
||||
xunlong_orangepi-r1-plus
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi-r1-plus-lts-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=Orange Pi R1 Plus LTS
|
||||
BUILD_DEVICES:= \
|
||||
xunlong_orangepi-r1-plus-lts
|
||||
endef
|
||||
|
||||
define U-Boot/roc-cc-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=ROC-RK3328-CC
|
||||
BUILD_DEVICES:= \
|
||||
firefly_roc-rk3328-cc
|
||||
endef
|
||||
|
||||
define U-Boot/rock-pi-e-rk3328
|
||||
$(U-Boot/Default/rk3328)
|
||||
$(U-Boot/rk3328/Default)
|
||||
NAME:=Rock Pi E
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-pi-e
|
||||
@@ -84,56 +84,56 @@ endef
|
||||
|
||||
# RK3399 boards
|
||||
|
||||
define U-Boot/Default/rk3399
|
||||
define U-Boot/rk3399/Default
|
||||
BUILD_SUBTARGET:=armv8
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3399
|
||||
ATF:=$(RK3399_ATF)
|
||||
endef
|
||||
|
||||
define U-Boot/guangmiao-g4c-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=GuangMiao G4C
|
||||
BUILD_DEVICES:= \
|
||||
huake_guangmiao-g4c
|
||||
endef
|
||||
|
||||
define U-Boot/nanopc-t4-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=NanoPC T4
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopc-t4
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4s-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=NanoPi R4S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4s
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4se-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=NanoPi R4SE
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4se
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r4s-enterprise-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=NanoPi R4S Enterprise Edition
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r4s-enterprise
|
||||
endef
|
||||
|
||||
define U-Boot/rock-pi-4-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=Rock Pi 4
|
||||
BUILD_DEVICES:= \
|
||||
radxa_rock-pi-4a
|
||||
endef
|
||||
|
||||
define U-Boot/rockpro64-rk3399
|
||||
$(U-Boot/Default/rk3399)
|
||||
$(U-Boot/rk3399/Default)
|
||||
NAME:=RockPro64
|
||||
BUILD_DEVICES:= \
|
||||
pine64_rockpro64
|
||||
@@ -142,7 +142,7 @@ endef
|
||||
|
||||
# RK3568 boards
|
||||
|
||||
define U-Boot/Default/rk3568
|
||||
define U-Boot/rk3568/Default
|
||||
BUILD_SUBTARGET:=armv8
|
||||
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568
|
||||
ATF:=$(RK3568_ATF)
|
||||
@@ -150,54 +150,68 @@ define U-Boot/Default/rk3568
|
||||
endef
|
||||
|
||||
define U-Boot/fastrhino-r66s-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=FastRhino R66S
|
||||
BUILD_DEVICES:= \
|
||||
lunzn_fastrhino-r66s
|
||||
endef
|
||||
|
||||
define U-Boot/fastrhino-r68s-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=FastRhino R68S
|
||||
BUILD_DEVICES:= \
|
||||
lunzn_fastrhino-r68s
|
||||
endef
|
||||
|
||||
define U-Boot/lyt-t68m-rk3568
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=LYT T68M
|
||||
BUILD_DEVICES:= \
|
||||
lyt_t68m
|
||||
endef
|
||||
|
||||
define U-Boot/mrkaio-m68s-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=Mrkaio M68S
|
||||
BUILD_DEVICES:= \
|
||||
ezpro_mrkaio-m68s
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r5c-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=NanoPi R5C
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r5c
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r5s-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=NanoPi R5S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r5s
|
||||
endef
|
||||
|
||||
define U-Boot/photonicat-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=Ariaboard Photonicat
|
||||
BUILD_DEVICES:= \
|
||||
ariaboard_photonicat
|
||||
endef
|
||||
|
||||
define U-Boot/roc-pc-rk3568
|
||||
$(U-Boot/Default/rk3568)
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=Station P2
|
||||
BUILD_DEVICES:= \
|
||||
firefly_roc-rk3568-pc
|
||||
endef
|
||||
|
||||
define U-Boot/sige3-rk3568
|
||||
$(U-Boot/rk3568/Default)
|
||||
NAME:=Sige3
|
||||
BUILD_DEVICES:= \
|
||||
armsom_sige3
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
guangmiao-g4c-rk3399 \
|
||||
nanopc-t4-rk3399 \
|
||||
@@ -215,11 +229,13 @@ UBOOT_TARGETS := \
|
||||
rock-pi-e-rk3328 \
|
||||
fastrhino-r66s-rk3568 \
|
||||
fastrhino-r68s-rk3568 \
|
||||
lyt-t68m-rk3568 \
|
||||
mrkaio-m68s-rk3568 \
|
||||
nanopi-r5c-rk3568 \
|
||||
nanopi-r5s-rk3568 \
|
||||
photonicat-rk3568 \
|
||||
roc-pc-rk3568
|
||||
roc-pc-rk3568 \
|
||||
sige3-rk3568
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
|
||||
@@ -28,12 +28,15 @@
|
||||
rk3399-orangepi.dtb \
|
||||
rk3399-pinebook-pro.dtb \
|
||||
rk3399-pinephone-pro.dtb \
|
||||
@@ -169,6 +175,13 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
@@ -168,7 +174,16 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
rk3566-anbernic-rgxx3.dtb \
|
||||
rk3566-radxa-cm3-io.dtb \
|
||||
+ rk3568-armsom-sige3.dtb \
|
||||
rk3568-evb.dtb \
|
||||
+ rk3568-fastrhino-r66s.dtb \
|
||||
+ rk3568-fastrhino-r68s.dtb \
|
||||
+ rk3568-lyt-t68m.dtb \
|
||||
+ rk3568-mrkaio-m68s.dtb \
|
||||
+ rk3568-nanopi-r5c.dtb \
|
||||
+ rk3568-nanopi-r5s.dtb \
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
|
||||
*/
|
||||
|
||||
#include "rk356x-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart2;
|
||||
u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
cap-mmc-highspeed;
|
||||
mmc-ddr-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
clock-frequency = <24000000>;
|
||||
bootph-all;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,809 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (c) 2020 Rockchip Electronics Co., Ltd.
|
||||
* Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3568.dtsi"
|
||||
|
||||
/ {
|
||||
model = "ArmSom Sige3";
|
||||
compatible = "armsom,sige3", "rockchip,rk3568";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
mmc2 = &sdmmc1;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_green_pin>, <&led_red_pin>;
|
||||
|
||||
led_status_green: led-0 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
|
||||
led_status_red: led-1 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi-con {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 50 100 150 200 255>;
|
||||
fan-supply = <&vcc5v0_sys>;
|
||||
pwms = <&pwm3 0 50000 0>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
rk809-sound {
|
||||
compatible = "simple-audio-card";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hp_det_pin>;
|
||||
simple-audio-card,name = "Analog RK817";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,hp-det-gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
simple-audio-card,widgets =
|
||||
"Headphone", "Headphones",
|
||||
"Speaker", "Speaker";
|
||||
simple-audio-card,routing =
|
||||
"Headphones", "HPOL",
|
||||
"Headphones", "HPOR",
|
||||
"Speaker", "SPKO";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&i2s1_8ch>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&rk809>;
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
clocks = <&pmucru CLK_RTC_32K>;
|
||||
clock-names = "ext_clock";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_enable_h &clk32k_out1>;
|
||||
post-power-on-delay-ms = <100>;
|
||||
power-off-delay-us = <5000000>;
|
||||
reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie30_pwren_h>;
|
||||
regulator-name = "vcc3v3_pcie30";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <5000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_usb: vcc5v0-usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_host: vcc5v0-usb-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
regulator-name = "vcc5v0_usb_host";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_host2: vcc5v0-usb-host2-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_host2_en>;
|
||||
regulator-name = "vcc5v0_usb_host2";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||
regulator-name = "vcc5v0_usb_otg";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
assigned-clock-rates = <0>, <125000000>;
|
||||
clock_in_out = "output";
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1m1_miim
|
||||
&gmac1m1_tx_bus2
|
||||
&gmac1m1_rx_bus2
|
||||
&gmac1m1_rgmii_clk
|
||||
&gmac1m1_rgmii_bus>;
|
||||
snps,reset-gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
tx_delay = <0x48>;
|
||||
rx_delay = <0x2a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
avdd-0v9-supply = <&vdda0v9_image>;
|
||||
avdd-1v8-supply = <&vcca1v8_image>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_in {
|
||||
hdmi_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_out {
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
rk809: pmic@20 {
|
||||
compatible = "rockchip,rk809";
|
||||
reg = <0x20>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
#clock-cells = <1>;
|
||||
clock-names = "mclk";
|
||||
clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
||||
rockchip,system-power-controller;
|
||||
#sound-dai-cells = <0>;
|
||||
vcc1-supply = <&vcc3v3_sys>;
|
||||
vcc2-supply = <&vcc3v3_sys>;
|
||||
vcc3-supply = <&vcc3v3_sys>;
|
||||
vcc4-supply = <&vcc3v3_sys>;
|
||||
vcc5-supply = <&vcc3v3_sys>;
|
||||
vcc6-supply = <&vcc3v3_sys>;
|
||||
vcc7-supply = <&vcc3v3_sys>;
|
||||
vcc8-supply = <&vcc3v3_sys>;
|
||||
vcc9-supply = <&vcc3v3_sys>;
|
||||
wakeup-source;
|
||||
|
||||
codec {
|
||||
rockchip,mic-in-differential;
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_logic: DCDC_REG1 {
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_ddr: DCDC_REG3 {
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8: DCDC_REG5 {
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_image: LDO_REG1 {
|
||||
regulator-name = "vdda0v9_image";
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_0v9: LDO_REG2 {
|
||||
regulator-name = "vdda_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_pmu: LDO_REG3 {
|
||||
regulator-name = "vdda0v9_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <900000>;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_acodec: LDO_REG4 {
|
||||
regulator-name = "vccio_acodec";
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_pmu: LDO_REG6 {
|
||||
regulator-name = "vcc3v3_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca_1v8: LDO_REG7 {
|
||||
regulator-name = "vcca_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_pmu: LDO_REG8 {
|
||||
regulator-name = "vcca1v8_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <950000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3: SWITCH_REG1 {
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_sd: SWITCH_REG2 {
|
||||
regulator-name = "vcc3v3_sd";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usbc1: usb-typec@22 {
|
||||
compatible = "fcs,fusb302";
|
||||
reg = <0x22>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usbc1_int>;
|
||||
vbus-supply = <&vcc3v3_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vdd_cpu: regulator@40 {
|
||||
compatible = "rockchip,rk8600";
|
||||
reg = <0x40>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <712500>;
|
||||
regulator-max-microvolt = <1390000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563: hym8563@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <32768>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PC0 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s1_8ch {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s1m0_sclktx
|
||||
&i2s1m0_lrcktx
|
||||
&i2s1m0_sdi0
|
||||
&i2s1m0_sdo0>;
|
||||
rockchip,trcm-sync-tx-only;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
pinctrl-0 = <ð_phy_reset_pin>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie30phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie3x2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie30_reset_pin>;
|
||||
reset-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
bt {
|
||||
bt_reg_on_h: bt-reg-on-h {
|
||||
rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
bt_host_wake_h: bt-host-wake-h {
|
||||
rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
bt_wake_h: bt-wake-h {
|
||||
rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1 {
|
||||
eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
led_green_pin: led-green-pin {
|
||||
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
led_red_pin: led-red-pin {
|
||||
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
headphone {
|
||||
hp_det_pin: hp-det-pin {
|
||||
rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie30 {
|
||||
pcie30_pwren_h: pcie30-pwren-h {
|
||||
rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
pcie30_reset_pin: pcie30-reset-pin {
|
||||
rockchip,pins = <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
pmic {
|
||||
pmic_int: pmic-int {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
sdio-pwrseq {
|
||||
wifi_enable_h: wifi-enable-h {
|
||||
rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_usb_host_en: vcc5v0-usb-host-en {
|
||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_host2_en: vcc5v0-usb-host2-en {
|
||||
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg_en: vcc5v0-usb-otg-en {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
usbc1_int: usbc1-int {
|
||||
rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
pmuio1-supply = <&vcc3v3_pmu>;
|
||||
pmuio2-supply = <&vcc3v3_pmu>;
|
||||
vccio1-supply = <&vccio_acodec>;
|
||||
vccio2-supply = <&vcc_1v8>;
|
||||
vccio3-supply = <&vccio_sd>;
|
||||
vccio4-supply = <&vcc_1v8>;
|
||||
vccio5-supply = <&vcc_3v3>;
|
||||
vccio6-supply = <&vcc_1v8>;
|
||||
vccio7-supply = <&vcc_3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcca_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc0 {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
vmmc-supply = <&vcc3v3_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
disable-wp;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
rockchip,hw-tshut-mode = <1>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
clocks = <&pmucru CLK_RTC_32K>;
|
||||
clock-names = "lpo";
|
||||
device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bt_host_wake_h &bt_wake_h &bt_reg_on_h>;
|
||||
vbat-supply = <&vcc_3v3>;
|
||||
vddio-supply = <&vcc_1v8>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
extcon = <&usb2phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_host {
|
||||
phy-supply = <&vcc5v0_usb_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_otg {
|
||||
phy-supply = <&vcc5v0_usb_otg>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1_host {
|
||||
phy-supply = <&vcc5v0_usb_host2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop {
|
||||
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rk356x-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart2;
|
||||
u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
cap-mmc-highspeed;
|
||||
mmc-ddr-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
clock-frequency = <24000000>;
|
||||
bootph-all;
|
||||
status = "okay";
|
||||
};
|
||||
725
package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-lyt-t68m.dts
Normal file
725
package/boot/uboot-rockchip/src/arch/arm/dts/rk3568-lyt-t68m.dts
Normal file
@@ -0,0 +1,725 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3568.dtsi"
|
||||
|
||||
/ {
|
||||
model = "LYT T68M";
|
||||
compatible = "lyt,t68m", "rockchip,rk3568";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
ethernet1 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
|
||||
led-boot = &power_led;
|
||||
led-failsafe = &power_led;
|
||||
led-running = &power_led;
|
||||
led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&reset_button_pin>;
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <50>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_power_pin>, <&led_status_pin>;
|
||||
|
||||
power_led: led-power {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
status_led: led-status {
|
||||
color =<LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi-con {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_usb: vcc5v0-usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_host: vcc5v0-usb-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
regulator-name = "vcc5v0_usb_host";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||
regulator-name = "vcc5v0_usb_otg";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
|
||||
pcie30_avdd0v9: pcie30-avdd0v9-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pcie30_avdd0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
pcie30_avdd1v8: pcie30-avdd1v8-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pcie30_avdd1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie: vcc3v3-pcie-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie_enable_h>;
|
||||
regulator-name = "vcc3v3_pcie";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
/* actually fed by vcc12v_dcin */
|
||||
vcc3v3_minipcie: vcc3v3-minipcie-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&minipcie_enable_h>;
|
||||
regulator-name = "vcc3v3_minipcie";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc3v3_pcie>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
|
||||
assigned-clock-rates = <0>, <125000000>;
|
||||
clock_in_out = "output";
|
||||
phy-mode = "rgmii-id";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac0_miim
|
||||
&gmac0_tx_bus2
|
||||
&gmac0_rx_bus2
|
||||
&gmac0_rgmii_clk
|
||||
&gmac0_rgmii_bus>;
|
||||
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
phy-handle = <&rgmii_phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
|
||||
assigned-clock-rates = <0>, <125000000>;
|
||||
clock_in_out = "output";
|
||||
phy-mode = "rgmii-id";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1m1_miim
|
||||
&gmac1m1_tx_bus2
|
||||
&gmac1m1_rx_bus2
|
||||
&gmac1m1_rgmii_clk
|
||||
&gmac1m1_rgmii_bus>;
|
||||
snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
avdd-0v9-supply = <&vdda0v9_image>;
|
||||
avdd-1v8-supply = <&vcca1v8_image>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_in {
|
||||
hdmi_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_out {
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu: regulator@1c {
|
||||
compatible = "tcs,tcs4525";
|
||||
reg = <0x1c>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
rk809: pmic@20 {
|
||||
compatible = "rockchip,rk809";
|
||||
reg = <0x20>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
||||
#clock-cells = <1>;
|
||||
clock-names = "mclk";
|
||||
clocks = <&cru I2S1_MCLKOUT_TX>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
||||
system-power-controller;
|
||||
#sound-dai-cells = <0>;
|
||||
wakeup-source;
|
||||
|
||||
vcc1-supply = <&vcc3v3_sys>;
|
||||
vcc2-supply = <&vcc3v3_sys>;
|
||||
vcc3-supply = <&vcc3v3_sys>;
|
||||
vcc4-supply = <&vcc3v3_sys>;
|
||||
vcc5-supply = <&vcc3v3_sys>;
|
||||
vcc6-supply = <&vcc3v3_sys>;
|
||||
vcc7-supply = <&vcc3v3_sys>;
|
||||
vcc8-supply = <&vcc3v3_sys>;
|
||||
vcc9-supply = <&vcc3v3_sys>;
|
||||
|
||||
regulators {
|
||||
vdd_logic: DCDC_REG1 {
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_ddr: DCDC_REG3 {
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8: DCDC_REG5 {
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_image: LDO_REG1 {
|
||||
regulator-name = "vdda0v9_image";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_0v9: LDO_REG2 {
|
||||
regulator-name = "vdda_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_pmu: LDO_REG3 {
|
||||
regulator-name = "vdda0v9_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <900000>;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_acodec: LDO_REG4 {
|
||||
regulator-name = "vccio_acodec";
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_pmu: LDO_REG6 {
|
||||
regulator-name = "vcc3v3_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca_1v8: LDO_REG7 {
|
||||
regulator-name = "vcca_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_pmu: LDO_REG8 {
|
||||
regulator-name = "vcca1v8_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3: SWITCH_REG1 {
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_sd: SWITCH_REG2 {
|
||||
regulator-name = "vcc3v3_sd";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0_8ch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2s1_8ch {
|
||||
rockchip,trcm-sync-tx-only;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
rgmii_phy0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
realtek,led-data = <0x6d60>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0>;
|
||||
realtek,led-data = <0x6d60>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1 {
|
||||
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_minipcie>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie30phy {
|
||||
data-lanes = <1 2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie3x1 {
|
||||
num-lanes = <1>;
|
||||
reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie3x2 {
|
||||
num-lanes = <1>;
|
||||
reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
leds {
|
||||
led_power_pin: led-power-pin {
|
||||
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
led_status_pin: led-status-pin {
|
||||
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie {
|
||||
minipcie_enable_h: minipcie-enable-h {
|
||||
rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
pcie_enable_h: pcie-enable-h {
|
||||
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pmic {
|
||||
pmic_int: pmic_int {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
rockchip-key {
|
||||
reset_button_pin: reset-button-pin {
|
||||
rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_usb_host_en: vcc5v0_usb_host_en {
|
||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
pmuio1-supply = <&vcc3v3_pmu>;
|
||||
pmuio2-supply = <&vcc3v3_pmu>;
|
||||
vccio1-supply = <&vccio_acodec>;
|
||||
vccio2-supply = <&vcc_1v8>;
|
||||
vccio3-supply = <&vccio_sd>;
|
||||
vccio4-supply = <&vcc_1v8>;
|
||||
vccio5-supply = <&vcc_3v3>;
|
||||
vccio6-supply = <&vcc_1v8>;
|
||||
vccio7-supply = <&vcc_3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcca_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc0 {
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc3v3_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
rockchip,hw-tshut-mode = <1>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
extcon = <&usb2phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_host {
|
||||
phy-supply = <&vcc5v0_usb_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_otg {
|
||||
phy-supply = <&vcc5v0_usb_otg>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1_host {
|
||||
phy-supply = <&vcc5v0_usb_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy1_otg {
|
||||
phy-supply = <&vcc5v0_usb_host>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop {
|
||||
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vp0 {
|
||||
vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
remote-endpoint = <&hdmi_in_vp0>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
CONFIG_COUNTER_FREQUENCY=24000000
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_TEXT_BASE=0x00a00000
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3568-lyt-t68m"
|
||||
CONFIG_ROCKCHIP_RK3568=y
|
||||
CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
CONFIG_TARGET_EVB_RK3568=y
|
||||
CONFIG_SPL_STACK=0x400000
|
||||
CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-lyt-t68m.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_PAD_TO=0x7f8000
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x4000000
|
||||
CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
CONFIG_SPL_STACK_R=y
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_SPL_DM_WARN=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
CONFIG_POWER_DOMAIN=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_PMIC_RK8XX=y
|
||||
CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
CONFIG_REGULATOR_RK8XX=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_SPL_RAM=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550_MEM32=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_SYSRESET_PSCI=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_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
@@ -0,0 +1,85 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
CONFIG_COUNTER_FREQUENCY=24000000
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_TEXT_BASE=0x00a00000
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3568-armsom-sige3"
|
||||
CONFIG_ROCKCHIP_RK3568=y
|
||||
CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||
CONFIG_TARGET_EVB_RK3568=y
|
||||
CONFIG_SPL_STACK=0x400000
|
||||
CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-armsom-sige3.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_PAD_TO=0x7f8000
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x4000000
|
||||
CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
CONFIG_SPL_STACK_R=y
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_SPL_DM_WARN=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
CONFIG_POWER_DOMAIN=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_PMIC_RK8XX=y
|
||||
CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||
CONFIG_REGULATOR_RK8XX=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_SPL_RAM=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550_MEM32=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_SYSRESET_PSCI=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_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
@@ -4,10 +4,10 @@ PKG_NAME:=armbian-firmware
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-07-11
|
||||
PKG_SOURCE_DATE:=2024-06-26
|
||||
PKG_SOURCE_URL:=https://github.com/armbian/firmware.git
|
||||
PKG_SOURCE_VERSION:=a5e591c919a280d05f3bfcdc5892ea5788d020f6
|
||||
PKG_MIRROR_HASH:=253e5f4cc39ddbffaee24654a760814402b5e3678030a134bc894d4841f611c3
|
||||
PKG_SOURCE_VERSION:=7f2e18ecac75d50acb843395ad07a0f2b9a12a50
|
||||
PKG_MIRROR_HASH:=9967883add1587fb178e3b1a9aecec8e03b67f3554af63b294b771f67b88c934
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -43,6 +43,9 @@ $(eval $(call BuildPackage,brcmfmac-firmware-4356-sdio))
|
||||
Package/brcmfmac-firmware-43456-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43456 FullMac SDIO firmware)
|
||||
define Package/brcmfmac-firmware-43456-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/BCM4345C5.hcd \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/
|
||||
@@ -52,6 +55,21 @@ define Package/brcmfmac-firmware-43456-sdio/install
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-firmware-43456-sdio))
|
||||
|
||||
Package/brcmfmac-firmware-43752-pcie = $(call Package/armbian-firmware-default,Broadcom BCM43752 FullMac PCIe firmware)
|
||||
define Package/brcmfmac-firmware-43752-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/BCM4362A2.hcd \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-firmware-43752-pcie))
|
||||
|
||||
Package/brcmfmac-firmware-43752-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43752 FullMac SDIO firmware)
|
||||
define Package/brcmfmac-firmware-43752-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
@@ -67,36 +85,57 @@ define Package/brcmfmac-firmware-43752-sdio/install
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-firmware-43752-sdio))
|
||||
|
||||
Package/brcmfmac-nvram-4356-sdio = $(call Package/armbian-firmware-default,Broadcom BCM4356 NVRAM firmware)
|
||||
Package/brcmfmac-nvram-4356-sdio = $(call Package/armbian-firmware-default,Broadcom BCM4356 SDIO NVRAM firmware)
|
||||
define Package/brcmfmac-nvram-4356-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac4356-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/rkwifi/nvram_ap6356s.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.AP6356S.txt
|
||||
$(LN) \
|
||||
brcmfmac4356-sdio.txt \
|
||||
brcmfmac4356-sdio.AP6356S.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.friendlyarm,nanopc-t4.txt
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-nvram-4356-sdio))
|
||||
|
||||
Package/brcmfmac-nvram-43456-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43456 NVRAM firmware)
|
||||
Package/brcmfmac-nvram-43456-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43456 SDIO NVRAM firmware)
|
||||
define Package/brcmfmac-nvram-43456-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43456-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/nvram_ap6256.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.AP6256S.txt
|
||||
$(LN) \
|
||||
brcmfmac43456-sdio.txt \
|
||||
brcmfmac43456-sdio.AP6256S.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4a.txt
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-nvram-43456-sdio))
|
||||
|
||||
Package/brcmfmac-nvram-43752-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43752 NVRAM firmware)
|
||||
Package/brcmfmac-nvram-43752-pcie = $(call Package/armbian-firmware-default,Broadcom BCM43752 PCIe NVRAM firmware)
|
||||
define Package/brcmfmac-nvram-43752-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43752-pcie.txt \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(LN) \
|
||||
brcmfmac43752-pcie.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43752-pcie.armsom,sige7.txt
|
||||
endef
|
||||
$(eval $(call BuildPackage,brcmfmac-nvram-43752-pcie))
|
||||
|
||||
Package/brcmfmac-nvram-43752-sdio = $(call Package/armbian-firmware-default,Broadcom BCM43752 SDIO NVRAM firmware)
|
||||
define Package/brcmfmac-nvram-43752-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/brcm/brcmfmac43752-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/
|
||||
$(LN) \
|
||||
brcmfmac43752-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43752-sdio.armsom,sige3.txt
|
||||
$(LN) \
|
||||
brcmfmac43752-sdio.txt \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43752-sdio.firefly,rk3568-roc-pc.txt
|
||||
|
||||
@@ -200,3 +200,30 @@ define Package/e100-firmware/install
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/e100/d102e_ucode.bin $(1)/lib/firmware/e100/
|
||||
endef
|
||||
$(eval $(call BuildPackage,e100-firmware))
|
||||
|
||||
Package/intel-igpu-firmware-dmc = $(call Package/firmware-default,Intel iGPU DMC Display MC firmware)
|
||||
define Package/intel-igpu-firmware-dmc/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/i915
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/i915/*_dmc_*.bin* \
|
||||
$(1)/lib/firmware/i915/
|
||||
endef
|
||||
$(eval $(call BuildPackage,intel-igpu-firmware-dmc))
|
||||
|
||||
Package/intel-igpu-firmware-guc = $(call Package/firmware-default,Intel iGPU GUC Graphics MC firmware)
|
||||
define Package/intel-igpu-firmware-guc/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/i915
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/i915/*_guc_*.bin* \
|
||||
$(1)/lib/firmware/i915/
|
||||
endef
|
||||
$(eval $(call BuildPackage,intel-igpu-firmware-guc))
|
||||
|
||||
Package/intel-igpu-firmware-huc = $(call Package/firmware-default,Intel iGPU HUC H.265 MC firmware)
|
||||
define Package/intel-igpu-firmware-huc/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/i915
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/i915/*_huc_*.bin* \
|
||||
$(1)/lib/firmware/i915/
|
||||
endef
|
||||
$(eval $(call BuildPackage,intel-igpu-firmware-huc))
|
||||
|
||||
@@ -126,7 +126,7 @@ static int ptm_stop(struct net_device *);
|
||||
static unsigned int ptm_poll(int, unsigned int);
|
||||
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);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
@@ -247,7 +247,7 @@ static struct net_device_ops g_ptm_netdev_ops = {
|
||||
.ndo_start_xmit = ptm_hard_start_xmit,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_do_ioctl = ptm_ioctl,
|
||||
.ndo_siocdevprivate = ptm_ioctl,
|
||||
.ndo_tx_timeout = ptm_tx_timeout,
|
||||
};
|
||||
|
||||
@@ -452,7 +452,7 @@ PTM_HARD_START_XMIT_FAIL:
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd)
|
||||
{
|
||||
int ndev;
|
||||
|
||||
@@ -462,45 +462,45 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
switch ( cmd )
|
||||
{
|
||||
case IFX_PTM_MIB_CW_GET:
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxNoIdleCodewords = WAN_MIB_TABLE[ndev].wrx_nonidle_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxIdleCodewords = WAN_MIB_TABLE[ndev].wrx_idle_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxCodingViolation = WAN_MIB_TABLE[ndev].wrx_err_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxNoIdleCodewords = 0;
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxIdleCodewords = 0;
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxNoIdleCodewords = WAN_MIB_TABLE[ndev].wrx_nonidle_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxIdleCodewords = WAN_MIB_TABLE[ndev].wrx_idle_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxCodingViolation = WAN_MIB_TABLE[ndev].wrx_err_cw;
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifTxNoIdleCodewords = 0;
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifTxIdleCodewords = 0;
|
||||
break;
|
||||
case IFX_PTM_MIB_FRAME_GET:
|
||||
((PTM_FRAME_MIB_T *)ifr->ifr_data)->RxCorrect = WAN_MIB_TABLE[ndev].wrx_correct_pdu;
|
||||
((PTM_FRAME_MIB_T *)ifr->ifr_data)->TC_CrcError = WAN_MIB_TABLE[ndev].wrx_tccrc_err_pdu;
|
||||
((PTM_FRAME_MIB_T *)ifr->ifr_data)->RxDropped = WAN_MIB_TABLE[ndev].wrx_nodesc_drop_pdu + WAN_MIB_TABLE[ndev].wrx_len_violation_drop_pdu;
|
||||
((PTM_FRAME_MIB_T *)ifr->ifr_data)->TxSend = WAN_MIB_TABLE[ndev].wtx_total_pdu;
|
||||
((PTM_FRAME_MIB_T *)data)->RxCorrect = WAN_MIB_TABLE[ndev].wrx_correct_pdu;
|
||||
((PTM_FRAME_MIB_T *)data)->TC_CrcError = WAN_MIB_TABLE[ndev].wrx_tccrc_err_pdu;
|
||||
((PTM_FRAME_MIB_T *)data)->RxDropped = WAN_MIB_TABLE[ndev].wrx_nodesc_drop_pdu + WAN_MIB_TABLE[ndev].wrx_len_violation_drop_pdu;
|
||||
((PTM_FRAME_MIB_T *)data)->TxSend = WAN_MIB_TABLE[ndev].wtx_total_pdu;
|
||||
break;
|
||||
case IFX_PTM_CFG_GET:
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent = CFG_ETH_EFMTC_CRC->rx_eth_crc_present;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck = CFG_ETH_EFMTC_CRC->rx_eth_crc_check;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck = CFG_ETH_EFMTC_CRC->rx_tc_crc_check;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen = CFG_ETH_EFMTC_CRC->rx_tc_crc_len;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen = CFG_ETH_EFMTC_CRC->tx_eth_crc_gen;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen = CFG_ETH_EFMTC_CRC->tx_tc_crc_gen;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen = CFG_ETH_EFMTC_CRC->tx_tc_crc_len;
|
||||
((IFX_PTM_CFG_T *)data)->RxEthCrcPresent = CFG_ETH_EFMTC_CRC->rx_eth_crc_present;
|
||||
((IFX_PTM_CFG_T *)data)->RxEthCrcCheck = CFG_ETH_EFMTC_CRC->rx_eth_crc_check;
|
||||
((IFX_PTM_CFG_T *)data)->RxTcCrcCheck = CFG_ETH_EFMTC_CRC->rx_tc_crc_check;
|
||||
((IFX_PTM_CFG_T *)data)->RxTcCrcLen = CFG_ETH_EFMTC_CRC->rx_tc_crc_len;
|
||||
((IFX_PTM_CFG_T *)data)->TxEthCrcGen = CFG_ETH_EFMTC_CRC->tx_eth_crc_gen;
|
||||
((IFX_PTM_CFG_T *)data)->TxTcCrcGen = CFG_ETH_EFMTC_CRC->tx_tc_crc_gen;
|
||||
((IFX_PTM_CFG_T *)data)->TxTcCrcLen = CFG_ETH_EFMTC_CRC->tx_tc_crc_len;
|
||||
break;
|
||||
case IFX_PTM_CFG_SET:
|
||||
CFG_ETH_EFMTC_CRC->rx_eth_crc_present = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent ? 1 : 0;
|
||||
CFG_ETH_EFMTC_CRC->rx_eth_crc_check = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck ? 1 : 0;
|
||||
if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck && (((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen == 32) )
|
||||
CFG_ETH_EFMTC_CRC->rx_eth_crc_present = ((IFX_PTM_CFG_T *)data)->RxEthCrcPresent ? 1 : 0;
|
||||
CFG_ETH_EFMTC_CRC->rx_eth_crc_check = ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck ? 1 : 0;
|
||||
if ( ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck && (((IFX_PTM_CFG_T *)data)->RxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)data)->RxTcCrcLen == 32) )
|
||||
{
|
||||
CFG_ETH_EFMTC_CRC->rx_tc_crc_check = 1;
|
||||
CFG_ETH_EFMTC_CRC->rx_tc_crc_len = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen;
|
||||
CFG_ETH_EFMTC_CRC->rx_tc_crc_len = ((IFX_PTM_CFG_T *)data)->RxTcCrcLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
CFG_ETH_EFMTC_CRC->rx_tc_crc_check = 0;
|
||||
CFG_ETH_EFMTC_CRC->rx_tc_crc_len = 0;
|
||||
}
|
||||
CFG_ETH_EFMTC_CRC->tx_eth_crc_gen = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen ? 1 : 0;
|
||||
if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen && (((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen == 32) )
|
||||
CFG_ETH_EFMTC_CRC->tx_eth_crc_gen = ((IFX_PTM_CFG_T *)data)->TxEthCrcGen ? 1 : 0;
|
||||
if ( ((IFX_PTM_CFG_T *)data)->TxTcCrcGen && (((IFX_PTM_CFG_T *)data)->TxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)data)->TxTcCrcLen == 32) )
|
||||
{
|
||||
CFG_ETH_EFMTC_CRC->tx_tc_crc_gen = 1;
|
||||
CFG_ETH_EFMTC_CRC->tx_tc_crc_len = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen;
|
||||
CFG_ETH_EFMTC_CRC->tx_tc_crc_len = ((IFX_PTM_CFG_T *)data)->TxTcCrcLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ static int ptm_stop(struct net_device *);
|
||||
static unsigned int ptm_poll(int, unsigned int);
|
||||
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);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
@@ -120,7 +120,7 @@ static struct net_device_ops g_ptm_netdev_ops = {
|
||||
.ndo_start_xmit = ptm_hard_start_xmit,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_do_ioctl = ptm_ioctl,
|
||||
.ndo_siocdevprivate = ptm_ioctl,
|
||||
.ndo_tx_timeout = ptm_tx_timeout,
|
||||
};
|
||||
|
||||
@@ -370,62 +370,62 @@ PTM_HARD_START_XMIT_FAIL:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd)
|
||||
{
|
||||
ASSERT(dev == g_net_dev[0], "incorrect device");
|
||||
|
||||
switch ( cmd )
|
||||
{
|
||||
case IFX_PTM_MIB_CW_GET:
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxNoIdleCodewords = IFX_REG_R32(DREG_AR_CELL0) + IFX_REG_R32(DREG_AR_CELL1);
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxIdleCodewords = IFX_REG_R32(DREG_AR_IDLE_CNT0) + IFX_REG_R32(DREG_AR_IDLE_CNT1);
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxCodingViolation = IFX_REG_R32(DREG_AR_CVN_CNT0) + IFX_REG_R32(DREG_AR_CVN_CNT1) + IFX_REG_R32(DREG_AR_CVNP_CNT0) + IFX_REG_R32(DREG_AR_CVNP_CNT1);
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxNoIdleCodewords = IFX_REG_R32(DREG_AT_CELL0) + IFX_REG_R32(DREG_AT_CELL1);
|
||||
((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxIdleCodewords = IFX_REG_R32(DREG_AT_IDLE_CNT0) + IFX_REG_R32(DREG_AT_IDLE_CNT1);
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxNoIdleCodewords = IFX_REG_R32(DREG_AR_CELL0) + IFX_REG_R32(DREG_AR_CELL1);
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxIdleCodewords = IFX_REG_R32(DREG_AR_IDLE_CNT0) + IFX_REG_R32(DREG_AR_IDLE_CNT1);
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifRxCodingViolation = IFX_REG_R32(DREG_AR_CVN_CNT0) + IFX_REG_R32(DREG_AR_CVN_CNT1) + IFX_REG_R32(DREG_AR_CVNP_CNT0) + IFX_REG_R32(DREG_AR_CVNP_CNT1);
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifTxNoIdleCodewords = IFX_REG_R32(DREG_AT_CELL0) + IFX_REG_R32(DREG_AT_CELL1);
|
||||
((PTM_CW_IF_ENTRY_T *)data)->ifTxIdleCodewords = IFX_REG_R32(DREG_AT_IDLE_CNT0) + IFX_REG_R32(DREG_AT_IDLE_CNT1);
|
||||
break;
|
||||
case IFX_PTM_MIB_FRAME_GET:
|
||||
{
|
||||
PTM_FRAME_MIB_T data = {0};
|
||||
PTM_FRAME_MIB_T tmp = {0};
|
||||
int i;
|
||||
|
||||
data.RxCorrect = IFX_REG_R32(DREG_AR_HEC_CNT0) + IFX_REG_R32(DREG_AR_HEC_CNT1) + IFX_REG_R32(DREG_AR_AIIDLE_CNT0) + IFX_REG_R32(DREG_AR_AIIDLE_CNT1);
|
||||
tmp.RxCorrect = IFX_REG_R32(DREG_AR_HEC_CNT0) + IFX_REG_R32(DREG_AR_HEC_CNT1) + IFX_REG_R32(DREG_AR_AIIDLE_CNT0) + IFX_REG_R32(DREG_AR_AIIDLE_CNT1);
|
||||
for ( i = 0; i < 4; i++ )
|
||||
data.RxDropped += WAN_RX_MIB_TABLE(i)->wrx_dropdes_pdu;
|
||||
tmp.RxDropped += WAN_RX_MIB_TABLE(i)->wrx_dropdes_pdu;
|
||||
for ( i = 0; i < 8; i++ )
|
||||
data.TxSend += WAN_TX_MIB_TABLE(i)->wtx_total_pdu;
|
||||
tmp.TxSend += WAN_TX_MIB_TABLE(i)->wtx_total_pdu;
|
||||
|
||||
*((PTM_FRAME_MIB_T *)ifr->ifr_data) = data;
|
||||
*((PTM_FRAME_MIB_T *)data) = tmp;
|
||||
}
|
||||
break;
|
||||
case IFX_PTM_CFG_GET:
|
||||
// use bear channel 0 preemption gamma interface settings
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent = 1;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_eth_fcs_ver_dis == 0 ? 1 : 0;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis == 0 ? 1 : 0;;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size == 0 ? 0 : (RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size * 16);
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen = TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis == 0 ? 1 : 0;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : 1;
|
||||
((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : (TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size * 16);
|
||||
((IFX_PTM_CFG_T *)data)->RxEthCrcPresent = 1;
|
||||
((IFX_PTM_CFG_T *)data)->RxEthCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_eth_fcs_ver_dis == 0 ? 1 : 0;
|
||||
((IFX_PTM_CFG_T *)data)->RxTcCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis == 0 ? 1 : 0;;
|
||||
((IFX_PTM_CFG_T *)data)->RxTcCrcLen = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size == 0 ? 0 : (RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size * 16);
|
||||
((IFX_PTM_CFG_T *)data)->TxEthCrcGen = TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis == 0 ? 1 : 0;
|
||||
((IFX_PTM_CFG_T *)data)->TxTcCrcGen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : 1;
|
||||
((IFX_PTM_CFG_T *)data)->TxTcCrcLen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : (TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size * 16);
|
||||
break;
|
||||
case IFX_PTM_CFG_SET:
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < 4; i++ ) {
|
||||
RX_GAMMA_ITF_CFG(i)->rx_eth_fcs_ver_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck ? 0 : 1;
|
||||
RX_GAMMA_ITF_CFG(i)->rx_eth_fcs_ver_dis = ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck ? 0 : 1;
|
||||
|
||||
RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck ? 0 : 1;
|
||||
RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis = ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck ? 0 : 1;
|
||||
|
||||
switch ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen ) {
|
||||
switch ( ((IFX_PTM_CFG_T *)data)->RxTcCrcLen ) {
|
||||
case 16: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 1; break;
|
||||
case 32: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 2; break;
|
||||
default: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 0;
|
||||
}
|
||||
|
||||
TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen ? 0 : 1;
|
||||
TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis = ((IFX_PTM_CFG_T *)data)->TxEthCrcGen ? 0 : 1;
|
||||
|
||||
if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen ) {
|
||||
switch ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen ) {
|
||||
if ( ((IFX_PTM_CFG_T *)data)->TxTcCrcGen ) {
|
||||
switch ( ((IFX_PTM_CFG_T *)data)->TxTcCrcLen ) {
|
||||
case 16: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 1; break;
|
||||
case 32: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 2; break;
|
||||
default: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 0;
|
||||
@@ -440,7 +440,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
struct ppe_prio_q_map cmd;
|
||||
|
||||
if ( copy_from_user(&cmd, ifr->ifr_data, sizeof(cmd)) )
|
||||
if ( copy_from_user(&cmd, data, sizeof(cmd)) )
|
||||
return -EFAULT;
|
||||
|
||||
if ( cmd.pkt_prio < 0 || cmd.pkt_prio >= ARRAY_SIZE(g_ptm_prio_queue_map) )
|
||||
|
||||
@@ -804,6 +804,7 @@ define KernelPackage/mtdtests
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_speedtest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_stresstest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_subpagetest.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_test.ko \
|
||||
$(LINUX_DIR)/drivers/mtd/tests/mtd_torturetest.ko
|
||||
endef
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=6.1.97-1
|
||||
PKG_VERSION:=6.1.110-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.97/
|
||||
PKG_HASH:=8e9ae2d02f373252dd61f5c6a81c88eec67ca773464d9ef3d844752dc6775540
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.110/
|
||||
PKG_HASH:=2415bc529ca25be0aa597f9638d8b6fc4138080bbaea96881a38101896df6703
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
@@ -299,9 +299,6 @@ define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(PKG_UNPACK)
|
||||
$(Build/Patch)
|
||||
rm -rf \
|
||||
$(PKG_BUILD_DIR)/include/linux/ssb \
|
||||
$(PKG_BUILD_DIR)/include/linux/bcma
|
||||
|
||||
rm -f \
|
||||
$(PKG_BUILD_DIR)/include/linux/mhi.h \
|
||||
|
||||
@@ -20,7 +20,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6418,18 +6418,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6425,18 +6425,16 @@ static int ath11k_mac_op_add_interface(s
|
||||
|
||||
ath11k_dp_vdev_tx_attach(ar, arvif);
|
||||
|
||||
@@ -42,7 +42,7 @@ Link: https://lore.kernel.org/r/20221006005842.8599-1-quic_periyasa@quicinc.com
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
|
||||
return 0;
|
||||
@@ -6454,7 +6452,6 @@ err_vdev_del:
|
||||
@@ -6461,7 +6459,6 @@ err_vdev_del:
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
err:
|
||||
|
||||
@@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20221007051130.6067-1-quic_mpubbise@quicinc.com
|
||||
|
||||
exit:
|
||||
kfree(arg.chan_list);
|
||||
@@ -9065,6 +9087,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9072,6 +9094,9 @@ static int __ath11k_mac_register(struct
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6230,6 +6230,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
@@ -6237,6 +6237,40 @@ void ath11k_mac_11d_scan_stop_all(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6465,10 +6499,7 @@ err_peer_del:
|
||||
@@ -6472,10 +6506,7 @@ err_peer_del:
|
||||
}
|
||||
|
||||
err_vdev_del:
|
||||
@@ -74,7 +74,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
list_del(&arvif->list);
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
@@ -6496,7 +6527,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6503,7 +6534,6 @@ static void ath11k_mac_op_remove_interfa
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -6517,29 +6547,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6524,29 +6554,13 @@ static void ath11k_mac_op_remove_interfa
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
struct ath11k_hw_ops {
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8007,6 +8007,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8014,6 +8014,7 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
int recovery_count;
|
||||
@@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com
|
||||
|
||||
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
|
||||
return;
|
||||
@@ -8042,6 +8043,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
@@ -8049,6 +8050,12 @@ ath11k_mac_op_reconfig_complete(struct i
|
||||
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com
|
||||
if (changed & BSS_CHANGED_FILS_DISCOVERY ||
|
||||
changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP)
|
||||
ath11k_mac_fils_discovery(arvif, info);
|
||||
@@ -9118,6 +9132,10 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9125,6 +9139,10 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
ath11k_control_beaconing(arvif, info);
|
||||
|
||||
if (arvif->is_up && vif->bss_conf.he_support &&
|
||||
@@ -5389,6 +5512,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5388,6 +5511,10 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
@@ -190,7 +190,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
|
||||
he_cap_elem->phy_cap_info[5] &=
|
||||
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
|
||||
@@ -6023,69 +6150,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6030,69 +6157,6 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
@@ -6754,7 +6818,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6761,7 +6825,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct wmi_vdev_start_req_arg arg = {};
|
||||
const struct cfg80211_chan_def *chandef = &ctx->def;
|
||||
@@ -268,7 +268,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@q
|
||||
int ret = 0;
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
@@ -6795,15 +6858,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6802,15 +6865,6 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
spin_lock_bh(&ab->base_lock);
|
||||
arg.regdomain = ar->ab->dfs_region;
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
@@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5480,6 +5480,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
@@ -5479,6 +5479,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
|
||||
return cpu_to_le16(bcap->he_6ghz_capa);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@q
|
||||
static int ath11k_mac_copy_he_cap(struct ath11k *ar,
|
||||
struct ath11k_pdev_cap *cap,
|
||||
struct ieee80211_sband_iftype_data *data,
|
||||
@@ -5541,18 +5562,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5540,18 +5561,7 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/1666128501-12364-5-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5485,20 +5485,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
@@ -5484,20 +5484,36 @@ static void ath11k_mac_set_hemcsmap(stru
|
||||
struct ieee80211_sta_he_cap *he_cap,
|
||||
int band)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20221219053844.4084486-1-quic_mkenna@quicinc.com
|
||||
static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9179,6 +9179,11 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9186,6 +9186,11 @@ static int __ath11k_mac_register(struct
|
||||
goto err_free_if_combs;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/20230309164434.32660-1-quic_hprem@quicinc.com
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3038,39 +3015,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
@@ -3037,39 +3014,51 @@ static int ath11k_dp_rx_reap_mon_status_
|
||||
|
||||
spin_lock_bh(&rx_ring->idr_lock);
|
||||
skb = idr_find(&rx_ring->bufs_idr, buf_id);
|
||||
|
||||
@@ -106,7 +106,7 @@ Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com
|
||||
(vif->type == NL80211_IFTYPE_AP ||
|
||||
vif->type == NL80211_IFTYPE_MESH_POINT)) {
|
||||
arvif->ftm_responder = info->ftm_responder;
|
||||
@@ -9239,7 +9239,7 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9246,7 +9246,7 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20230328071150.29645-1-quic_tamizhr@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6682,6 +6682,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
@@ -6689,6 +6689,11 @@ static void ath11k_mac_op_remove_interfa
|
||||
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n",
|
||||
arvif->vdev_id);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3115,8 +3115,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
@@ -3114,8 +3114,11 @@ int ath11k_peer_rx_frag_setup(struct ath
|
||||
int i;
|
||||
|
||||
tfm = crypto_alloc_shash("michael_mic", 0, 0);
|
||||
|
||||
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -3607,7 +3607,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
@@ -3606,7 +3606,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Link: https://lore.kernel.org/r/1681762947-13882-1-git-send-email-quic_msinada@q
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5582,10 +5582,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
@@ -5581,10 +5581,6 @@ static int ath11k_mac_copy_he_cap(struct
|
||||
|
||||
he_cap_elem->mac_cap_info[1] &=
|
||||
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
|
||||
|
||||
@@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
#define ATH11K_QUEUE_LEN 4096
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -9006,19 +9006,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
@@ -9013,19 +9013,23 @@ static int ath11k_mac_setup_iface_combin
|
||||
|
||||
static const u8 ath11k_if_types_ext_capa[] = {
|
||||
[0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
|
||||
@@ -80,7 +80,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-2-quic_alokad@quicinc.com
|
||||
};
|
||||
|
||||
static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = {
|
||||
@@ -9256,6 +9260,9 @@ static int __ath11k_mac_register(struct
|
||||
@@ -9263,6 +9267,9 @@ static int __ath11k_mac_register(struct
|
||||
wiphy_ext_feature_set(ar->hw->wiphy,
|
||||
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -6178,17 +6178,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
@@ -6185,17 +6185,62 @@ static void ath11k_mac_op_stop(struct ie
|
||||
atomic_set(&ar->num_pending_mgmt_tx, 0);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
|
||||
params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
|
||||
@@ -6203,6 +6248,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
@@ -6210,6 +6255,7 @@ ath11k_mac_setup_vdev_create_params(stru
|
||||
params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
|
||||
params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
}
|
||||
|
||||
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
|
||||
@@ -6497,7 +6543,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
@@ -6504,7 +6550,12 @@ static int ath11k_mac_op_add_interface(s
|
||||
for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
|
||||
vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
|
||||
|
||||
@@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-3-quic_alokad@quicinc.com
|
||||
|
||||
ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
|
||||
if (ret) {
|
||||
@@ -6902,6 +6953,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
@@ -6909,6 +6960,17 @@ ath11k_mac_vdev_start_restart(struct ath
|
||||
arg.pref_tx_streams = ar->num_tx_chains;
|
||||
arg.pref_rx_streams = ar->num_rx_chains;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7130,7 +7138,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7137,7 +7145,8 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
int n_vifs)
|
||||
{
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
@@ -73,7 +73,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
int ret;
|
||||
int i;
|
||||
bool monitor_vif = false;
|
||||
@@ -7184,8 +7193,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
@@ -7191,8 +7200,15 @@ ath11k_mac_update_vif_chan(struct ath11k
|
||||
ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
|
||||
ret);
|
||||
|
||||
@@ -90,7 +90,7 @@ Link: https://lore.kernel.org/r/20230405221648.17950-5-quic_alokad@quicinc.com
|
||||
if (ret) {
|
||||
ath11k_warn(ab, "failed to bring vdev up %d: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
@@ -7303,7 +7319,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
@@ -7310,7 +7326,8 @@ static int ath11k_start_vdev_delay(struc
|
||||
}
|
||||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
|
||||
|
||||
@@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
*/
|
||||
|
||||
#include <net/mac80211.h>
|
||||
@@ -4335,6 +4335,20 @@ exit:
|
||||
@@ -4334,6 +4334,20 @@ exit:
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -52,7 +52,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-2-quic_mkenna@quicinc.com
|
||||
ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
@@ -7788,20 +7802,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
@@ -7795,20 +7809,6 @@ static void ath11k_mac_op_flush(struct i
|
||||
ath11k_mac_flush_tx_complete(ar);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -4477,6 +4477,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
@@ -4476,6 +4476,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
static int ath11k_station_assoc(struct ath11k *ar,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -4488,7 +4536,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4487,7 +4535,7 @@ static int ath11k_station_assoc(struct a
|
||||
struct cfg80211_chan_def def;
|
||||
enum nl80211_band band;
|
||||
struct cfg80211_bitrate_mask *mask;
|
||||
@@ -91,7 +91,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -4516,6 +4564,7 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4515,6 +4563,7 @@ static int ath11k_station_assoc(struct a
|
||||
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask);
|
||||
@@ -99,7 +99,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
|
||||
/* If single VHT/HE rate is configured (by set_bitrate_mask()),
|
||||
* peer_assoc will disable VHT/HE. This is now enabled by a peer specific
|
||||
@@ -4532,6 +4581,11 @@ static int ath11k_station_assoc(struct a
|
||||
@@ -4531,6 +4580,11 @@ static int ath11k_station_assoc(struct a
|
||||
band);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -111,7 +111,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
}
|
||||
|
||||
/* Re-assoc is run only to update supported rates for given station. It
|
||||
@@ -4605,7 +4659,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4604,7 +4658,7 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
const u16 *vht_mcs_mask;
|
||||
const u16 *he_mcs_mask;
|
||||
u32 changed, bw, nss, smps, bw_prev;
|
||||
@@ -120,7 +120,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
const struct cfg80211_bitrate_mask *mask;
|
||||
struct peer_assoc_params peer_arg;
|
||||
enum wmi_phy_mode peer_phymode;
|
||||
@@ -4721,6 +4775,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4720,6 +4774,8 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
|
||||
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
|
||||
mask = &arvif->bitrate_mask;
|
||||
@@ -129,7 +129,7 @@ Link: https://lore.kernel.org/r/20230504092033.3542456-3-quic_mkenna@quicinc.com
|
||||
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
|
||||
mask);
|
||||
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
|
||||
@@ -4743,6 +4799,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
@@ -4742,6 +4798,9 @@ static void ath11k_sta_rc_update_wk(stru
|
||||
} else if (sta->deflink.he_cap.has_he && num_he_rates == 1) {
|
||||
ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
|
||||
band);
|
||||
|
||||
@@ -226,7 +226,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
|
||||
if (pdev && pdev->pdev_id == pdev_id)
|
||||
return (pdev->ar ? pdev->ar : NULL);
|
||||
@@ -6268,6 +6271,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6275,6 +6278,11 @@ static int ath11k_mac_op_start(struct ie
|
||||
struct ath11k_pdev *pdev = ar->pdev;
|
||||
int ret;
|
||||
|
||||
@@ -238,7 +238,7 @@ Link: https://lore.kernel.org/r/20230517135934.16408-4-quic_rajkbhag@quicinc.com
|
||||
ath11k_mac_drain_tx(ar);
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
@@ -6282,6 +6290,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
@@ -6289,6 +6297,7 @@ static int ath11k_mac_op_start(struct ie
|
||||
case ATH11K_STATE_RESTARTED:
|
||||
case ATH11K_STATE_WEDGED:
|
||||
case ATH11K_STATE_ON:
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -462,43 +462,6 @@ USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
USB_RTL8153_ECM=
|
||||
-SSB_POSSIBLE=
|
||||
-SSB=
|
||||
-SSB_SPROM=
|
||||
-SSB_BLOCKIO=
|
||||
-SSB_PCIHOST_POSSIBLE=
|
||||
-SSB_PCIHOST=
|
||||
-SSB_B43_PCI_BRIDGE=
|
||||
-SSB_PCMCIAHOST_POSSIBLE=
|
||||
-SSB_PCMCIAHOST=
|
||||
-SSB_SDIOHOST_POSSIBLE=
|
||||
-SSB_SDIOHOST=
|
||||
-SSB_HOST_SOC=
|
||||
-SSB_SERIAL=
|
||||
-SSB_DRIVER_PCICORE_POSSIBLE=
|
||||
-SSB_DRIVER_PCICORE=
|
||||
-SSB_PCICORE_HOSTMODE=
|
||||
-SSB_DRIVER_MIPS=
|
||||
-SSB_SFLASH=
|
||||
-SSB_EMBEDDED=
|
||||
-SSB_DRIVER_EXTIF=
|
||||
-SSB_DRIVER_GIGE=
|
||||
-SSB_DRIVER_GPIO=
|
||||
-BCMA_POSSIBLE=
|
||||
-BCMA=
|
||||
-BCMA_BLOCKIO=
|
||||
-BCMA_HOST_PCI_POSSIBLE=
|
||||
-BCMA_HOST_PCI=
|
||||
-BCMA_HOST_SOC=
|
||||
-BCMA_DRIVER_PCI=
|
||||
-BCMA_DRIVER_PCI_HOSTMODE=
|
||||
-BCMA_DRIVER_MIPS=
|
||||
-BCMA_PFLASH=
|
||||
-BCMA_SFLASH=
|
||||
-BCMA_NFLASH=
|
||||
-BCMA_DRIVER_GMAC_CMN=
|
||||
-BCMA_DRIVER_GPIO=
|
||||
-BCMA_DEBUG=
|
||||
USB_ACM=
|
||||
USB_PRINTER=
|
||||
USB_WDM=
|
||||
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
@@ -63,21 +63,21 @@ endchoice
|
||||
config B43_PCI_AUTOSELECT
|
||||
bool
|
||||
depends on B43 && SSB_PCIHOST_POSSIBLE
|
||||
- select SSB_PCIHOST
|
||||
- select SSB_B43_PCI_BRIDGE
|
||||
+ depends on SSB_PCIHOST
|
||||
+ depends on SSB_B43_PCI_BRIDGE
|
||||
default y
|
||||
|
||||
# Auto-select SSB PCICORE driver, if possible
|
||||
config B43_PCICORE_AUTOSELECT
|
||||
bool
|
||||
depends on B43 && SSB_DRIVER_PCICORE_POSSIBLE
|
||||
- select SSB_DRIVER_PCICORE
|
||||
+ depends on SSB_DRIVER_PCICORE
|
||||
default y
|
||||
|
||||
config B43_SDIO
|
||||
bool "Broadcom 43xx SDIO device support"
|
||||
depends on B43 && B43_SSB && SSB_SDIOHOST_POSSIBLE
|
||||
- select SSB_SDIOHOST
|
||||
+ depends on SSB_SDIOHOST
|
||||
help
|
||||
Broadcom 43xx device support for Soft-MAC SDIO devices.
|
||||
|
||||
@@ -96,13 +96,13 @@ config B43_SDIO
|
||||
config B43_BCMA_PIO
|
||||
bool
|
||||
depends on B43 && B43_BCMA
|
||||
- select BCMA_BLOCKIO
|
||||
+ depends on BCMA_BLOCKIO
|
||||
default y
|
||||
|
||||
config B43_PIO
|
||||
bool
|
||||
depends on B43 && B43_SSB
|
||||
- select SSB_BLOCKIO
|
||||
+ depends on SSB_BLOCKIO
|
||||
default y
|
||||
|
||||
config B43_PHY_G
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -2854,7 +2854,7 @@ static struct ssb_device *b43_ssb_gpio_d
|
||||
{
|
||||
struct ssb_bus *bus = dev->dev->sdev->bus;
|
||||
|
||||
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
|
||||
#else
|
||||
return bus->chipco.dev;
|
||||
@@ -4873,7 +4873,7 @@ static int b43_wireless_core_init(struct
|
||||
}
|
||||
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
|
||||
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
|
||||
-#if defined(CPTCFG_B43_SSB) && defined(CPTCFG_SSB_DRIVER_PCICORE)
|
||||
+#if defined(CPTCFG_B43_SSB) && defined(CONFIG_SSB_DRIVER_PCICORE)
|
||||
if (dev->dev->bus_type == B43_BUS_SSB &&
|
||||
dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI &&
|
||||
dev->dev->sdev->bus->pcicore.dev->id.revision <= 10)
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/Kconfig
|
||||
@@ -3,7 +3,7 @@ config B43LEGACY
|
||||
tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)"
|
||||
depends on m
|
||||
depends on SSB_POSSIBLE && MAC80211 && HAS_DMA
|
||||
- select SSB
|
||||
+ depends on SSB
|
||||
depends on FW_LOADER
|
||||
help
|
||||
b43legacy is a driver for 802.11b devices from Broadcom (BCM4301 and
|
||||
@@ -25,15 +25,15 @@ config B43LEGACY
|
||||
config B43LEGACY_PCI_AUTOSELECT
|
||||
bool
|
||||
depends on B43LEGACY && SSB_PCIHOST_POSSIBLE
|
||||
- select SSB_PCIHOST
|
||||
- select SSB_B43_PCI_BRIDGE
|
||||
+ depends on SSB_PCIHOST
|
||||
+ depends on SSB_B43_PCI_BRIDGE
|
||||
default y
|
||||
|
||||
# Auto-select SSB PCICORE driver, if possible
|
||||
config B43LEGACY_PCICORE_AUTOSELECT
|
||||
bool
|
||||
depends on B43LEGACY && SSB_DRIVER_PCICORE_POSSIBLE
|
||||
- select SSB_DRIVER_PCICORE
|
||||
+ depends on SSB_DRIVER_PCICORE
|
||||
default y
|
||||
|
||||
# LED support
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
@@ -1907,7 +1907,7 @@ static int b43legacy_gpio_init(struct b4
|
||||
if (dev->dev->id.revision >= 2)
|
||||
mask |= 0x0010; /* FIXME: This is redundant. */
|
||||
|
||||
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||
pcidev = bus->pcicore.dev;
|
||||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
@@ -1926,7 +1926,7 @@ static void b43legacy_gpio_cleanup(struc
|
||||
struct ssb_bus *bus = dev->dev->bus;
|
||||
struct ssb_device *gpiodev, *pcidev = NULL;
|
||||
|
||||
-#ifdef CPTCFG_SSB_DRIVER_PCICORE
|
||||
+#ifdef CONFIG_SSB_DRIVER_PCICORE
|
||||
pcidev = bus->pcicore.dev;
|
||||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||
depends on m
|
||||
depends on MAC80211
|
||||
depends on BCMA_POSSIBLE
|
||||
- select BCMA
|
||||
+ depends on BCMA
|
||||
select BRCMUTIL
|
||||
depends on FW_LOADER
|
||||
depends on CORDIC
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1390,117 +1390,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
config BACKPORTED_USB_RTL8153_ECM
|
||||
tristate
|
||||
default USB_RTL8153_ECM
|
||||
-config BACKPORTED_SSB_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_POSSIBLE
|
||||
-config BACKPORTED_SSB
|
||||
- tristate
|
||||
- default SSB
|
||||
-config BACKPORTED_SSB_SPROM
|
||||
- tristate
|
||||
- default SSB_SPROM
|
||||
-config BACKPORTED_SSB_BLOCKIO
|
||||
- tristate
|
||||
- default SSB_BLOCKIO
|
||||
-config BACKPORTED_SSB_PCIHOST_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_PCIHOST_POSSIBLE
|
||||
-config BACKPORTED_SSB_PCIHOST
|
||||
- tristate
|
||||
- default SSB_PCIHOST
|
||||
-config BACKPORTED_SSB_B43_PCI_BRIDGE
|
||||
- tristate
|
||||
- default SSB_B43_PCI_BRIDGE
|
||||
-config BACKPORTED_SSB_PCMCIAHOST_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_PCMCIAHOST_POSSIBLE
|
||||
-config BACKPORTED_SSB_PCMCIAHOST
|
||||
- tristate
|
||||
- default SSB_PCMCIAHOST
|
||||
-config BACKPORTED_SSB_SDIOHOST_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_SDIOHOST_POSSIBLE
|
||||
-config BACKPORTED_SSB_SDIOHOST
|
||||
- tristate
|
||||
- default SSB_SDIOHOST
|
||||
-config BACKPORTED_SSB_HOST_SOC
|
||||
- tristate
|
||||
- default SSB_HOST_SOC
|
||||
-config BACKPORTED_SSB_SERIAL
|
||||
- tristate
|
||||
- default SSB_SERIAL
|
||||
-config BACKPORTED_SSB_DRIVER_PCICORE_POSSIBLE
|
||||
- tristate
|
||||
- default SSB_DRIVER_PCICORE_POSSIBLE
|
||||
-config BACKPORTED_SSB_DRIVER_PCICORE
|
||||
- tristate
|
||||
- default SSB_DRIVER_PCICORE
|
||||
-config BACKPORTED_SSB_PCICORE_HOSTMODE
|
||||
- tristate
|
||||
- default SSB_PCICORE_HOSTMODE
|
||||
-config BACKPORTED_SSB_DRIVER_MIPS
|
||||
- tristate
|
||||
- default SSB_DRIVER_MIPS
|
||||
-config BACKPORTED_SSB_SFLASH
|
||||
- tristate
|
||||
- default SSB_SFLASH
|
||||
-config BACKPORTED_SSB_EMBEDDED
|
||||
- tristate
|
||||
- default SSB_EMBEDDED
|
||||
-config BACKPORTED_SSB_DRIVER_EXTIF
|
||||
- tristate
|
||||
- default SSB_DRIVER_EXTIF
|
||||
-config BACKPORTED_SSB_DRIVER_GIGE
|
||||
- tristate
|
||||
- default SSB_DRIVER_GIGE
|
||||
-config BACKPORTED_SSB_DRIVER_GPIO
|
||||
- tristate
|
||||
- default SSB_DRIVER_GPIO
|
||||
-config BACKPORTED_BCMA_POSSIBLE
|
||||
- tristate
|
||||
- default BCMA_POSSIBLE
|
||||
-config BACKPORTED_BCMA
|
||||
- tristate
|
||||
- default BCMA
|
||||
-config BACKPORTED_BCMA_BLOCKIO
|
||||
- tristate
|
||||
- default BCMA_BLOCKIO
|
||||
-config BACKPORTED_BCMA_HOST_PCI_POSSIBLE
|
||||
- tristate
|
||||
- default BCMA_HOST_PCI_POSSIBLE
|
||||
-config BACKPORTED_BCMA_HOST_PCI
|
||||
- tristate
|
||||
- default BCMA_HOST_PCI
|
||||
-config BACKPORTED_BCMA_HOST_SOC
|
||||
- tristate
|
||||
- default BCMA_HOST_SOC
|
||||
-config BACKPORTED_BCMA_DRIVER_PCI
|
||||
- tristate
|
||||
- default BCMA_DRIVER_PCI
|
||||
-config BACKPORTED_BCMA_DRIVER_PCI_HOSTMODE
|
||||
- tristate
|
||||
- default BCMA_DRIVER_PCI_HOSTMODE
|
||||
-config BACKPORTED_BCMA_DRIVER_MIPS
|
||||
- tristate
|
||||
- default BCMA_DRIVER_MIPS
|
||||
-config BACKPORTED_BCMA_PFLASH
|
||||
- tristate
|
||||
- default BCMA_PFLASH
|
||||
-config BACKPORTED_BCMA_SFLASH
|
||||
- tristate
|
||||
- default BCMA_SFLASH
|
||||
-config BACKPORTED_BCMA_NFLASH
|
||||
- tristate
|
||||
- default BCMA_NFLASH
|
||||
-config BACKPORTED_BCMA_DRIVER_GMAC_CMN
|
||||
- tristate
|
||||
- default BCMA_DRIVER_GMAC_CMN
|
||||
-config BACKPORTED_BCMA_DRIVER_GPIO
|
||||
- tristate
|
||||
- default BCMA_DRIVER_GPIO
|
||||
-config BACKPORTED_BCMA_DEBUG
|
||||
- tristate
|
||||
- default BCMA_DEBUG
|
||||
config BACKPORTED_USB_ACM
|
||||
tristate
|
||||
default USB_ACM
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/K
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
|
||||
-source "$BACKPORT_DIR/drivers/ssb/Kconfig"
|
||||
-source "$BACKPORT_DIR/drivers/bcma/Kconfig"
|
||||
-
|
||||
source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
|
||||
|
||||
source "$BACKPORT_DIR/drivers/staging/Kconfig"
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -42,8 +42,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||
obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
|
||||
|
||||
obj-$(CPTCFG_USB_WDM) += drivers/usb/class/
|
||||
@@ -1,13 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ifndef __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+#define __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+
|
||||
+#include_next <linux/bcma/bcma_driver_chipcommon.h>
|
||||
+
|
||||
+#ifndef BCMA_CC_SROM_CONTROL_OTP_PRESENT
|
||||
+#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -339,6 +339,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
@@ -341,6 +341,7 @@ RT2X00_LIB_FIRMWARE=
|
||||
RT2X00_LIB_CRYPTO=
|
||||
RT2X00_LIB_LEDS=
|
||||
RT2X00_LIB_DEBUGFS=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1111,15 +1111,30 @@ config BACKPORTED_RTW88_CORE
|
||||
@@ -1117,15 +1117,30 @@ config BACKPORTED_RTW88_CORE
|
||||
config BACKPORTED_RTW88_PCI
|
||||
tristate
|
||||
default RTW88_PCI
|
||||
@@ -45,11 +45,11 @@
|
||||
CPTCFG_RTW88_8822CE=m
|
||||
+CPTCFG_RTW88_8822CU=m
|
||||
CPTCFG_RTW88=m
|
||||
CPTCFG_SSB=m
|
||||
CPTCFG_SSB_PCMCIAHOST=y
|
||||
CPTCFG_RTW89=m
|
||||
CPTCFG_RTW89_8852AE=m
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -367,13 +367,18 @@ RTL8XXXU_UNTESTED=
|
||||
@@ -369,13 +369,18 @@ RTL8XXXU_UNTESTED=
|
||||
RTW88=
|
||||
RTW88_CORE=
|
||||
RTW88_PCI=
|
||||
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] mac80211: allow scans in access point mode (for site survey)
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2733,6 +2733,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
@@ -2734,6 +2734,8 @@ static int ieee80211_scan(struct wiphy *
|
||||
*/
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.remove_interface = ar5523_remove_interface,
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -8592,6 +8592,7 @@ err_fallback:
|
||||
@@ -8599,6 +8599,7 @@ err_fallback:
|
||||
|
||||
static const struct ieee80211_ops ath11k_ops = {
|
||||
.tx = ath11k_mac_op_tx,
|
||||
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4357,9 +4357,6 @@ static int ieee80211_get_txq_stats(struc
|
||||
@@ -4359,9 +4359,6 @@ static int ieee80211_get_txq_stats(struc
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
int ret = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -677,8 +677,7 @@ static void add_common_files(struct ieee
|
||||
@@ -675,8 +675,7 @@ static void add_common_files(struct ieee
|
||||
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
|
||||
DEBUGFS_ADD(hw_queues);
|
||||
|
||||
@@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NL80211_EXT_FEATURE_AQL))
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2300,7 +2300,6 @@ void ieee80211_wake_queue_by_reason(stru
|
||||
@@ -2301,7 +2301,6 @@ void ieee80211_wake_queue_by_reason(stru
|
||||
void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
|
||||
enum queue_stop_reason reason,
|
||||
bool refcounted);
|
||||
@@ -73,7 +73,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void ieee80211_add_pending_skbs(struct ieee80211_local *local,
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -460,12 +460,6 @@ static void ieee80211_do_stop(struct iee
|
||||
@@ -481,12 +481,6 @@ static void ieee80211_do_stop(struct iee
|
||||
if (cancel_scan)
|
||||
ieee80211_scan_cancel(local);
|
||||
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
ieee80211_roc_purge(local, sdata);
|
||||
|
||||
switch (sdata->vif.type) {
|
||||
@@ -813,25 +807,6 @@ static void ieee80211_uninit(struct net_
|
||||
@@ -834,25 +828,6 @@ static void ieee80211_uninit(struct net_
|
||||
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static void
|
||||
ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
@@ -845,7 +820,6 @@ static const struct net_device_ops ieee8
|
||||
@@ -866,7 +841,6 @@ static const struct net_device_ops ieee8
|
||||
.ndo_start_xmit = ieee80211_subif_start_xmit,
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
};
|
||||
|
||||
@@ -967,7 +941,6 @@ static const struct net_device_ops ieee8
|
||||
@@ -988,7 +962,6 @@ static const struct net_device_ops ieee8
|
||||
.ndo_start_xmit = ieee80211_subif_start_xmit_8023,
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
@@ -128,7 +128,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
@@ -1471,35 +1444,6 @@ int ieee80211_do_open(struct wireless_de
|
||||
@@ -1492,35 +1465,6 @@ int ieee80211_do_open(struct wireless_de
|
||||
|
||||
ieee80211_recalc_ps(local);
|
||||
|
||||
@@ -164,7 +164,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
set_bit(SDATA_STATE_RUNNING, &sdata->state);
|
||||
|
||||
return 0;
|
||||
@@ -1529,17 +1473,12 @@ static void ieee80211_if_setup(struct ne
|
||||
@@ -1550,17 +1494,12 @@ static void ieee80211_if_setup(struct ne
|
||||
{
|
||||
ether_setup(dev);
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
@@ -183,7 +183,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static void ieee80211_iface_process_skb(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct sk_buff *skb)
|
||||
@@ -2124,9 +2063,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2145,9 +2084,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
struct net_device *ndev = NULL;
|
||||
struct ieee80211_sub_if_data *sdata = NULL;
|
||||
struct txq_info *txqi;
|
||||
@@ -193,7 +193,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@@ -2149,30 +2086,18 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2170,30 +2107,18 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
sizeof(void *));
|
||||
int txq_size = 0;
|
||||
|
||||
@@ -228,7 +228,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -627,7 +627,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -634,7 +634,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
|
||||
if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config ||
|
||||
!ops->add_interface || !ops->remove_interface ||
|
||||
@@ -237,7 +237,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return NULL;
|
||||
|
||||
if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
|
||||
@@ -716,9 +716,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -723,9 +723,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
if (!ops->set_key)
|
||||
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
@@ -248,7 +248,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM);
|
||||
|
||||
wiphy->bss_priv_size = sizeof(struct ieee80211_bss);
|
||||
@@ -831,10 +829,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -838,10 +836,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
atomic_set(&local->agg_queue_stop[i], 0);
|
||||
}
|
||||
tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending);
|
||||
@@ -317,7 +317,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
int i;
|
||||
|
||||
sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
|
||||
@@ -600,21 +599,18 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -603,21 +602,18 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
|
||||
sta->last_connected = ktime_get_seconds();
|
||||
|
||||
@@ -348,7 +348,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
if (sta_prepare_rate_control(local, sta, gfp))
|
||||
@@ -688,8 +684,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
@@ -691,8 +687,7 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
return sta;
|
||||
|
||||
free_txq:
|
||||
@@ -358,7 +358,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
free:
|
||||
sta_info_free_link(&sta->deflink);
|
||||
#ifdef CPTCFG_MAC80211_MESH
|
||||
@@ -1965,9 +1960,6 @@ ieee80211_sta_ps_deliver_response(struct
|
||||
@@ -1982,9 +1977,6 @@ ieee80211_sta_ps_deliver_response(struct
|
||||
* TIM recalculation.
|
||||
*/
|
||||
|
||||
@@ -368,7 +368,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
|
||||
if (!sta->sta.txq[tid] ||
|
||||
!(driver_release_tids & BIT(tid)) ||
|
||||
@@ -2452,7 +2444,7 @@ static void sta_set_tidstats(struct sta_
|
||||
@@ -2469,7 +2461,7 @@ static void sta_set_tidstats(struct sta_
|
||||
tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid];
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
spin_lock_bh(&local->fq.lock);
|
||||
rcu_read_lock();
|
||||
|
||||
@@ -2780,9 +2772,6 @@ unsigned long ieee80211_sta_last_active(
|
||||
@@ -2797,9 +2789,6 @@ unsigned long ieee80211_sta_last_active(
|
||||
|
||||
static void sta_update_codel_params(struct sta_info *sta, u32 thr)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -2197,6 +2197,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
@@ -2218,6 +2218,7 @@ int ieee80211_if_add(struct ieee80211_lo
|
||||
ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
ndev->hw_features |= ndev->features &
|
||||
MAC80211_SUPPORTED_FEATURES_TX;
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 1 Dec 2022 14:57:30 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix and simplify unencrypted drop check for
|
||||
mesh
|
||||
|
||||
ieee80211_drop_unencrypted is called from ieee80211_rx_h_mesh_fwding and
|
||||
ieee80211_frame_allowed.
|
||||
|
||||
Since ieee80211_rx_h_mesh_fwding can forward packets for other mesh nodes
|
||||
and is called earlier, it needs to check the decryptions status and if the
|
||||
packet is using the control protocol on its own, instead of deferring to
|
||||
the later call from ieee80211_frame_allowed.
|
||||
|
||||
Because of that, ieee80211_drop_unencrypted has a mesh specific check
|
||||
that skips over the mesh header in order to check the payload protocol.
|
||||
This code is invalid when called from ieee80211_frame_allowed, since that
|
||||
happens after the 802.11->802.3 conversion.
|
||||
|
||||
Fix this by moving the mesh specific check directly into
|
||||
ieee80211_rx_h_mesh_fwding.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
Link: https://lore.kernel.org/r/20221201135730.19723-1-nbd@nbd.name
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2405,7 +2405,6 @@ static int ieee80211_802_1x_port_control
|
||||
|
||||
static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
||||
{
|
||||
- struct ieee80211_hdr *hdr = (void *)rx->skb->data;
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
|
||||
@@ -2416,31 +2415,6 @@ static int ieee80211_drop_unencrypted(st
|
||||
if (status->flag & RX_FLAG_DECRYPTED)
|
||||
return 0;
|
||||
|
||||
- /* check mesh EAPOL frames first */
|
||||
- if (unlikely(rx->sta && ieee80211_vif_is_mesh(&rx->sdata->vif) &&
|
||||
- ieee80211_is_data(fc))) {
|
||||
- struct ieee80211s_hdr *mesh_hdr;
|
||||
- u16 hdr_len = ieee80211_hdrlen(fc);
|
||||
- u16 ethertype_offset;
|
||||
- __be16 ethertype;
|
||||
-
|
||||
- if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr))
|
||||
- goto drop_check;
|
||||
-
|
||||
- /* make sure fixed part of mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb, hdr_len + 6))
|
||||
- goto drop_check;
|
||||
-
|
||||
- mesh_hdr = (struct ieee80211s_hdr *)(skb->data + hdr_len);
|
||||
- ethertype_offset = hdr_len + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
- sizeof(rfc1042_header);
|
||||
-
|
||||
- if (skb_copy_bits(rx->skb, ethertype_offset, ðertype, 2) == 0 &&
|
||||
- ethertype == rx->sdata->control_port_protocol)
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
-drop_check:
|
||||
/* Drop unencrypted frames if key is set. */
|
||||
if (unlikely(!ieee80211_has_protected(fc) &&
|
||||
!ieee80211_is_any_nullfunc(fc) &&
|
||||
@@ -2898,8 +2872,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
|
||||
- if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
|
||||
- return RX_DROP_MONITOR;
|
||||
+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control)) {
|
||||
+ int offset = hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
+ sizeof(rfc1042_header);
|
||||
+ __be16 ethertype;
|
||||
+
|
||||
+ if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr) ||
|
||||
+ skb_copy_bits(rx->skb, offset, ðertype, 2) != 0 ||
|
||||
+ ethertype != rx->sdata->control_port_protocol)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
|
||||
/* frame is in RMC, don't forward */
|
||||
if (ieee80211_is_data(hdr->frame_control) &&
|
||||
@@ -1,25 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 13:53:11 +0100
|
||||
Subject: [PATCH] wifi: cfg80211: move A-MSDU check in
|
||||
ieee80211_data_to_8023_exthdr
|
||||
|
||||
When parsing the outer A-MSDU header, don't check for inner bridge tunnel
|
||||
or RFC1042 headers. This is handled by ieee80211_amsdu_to_8023s already.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -631,8 +631,9 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
break;
|
||||
}
|
||||
|
||||
- if (likely(skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
- ((!is_amsdu && ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
+ if (likely(!is_amsdu &&
|
||||
+ skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
+ ((ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
payload.proto != htons(ETH_P_AARP) &&
|
||||
payload.proto != htons(ETH_P_IPX)) ||
|
||||
ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {
|
||||
@@ -1,76 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 13:54:15 +0100
|
||||
Subject: [PATCH] wifi: cfg80211: factor out bridge tunnel / RFC1042 header
|
||||
check
|
||||
|
||||
The same check is done in multiple places, unify it.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -542,6 +542,21 @@ unsigned int ieee80211_get_mesh_hdrlen(s
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
|
||||
|
||||
+static bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
+{
|
||||
+ const __be16 *hdr_proto = hdr + ETH_ALEN;
|
||||
+
|
||||
+ if (!(ether_addr_equal(hdr, rfc1042_header) &&
|
||||
+ *hdr_proto != htons(ETH_P_AARP) &&
|
||||
+ *hdr_proto != htons(ETH_P_IPX)) &&
|
||||
+ !ether_addr_equal(hdr, bridge_tunnel_header))
|
||||
+ return false;
|
||||
+
|
||||
+ *proto = *hdr_proto;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
u8 data_offset, bool is_amsdu)
|
||||
@@ -633,14 +648,9 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
|
||||
if (likely(!is_amsdu &&
|
||||
skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
- ((ether_addr_equal(payload.hdr, rfc1042_header) &&
|
||||
- payload.proto != htons(ETH_P_AARP) &&
|
||||
- payload.proto != htons(ETH_P_IPX)) ||
|
||||
- ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {
|
||||
- /* remove RFC1042 or Bridge-Tunnel encapsulation and
|
||||
- * replace EtherType */
|
||||
+ ieee80211_get_8023_tunnel_proto(&payload, &tmp.h_proto))) {
|
||||
+ /* remove RFC1042 or Bridge-Tunnel encapsulation */
|
||||
hdrlen += ETH_ALEN + 2;
|
||||
- tmp.h_proto = payload.proto;
|
||||
skb_postpull_rcsum(skb, &payload, ETH_ALEN + 2);
|
||||
} else {
|
||||
tmp.h_proto = htons(skb->len - hdrlen);
|
||||
@@ -756,8 +766,6 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
{
|
||||
unsigned int hlen = ALIGN(extra_headroom, 4);
|
||||
struct sk_buff *frame = NULL;
|
||||
- u16 ethertype;
|
||||
- u8 *payload;
|
||||
int offset = 0, remaining;
|
||||
struct ethhdr eth;
|
||||
bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
|
||||
@@ -811,14 +819,8 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
frame->dev = skb->dev;
|
||||
frame->priority = skb->priority;
|
||||
|
||||
- payload = frame->data;
|
||||
- ethertype = (payload[6] << 8) | payload[7];
|
||||
- if (likely((ether_addr_equal(payload, rfc1042_header) &&
|
||||
- ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
|
||||
- ether_addr_equal(payload, bridge_tunnel_header))) {
|
||||
- eth.h_proto = htons(ethertype);
|
||||
+ if (likely(ieee80211_get_8023_tunnel_proto(frame->data, ð.h_proto)))
|
||||
skb_pull(frame, ETH_ALEN + 2);
|
||||
- }
|
||||
|
||||
memcpy(skb_push(frame, sizeof(eth)), ð, sizeof(eth));
|
||||
__skb_queue_tail(list, frame);
|
||||
@@ -1,54 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 2 Dec 2022 17:01:46 +0100
|
||||
Subject: [PATCH] wifi: mac80211: remove mesh forwarding congestion check
|
||||
|
||||
Now that all drivers use iTXQ, it does not make sense to check to drop
|
||||
tx forwarding packets when the driver has stopped the queues.
|
||||
fq_codel will take care of dropping packets when the queues fill up
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/debugfs_netdev.c
|
||||
+++ b/net/mac80211/debugfs_netdev.c
|
||||
@@ -603,8 +603,6 @@ IEEE80211_IF_FILE(fwded_mcast, u.mesh.ms
|
||||
IEEE80211_IF_FILE(fwded_unicast, u.mesh.mshstats.fwded_unicast, DEC);
|
||||
IEEE80211_IF_FILE(fwded_frames, u.mesh.mshstats.fwded_frames, DEC);
|
||||
IEEE80211_IF_FILE(dropped_frames_ttl, u.mesh.mshstats.dropped_frames_ttl, DEC);
|
||||
-IEEE80211_IF_FILE(dropped_frames_congestion,
|
||||
- u.mesh.mshstats.dropped_frames_congestion, DEC);
|
||||
IEEE80211_IF_FILE(dropped_frames_no_route,
|
||||
u.mesh.mshstats.dropped_frames_no_route, DEC);
|
||||
|
||||
@@ -740,7 +738,6 @@ static void add_mesh_stats(struct ieee80
|
||||
MESHSTATS_ADD(fwded_frames);
|
||||
MESHSTATS_ADD(dropped_frames_ttl);
|
||||
MESHSTATS_ADD(dropped_frames_no_route);
|
||||
- MESHSTATS_ADD(dropped_frames_congestion);
|
||||
#undef MESHSTATS_ADD
|
||||
}
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -333,7 +333,6 @@ struct mesh_stats {
|
||||
__u32 fwded_frames; /* Mesh total forwarded frames */
|
||||
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
|
||||
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
|
||||
- __u32 dropped_frames_congestion;/* Not forwarded due to congestion */
|
||||
};
|
||||
|
||||
#define PREQ_Q_F_START 0x1
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2932,11 +2932,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
|
||||
return RX_CONTINUE;
|
||||
|
||||
ac = ieee802_1d_to_ac[skb->priority];
|
||||
- q = sdata->vif.hw_queue[ac];
|
||||
- if (ieee80211_queue_stopped(&local->hw, q)) {
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
skb_set_queue_mapping(skb, ac);
|
||||
|
||||
if (!--mesh_hdr->ttl) {
|
||||
@@ -1,753 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 6 Dec 2022 11:15:02 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix receiving A-MSDU frames on mesh
|
||||
interfaces
|
||||
|
||||
The current mac80211 mesh A-MSDU receive path fails to parse A-MSDU packets
|
||||
on mesh interfaces, because it assumes that the Mesh Control field is always
|
||||
directly after the 802.11 header.
|
||||
802.11-2020 9.3.2.2.2 Figure 9-70 shows that the Mesh Control field is
|
||||
actually part of the A-MSDU subframe header.
|
||||
This makes more sense, since it allows packets for multiple different
|
||||
destinations to be included in the same A-MSDU, as long as RA and TID are
|
||||
still the same.
|
||||
Another issue is the fact that the A-MSDU subframe length field was apparently
|
||||
accidentally defined as little-endian in the standard.
|
||||
|
||||
In order to fix this, the mesh forwarding path needs happen at a different
|
||||
point in the receive path.
|
||||
|
||||
ieee80211_data_to_8023_exthdr is changed to ignore the mesh control field
|
||||
and leave it in after the ethernet header. This also affects the source/dest
|
||||
MAC address fields, which now in the case of mesh point to the mesh SA/DA.
|
||||
|
||||
ieee80211_amsdu_to_8023s is changed to deal with the endian difference and
|
||||
to add the Mesh Control length to the subframe length, since it's not covered
|
||||
by the MSDU length field.
|
||||
|
||||
With these changes, the mac80211 will get the same packet structure for
|
||||
converted regular data packets and unpacked A-MSDU subframes.
|
||||
|
||||
The mesh forwarding checks are now only performed after the A-MSDU decap.
|
||||
For locally received packets, the Mesh Control header is stripped away.
|
||||
For forwarded packets, a new 802.11 header gets added.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
|
||||
@@ -33,7 +33,7 @@ static int mwifiex_11n_dispatch_amsdu_pk
|
||||
skb_trim(skb, le16_to_cpu(local_rx_pd->rx_pkt_length));
|
||||
|
||||
ieee80211_amsdu_to_8023s(skb, &list, priv->curr_addr,
|
||||
- priv->wdev.iftype, 0, NULL, NULL);
|
||||
+ priv->wdev.iftype, 0, NULL, NULL, false);
|
||||
|
||||
while (!skb_queue_empty(&list)) {
|
||||
struct rx_packet_hdr *rx_hdr;
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -6324,11 +6324,36 @@ static inline int ieee80211_data_to_8023
|
||||
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
|
||||
* @check_da: DA to check in the inner ethernet header, or NULL
|
||||
* @check_sa: SA to check in the inner ethernet header, or NULL
|
||||
+ * @mesh_control: A-MSDU subframe header includes the mesh control field
|
||||
*/
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
- const u8 *check_da, const u8 *check_sa);
|
||||
+ const u8 *check_da, const u8 *check_sa,
|
||||
+ bool mesh_control);
|
||||
+
|
||||
+/**
|
||||
+ * ieee80211_get_8023_tunnel_proto - get RFC1042 or bridge tunnel encap protocol
|
||||
+ *
|
||||
+ * Check for RFC1042 or bridge tunnel header and fetch the encapsulated
|
||||
+ * protocol.
|
||||
+ *
|
||||
+ * @hdr: pointer to the MSDU payload
|
||||
+ * @proto: destination pointer to store the protocol
|
||||
+ * Return: true if encapsulation was found
|
||||
+ */
|
||||
+bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto);
|
||||
+
|
||||
+/**
|
||||
+ * ieee80211_strip_8023_mesh_hdr - strip mesh header from converted 802.3 frames
|
||||
+ *
|
||||
+ * Strip the mesh header, which was left in by ieee80211_data_to_8023 as part
|
||||
+ * of the MSDU data. Also move any source/destination addresses from the mesh
|
||||
+ * header to the ethernet header (if present).
|
||||
+ *
|
||||
+ * @skb: The 802.3 frame with embedded mesh header
|
||||
+ */
|
||||
+int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2726,6 +2726,174 @@ ieee80211_deliver_skb(struct ieee80211_r
|
||||
}
|
||||
}
|
||||
|
||||
+static ieee80211_rx_result
|
||||
+ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta,
|
||||
+ struct sk_buff *skb)
|
||||
+{
|
||||
+#ifdef CPTCFG_MAC80211_MESH
|
||||
+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
+ struct ieee80211_local *local = sdata->local;
|
||||
+ uint16_t fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA;
|
||||
+ struct ieee80211_hdr hdr = {
|
||||
+ .frame_control = cpu_to_le16(fc)
|
||||
+ };
|
||||
+ struct ieee80211_hdr *fwd_hdr;
|
||||
+ struct ieee80211s_hdr *mesh_hdr;
|
||||
+ struct ieee80211_tx_info *info;
|
||||
+ struct sk_buff *fwd_skb;
|
||||
+ struct ethhdr *eth;
|
||||
+ bool multicast;
|
||||
+ int tailroom = 0;
|
||||
+ int hdrlen, mesh_hdrlen;
|
||||
+ u8 *qos;
|
||||
+
|
||||
+ if (!ieee80211_vif_is_mesh(&sdata->vif))
|
||||
+ return RX_CONTINUE;
|
||||
+
|
||||
+ if (!pskb_may_pull(skb, sizeof(*eth) + 6))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ mesh_hdr = (struct ieee80211s_hdr *)(skb->data + sizeof(*eth));
|
||||
+ mesh_hdrlen = ieee80211_get_mesh_hdrlen(mesh_hdr);
|
||||
+
|
||||
+ if (!pskb_may_pull(skb, sizeof(*eth) + mesh_hdrlen))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ eth = (struct ethhdr *)skb->data;
|
||||
+ multicast = is_multicast_ether_addr(eth->h_dest);
|
||||
+
|
||||
+ mesh_hdr = (struct ieee80211s_hdr *)(eth + 1);
|
||||
+ if (!mesh_hdr->ttl)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ /* frame is in RMC, don't forward */
|
||||
+ if (is_multicast_ether_addr(eth->h_dest) &&
|
||||
+ mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ /* Frame has reached destination. Don't forward */
|
||||
+ if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
+ if (is_multicast_ether_addr(eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
+ /* forward packet */
|
||||
+ if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
+ tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
+
|
||||
+ if (!--mesh_hdr->ttl) {
|
||||
+ if (multicast)
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
+ if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
+ struct mesh_path *mppath;
|
||||
+ char *proxied_addr;
|
||||
+
|
||||
+ if (multicast)
|
||||
+ proxied_addr = mesh_hdr->eaddr1;
|
||||
+ else if ((mesh_hdr->flags & MESH_FLAGS_AE) == MESH_FLAGS_AE_A5_A6)
|
||||
+ /* has_a4 already checked in ieee80211_rx_mesh_check */
|
||||
+ proxied_addr = mesh_hdr->eaddr2;
|
||||
+ else
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+ mppath = mpp_path_lookup(sdata, proxied_addr);
|
||||
+ if (!mppath) {
|
||||
+ mpp_path_add(sdata, proxied_addr, eth->h_source);
|
||||
+ } else {
|
||||
+ spin_lock_bh(&mppath->state_lock);
|
||||
+ if (!ether_addr_equal(mppath->mpp, eth->h_source))
|
||||
+ memcpy(mppath->mpp, eth->h_source, ETH_ALEN);
|
||||
+ mppath->exp_time = jiffies;
|
||||
+ spin_unlock_bh(&mppath->state_lock);
|
||||
+ }
|
||||
+ rcu_read_unlock();
|
||||
+ }
|
||||
+
|
||||
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||
+
|
||||
+ ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
|
||||
+ eth->h_dest, eth->h_source);
|
||||
+ hdrlen = ieee80211_hdrlen(hdr.frame_control);
|
||||
+ if (multicast) {
|
||||
+ int extra_head = sizeof(struct ieee80211_hdr) - sizeof(*eth);
|
||||
+
|
||||
+ fwd_skb = skb_copy_expand(skb, local->tx_headroom + extra_head +
|
||||
+ IEEE80211_ENCRYPT_HEADROOM,
|
||||
+ tailroom, GFP_ATOMIC);
|
||||
+ if (!fwd_skb)
|
||||
+ goto rx_accept;
|
||||
+ } else {
|
||||
+ fwd_skb = skb;
|
||||
+ skb = NULL;
|
||||
+
|
||||
+ if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||||
+ return RX_DROP_UNUSABLE;
|
||||
+ }
|
||||
+
|
||||
+ fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||||
+ memcpy(fwd_hdr, &hdr, hdrlen - 2);
|
||||
+ qos = ieee80211_get_qos_ctl(fwd_hdr);
|
||||
+ qos[0] = qos[1] = 0;
|
||||
+
|
||||
+ skb_reset_mac_header(fwd_skb);
|
||||
+ hdrlen += mesh_hdrlen;
|
||||
+ if (ieee80211_get_8023_tunnel_proto(fwd_skb->data + hdrlen,
|
||||
+ &fwd_skb->protocol))
|
||||
+ hdrlen += ETH_ALEN;
|
||||
+ else
|
||||
+ fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||||
+ skb_set_network_header(fwd_skb, hdrlen);
|
||||
+
|
||||
+ info = IEEE80211_SKB_CB(fwd_skb);
|
||||
+ memset(info, 0, sizeof(*info));
|
||||
+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
+ info->control.vif = &sdata->vif;
|
||||
+ info->control.jiffies = jiffies;
|
||||
+ if (multicast) {
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
+ memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
+ /* update power mode indication when forwarding */
|
||||
+ ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr);
|
||||
+ } else if (!mesh_nexthop_lookup(sdata, fwd_skb)) {
|
||||
+ /* mesh power mode flags updated in mesh_nexthop_lookup */
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||
+ } else {
|
||||
+ /* unable to resolve next hop */
|
||||
+ if (sta)
|
||||
+ mesh_path_error_tx(sdata, ifmsh->mshcfg.element_ttl,
|
||||
+ hdr.addr3, 0,
|
||||
+ WLAN_REASON_MESH_PATH_NOFORWARD,
|
||||
+ sta->sta.addr);
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
|
||||
+ kfree_skb(fwd_skb);
|
||||
+ goto rx_accept;
|
||||
+ }
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
+ fwd_skb->dev = sdata->dev;
|
||||
+ ieee80211_add_pending_skb(local, fwd_skb);
|
||||
+
|
||||
+rx_accept:
|
||||
+ if (!skb)
|
||||
+ return RX_QUEUED;
|
||||
+
|
||||
+ ieee80211_strip_8023_mesh_hdr(skb);
|
||||
+#endif
|
||||
+
|
||||
+ return RX_CONTINUE;
|
||||
+}
|
||||
+
|
||||
static ieee80211_rx_result debug_noinline
|
||||
__ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset)
|
||||
{
|
||||
@@ -2734,8 +2902,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
__le16 fc = hdr->frame_control;
|
||||
struct sk_buff_head frame_list;
|
||||
+ static ieee80211_rx_result res;
|
||||
struct ethhdr ethhdr;
|
||||
const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source;
|
||||
+ bool mesh = false;
|
||||
|
||||
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
|
||||
check_da = NULL;
|
||||
@@ -2752,6 +2922,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
break;
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
check_sa = NULL;
|
||||
+ check_da = NULL;
|
||||
+ mesh = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2769,17 +2941,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
|
||||
rx->sdata->vif.type,
|
||||
rx->local->hw.extra_tx_headroom,
|
||||
- check_da, check_sa);
|
||||
+ check_da, check_sa, mesh);
|
||||
|
||||
while (!skb_queue_empty(&frame_list)) {
|
||||
rx->skb = __skb_dequeue(&frame_list);
|
||||
|
||||
- if (!ieee80211_frame_allowed(rx, fc)) {
|
||||
- dev_kfree_skb(rx->skb);
|
||||
+ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb);
|
||||
+ switch (res) {
|
||||
+ case RX_QUEUED:
|
||||
continue;
|
||||
+ case RX_CONTINUE:
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto free;
|
||||
}
|
||||
|
||||
+ if (!ieee80211_frame_allowed(rx, fc))
|
||||
+ goto free;
|
||||
+
|
||||
ieee80211_deliver_skb(rx);
|
||||
+ continue;
|
||||
+
|
||||
+free:
|
||||
+ dev_kfree_skb(rx->skb);
|
||||
}
|
||||
|
||||
return RX_QUEUED;
|
||||
@@ -2812,6 +2996,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
|
||||
if (!rx->sdata->u.mgd.use_4addr)
|
||||
return RX_DROP_UNUSABLE;
|
||||
break;
|
||||
+ case NL80211_IFTYPE_MESH_POINT:
|
||||
+ break;
|
||||
default:
|
||||
return RX_DROP_UNUSABLE;
|
||||
}
|
||||
@@ -2840,155 +3026,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
|
||||
return __ieee80211_rx_h_amsdu(rx, 0);
|
||||
}
|
||||
|
||||
-#ifdef CPTCFG_MAC80211_MESH
|
||||
-static ieee80211_rx_result
|
||||
-ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
-{
|
||||
- struct ieee80211_hdr *fwd_hdr, *hdr;
|
||||
- struct ieee80211_tx_info *info;
|
||||
- struct ieee80211s_hdr *mesh_hdr;
|
||||
- struct sk_buff *skb = rx->skb, *fwd_skb;
|
||||
- struct ieee80211_local *local = rx->local;
|
||||
- struct ieee80211_sub_if_data *sdata = rx->sdata;
|
||||
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
- u16 ac, q, hdrlen;
|
||||
- int tailroom = 0;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *) skb->data;
|
||||
- hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
-
|
||||
- /* make sure fixed part of mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb, hdrlen + 6))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
-
|
||||
- /* make sure full mesh header is there, also checks skb len */
|
||||
- if (!pskb_may_pull(rx->skb,
|
||||
- hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr)))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- /* reload pointers */
|
||||
- hdr = (struct ieee80211_hdr *) skb->data;
|
||||
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
-
|
||||
- if (ieee80211_drop_unencrypted(rx, hdr->frame_control)) {
|
||||
- int offset = hdrlen + ieee80211_get_mesh_hdrlen(mesh_hdr) +
|
||||
- sizeof(rfc1042_header);
|
||||
- __be16 ethertype;
|
||||
-
|
||||
- if (!ether_addr_equal(hdr->addr1, rx->sdata->vif.addr) ||
|
||||
- skb_copy_bits(rx->skb, offset, ðertype, 2) != 0 ||
|
||||
- ethertype != rx->sdata->control_port_protocol)
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- /* frame is in RMC, don't forward */
|
||||
- if (ieee80211_is_data(hdr->frame_control) &&
|
||||
- is_multicast_ether_addr(hdr->addr1) &&
|
||||
- mesh_rmc_check(rx->sdata, hdr->addr3, mesh_hdr))
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- if (!ieee80211_is_data(hdr->frame_control))
|
||||
- return RX_CONTINUE;
|
||||
-
|
||||
- if (!mesh_hdr->ttl)
|
||||
- return RX_DROP_MONITOR;
|
||||
-
|
||||
- if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
- struct mesh_path *mppath;
|
||||
- char *proxied_addr;
|
||||
- char *mpp_addr;
|
||||
-
|
||||
- if (is_multicast_ether_addr(hdr->addr1)) {
|
||||
- mpp_addr = hdr->addr3;
|
||||
- proxied_addr = mesh_hdr->eaddr1;
|
||||
- } else if ((mesh_hdr->flags & MESH_FLAGS_AE) ==
|
||||
- MESH_FLAGS_AE_A5_A6) {
|
||||
- /* has_a4 already checked in ieee80211_rx_mesh_check */
|
||||
- mpp_addr = hdr->addr4;
|
||||
- proxied_addr = mesh_hdr->eaddr2;
|
||||
- } else {
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- rcu_read_lock();
|
||||
- mppath = mpp_path_lookup(sdata, proxied_addr);
|
||||
- if (!mppath) {
|
||||
- mpp_path_add(sdata, proxied_addr, mpp_addr);
|
||||
- } else {
|
||||
- spin_lock_bh(&mppath->state_lock);
|
||||
- if (!ether_addr_equal(mppath->mpp, mpp_addr))
|
||||
- memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
|
||||
- mppath->exp_time = jiffies;
|
||||
- spin_unlock_bh(&mppath->state_lock);
|
||||
- }
|
||||
- rcu_read_unlock();
|
||||
- }
|
||||
-
|
||||
- /* Frame has reached destination. Don't forward */
|
||||
- if (!is_multicast_ether_addr(hdr->addr1) &&
|
||||
- ether_addr_equal(sdata->vif.addr, hdr->addr3))
|
||||
- return RX_CONTINUE;
|
||||
-
|
||||
- ac = ieee802_1d_to_ac[skb->priority];
|
||||
- skb_set_queue_mapping(skb, ac);
|
||||
-
|
||||
- if (!--mesh_hdr->ttl) {
|
||||
- if (!is_multicast_ether_addr(hdr->addr1))
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh,
|
||||
- dropped_frames_ttl);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if (!ifmsh->mshcfg.dot11MeshForwarding)
|
||||
- goto out;
|
||||
-
|
||||
- if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
- tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
-
|
||||
- fwd_skb = skb_copy_expand(skb, local->tx_headroom +
|
||||
- IEEE80211_ENCRYPT_HEADROOM,
|
||||
- tailroom, GFP_ATOMIC);
|
||||
- if (!fwd_skb)
|
||||
- goto out;
|
||||
-
|
||||
- fwd_skb->dev = sdata->dev;
|
||||
- fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
|
||||
- fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
|
||||
- info = IEEE80211_SKB_CB(fwd_skb);
|
||||
- memset(info, 0, sizeof(*info));
|
||||
- info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
- info->control.vif = &rx->sdata->vif;
|
||||
- info->control.jiffies = jiffies;
|
||||
- if (is_multicast_ether_addr(fwd_hdr->addr1)) {
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
- memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
- /* update power mode indication when forwarding */
|
||||
- ieee80211_mps_set_frame_flags(sdata, NULL, fwd_hdr);
|
||||
- } else if (!mesh_nexthop_lookup(sdata, fwd_skb)) {
|
||||
- /* mesh power mode flags updated in mesh_nexthop_lookup */
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast);
|
||||
- } else {
|
||||
- /* unable to resolve next hop */
|
||||
- mesh_path_error_tx(sdata, ifmsh->mshcfg.element_ttl,
|
||||
- fwd_hdr->addr3, 0,
|
||||
- WLAN_REASON_MESH_PATH_NOFORWARD,
|
||||
- fwd_hdr->addr2);
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
|
||||
- kfree_skb(fwd_skb);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
- ieee80211_add_pending_skb(local, fwd_skb);
|
||||
- out:
|
||||
- if (is_multicast_ether_addr(hdr->addr1))
|
||||
- return RX_CONTINUE;
|
||||
- return RX_DROP_MONITOR;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static ieee80211_rx_result debug_noinline
|
||||
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
|
||||
{
|
||||
@@ -2997,6 +3034,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
|
||||
struct net_device *dev = sdata->dev;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
|
||||
__le16 fc = hdr->frame_control;
|
||||
+ static ieee80211_rx_result res;
|
||||
bool port_control;
|
||||
int err;
|
||||
|
||||
@@ -3023,6 +3061,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_
|
||||
if (unlikely(err))
|
||||
return RX_DROP_UNUSABLE;
|
||||
|
||||
+ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb);
|
||||
+ if (res != RX_CONTINUE)
|
||||
+ return res;
|
||||
+
|
||||
if (!ieee80211_frame_allowed(rx, fc))
|
||||
return RX_DROP_MONITOR;
|
||||
|
||||
@@ -3997,10 +4039,6 @@ static void ieee80211_rx_handlers(struct
|
||||
CALL_RXH(ieee80211_rx_h_defragment);
|
||||
CALL_RXH(ieee80211_rx_h_michael_mic_verify);
|
||||
/* must be after MMIC verify so header is counted in MPDU mic */
|
||||
-#ifdef CPTCFG_MAC80211_MESH
|
||||
- if (ieee80211_vif_is_mesh(&rx->sdata->vif))
|
||||
- CALL_RXH(ieee80211_rx_h_mesh_fwding);
|
||||
-#endif
|
||||
CALL_RXH(ieee80211_rx_h_amsdu);
|
||||
CALL_RXH(ieee80211_rx_h_data);
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -542,7 +542,7 @@ unsigned int ieee80211_get_mesh_hdrlen(s
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen);
|
||||
|
||||
-static bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
+bool ieee80211_get_8023_tunnel_proto(const void *hdr, __be16 *proto)
|
||||
{
|
||||
const __be16 *hdr_proto = hdr + ETH_ALEN;
|
||||
|
||||
@@ -556,6 +556,49 @@ static bool ieee80211_get_8023_tunnel_pr
|
||||
|
||||
return true;
|
||||
}
|
||||
+EXPORT_SYMBOL(ieee80211_get_8023_tunnel_proto);
|
||||
+
|
||||
+int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb)
|
||||
+{
|
||||
+ const void *mesh_addr;
|
||||
+ struct {
|
||||
+ struct ethhdr eth;
|
||||
+ u8 flags;
|
||||
+ } payload;
|
||||
+ int hdrlen;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = skb_copy_bits(skb, 0, &payload, sizeof(payload));
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ hdrlen = sizeof(payload.eth) + __ieee80211_get_mesh_hdrlen(payload.flags);
|
||||
+
|
||||
+ if (likely(pskb_may_pull(skb, hdrlen + 8) &&
|
||||
+ ieee80211_get_8023_tunnel_proto(skb->data + hdrlen,
|
||||
+ &payload.eth.h_proto)))
|
||||
+ hdrlen += ETH_ALEN + 2;
|
||||
+ else if (!pskb_may_pull(skb, hdrlen))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
|
||||
+ switch (payload.flags & MESH_FLAGS_AE) {
|
||||
+ case MESH_FLAGS_AE_A4:
|
||||
+ memcpy(&payload.eth.h_source, mesh_addr, ETH_ALEN);
|
||||
+ break;
|
||||
+ case MESH_FLAGS_AE_A5_A6:
|
||||
+ memcpy(&payload.eth.h_dest, mesh_addr, 2 * ETH_ALEN);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ pskb_pull(skb, hdrlen - sizeof(payload.eth));
|
||||
+ memcpy(skb->data, &payload.eth, sizeof(payload.eth));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ieee80211_strip_8023_mesh_hdr);
|
||||
|
||||
int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
@@ -568,7 +611,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
} payload;
|
||||
struct ethhdr tmp;
|
||||
u16 hdrlen;
|
||||
- u8 mesh_flags = 0;
|
||||
|
||||
if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
|
||||
return -1;
|
||||
@@ -589,12 +631,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
memcpy(tmp.h_dest, ieee80211_get_DA(hdr), ETH_ALEN);
|
||||
memcpy(tmp.h_source, ieee80211_get_SA(hdr), ETH_ALEN);
|
||||
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT &&
|
||||
- skb_copy_bits(skb, hdrlen, &mesh_flags, 1) < 0)
|
||||
- return -1;
|
||||
-
|
||||
- mesh_flags &= MESH_FLAGS_AE;
|
||||
-
|
||||
switch (hdr->frame_control &
|
||||
cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
|
||||
case cpu_to_le16(IEEE80211_FCTL_TODS):
|
||||
@@ -608,17 +644,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
iftype != NL80211_IFTYPE_AP_VLAN &&
|
||||
iftype != NL80211_IFTYPE_STATION))
|
||||
return -1;
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT) {
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A4)
|
||||
- return -1;
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A5_A6 &&
|
||||
- skb_copy_bits(skb, hdrlen +
|
||||
- offsetof(struct ieee80211s_hdr, eaddr1),
|
||||
- tmp.h_dest, 2 * ETH_ALEN) < 0)
|
||||
- return -1;
|
||||
-
|
||||
- hdrlen += __ieee80211_get_mesh_hdrlen(mesh_flags);
|
||||
- }
|
||||
break;
|
||||
case cpu_to_le16(IEEE80211_FCTL_FROMDS):
|
||||
if ((iftype != NL80211_IFTYPE_STATION &&
|
||||
@@ -627,16 +652,6 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
(is_multicast_ether_addr(tmp.h_dest) &&
|
||||
ether_addr_equal(tmp.h_source, addr)))
|
||||
return -1;
|
||||
- if (iftype == NL80211_IFTYPE_MESH_POINT) {
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A5_A6)
|
||||
- return -1;
|
||||
- if (mesh_flags == MESH_FLAGS_AE_A4 &&
|
||||
- skb_copy_bits(skb, hdrlen +
|
||||
- offsetof(struct ieee80211s_hdr, eaddr1),
|
||||
- tmp.h_source, ETH_ALEN) < 0)
|
||||
- return -1;
|
||||
- hdrlen += __ieee80211_get_mesh_hdrlen(mesh_flags);
|
||||
- }
|
||||
break;
|
||||
case cpu_to_le16(0):
|
||||
if (iftype != NL80211_IFTYPE_ADHOC &&
|
||||
@@ -646,7 +661,7 @@ int ieee80211_data_to_8023_exthdr(struct
|
||||
break;
|
||||
}
|
||||
|
||||
- if (likely(!is_amsdu &&
|
||||
+ if (likely(!is_amsdu && iftype != NL80211_IFTYPE_MESH_POINT &&
|
||||
skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
|
||||
ieee80211_get_8023_tunnel_proto(&payload, &tmp.h_proto))) {
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation */
|
||||
@@ -722,7 +737,8 @@ __ieee80211_amsdu_copy_frag(struct sk_bu
|
||||
|
||||
static struct sk_buff *
|
||||
__ieee80211_amsdu_copy(struct sk_buff *skb, unsigned int hlen,
|
||||
- int offset, int len, bool reuse_frag)
|
||||
+ int offset, int len, bool reuse_frag,
|
||||
+ int min_len)
|
||||
{
|
||||
struct sk_buff *frame;
|
||||
int cur_len = len;
|
||||
@@ -736,7 +752,7 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
* in the stack later.
|
||||
*/
|
||||
if (reuse_frag)
|
||||
- cur_len = min_t(int, len, 32);
|
||||
+ cur_len = min_t(int, len, min_len);
|
||||
|
||||
/*
|
||||
* Allocate and reserve two bytes more for payload
|
||||
@@ -746,6 +762,7 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
if (!frame)
|
||||
return NULL;
|
||||
|
||||
+ frame->priority = skb->priority;
|
||||
skb_reserve(frame, hlen + sizeof(struct ethhdr) + 2);
|
||||
skb_copy_bits(skb, offset, skb_put(frame, cur_len), cur_len);
|
||||
|
||||
@@ -762,23 +779,37 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
- const u8 *check_da, const u8 *check_sa)
|
||||
+ const u8 *check_da, const u8 *check_sa,
|
||||
+ bool mesh_control)
|
||||
{
|
||||
unsigned int hlen = ALIGN(extra_headroom, 4);
|
||||
struct sk_buff *frame = NULL;
|
||||
int offset = 0, remaining;
|
||||
- struct ethhdr eth;
|
||||
+ struct {
|
||||
+ struct ethhdr eth;
|
||||
+ uint8_t flags;
|
||||
+ } hdr;
|
||||
bool reuse_frag = skb->head_frag && !skb_has_frag_list(skb);
|
||||
bool reuse_skb = false;
|
||||
bool last = false;
|
||||
+ int copy_len = sizeof(hdr.eth);
|
||||
+
|
||||
+ if (iftype == NL80211_IFTYPE_MESH_POINT)
|
||||
+ copy_len = sizeof(hdr);
|
||||
|
||||
while (!last) {
|
||||
unsigned int subframe_len;
|
||||
- int len;
|
||||
+ int len, mesh_len = 0;
|
||||
u8 padding;
|
||||
|
||||
- skb_copy_bits(skb, offset, ð, sizeof(eth));
|
||||
- len = ntohs(eth.h_proto);
|
||||
+ skb_copy_bits(skb, offset, &hdr, copy_len);
|
||||
+ if (iftype == NL80211_IFTYPE_MESH_POINT)
|
||||
+ mesh_len = __ieee80211_get_mesh_hdrlen(hdr.flags);
|
||||
+ if (mesh_control)
|
||||
+ len = le16_to_cpu(*(__le16 *)&hdr.eth.h_proto) + mesh_len;
|
||||
+ else
|
||||
+ len = ntohs(hdr.eth.h_proto);
|
||||
+
|
||||
subframe_len = sizeof(struct ethhdr) + len;
|
||||
padding = (4 - subframe_len) & 0x3;
|
||||
|
||||
@@ -787,16 +818,16 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
if (subframe_len > remaining)
|
||||
goto purge;
|
||||
/* mitigate A-MSDU aggregation injection attacks */
|
||||
- if (ether_addr_equal(eth.h_dest, rfc1042_header))
|
||||
+ if (ether_addr_equal(hdr.eth.h_dest, rfc1042_header))
|
||||
goto purge;
|
||||
|
||||
offset += sizeof(struct ethhdr);
|
||||
last = remaining <= subframe_len + padding;
|
||||
|
||||
/* FIXME: should we really accept multicast DA? */
|
||||
- if ((check_da && !is_multicast_ether_addr(eth.h_dest) &&
|
||||
- !ether_addr_equal(check_da, eth.h_dest)) ||
|
||||
- (check_sa && !ether_addr_equal(check_sa, eth.h_source))) {
|
||||
+ if ((check_da && !is_multicast_ether_addr(hdr.eth.h_dest) &&
|
||||
+ !ether_addr_equal(check_da, hdr.eth.h_dest)) ||
|
||||
+ (check_sa && !ether_addr_equal(check_sa, hdr.eth.h_source))) {
|
||||
offset += len + padding;
|
||||
continue;
|
||||
}
|
||||
@@ -808,7 +839,7 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
reuse_skb = true;
|
||||
} else {
|
||||
frame = __ieee80211_amsdu_copy(skb, hlen, offset, len,
|
||||
- reuse_frag);
|
||||
+ reuse_frag, 32 + mesh_len);
|
||||
if (!frame)
|
||||
goto purge;
|
||||
|
||||
@@ -819,10 +850,11 @@ void ieee80211_amsdu_to_8023s(struct sk_
|
||||
frame->dev = skb->dev;
|
||||
frame->priority = skb->priority;
|
||||
|
||||
- if (likely(ieee80211_get_8023_tunnel_proto(frame->data, ð.h_proto)))
|
||||
+ if (likely(iftype != NL80211_IFTYPE_MESH_POINT &&
|
||||
+ ieee80211_get_8023_tunnel_proto(frame->data, &hdr.eth.h_proto)))
|
||||
skb_pull(frame, ETH_ALEN + 2);
|
||||
|
||||
- memcpy(skb_push(frame, sizeof(eth)), ð, sizeof(eth));
|
||||
+ memcpy(skb_push(frame, sizeof(hdr.eth)), &hdr.eth, sizeof(hdr.eth));
|
||||
__skb_queue_tail(list, frame);
|
||||
}
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 9 Dec 2022 21:15:04 +0100
|
||||
Subject: [PATCH] wifi: mac80211: add a workaround for receiving
|
||||
non-standard mesh A-MSDU
|
||||
|
||||
At least ath10k and ath11k supported hardware (maybe more) does not implement
|
||||
mesh A-MSDU aggregation in a standard compliant way.
|
||||
802.11-2020 9.3.2.2.2 declares that the Mesh Control field is part of the
|
||||
A-MSDU header. As such, its length must not be included in the subframe
|
||||
length field.
|
||||
Hardware affected by this bug treats the mesh control field as part of the
|
||||
MSDU data and sets the length accordingly.
|
||||
In order to avoid packet loss, keep track of which stations are affected
|
||||
by this and take it into account when converting A-MSDU to 802.3 + mesh control
|
||||
packets.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -6310,6 +6310,19 @@ static inline int ieee80211_data_to_8023
|
||||
}
|
||||
|
||||
/**
|
||||
+ * ieee80211_is_valid_amsdu - check if subframe lengths of an A-MSDU are valid
|
||||
+ *
|
||||
+ * This is used to detect non-standard A-MSDU frames, e.g. the ones generated
|
||||
+ * by ath10k and ath11k, where the subframe length includes the length of the
|
||||
+ * mesh control field.
|
||||
+ *
|
||||
+ * @skb: The input A-MSDU frame without any headers.
|
||||
+ * @mesh_hdr: use standard compliant mesh A-MSDU subframe header
|
||||
+ * Returns: true if subframe header lengths are valid for the @mesh_hdr mode
|
||||
+ */
|
||||
+bool ieee80211_is_valid_amsdu(struct sk_buff *skb, bool mesh_hdr);
|
||||
+
|
||||
+/**
|
||||
* ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame
|
||||
*
|
||||
* Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames.
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2905,7 +2905,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
static ieee80211_rx_result res;
|
||||
struct ethhdr ethhdr;
|
||||
const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source;
|
||||
- bool mesh = false;
|
||||
|
||||
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
|
||||
check_da = NULL;
|
||||
@@ -2923,7 +2922,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
check_sa = NULL;
|
||||
check_da = NULL;
|
||||
- mesh = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2938,10 +2936,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
|
||||
data_offset, true))
|
||||
return RX_DROP_UNUSABLE;
|
||||
|
||||
+ if (rx->sta && rx->sta->amsdu_mesh_control < 0) {
|
||||
+ bool valid_std = ieee80211_is_valid_amsdu(skb, true);
|
||||
+ bool valid_nonstd = ieee80211_is_valid_amsdu(skb, false);
|
||||
+
|
||||
+ if (valid_std && !valid_nonstd)
|
||||
+ rx->sta->amsdu_mesh_control = 1;
|
||||
+ else if (valid_nonstd && !valid_std)
|
||||
+ rx->sta->amsdu_mesh_control = 0;
|
||||
+ }
|
||||
+
|
||||
ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
|
||||
rx->sdata->vif.type,
|
||||
rx->local->hw.extra_tx_headroom,
|
||||
- check_da, check_sa, mesh);
|
||||
+ check_da, check_sa,
|
||||
+ rx->sta->amsdu_mesh_control);
|
||||
|
||||
while (!skb_queue_empty(&frame_list)) {
|
||||
rx->skb = __skb_dequeue(&frame_list);
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -594,6 +594,9 @@ __sta_info_alloc(struct ieee80211_sub_if
|
||||
|
||||
sta->sta_state = IEEE80211_STA_NONE;
|
||||
|
||||
+ if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
|
||||
+ sta->amsdu_mesh_control = -1;
|
||||
+
|
||||
/* Mark TID as unreserved */
|
||||
sta->reserved_tid = IEEE80211_TID_UNRESERVED;
|
||||
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -702,6 +702,7 @@ struct sta_info {
|
||||
struct codel_params cparams;
|
||||
|
||||
u8 reserved_tid;
|
||||
+ s8 amsdu_mesh_control;
|
||||
|
||||
struct cfg80211_chan_def tdls_chandef;
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -776,6 +776,38 @@ __ieee80211_amsdu_copy(struct sk_buff *s
|
||||
return frame;
|
||||
}
|
||||
|
||||
+bool ieee80211_is_valid_amsdu(struct sk_buff *skb, bool mesh_hdr)
|
||||
+{
|
||||
+ int offset = 0, remaining, subframe_len, padding;
|
||||
+
|
||||
+ for (offset = 0; offset < skb->len; offset += subframe_len + padding) {
|
||||
+ struct {
|
||||
+ __be16 len;
|
||||
+ u8 mesh_flags;
|
||||
+ } hdr;
|
||||
+ u16 len;
|
||||
+
|
||||
+ if (skb_copy_bits(skb, offset + 2 * ETH_ALEN, &hdr, sizeof(hdr)) < 0)
|
||||
+ return false;
|
||||
+
|
||||
+ if (mesh_hdr)
|
||||
+ len = le16_to_cpu(*(__le16 *)&hdr.len) +
|
||||
+ __ieee80211_get_mesh_hdrlen(hdr.mesh_flags);
|
||||
+ else
|
||||
+ len = ntohs(hdr.len);
|
||||
+
|
||||
+ subframe_len = sizeof(struct ethhdr) + len;
|
||||
+ padding = (4 - subframe_len) & 0x3;
|
||||
+ remaining = skb->len - offset;
|
||||
+
|
||||
+ if (subframe_len > remaining)
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ieee80211_is_valid_amsdu);
|
||||
+
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom,
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
#ifdef CPTCFG_MAC80211_MESH
|
||||
@@ -2007,6 +2022,11 @@ int ieee80211_tx_control_port(struct wip
|
||||
@@ -2009,6 +2024,11 @@ int ieee80211_tx_control_port(struct wip
|
||||
int link_id, u64 *cookie);
|
||||
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *buf, size_t len);
|
||||
@@ -698,7 +698,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2797,6 +2797,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2778,6 +2778,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
struct mesh_path *mppath;
|
||||
char *proxied_addr;
|
||||
@@ -706,7 +706,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (multicast)
|
||||
proxied_addr = mesh_hdr->eaddr1;
|
||||
@@ -2812,11 +2813,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2793,11 +2794,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
mpp_path_add(sdata, proxied_addr, eth->h_source);
|
||||
} else {
|
||||
spin_lock_bh(&mppath->state_lock);
|
||||
|
||||
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
|
||||
eth->h_dest, eth->h_source);
|
||||
hdrlen = ieee80211_hdrlen(hdr.frame_control);
|
||||
@@ -2868,6 +2931,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2871,6 +2934,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
|
||||
info->control.vif = &sdata->vif;
|
||||
info->control.jiffies = jiffies;
|
||||
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (multicast) {
|
||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
|
||||
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
|
||||
@@ -2889,7 +2953,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
@@ -2892,7 +2956,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
}
|
||||
|
||||
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
|
||||
@@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
rx_accept:
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2027,6 +2027,8 @@ void __ieee80211_xmit_fast(struct ieee80
|
||||
@@ -2029,6 +2029,8 @@ void __ieee80211_xmit_fast(struct ieee80
|
||||
struct ieee80211_fast_tx *fast_tx,
|
||||
struct sk_buff *skb, bool ampdu,
|
||||
const u8 *da, const u8 *sa);
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 20 Feb 2023 12:50:50 +0100
|
||||
Subject: [PATCH] mac80211: fix mesh forwarding
|
||||
|
||||
Linearize packets (needed for forwarding A-MSDU subframes).
|
||||
Fix network header offset to fix flow dissector (and fair queueing).
|
||||
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2910,6 +2910,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
|
||||
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||||
return RX_DROP_UNUSABLE;
|
||||
+
|
||||
+ if (skb_linearize(fwd_skb))
|
||||
+ return RX_DROP_UNUSABLE;
|
||||
}
|
||||
|
||||
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||||
@@ -2924,7 +2927,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
hdrlen += ETH_ALEN;
|
||||
else
|
||||
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||||
- skb_set_network_header(fwd_skb, hdrlen);
|
||||
+ skb_set_network_header(fwd_skb, hdrlen + 2);
|
||||
|
||||
info = IEEE80211_SKB_CB(fwd_skb);
|
||||
memset(info, 0, sizeof(*info));
|
||||
@@ -1,52 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Feb 2023 20:30:20 +0100
|
||||
Subject: [PATCH] wifi: mac80211: fix mesh path discovery based on unicast
|
||||
packets
|
||||
|
||||
If a packet has reached its intended destination, it was bumped to the code
|
||||
that accepts it, without first checking if a mesh_path needs to be created
|
||||
based on the discovered source.
|
||||
Fix this by moving the destination address check further down
|
||||
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2830,17 +2830,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
|
||||
return RX_DROP_MONITOR;
|
||||
|
||||
- /* Frame has reached destination. Don't forward */
|
||||
- if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
- goto rx_accept;
|
||||
-
|
||||
- if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
- if (is_multicast_ether_addr(eth->h_dest))
|
||||
- goto rx_accept;
|
||||
-
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
/* forward packet */
|
||||
if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
@@ -2887,6 +2876,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
+ /* Frame has reached destination. Don't forward */
|
||||
+ if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
+ if (is_multicast_ether_addr(eth->h_dest))
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
|
||||
|
||||
if (!multicast &&
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
* @tid: the TID to BA on.
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -554,6 +554,23 @@ void ieee80211_tx_ba_session_handle_star
|
||||
@@ -550,6 +550,23 @@ void ieee80211_tx_ba_session_handle_star
|
||||
ieee80211_send_addba_with_timeout(sta, tid_tx);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u16 old_links, u16 new_links,
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -1944,7 +1944,8 @@ void ieee80211_color_collision_detection
|
||||
@@ -1946,7 +1946,8 @@ void ieee80211_color_collision_detection
|
||||
/* interface handling */
|
||||
#define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
|
||||
NETIF_F_HW_CSUM | NETIF_F_SG | \
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
MAC80211_SUPPORTED_FEATURES_RX)
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -813,6 +813,21 @@ ieee80211_get_stats64(struct net_device
|
||||
@@ -834,6 +834,21 @@ ieee80211_get_stats64(struct net_device
|
||||
dev_fetch_sw_netstats(stats, dev->tstats);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops ieee80211_dataif_ops = {
|
||||
.ndo_open = ieee80211_open,
|
||||
.ndo_stop = ieee80211_stop,
|
||||
@@ -821,6 +836,7 @@ static const struct net_device_ops ieee8
|
||||
@@ -842,6 +857,7 @@ static const struct net_device_ops ieee8
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
@@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
|
||||
#if LINUX_VERSION_IS_GEQ(5,2,0)
|
||||
@@ -945,6 +961,7 @@ static const struct net_device_ops ieee8
|
||||
@@ -966,6 +982,7 @@ static const struct net_device_ops ieee8
|
||||
#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
#endif
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sun, 26 Mar 2023 17:11:34 +0200
|
||||
Subject: [PATCH] wifi: mac80211: fix receiving mesh packets in forwarding=0
|
||||
networks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When forwarding is set to 0, frames are typically sent with ttl=1.
|
||||
Move the ttl decrement check below the check for local receive in order to
|
||||
fix packet drops.
|
||||
|
||||
Reported-by: Thomas Hühn <thomas.huehn@hs-nordhausen.de>
|
||||
Reported-by: Nick Hainke <vincent@systemli.org>
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2834,14 +2834,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (sdata->crypto_tx_tailroom_needed_cnt)
|
||||
tailroom = IEEE80211_ENCRYPT_TAILROOM;
|
||||
|
||||
- if (!--mesh_hdr->ttl) {
|
||||
- if (multicast)
|
||||
- goto rx_accept;
|
||||
-
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
- return RX_DROP_MONITOR;
|
||||
- }
|
||||
-
|
||||
if (mesh_hdr->flags & MESH_FLAGS_AE) {
|
||||
struct mesh_path *mppath;
|
||||
char *proxied_addr;
|
||||
@@ -2880,6 +2872,14 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||||
if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
|
||||
goto rx_accept;
|
||||
|
||||
+ if (!--mesh_hdr->ttl) {
|
||||
+ if (multicast)
|
||||
+ goto rx_accept;
|
||||
+
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ }
|
||||
+
|
||||
if (!ifmsh->mshcfg.dot11MeshForwarding) {
|
||||
if (is_multicast_ether_addr(eth->h_dest))
|
||||
goto rx_accept;
|
||||
@@ -19,7 +19,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1276,6 +1276,14 @@ static void __sta_info_destroy_part2(str
|
||||
@@ -1290,6 +1290,14 @@ static void __sta_info_destroy_part2(str
|
||||
WARN_ON_ONCE(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
|
||||
struct ieee80211_channel_switch *ch_switch)
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -1281,8 +1281,12 @@ static void __sta_info_destroy_part2(str
|
||||
@@ -1295,8 +1295,12 @@ static void __sta_info_destroy_part2(str
|
||||
* frames sitting on hardware queues might be sent out without
|
||||
* any encryption at all.
|
||||
*/
|
||||
|
||||
@@ -129,7 +129,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
new = kzalloc(size, GFP_KERNEL);
|
||||
@@ -3394,8 +3394,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
|
||||
@@ -3396,8 +3396,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
|
||||
|
||||
len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len +
|
||||
beacon->proberesp_ies_len + beacon->assocresp_ies_len +
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 11 Jul 2023 13:30:12 +0200
|
||||
Subject: [PATCH] wifi: cfg80211: fix receving mesh packets without RFC1042
|
||||
header
|
||||
|
||||
Fix ethernet header length field after stripping the mesh header
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/
|
||||
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||||
Reported-by: Nicolas Escande <nico.escande@gmail.com>
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct
|
||||
hdrlen += ETH_ALEN + 2;
|
||||
else if (!pskb_may_pull(skb, hdrlen))
|
||||
return -EINVAL;
|
||||
+ else
|
||||
+ payload.eth.h_proto = htons(skb->len - hdrlen);
|
||||
|
||||
mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
|
||||
switch (payload.flags & MESH_FLAGS_AE) {
|
||||
@@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
{
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -491,6 +491,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
@@ -497,6 +497,8 @@ void cfg80211_set_dfs_state(struct wiphy
|
||||
enum nl80211_dfs_state dfs_state);
|
||||
|
||||
void cfg80211_dfs_channels_update_work(struct work_struct *work);
|
||||
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -277,6 +277,8 @@ struct cfg80211_event {
|
||||
@@ -283,6 +283,8 @@ struct cfg80211_event {
|
||||
} ij;
|
||||
struct {
|
||||
u8 bssid[ETH_ALEN];
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
} pa;
|
||||
};
|
||||
};
|
||||
@@ -421,7 +423,8 @@ int cfg80211_disconnect(struct cfg80211_
|
||||
@@ -427,7 +429,8 @@ int cfg80211_disconnect(struct cfg80211_
|
||||
bool wextev);
|
||||
void __cfg80211_roamed(struct wireless_dev *wdev,
|
||||
struct cfg80211_roam_info *info);
|
||||
@@ -97,7 +97,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void cfg80211_autodisconnect_wk(struct work_struct *work);
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -17993,7 +17993,8 @@ void nl80211_send_roamed(struct cfg80211
|
||||
@@ -18024,7 +18024,8 @@ void nl80211_send_roamed(struct cfg80211
|
||||
}
|
||||
|
||||
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct sk_buff *msg;
|
||||
void *hdr;
|
||||
@@ -18013,6 +18014,11 @@ void nl80211_send_port_authorized(struct
|
||||
@@ -18044,6 +18045,11 @@ void nl80211_send_port_authorized(struct
|
||||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
|
||||
goto nla_put_failure;
|
||||
|
||||
@@ -176,7 +176,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* Use the wdev event list so that if there are pending
|
||||
--- a/net/wireless/util.c
|
||||
+++ b/net/wireless/util.c
|
||||
@@ -1059,7 +1059,9 @@ void cfg80211_process_wdev_events(struct
|
||||
@@ -1065,7 +1065,9 @@ void cfg80211_process_wdev_events(struct
|
||||
__cfg80211_leave(wiphy_to_rdev(wdev->wiphy), wdev);
|
||||
break;
|
||||
case EVENT_PORT_AUTHORIZED:
|
||||
|
||||
@@ -94,7 +94,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -2389,6 +2389,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2403,6 +2403,13 @@ static void sta_stats_decode_rate(struct
|
||||
rinfo->he_ru_alloc = STA_STATS_GET(HE_RU, rate);
|
||||
rinfo->he_dcm = STA_STATS_GET(HE_DCM, rate);
|
||||
break;
|
||||
@@ -110,7 +110,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -930,6 +930,7 @@ enum sta_stats_type {
|
||||
@@ -936,6 +936,7 @@ enum sta_stats_type {
|
||||
STA_STATS_RATE_TYPE_VHT,
|
||||
STA_STATS_RATE_TYPE_HE,
|
||||
STA_STATS_RATE_TYPE_S1G,
|
||||
@@ -118,7 +118,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
#define STA_STATS_FIELD_HT_MCS GENMASK( 7, 0)
|
||||
@@ -939,12 +940,16 @@ enum sta_stats_type {
|
||||
@@ -945,12 +946,16 @@ enum sta_stats_type {
|
||||
#define STA_STATS_FIELD_VHT_NSS GENMASK( 7, 4)
|
||||
#define STA_STATS_FIELD_HE_MCS GENMASK( 3, 0)
|
||||
#define STA_STATS_FIELD_HE_NSS GENMASK( 7, 4)
|
||||
@@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
|
||||
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
|
||||
@@ -983,6 +988,13 @@ static inline u32 sta_stats_encode_rate(
|
||||
@@ -989,6 +994,13 @@ static inline u32 sta_stats_encode_rate(
|
||||
r |= STA_STATS_FIELD(HE_RU, s->he_ru);
|
||||
r |= STA_STATS_FIELD(HE_DCM, s->he_dcm);
|
||||
break;
|
||||
@@ -157,7 +157,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return STA_STATS_RATE_INVALID;
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -3898,6 +3898,19 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3902,6 +3902,19 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
|
||||
/* Fill cfg80211 rate info */
|
||||
switch (status->encoding) {
|
||||
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
bool mu_mimo_owner;
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -4195,7 +4195,7 @@ static int ieee80211_set_ap_chanwidth(st
|
||||
@@ -4197,7 +4197,7 @@ static int ieee80211_set_ap_chanwidth(st
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_link_data *link;
|
||||
int ret;
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct ieee80211_bss_conf *link_conf = link->conf;
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -2497,7 +2497,7 @@ int ieee80211_link_unreserve_chanctx(str
|
||||
@@ -2499,7 +2499,7 @@ int ieee80211_link_unreserve_chanctx(str
|
||||
int __must_check
|
||||
ieee80211_link_change_bandwidth(struct ieee80211_link_data *link,
|
||||
const struct cfg80211_chan_def *chandef,
|
||||
|
||||
@@ -107,7 +107,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -819,6 +819,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -829,6 +829,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
|
||||
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
|
||||
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
|
||||
@@ -115,7 +115,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3187,6 +3188,21 @@ static bool nl80211_can_set_dev_channel(
|
||||
@@ -3197,6 +3198,21 @@ static bool nl80211_can_set_dev_channel(
|
||||
wdev->iftype == NL80211_IFTYPE_P2P_GO;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
|
||||
struct genl_info *info,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
@@ -5938,6 +5954,14 @@ static int nl80211_start_ap(struct sk_bu
|
||||
@@ -5969,6 +5985,14 @@ static int nl80211_start_ap(struct sk_bu
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef,
|
||||
wdev->iftype)) {
|
||||
err = -EINVAL;
|
||||
@@ -10076,6 +10100,14 @@ skip_beacons:
|
||||
@@ -10107,6 +10131,14 @@ skip_beacons:
|
||||
if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
|
||||
params.block_tx = true;
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* ieee80211_operating_class_to_band - convert operating class to band
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -3610,7 +3610,8 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3612,7 +3612,8 @@ static int __ieee80211_csa_finalize(stru
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -101,7 +101,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3882,7 +3883,7 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3884,7 +3885,7 @@ __ieee80211_channel_switch(struct wiphy
|
||||
|
||||
cfg80211_ch_switch_started_notify(sdata->dev,
|
||||
&sdata->deflink.csa_chandef, 0,
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/* use driver's channel switch callback */
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -19054,7 +19054,7 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19085,7 +19085,7 @@ static void nl80211_ch_switch_notify(str
|
||||
struct cfg80211_chan_def *chandef,
|
||||
gfp_t gfp,
|
||||
enum nl80211_commands notif,
|
||||
@@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = netdev->ieee80211_ptr;
|
||||
struct sk_buff *msg;
|
||||
@@ -19088,6 +19088,9 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19119,6 +19119,9 @@ static void nl80211_ch_switch_notify(str
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
genlmsg_end(msg, hdr);
|
||||
|
||||
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
|
||||
@@ -19100,7 +19103,7 @@ static void nl80211_ch_switch_notify(str
|
||||
@@ -19131,7 +19134,7 @@ static void nl80211_ch_switch_notify(str
|
||||
|
||||
void cfg80211_ch_switch_notify(struct net_device *dev,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
@@ -160,7 +160,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
@@ -19109,7 +19112,7 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
@@ -19140,7 +19143,7 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
WARN_INVALID_LINK_ID(wdev, link_id);
|
||||
|
||||
@@ -169,7 +169,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_STATION:
|
||||
@@ -19137,14 +19140,15 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
@@ -19168,14 +19171,15 @@ void cfg80211_ch_switch_notify(struct ne
|
||||
cfg80211_sched_dfs_chan_update(rdev);
|
||||
|
||||
nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
|
||||
@@ -187,7 +187,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct wiphy *wiphy = wdev->wiphy;
|
||||
@@ -19153,11 +19157,13 @@ void cfg80211_ch_switch_started_notify(s
|
||||
@@ -19184,11 +19188,13 @@ void cfg80211_ch_switch_started_notify(s
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
WARN_INVALID_LINK_ID(wdev, link_id);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP &&
|
||||
params->mbssid_config.tx_wdev) {
|
||||
err = ieee80211_set_ap_mbssid_options(sdata,
|
||||
@@ -3569,6 +3574,12 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3571,6 +3576,12 @@ static int __ieee80211_csa_finalize(stru
|
||||
lockdep_assert_held(&local->mtx);
|
||||
lockdep_assert_held(&local->chanctx_mtx);
|
||||
|
||||
@@ -72,7 +72,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/*
|
||||
* using reservation isn't immediate as it may be deferred until later
|
||||
* with multi-vif. once reservation is complete it will re-schedule the
|
||||
@@ -3611,7 +3622,7 @@ static int __ieee80211_csa_finalize(stru
|
||||
@@ -3613,7 +3624,7 @@ static int __ieee80211_csa_finalize(stru
|
||||
return err;
|
||||
|
||||
cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0,
|
||||
@@ -81,7 +81,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3873,9 +3884,13 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3875,9 +3886,13 @@ __ieee80211_channel_switch(struct wiphy
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (sdata->deflink.csa_block_tx)
|
||||
ieee80211_stop_vif_queues(local, sdata,
|
||||
@@ -3883,7 +3898,8 @@ __ieee80211_channel_switch(struct wiphy
|
||||
@@ -3885,7 +3900,8 @@ __ieee80211_channel_switch(struct wiphy
|
||||
|
||||
cfg80211_ch_switch_started_notify(sdata->dev,
|
||||
&sdata->deflink.csa_chandef, 0,
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -2493,21 +2493,55 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2497,21 +2497,55 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
|
||||
/* Finally also reconfigure all the BSS information */
|
||||
list_for_each_entry(sdata, &local->interfaces, list) {
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
switch (sdata->vif.type) {
|
||||
@@ -2527,42 +2561,42 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2531,42 +2565,42 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
&sdata->deflink.tx_conf[i]);
|
||||
break;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
break;
|
||||
case NL80211_IFTYPE_OCB:
|
||||
changed |= BSS_CHANGED_OCB;
|
||||
@@ -2597,6 +2631,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2601,6 +2635,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
case NL80211_IFTYPE_NAN:
|
||||
res = ieee80211_reconfig_nan(sdata);
|
||||
if (res < 0) {
|
||||
@@ -158,7 +158,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
ieee80211_handle_reconfig_failure(local);
|
||||
return res;
|
||||
}
|
||||
@@ -2614,6 +2649,10 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2618,6 +2653,10 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
WARN_ON(1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -2344,6 +2344,35 @@ static int ieee80211_reconfig_nan(struct
|
||||
@@ -2348,6 +2348,35 @@ static int ieee80211_reconfig_nan(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
int ieee80211_reconfig(struct ieee80211_local *local)
|
||||
{
|
||||
struct ieee80211_hw *hw = &local->hw;
|
||||
@@ -2606,7 +2635,13 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2610,7 +2639,13 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
changed |= BSS_CHANGED_IBSS;
|
||||
fallthrough;
|
||||
case NL80211_IFTYPE_AP:
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (sdata->vif.bss_conf.ftm_responder == 1 &&
|
||||
wiphy_ext_feature_isset(sdata->local->hw.wiphy,
|
||||
@@ -2616,6 +2651,13 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2620,6 +2655,13 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP) {
|
||||
changed |= BSS_CHANGED_AP_PROBE_RESP;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -521,7 +521,7 @@ static void ieee80211_do_stop(struct iee
|
||||
@@ -542,7 +542,7 @@ static void ieee80211_do_stop(struct iee
|
||||
cancel_work_sync(&sdata->recalc_smps);
|
||||
|
||||
sdata_lock(sdata);
|
||||
@@ -141,7 +141,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
"destroying interface with valid links 0x%04x\n",
|
||||
sdata->vif.valid_links);
|
||||
|
||||
@@ -1834,7 +1834,7 @@ static int ieee80211_runtime_change_ifty
|
||||
@@ -1855,7 +1855,7 @@ static int ieee80211_runtime_change_ifty
|
||||
return -EBUSY;
|
||||
|
||||
/* for now, don't support changing while links exist */
|
||||
@@ -485,7 +485,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct {
|
||||
u8 id;
|
||||
u8 len;
|
||||
@@ -2542,7 +2542,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2546,7 +2546,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
continue;
|
||||
|
||||
sdata_lock(sdata);
|
||||
@@ -494,7 +494,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct ieee80211_bss_conf *old[IEEE80211_MLD_MAX_NUM_LINKS] = {
|
||||
[0] = &sdata->vif.bss_conf,
|
||||
};
|
||||
@@ -2562,7 +2562,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2566,7 +2566,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
for (link_id = 0;
|
||||
link_id < ARRAY_SIZE(sdata->vif.link_conf);
|
||||
link_id++) {
|
||||
@@ -503,7 +503,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
!(sdata->vif.active_links & BIT(link_id)))
|
||||
continue;
|
||||
|
||||
@@ -2594,12 +2594,12 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2598,12 +2598,12 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
if (sdata->vif.bss_conf.mu_mimo_owner)
|
||||
changed |= BSS_CHANGED_MU_GROUPS;
|
||||
|
||||
@@ -518,7 +518,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
changed |= BSS_CHANGED_ASSOC |
|
||||
BSS_CHANGED_ARP_FILTER |
|
||||
BSS_CHANGED_PS;
|
||||
@@ -2637,7 +2637,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2641,7 +2641,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
case NL80211_IFTYPE_AP:
|
||||
changed |= BSS_CHANGED_P2P_PS;
|
||||
|
||||
@@ -527,7 +527,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
ieee80211_vif_cfg_change_notify(sdata,
|
||||
BSS_CHANGED_SSID);
|
||||
else
|
||||
@@ -2651,7 +2651,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
@@ -2655,7 +2655,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
if (sdata->vif.type == NL80211_IFTYPE_AP) {
|
||||
changed |= BSS_CHANGED_AP_PROBE_RESP;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -3077,6 +3077,19 @@ static int ieee80211_get_tx_power(struct
|
||||
@@ -3079,6 +3079,19 @@ static int ieee80211_get_tx_power(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
@@ -5007,6 +5020,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
@@ -5009,6 +5022,7 @@ const struct cfg80211_ops mac80211_confi
|
||||
.set_wiphy_params = ieee80211_set_wiphy_params,
|
||||
.set_tx_power = ieee80211_set_tx_power,
|
||||
.get_tx_power = ieee80211_get_tx_power,
|
||||
@@ -118,7 +118,7 @@
|
||||
if (local->hw.conf.power_level != power) {
|
||||
changed |= IEEE80211_CONF_CHANGE_POWER;
|
||||
local->hw.conf.power_level = power;
|
||||
@@ -759,6 +765,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
@@ -766,6 +772,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_BW;
|
||||
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
|
||||
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
|
||||
@@ -128,7 +128,7 @@
|
||||
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -820,6 +820,7 @@ static const struct nla_policy nl80211_p
|
||||
@@ -830,6 +830,7 @@ static const struct nla_policy nl80211_p
|
||||
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
|
||||
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
|
||||
[NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
|
||||
@@ -136,7 +136,7 @@
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -3547,6 +3548,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
@@ -3584,6 +3585,22 @@ static int nl80211_set_wiphy(struct sk_b
|
||||
if (result)
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2368,6 +2368,13 @@ static void sta_stats_decode_rate(struct
|
||||
@@ -2382,6 +2382,13 @@ static void sta_stats_decode_rate(struct
|
||||
|
||||
sband = local->hw.wiphy->bands[band];
|
||||
|
||||
|
||||
@@ -1,39 +1,33 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8101
|
||||
PKG_VERSION:=1.039.00
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=@IMMORTALWRT
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8101/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=e64e1738e71d6717dd844bf771fea4691edae63e92d7d03bb5ad2ef08e56e72b
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_MAINTAINER:=Alvaro Fernandez Rojas <noltari@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/r8101
|
||||
TITLE:=Driver for Realtek r8101 chipsets
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/src/r8101.ko
|
||||
TITLE:=Realtek RTL8101 PCI Fast Ethernet driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-libphy
|
||||
FILES:=$(PKG_BUILD_DIR)/src/r8101.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8101)
|
||||
endef
|
||||
|
||||
define KernelPackage/r8101/description
|
||||
This package contains a driver for Realtek r8101 chipsets.
|
||||
PROVIDES:=kmod-r8169
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) M=$(PKG_BUILD_DIR)/src modules
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M="$(PKG_BUILD_DIR)/src" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,r8101))
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
From ec0de750e20073b23c91b67f4bc3ab71c50f0eed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Sat, 17 Aug 2024 21:19:54 +0200
|
||||
Subject: [PATCH] r8101: print link speed and duplex mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Like other Ethernet drivers, print link speed and duplex mode
|
||||
when the interface is up. Formatting output at the same time.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
src/r8101.h | 2 ++
|
||||
src/r8101_n.c | 42 +++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 41 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/r8101.h
|
||||
+++ b/src/r8101.h
|
||||
@@ -1162,6 +1162,8 @@ enum RTL8101_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
+#define RTL8101_FULL_DUPLEX_MASK (FullDup)
|
||||
+
|
||||
/* ResetCounterCommand */
|
||||
CounterReset = 0x1,
|
||||
/* DumpCounterCommand */
|
||||
--- a/src/r8101_n.c
|
||||
+++ b/src/r8101_n.c
|
||||
@@ -39,6 +39,7 @@ This driver is modified from r8169.c in
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/phy.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -2838,6 +2839,34 @@ rtl8101_issue_offset_99_event(struct rtl
|
||||
}
|
||||
}
|
||||
|
||||
+static unsigned int rtl8101_phy_duplex(u8 status)
|
||||
+{
|
||||
+ unsigned int duplex = DUPLEX_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & RTL8101_FULL_DUPLEX_MASK)
|
||||
+ duplex = DUPLEX_FULL;
|
||||
+ else
|
||||
+ duplex = DUPLEX_HALF;
|
||||
+ }
|
||||
+
|
||||
+ return duplex;
|
||||
+}
|
||||
+
|
||||
+static int rtl8101_phy_speed(u8 status)
|
||||
+{
|
||||
+ int speed = SPEED_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & _100bps)
|
||||
+ speed = SPEED_100;
|
||||
+ else if (status & _10bps)
|
||||
+ speed = SPEED_10;
|
||||
+ }
|
||||
+
|
||||
+ return speed;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
rtl8101_check_link_status(struct net_device *dev)
|
||||
{
|
||||
@@ -2913,8 +2942,15 @@ rtl8101_check_link_status(struct net_dev
|
||||
tp->phy_reg_aner = rtl8101_mdio_read(tp, MII_EXPANSION);
|
||||
tp->phy_reg_anlpar = rtl8101_mdio_read(tp, MII_LPA);
|
||||
|
||||
- if (netif_msg_ifup(tp))
|
||||
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
|
||||
+ if (netif_msg_ifup(tp)) {
|
||||
+ const u8 phy_status = RTL_R8(tp, PHYstatus);
|
||||
+ const unsigned int phy_duplex = rtl8101_phy_duplex(phy_status);
|
||||
+ const int phy_speed = rtl8101_phy_speed(phy_status);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
|
||||
+ dev->name,
|
||||
+ phy_speed_to_str(phy_speed),
|
||||
+ phy_duplex_to_str(phy_duplex));
|
||||
+ }
|
||||
} else {
|
||||
if (tp->mcfg == CFG_METHOD_11 || tp->mcfg == CFG_METHOD_12 ||
|
||||
tp->mcfg == CFG_METHOD_13) {
|
||||
@@ -2925,7 +2961,7 @@ rtl8101_check_link_status(struct net_dev
|
||||
rtl8101_mdio_write(tp, 0x1F, 0x0000);
|
||||
}
|
||||
if (netif_msg_ifdown(tp))
|
||||
- printk(KERN_INFO PFX "%s: link down\n", dev->name);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Down\n", dev->name);
|
||||
|
||||
tp->phy_reg_aner = 0;
|
||||
tp->phy_reg_anlpar = 0;
|
||||
@@ -1,42 +1,32 @@
|
||||
# Attribution: https://gist.github.com/lenew/9b41ba901c3393047ede0766760f9d55
|
||||
|
||||
#Put this source to 'package/kernel/r8125' folder of OpenWRT/LEDE SDK
|
||||
#Build(make menuconfig, make defconfig, make)
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.013.02-2
|
||||
PKG_VERSION:=9.013.02
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/awesometic/realtek-r8125-dkms/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=eae10100680de13e8119602c50a1748b8a0669eccd61d9a4515b4c846deb3960
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-dkms-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=d36410ee99c956f250d9cd08340d8c36567d190f420a8ee128ff6e51225aac0c
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_MAINTAINER:=Alvaro Fernandez Rojas <noltari@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/r8125
|
||||
TITLE:=Driver for Realtek r8125 chipsets
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=@PCI_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/src/r8125.ko
|
||||
TITLE:=Realtek RTL8125 PCI 2.5 Gigabit Ethernet driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-libphy
|
||||
FILES:=$(PKG_BUILD_DIR)/src/r8125.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8125)
|
||||
endef
|
||||
|
||||
define KernelPackage/r8125/description
|
||||
This package contains a driver for Realtek r8125 chipsets.
|
||||
PROVIDES:=kmod-r8169 kmod-r8125-rss
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M=$(PKG_BUILD_DIR)/src \
|
||||
M="$(PKG_BUILD_DIR)/src" \
|
||||
CONFIG_ASPM=n \
|
||||
ENABLE_RSS_SUPPORT=y \
|
||||
modules
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Sat, 17 Aug 2024 22:07:23 +0200
|
||||
Subject: [PATCH] r8125_rss: silence rxnfc log
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This log is noisy and useless, just ignore it.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
---
|
||||
src/r8125_rss.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/r8125_rss.c
|
||||
+++ b/src/r8125_rss.c
|
||||
@@ -91,7 +91,7 @@ int rtl8125_get_rxnfc(struct net_device
|
||||
struct rtl8125_private *tp = netdev_priv(dev);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
|
||||
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return ret;
|
||||
@@ -0,0 +1,100 @@
|
||||
From e351ac87bc3135e8555587e0bf80efb248ade0b7 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Sun, 4 Aug 2024 21:16:23 +0800
|
||||
Subject: [PATCH] r8125: print link speed and duplex mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Like other Ethernet drivers, print link speed and duplex mode
|
||||
when the interface is up. Formatting output at the same time.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
src/r8125.h | 2 ++
|
||||
src/r8125_n.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 45 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/r8125.h
|
||||
+++ b/src/r8125.h
|
||||
@@ -1563,6 +1563,8 @@ enum RTL8125_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
|
||||
+
|
||||
/* DBG_reg */
|
||||
Fix_Nak_1 = (1 << 4),
|
||||
Fix_Nak_2 = (1 << 3),
|
||||
--- a/src/r8125_n.c
|
||||
+++ b/src/r8125_n.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/phy.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -5112,6 +5113,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
+static unsigned int rtl8125_phy_duplex(u16 status)
|
||||
+{
|
||||
+ unsigned int duplex = DUPLEX_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & RTL8125_FULL_DUPLEX_MASK)
|
||||
+ duplex = DUPLEX_FULL;
|
||||
+ else
|
||||
+ duplex = DUPLEX_HALF;
|
||||
+ }
|
||||
+
|
||||
+ return duplex;
|
||||
+}
|
||||
+
|
||||
+static int rtl8125_phy_speed(u16 status)
|
||||
+{
|
||||
+ int speed = SPEED_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & _2500bpsF)
|
||||
+ speed = SPEED_2500;
|
||||
+ else if (status & _1000bpsF)
|
||||
+ speed = SPEED_1000;
|
||||
+ else if (status & _100bps)
|
||||
+ speed = SPEED_100;
|
||||
+ else if (status & _10bps)
|
||||
+ speed = SPEED_10;
|
||||
+ }
|
||||
+
|
||||
+ return speed;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
_rtl8125_check_link_status(struct net_device *dev)
|
||||
{
|
||||
@@ -5120,11 +5153,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
if (tp->link_ok(dev)) {
|
||||
rtl8125_link_on_patch(dev);
|
||||
|
||||
- if (netif_msg_ifup(tp))
|
||||
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
|
||||
+ if (netif_msg_ifup(tp)) {
|
||||
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
|
||||
+ const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status);
|
||||
+ const int phy_speed = rtl8125_phy_speed(phy_status);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
|
||||
+ dev->name,
|
||||
+ phy_speed_to_str(phy_speed),
|
||||
+ phy_duplex_to_str(phy_duplex));
|
||||
+ }
|
||||
} else {
|
||||
if (netif_msg_ifdown(tp))
|
||||
- printk(KERN_INFO PFX "%s: link down\n", dev->name);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Down\n", dev->name);
|
||||
|
||||
rtl8125_link_down_patch(dev);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/r8125_n.c
|
||||
+++ b/src/r8125_n.c
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mii.h>
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -13626,6 +13627,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
|
||||
@@ -13666,6 +13667,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
|
||||
tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
static void
|
||||
rtl8125_init_software_variable(struct net_device *dev)
|
||||
{
|
||||
@@ -14260,6 +14280,8 @@ rtl8125_init_software_variable(struct ne
|
||||
@@ -14300,6 +14320,8 @@ rtl8125_init_software_variable(struct ne
|
||||
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
|
||||
tp->rtl8125_rx_config &= ~EnableRxDescV4_1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/r8125_n.c
|
||||
+++ b/src/r8125_n.c
|
||||
@@ -15305,6 +15305,7 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
@@ -15345,6 +15345,7 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
void __iomem *ioaddr;
|
||||
struct net_device *dev;
|
||||
struct rtl8125_private *tp;
|
||||
@@ -8,7 +8,7 @@
|
||||
int rc = -ENOMEM, i, pm_cap;
|
||||
|
||||
assert(ioaddr_out != NULL);
|
||||
@@ -15319,6 +15320,9 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
@@ -15359,6 +15360,9 @@ rtl8125_init_board(struct pci_dev *pdev,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
35
package/kernel/r8126/Makefile
Normal file
35
package/kernel/r8126/Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8126
|
||||
PKG_VERSION:=10.013.00
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=b41bda6ff3bbb7d9bc5b81c5c21355f031587d3a3a5862abcd4d766e942272e7
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_MAINTAINER:=Alvaro Fernandez Rojas <noltari@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/r8126
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Realtek RTL8126 PCI 5 Gigabit Ethernet driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-libphy
|
||||
FILES:=$(PKG_BUILD_DIR)/src/r8126.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8126)
|
||||
PROVIDES:=kmod-r8169 kmod-r8126-rss
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M="$(PKG_BUILD_DIR)/src" \
|
||||
CONFIG_ASPM=n \
|
||||
ENABLE_RSS_SUPPORT=y \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,r8126))
|
||||
21
package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch
Normal file
21
package/kernel/r8126/patches/001-r8126.h-use-BIT_ULL.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
From 9649df50a239d1379cc8d9febd4854a0c7ca0731 Mon Sep 17 00:00:00 2001
|
||||
From: Mieczyslaw Nalewaj <namiltd@poczta.onet.pl>
|
||||
Date: Sat, 10 Aug 2024 17:42:44 +0200
|
||||
Subject: [PATCH] r8126.h: use BIT_ULL
|
||||
|
||||
Fixes compilation on 32 bit systems.
|
||||
---
|
||||
src/r8126.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/r8126.h
|
||||
+++ b/src/r8126.h
|
||||
@@ -678,7 +678,7 @@ This is free software, and you are welco
|
||||
#ifndef ADVERTISED_2500baseX_Full
|
||||
#define ADVERTISED_2500baseX_Full 0x8000
|
||||
#endif
|
||||
-#define RTK_ADVERTISED_5000baseX_Full BIT(48)
|
||||
+#define RTK_ADVERTISED_5000baseX_Full BIT_ULL(48)
|
||||
|
||||
#define RTK_ADVERTISE_2500FULL 0x80
|
||||
#define RTK_ADVERTISE_5000FULL 0x100
|
||||
@@ -0,0 +1,27 @@
|
||||
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Sat, 17 Aug 2024 22:07:23 +0200
|
||||
Subject: [PATCH] r8126_rss: silence rxnfc log
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This log is noisy and useless, just ignore it.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
src/r8126_rss.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/r8126_rss.c
|
||||
+++ b/src/r8126_rss.c
|
||||
@@ -91,7 +91,7 @@ int rtl8126_get_rxnfc(struct net_device
|
||||
struct rtl8126_private *tp = netdev_priv(dev);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
|
||||
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
|
||||
|
||||
if (!(dev->features & NETIF_F_RXHASH))
|
||||
return ret;
|
||||
@@ -0,0 +1,102 @@
|
||||
From 5ca1d47e065c0318774a946ffdf76010c78cc164 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Sat, 10 Aug 2024 20:16:32 +0800
|
||||
Subject: [PATCH] r8126: print link speed and duplex mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Like other Ethernet drivers, print link speed and duplex mode
|
||||
when the interface is up. Formatting output at the same time.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
src/r8126.h | 2 ++
|
||||
src/r8126_n.c | 48 +++++++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 47 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/r8126.h
|
||||
+++ b/src/r8126.h
|
||||
@@ -1561,6 +1561,8 @@ enum RTL8126_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
+#define RTL8126_FULL_DUPLEX_MASK (_5000bpsF | _2500bpsF | _1000bpsF | FullDup)
|
||||
+
|
||||
/* DBG_reg */
|
||||
Fix_Nak_1 = (1 << 4),
|
||||
Fix_Nak_2 = (1 << 3),
|
||||
--- a/src/r8126_n.c
|
||||
+++ b/src/r8126_n.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/phy.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -4740,6 +4741,40 @@ rtl8126_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
+static unsigned int rtl8126_phy_duplex(u16 status)
|
||||
+{
|
||||
+ unsigned int duplex = DUPLEX_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & RTL8126_FULL_DUPLEX_MASK)
|
||||
+ duplex = DUPLEX_FULL;
|
||||
+ else
|
||||
+ duplex = DUPLEX_HALF;
|
||||
+ }
|
||||
+
|
||||
+ return duplex;
|
||||
+}
|
||||
+
|
||||
+static int rtl8126_phy_speed(u16 status)
|
||||
+{
|
||||
+ int speed = SPEED_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & _5000bpsF)
|
||||
+ speed = SPEED_5000;
|
||||
+ else if (status & _2500bpsF)
|
||||
+ speed = SPEED_2500;
|
||||
+ else if (status & _1000bpsF)
|
||||
+ speed = SPEED_1000;
|
||||
+ else if (status & _100bps)
|
||||
+ speed = SPEED_100;
|
||||
+ else if (status & _10bps)
|
||||
+ speed = SPEED_10;
|
||||
+ }
|
||||
+
|
||||
+ return speed;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
_rtl8126_check_link_status(struct net_device *dev)
|
||||
{
|
||||
@@ -4748,11 +4783,18 @@ _rtl8126_check_link_status(struct net_de
|
||||
if (tp->link_ok(dev)) {
|
||||
rtl8126_link_on_patch(dev);
|
||||
|
||||
- if (netif_msg_ifup(tp))
|
||||
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
|
||||
+ if (netif_msg_ifup(tp)) {
|
||||
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
|
||||
+ const unsigned int phy_duplex = rtl8126_phy_duplex(phy_status);
|
||||
+ const int phy_speed = rtl8126_phy_speed(phy_status);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
|
||||
+ dev->name,
|
||||
+ phy_speed_to_str(phy_speed),
|
||||
+ phy_duplex_to_str(phy_duplex));
|
||||
+ }
|
||||
} else {
|
||||
if (netif_msg_ifdown(tp))
|
||||
- printk(KERN_INFO PFX "%s: link down\n", dev->name);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Down\n", dev->name);
|
||||
|
||||
rtl8126_link_down_patch(dev);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
--- a/src/r8126_n.c
|
||||
+++ b/src/r8126_n.c
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mii.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -11652,6 +11653,25 @@ rtl8126_setup_mqs_reg(struct rtl8126_pri
|
||||
}
|
||||
}
|
||||
|
||||
+static int
|
||||
+rtl8126_led_configuration(struct rtl8126_private *tp)
|
||||
+{
|
||||
+ const int led_regs[] = { 0x18, 0x86, 0x84, 0x96 }; /* LEDSEL 0-3 */
|
||||
+ u32 led_data[4];
|
||||
+ int ret, i;
|
||||
+
|
||||
+ ret = of_property_read_u32_array(tp->pci_dev->dev.of_node,
|
||||
+ "realtek,led-data", led_data, 4);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ RTL_W16(tp, led_regs[i], led_data[i]);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
rtl8126_init_software_variable(struct net_device *dev)
|
||||
{
|
||||
@@ -12024,6 +12044,8 @@ rtl8126_init_software_variable(struct ne
|
||||
if (tp->InitRxDescType == RX_DESC_RING_TYPE_3)
|
||||
tp->rtl8126_rx_config |= EnableRxDescV3;
|
||||
|
||||
+ rtl8126_led_configuration(tp);
|
||||
+
|
||||
tp->NicCustLedValue = RTL_R16(tp, CustomLED);
|
||||
|
||||
tp->wol_opts = rtl8126_get_hw_wol(tp);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user