Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42a15ca378 | ||
|
|
1d4dea6d4f | ||
|
|
41a97c2074 | ||
|
|
9a765554f4 | ||
|
|
2cc9ee8000 | ||
|
|
06874171d1 | ||
|
|
c5ef62a218 | ||
|
|
99b00edf35 | ||
|
|
9132344444 | ||
|
|
169c9e3a88 | ||
|
|
39bf2aee0e | ||
|
|
3008f1f441 | ||
|
|
ee62912b2d | ||
|
|
f6513143ad | ||
|
|
5cf00adf21 | ||
|
|
0e5350db43 | ||
|
|
52de8bf86e | ||
|
|
41d36bb2d0 | ||
|
|
cd17ca7d6f | ||
|
|
30e6f28853 | ||
|
|
f65edc9b99 | ||
|
|
fdd862f9ac | ||
|
|
4910ffa8e9 | ||
|
|
d38f7ec56f | ||
|
|
56d69ee70d | ||
|
|
c6256a6533 | ||
|
|
28343cfb7d | ||
|
|
180b750c02 | ||
|
|
411c73f748 | ||
|
|
e44a781e11 | ||
|
|
95b0b8725c | ||
|
|
3731ffa0ee | ||
|
|
53c60d4bfa | ||
|
|
88075c87dc | ||
|
|
b1c3539868 | ||
|
|
864bba55d8 | ||
|
|
92020d4242 | ||
|
|
17e9553284 | ||
|
|
f44f8b07b0 | ||
|
|
e8a806c49e | ||
|
|
45b3f2aa0f | ||
|
|
604274c24b | ||
|
|
13c9f1f37d | ||
|
|
e12ffac02d | ||
|
|
f1e1daa6e8 | ||
|
|
0327104686 | ||
|
|
8ed3b5b04b | ||
|
|
2736a5df94 | ||
|
|
49b2e6365d | ||
|
|
2d69d098e0 | ||
|
|
7bd583e5f3 | ||
|
|
b2896d413e | ||
|
|
952de38ef4 | ||
|
|
abf8209d7f | ||
|
|
610b2cff60 | ||
|
|
b99d7aecc8 | ||
|
|
7612ecb201 | ||
|
|
7fc336484b | ||
|
|
d1c15c41d9 |
@@ -1,4 +1,4 @@
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^b0ccc356900f6e1e1dc613d0ea980d5572f553dd
|
||||
src-git luci https://git.openwrt.org/project/luci.git^cc582ebfb3cb2782db841ad2a4e908d1df4046f9
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^10d3ffd8b30186b49538167bac1fa1bf9c88f860
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^001ae7137c88bb679284bfac5087cde65b5abf9a
|
||||
src-git packages https://git.openwrt.org/feed/packages.git^78bcd00c13587571b5c79ed2fc3363aa674aaef7
|
||||
src-git luci https://git.openwrt.org/project/luci.git^fe09ab990256d8b63e76cc1ab2435baef921b8b4
|
||||
src-git routing https://git.openwrt.org/feed/routing.git^a0d61bddb3ce4ca54bd76af86c28f58feb6cc044
|
||||
src-git telephony https://git.openwrt.org/feed/telephony.git^0183c1adda0e7581698b0ea4bff7c08379acf447
|
||||
|
||||
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .179
|
||||
LINUX_VERSION-5.4 = .188
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.179 = 2c9bdec0922a95aff34e8d53d2e0ecf7e842033cd908d2959a43d34afb5d897d
|
||||
LINUX_KERNEL_HASH-5.4.188 = 9fbc8bfdc28c9fce2307bdf7cf1172c9819df673397a411c40a5c3d0a570fdbc
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -44,6 +44,7 @@ TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
|
||||
UBOOT_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
|
||||
LOCALVERSION="-OpenWrt-$(REVISION)" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)"
|
||||
|
||||
define Build/U-Boot/Target
|
||||
|
||||
@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.2)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.3)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16495-bf0c965af0)
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16554-1d4dea6d4f)
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.2)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.3)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
||||
@@ -48,6 +48,7 @@ boot() {
|
||||
|
||||
/bin/config_generate
|
||||
uci_apply_defaults
|
||||
sync
|
||||
|
||||
# temporary hack until configd exists
|
||||
/sbin/reload_config
|
||||
|
||||
@@ -183,7 +183,7 @@ if VERSIONOPT
|
||||
config VERSION_REPO
|
||||
string
|
||||
prompt "Release repository"
|
||||
default "https://downloads.openwrt.org/releases/21.02.2"
|
||||
default "https://downloads.openwrt.org/releases/21.02.3"
|
||||
help
|
||||
This is the repository address embedded in the image, it defaults
|
||||
to the trunk snapshot repo; the url may contain the following placeholders:
|
||||
|
||||
48
package/boot/uboot-bcm4908/Makefile
Normal file
48
package/boot/uboot-bcm4908/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git
|
||||
PKG_SOURCE_DATE:=2022-03-03
|
||||
PKG_SOURCE_VERSION:=92e9eca819c9c898d9d2010e1a217726c42c8c47
|
||||
PKG_MIRROR_HASH:=11c37fe4c18d55e799153600d1cfd8ee9ca7da8326d0024c1d825f4a327c5f0d
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define U-Boot/Default
|
||||
BUILD_TARGET:=bcm4908
|
||||
UBOOT_IMAGE:=u-boot-nodtb.bin
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
define U-Boot/bcm4908
|
||||
NAME:=Broadcom's BCM4908
|
||||
UBOOT_CONFIG:=bcm94908
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
bcm4908
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
mkdir -p $(PKG_BUILD_DIR)/include/generated/
|
||||
( cd $(PKG_BUILD_DIR)/board/broadcom/bcmbca/httpd/html/ && \
|
||||
$(STAGING_DIR_HOST)/bin/xxd -i index.html > ../../../../../include/generated/index.h && \
|
||||
$(STAGING_DIR_HOST)/bin/xxd -i flashing.html > ../../../../../include/generated/flashing.h && \
|
||||
$(STAGING_DIR_HOST)/bin/xxd -i fail.html > ../../../../../include/generated/fail.h && \
|
||||
$(STAGING_DIR_HOST)/bin/xxd -i 404.html > ../../../../../include/generated/404.h )
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/u-boot
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/u-boot/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/u-boot.dtb $(STAGING_DIR_IMAGE)/u-boot/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/arch/arm/dts/*.dtb $(STAGING_DIR_IMAGE)/u-boot/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
@@ -0,0 +1,40 @@
|
||||
From: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Date: Mon, 26 Sep 2016 13:05:02 +0900
|
||||
Subject: [PATCH] check-config: allow to complete build even with ad-hoc CONFIG
|
||||
options
|
||||
|
||||
Currently, the check-config.sh terminates the build when unknown
|
||||
ad-hoc options are detected. I think it is too much because we may
|
||||
want to patch config headers locally in a build/deployment project.
|
||||
|
||||
So, let's relax check-config.sh to just warn even if it detects
|
||||
options that are not in the whitelist. Instead, this check can be
|
||||
done at the end of build, along with other checks. It will catch
|
||||
more attention.
|
||||
|
||||
Even with this change, the Buildman tool catches new warnings,
|
||||
so Tom can give NACK to new ad-hoc options.
|
||||
|
||||
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
---
|
||||
scripts/check-config.sh | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/scripts/check-config.sh
|
||||
+++ b/scripts/check-config.sh
|
||||
@@ -50,14 +50,13 @@ cat `find ${srctree} -name "Kconfig*"` |sed -n \
|
||||
|sort |uniq > ${ok}
|
||||
comm -23 ${suspects} ${ok} >${new_adhoc}
|
||||
if [ -s ${new_adhoc} ]; then
|
||||
- echo >&2 "Error: You must add new CONFIG options using Kconfig"
|
||||
+ echo >&2 "Warning: You must add new CONFIG options using Kconfig"
|
||||
echo >&2 "The following new ad-hoc CONFIG options were detected:"
|
||||
cat >&2 ${new_adhoc}
|
||||
echo >&2
|
||||
echo >&2 "Please add these via Kconfig instead. Find a suitable Kconfig"
|
||||
echo >&2 "file and add a 'config' or 'menuconfig' option."
|
||||
# Don't delete the temporary files in case they are useful
|
||||
- exit 1
|
||||
else
|
||||
rm ${suspects} ${ok} ${new_adhoc}
|
||||
fi
|
||||
@@ -0,0 +1,24 @@
|
||||
From 8efe417aa9de654425cc01d0fc93be355a3f648d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 13 Oct 2021 11:04:45 +0200
|
||||
Subject: [PATCH] tools: fix mkimage static compilation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
tools/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -157,7 +157,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON
|
||||
HOSTCFLAGS_kwbimage.o += \
|
||||
$(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
|
||||
HOSTLOADLIBES_mkimage += \
|
||||
- $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")
|
||||
+ $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto -lpthread")
|
||||
|
||||
# OS X deprecate openssl in favour of CommonCrypto, supress deprecation
|
||||
# warnings on those systems
|
||||
@@ -0,0 +1,38 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 4 Mar 2022 09:21:32 +0100
|
||||
Subject: [PATCH] configs: bcm94908: unset CONFIG_SPL
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Compiling SPL is always tricky as it needs to fit limited resources.
|
||||
Fortunately in most cases there is no need to replace SPL or TPL while
|
||||
flashing a new firmware.
|
||||
|
||||
Compiling SPL for BCM4908 seems to fail with non-Broadcom toolchain:
|
||||
aarch64-openwrt-linux-musl-ld.bfd: u-boot-spl section `.u_boot_list' will not fit in region `.sram'
|
||||
aarch64-openwrt-linux-musl-ld.bfd: section .bss VMA [00000000822b9000,00000000822b93ef] overlaps section .u_boot_list VMA [00000000822b8f60,00000000822b9a87]
|
||||
aarch64-openwrt-linux-musl-ld.bfd: region `.sram' overflowed by 2696 bytes
|
||||
|
||||
It also requires hashtable.h which has to be generated using some
|
||||
Broadcom's custom perl script that isn't integrated as this point.
|
||||
|
||||
For now just disable SPL and use only last-stage U-Boot that must be
|
||||
shipped with every firmware.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
configs/bcm94908_defconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/configs/bcm94908_defconfig
|
||||
+++ b/configs/bcm94908_defconfig
|
||||
@@ -21,7 +21,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
-CONFIG_SPL=y
|
||||
+# CONFIG_SPL is not set
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_ENV_VARS_UBOOT_CONFIG=y
|
||||
CONFIG_TPL_SYS_MALLOC_F_LEN=0x11000
|
||||
@@ -0,0 +1,55 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 4 Mar 2022 09:23:34 +0100
|
||||
Subject: [PATCH] Assume TPL support for ATF when compiling U-Boot without TPL
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Broadcom's U-Boot behaviour depends on compilation time check whether
|
||||
TPL was compiled with or without ATF support. There is no proper runtime
|
||||
check.
|
||||
|
||||
When compiling just U-Boot (without SPL & TPL) there is no way to tell
|
||||
if it's going to work with TPL with or without ATF support.
|
||||
|
||||
Modify code to blindly assume ATF support in TPL in such cases. It seems
|
||||
to be always true for Broadcom and we need some assumption as we don't
|
||||
deal with compiling SPL or TPL.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
arch/arm/mach-bcmbca/bcm4908/cpu.c | 2 +-
|
||||
board/broadcom/bcmbca/board.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-bcmbca/bcm4908/cpu.c
|
||||
+++ b/arch/arm/mach-bcmbca/bcm4908/cpu.c
|
||||
@@ -138,7 +138,7 @@ int get_nr_cpus()
|
||||
return nr_cpus;
|
||||
}
|
||||
|
||||
-#if !defined(CONFIG_TPL_ATF)
|
||||
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
|
||||
void boot_secondary_cpu(unsigned long vector)
|
||||
{
|
||||
uint32_t cpu, nr_cpus = QUAD_CPUS;
|
||||
--- a/board/broadcom/bcmbca/board.c
|
||||
+++ b/board/broadcom/bcmbca/board.c
|
||||
@@ -103,7 +103,7 @@ void board_spinor_init(void)
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
-#if !defined(CONFIG_TPL_ATF)
|
||||
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
|
||||
unsigned long vector;
|
||||
#endif
|
||||
board_sdk_init_e();
|
||||
@@ -121,7 +121,7 @@ int board_init(void)
|
||||
printf("$Uboot: "BUILD_TAG" $\n");
|
||||
#endif
|
||||
|
||||
-#if !defined(CONFIG_TPL_ATF)
|
||||
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
|
||||
#if defined(CONFIG_ARM64)
|
||||
vector = (unsigned long)&_start;
|
||||
#else
|
||||
@@ -61,6 +61,8 @@ samsung,wam250|\
|
||||
ubnt,nanostation-m|\
|
||||
yuncore,a770|\
|
||||
yuncore,a782|\
|
||||
yuncore,a930|\
|
||||
yuncore,xd3200|\
|
||||
yuncore,xd4200|\
|
||||
zyxel,nbg6616)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
||||
|
||||
@@ -18,7 +18,10 @@ buffalo,ls421de)
|
||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000"
|
||||
;;
|
||||
cznic,turris-omnia)
|
||||
if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
|
||||
idx="$(find_mtd_index u-boot-env)"
|
||||
if [ -n "$idx" ]; then
|
||||
ubootenv_add_uci_config "/dev/mtd${idx}" "0x0" "0x10000" "0x10000"
|
||||
elif grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
|
||||
else
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
|
||||
|
||||
@@ -7,25 +7,24 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
UNPACK_CMD=unzip -q -p $(DL_DIR)/$(PKG_SOURCE) $(PKG_SOURCE_UNZIP) | gzip -dc | $(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
PKG_NAME:=cypress-firmware
|
||||
PKG_VERSION:=v5.4.18-2020_0402
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=5.4.18-2021_0812
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_UNZIP:=cypress-firmware-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=cypress-fmac-$(PKG_VERSION).zip
|
||||
PKG_SOURCE_URL:=https://community.cypress.com/gfawx74859/attachments/gfawx74859/resourcelibrary/1016/1/
|
||||
PKG_HASH:=b12b0570f462c2f3c26dde98b10235a845a7109037def1e7e51af728bcc1a958
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Infineon/ifx-linux-firmware/
|
||||
PKG_MIRROR_HASH:=ac882b482dd401b53cdecc6004cd2bd3d65e888c19206dcf10931a28033ada4d
|
||||
PKG_SOURCE_VERSION:=release-v$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
PKG_LICENSE_FILES:=LICENCE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/cypress-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=https://community.cypress.com/community/linux
|
||||
URL:=https://community.infineon.com/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@@ -41,10 +40,10 @@ endef
|
||||
define Package/cypress-firmware-43012-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43012-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -59,7 +58,7 @@ endef
|
||||
define Package/cypress-firmware-43340-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43340-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43340-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43340-sdio.bin
|
||||
endef
|
||||
|
||||
@@ -76,7 +75,7 @@ endef
|
||||
define Package/cypress-firmware-43362-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43362-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43362-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43362-sdio.bin
|
||||
endef
|
||||
|
||||
@@ -91,7 +90,7 @@ endef
|
||||
define Package/cypress-firmware-4339-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4339-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4339-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4339-sdio.bin
|
||||
endef
|
||||
|
||||
@@ -108,10 +107,10 @@ endef
|
||||
define Package/cypress-firmware-43430-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43430-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43430-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -128,10 +127,10 @@ endef
|
||||
define Package/cypress-firmware-43455-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43455-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43455-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -146,10 +145,10 @@ endef
|
||||
define Package/cypress-firmware-4354-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4354-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4354-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4354-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -164,10 +163,10 @@ endef
|
||||
define Package/cypress-firmware-4356-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-pcie.clm_blob
|
||||
endef
|
||||
|
||||
@@ -182,10 +181,10 @@ endef
|
||||
define Package/cypress-firmware-4356-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4356-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4356-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4356-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -200,51 +199,15 @@ endef
|
||||
define Package/cypress-firmware-43570-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac43570-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43570-pcie))
|
||||
|
||||
# Cypress 4359 PCIe Firmware
|
||||
define Package/cypress-firmware-4359-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4359 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4359-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4359-pcie))
|
||||
|
||||
# Cypress 4359 SDIO Firmware
|
||||
define Package/cypress-firmware-4359-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW4359 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-4359-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4359-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4359-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4359-sdio))
|
||||
|
||||
# Cypress 4373 SDIO Firmware
|
||||
define Package/cypress-firmware-4373-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
@@ -254,10 +217,10 @@ endef
|
||||
define Package/cypress-firmware-4373-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-sdio.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-sdio.clm_blob
|
||||
endef
|
||||
|
||||
@@ -272,10 +235,10 @@ endef
|
||||
define Package/cypress-firmware-4373-usb/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373-usb.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373-usb.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373-usb.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac4373.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac4373.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac4373.clm_blob
|
||||
endef
|
||||
|
||||
@@ -290,29 +253,11 @@ endef
|
||||
define Package/cypress-firmware-54591-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac54591-pcie.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac54591-pcie.clm_blob \
|
||||
$(PKG_BUILD_DIR)/firmware/cyfmac54591-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac54591-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-54591-pcie))
|
||||
|
||||
# Cypress 89459 PCIe Firmware
|
||||
define Package/cypress-firmware-89459-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW89459 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-89459-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-89459-pcie))
|
||||
|
||||
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=5.10.85-1
|
||||
PKG_VERSION:=5.10.110-1
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.85/
|
||||
PKG_HASH:=0b5f2d5acf572c448f102a186aaccd8b77bda182ac5166c7b2e3217870162784
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.110/
|
||||
PKG_HASH:=3d958154080c059adaf26512430fd1a8888d65a2228e5e70e48d028201e148b1
|
||||
|
||||
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3189,6 +3189,16 @@ int ath10k_core_register(struct ath10k *
|
||||
@@ -3206,6 +3206,16 @@ int ath10k_core_register(struct ath10k *
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ v13:
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -130,6 +132,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -132,6 +134,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
@@ -148,7 +148,7 @@ v13:
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -335,6 +338,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -343,6 +346,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
@@ -156,7 +156,7 @@ v13:
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -375,6 +379,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -384,6 +388,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
@@ -164,7 +164,7 @@ v13:
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -422,6 +427,7 @@ static const struct ath10k_hw_params ath
|
||||
@@ -432,6 +437,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
@@ -172,7 +172,7 @@ v13:
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -2904,6 +2910,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
@@ -2921,6 +2927,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ v13:
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3162,9 +3172,18 @@ static void ath10k_core_register_work(st
|
||||
@@ -3179,9 +3189,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ v13:
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3210,6 +3229,8 @@ void ath10k_core_unregister(struct ath10
|
||||
@@ -3227,6 +3246,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -235,7 +235,11 @@ enum htt_rx_ring_flags {
|
||||
@@ -236,7 +236,11 @@ enum htt_rx_ring_flags {
|
||||
};
|
||||
|
||||
#define HTT_RX_RING_SIZE_MIN 128
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -431,6 +431,7 @@ struct brcmf_fw {
|
||||
@@ -433,6 +433,7 @@ struct brcmf_fw {
|
||||
struct brcmf_fw_request *req;
|
||||
u32 curpos;
|
||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
};
|
||||
|
||||
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
|
||||
@@ -638,6 +639,8 @@ static void brcmf_fw_request_done(const
|
||||
@@ -640,6 +641,8 @@ static void brcmf_fw_request_done(const
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -662,6 +665,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||
@@ -664,6 +667,8 @@ int brcmf_fw_get_firmwares(struct device
|
||||
{
|
||||
struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
@@ -39,7 +39,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
int ret;
|
||||
|
||||
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
||||
@@ -678,6 +683,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
@@ -680,6 +685,9 @@ int brcmf_fw_get_firmwares(struct device
|
||||
fwctx->dev = dev;
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
||||
fwctx->dev, GFP_KERNEL, fwctx,
|
||||
@@ -685,6 +693,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
@@ -687,6 +695,12 @@ int brcmf_fw_get_firmwares(struct device
|
||||
if (ret < 0)
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects
|
||||
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1307,7 +1307,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
@@ -1310,7 +1310,6 @@ static int ieee80211_stop_ap(struct wiph
|
||||
sdata->vif.bss_conf.ftmr_params = NULL;
|
||||
|
||||
__sta_info_flush(sdata, true);
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2725,7 +2725,7 @@ static void ieee80211_report_disconnect(
|
||||
@@ -2733,7 +2733,7 @@ static void ieee80211_report_disconnect(
|
||||
};
|
||||
|
||||
if (tx)
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
else
|
||||
cfg80211_rx_mlme_mgmt(sdata->dev, buf, len);
|
||||
|
||||
@@ -4719,7 +4719,8 @@ void ieee80211_mgd_quiesce(struct ieee80
|
||||
@@ -4734,7 +4734,8 @@ void ieee80211_mgd_quiesce(struct ieee80
|
||||
if (ifmgd->auth_data)
|
||||
ieee80211_destroy_auth_data(sdata, false);
|
||||
cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf,
|
||||
@@ -152,7 +152,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -15902,7 +15903,7 @@ static void nl80211_send_mlme_event(stru
|
||||
@@ -15914,7 +15915,7 @@ static void nl80211_send_mlme_event(stru
|
||||
const u8 *buf, size_t len,
|
||||
enum nl80211_commands cmd, gfp_t gfp,
|
||||
int uapsd_queues, const u8 *req_ies,
|
||||
@@ -161,7 +161,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct sk_buff *msg;
|
||||
void *hdr;
|
||||
@@ -15924,6 +15925,9 @@ static void nl80211_send_mlme_event(stru
|
||||
@@ -15936,6 +15937,9 @@ static void nl80211_send_mlme_event(stru
|
||||
nla_put(msg, NL80211_ATTR_REQ_IE, req_ies_len, req_ies)))
|
||||
goto nla_put_failure;
|
||||
|
||||
@@ -171,7 +171,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (uapsd_queues >= 0) {
|
||||
struct nlattr *nla_wmm =
|
||||
nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME);
|
||||
@@ -15952,7 +15956,8 @@ void nl80211_send_rx_auth(struct cfg8021
|
||||
@@ -15964,7 +15968,8 @@ void nl80211_send_rx_auth(struct cfg8021
|
||||
size_t len, gfp_t gfp)
|
||||
{
|
||||
nl80211_send_mlme_event(rdev, netdev, buf, len,
|
||||
@@ -181,7 +181,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
|
||||
@@ -15962,23 +15967,25 @@ void nl80211_send_rx_assoc(struct cfg802
|
||||
@@ -15974,23 +15979,25 @@ void nl80211_send_rx_assoc(struct cfg802
|
||||
{
|
||||
nl80211_send_mlme_event(rdev, netdev, buf, len,
|
||||
NL80211_CMD_ASSOCIATE, gfp, uapsd_queues,
|
||||
@@ -212,7 +212,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf,
|
||||
@@ -16009,7 +16016,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
|
||||
@@ -16021,7 +16028,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
|
||||
|
||||
trace_cfg80211_rx_unprot_mlme_mgmt(dev, buf, len);
|
||||
nl80211_send_mlme_event(rdev, dev, buf, len, cmd, GFP_ATOMIC, -1,
|
||||
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
struct ieee80211_mgd_auth_data *auth_data;
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2716,7 +2716,7 @@ EXPORT_SYMBOL(ieee80211_ap_probereq_get)
|
||||
@@ -2724,7 +2724,7 @@ EXPORT_SYMBOL(ieee80211_ap_probereq_get)
|
||||
|
||||
static void ieee80211_report_disconnect(struct ieee80211_sub_if_data *sdata,
|
||||
const u8 *buf, size_t len, bool tx,
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
{
|
||||
struct ieee80211_event event = {
|
||||
.type = MLME_EVENT,
|
||||
@@ -2725,7 +2725,7 @@ static void ieee80211_report_disconnect(
|
||||
@@ -2733,7 +2733,7 @@ static void ieee80211_report_disconnect(
|
||||
};
|
||||
|
||||
if (tx)
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
else
|
||||
cfg80211_rx_mlme_mgmt(sdata->dev, buf, len);
|
||||
|
||||
@@ -2747,13 +2747,18 @@ static void __ieee80211_disconnect(struc
|
||||
@@ -2755,13 +2755,18 @@ static void __ieee80211_disconnect(struc
|
||||
|
||||
tx = !sdata->csa_block_tx;
|
||||
|
||||
@@ -89,7 +89,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
tx, frame_buf);
|
||||
mutex_lock(&local->mtx);
|
||||
sdata->vif.csa_active = false;
|
||||
@@ -2766,7 +2771,9 @@ static void __ieee80211_disconnect(struc
|
||||
@@ -2774,7 +2779,9 @@ static void __ieee80211_disconnect(struc
|
||||
mutex_unlock(&local->mtx);
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), tx,
|
||||
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
sdata_unlock(sdata);
|
||||
}
|
||||
@@ -2785,6 +2792,13 @@ static void ieee80211_beacon_connection_
|
||||
@@ -2793,6 +2800,13 @@ static void ieee80211_beacon_connection_
|
||||
sdata_info(sdata, "Connection to AP %pM lost\n",
|
||||
ifmgd->bssid);
|
||||
__ieee80211_disconnect(sdata);
|
||||
@@ -114,7 +114,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
} else {
|
||||
ieee80211_mgd_probe_ap(sdata, true);
|
||||
}
|
||||
@@ -2823,6 +2837,21 @@ void ieee80211_connection_loss(struct ie
|
||||
@@ -2831,6 +2845,21 @@ void ieee80211_connection_loss(struct ie
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_connection_loss);
|
||||
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata,
|
||||
bool assoc)
|
||||
@@ -3126,7 +3155,7 @@ static void ieee80211_rx_mgmt_deauth(str
|
||||
@@ -3141,7 +3170,7 @@ static void ieee80211_rx_mgmt_deauth(str
|
||||
ieee80211_set_disassoc(sdata, 0, 0, false, NULL);
|
||||
|
||||
ieee80211_report_disconnect(sdata, (u8 *)mgmt, len, false,
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3175,7 +3204,8 @@ static void ieee80211_rx_mgmt_disassoc(s
|
||||
@@ -3190,7 +3219,8 @@ static void ieee80211_rx_mgmt_disassoc(s
|
||||
|
||||
ieee80211_set_disassoc(sdata, 0, 0, false, NULL);
|
||||
|
||||
@@ -155,7 +155,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
static void ieee80211_get_rates(struct ieee80211_supported_band *sband,
|
||||
@@ -4199,7 +4229,8 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
@@ -4214,7 +4244,8 @@ static void ieee80211_rx_mgmt_beacon(str
|
||||
true, deauth_buf);
|
||||
ieee80211_report_disconnect(sdata, deauth_buf,
|
||||
sizeof(deauth_buf), true,
|
||||
@@ -165,7 +165,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4344,7 +4375,7 @@ static void ieee80211_sta_connection_los
|
||||
@@ -4359,7 +4390,7 @@ static void ieee80211_sta_connection_los
|
||||
tx, frame_buf);
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true,
|
||||
@@ -174,7 +174,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
|
||||
@@ -5434,7 +5465,8 @@ int ieee80211_mgd_auth(struct ieee80211_
|
||||
@@ -5449,7 +5480,8 @@ int ieee80211_mgd_auth(struct ieee80211_
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -184,7 +184,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid);
|
||||
@@ -5506,7 +5538,8 @@ int ieee80211_mgd_assoc(struct ieee80211
|
||||
@@ -5521,7 +5553,8 @@ int ieee80211_mgd_assoc(struct ieee80211
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -194,7 +194,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
}
|
||||
|
||||
if (ifmgd->auth_data && !ifmgd->auth_data->done) {
|
||||
@@ -5809,7 +5842,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5824,7 +5857,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
ieee80211_destroy_auth_data(sdata, false);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -203,7 +203,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5829,7 +5862,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5844,7 +5877,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
ieee80211_destroy_assoc_data(sdata, false, true);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -212,7 +212,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5844,7 +5877,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
@@ -5859,7 +5892,7 @@ int ieee80211_mgd_deauth(struct ieee8021
|
||||
req->reason_code, tx, frame_buf);
|
||||
ieee80211_report_disconnect(sdata, frame_buf,
|
||||
sizeof(frame_buf), true,
|
||||
@@ -221,7 +221,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5877,7 +5910,7 @@ int ieee80211_mgd_disassoc(struct ieee80
|
||||
@@ -5892,7 +5925,7 @@ int ieee80211_mgd_disassoc(struct ieee80
|
||||
frame_buf);
|
||||
|
||||
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true,
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 24 Nov 2021 10:30:41 +0100
|
||||
Subject: [PATCH] mac80211: fix regression in SSN handling of addba tx
|
||||
|
||||
Some drivers that do their own sequence number allocation (e.g. ath9k) rely
|
||||
on being able to modify params->ssn on starting tx ampdu sessions.
|
||||
This was broken by a change that modified it to use sta->tid_seq[tid] instead.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 31d8bb4e07f8 ("mac80211: agg-tx: refactor sending addba")
|
||||
Reported-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_ti
|
||||
|
||||
/* send AddBA request */
|
||||
ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
|
||||
- tid_tx->dialog_token,
|
||||
- sta->tid_seq[tid] >> 4,
|
||||
+ tid_tx->dialog_token, tid_tx->ssn,
|
||||
buf_size, tid_tx->timeout);
|
||||
|
||||
WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
|
||||
@@ -523,6 +522,7 @@ void ieee80211_tx_ba_session_handle_star
|
||||
|
||||
params.ssn = sta->tid_seq[tid] >> 4;
|
||||
ret = drv_ampdu_action(local, sdata, ¶ms);
|
||||
+ tid_tx->ssn = params.ssn;
|
||||
if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
|
||||
return;
|
||||
} else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -190,6 +190,7 @@ struct tid_ampdu_tx {
|
||||
u8 stop_initiator;
|
||||
bool tx_stop;
|
||||
u16 buf_size;
|
||||
+ u16 ssn;
|
||||
|
||||
u16 failed_bar_ssn;
|
||||
bool bar_pending;
|
||||
@@ -1,28 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 2 Dec 2021 13:30:05 +0100
|
||||
Subject: [PATCH] mac80211: send ADDBA requests using the tid/queue of the
|
||||
aggregation session
|
||||
|
||||
Sending them out on a different queue can cause a race condition where a
|
||||
number of packets in the queue may be discarded by the receiver, because
|
||||
the ADDBA request is sent too early.
|
||||
This affects any driver with software A-MPDU setup which does not allocate
|
||||
packet seqno in hardware on tx, regardless of whether iTXQ is used or not.
|
||||
The only driver I've seen that explicitly deals with this issue internally
|
||||
is mwl8k.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -106,7 +106,7 @@ static void ieee80211_send_addba_request
|
||||
mgmt->u.action.u.addba_req.start_seq_num =
|
||||
cpu_to_le16(start_seq_num << 4);
|
||||
|
||||
- ieee80211_tx_skb(sdata, skb);
|
||||
+ ieee80211_tx_skb_tid(sdata, skb, tid);
|
||||
}
|
||||
|
||||
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
|
||||
@@ -1,79 +0,0 @@
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Mon, 29 Nov 2021 15:32:47 +0200
|
||||
Subject: [PATCH] mac80211: agg-tx: don't schedule_and_wake_txq() under
|
||||
sta->lock
|
||||
|
||||
When we call ieee80211_agg_start_txq(), that will in turn call
|
||||
schedule_and_wake_txq(). Called from ieee80211_stop_tx_ba_cb()
|
||||
this is done under sta->lock, which leads to certain circular
|
||||
lock dependencies, as reported by Chris Murphy:
|
||||
https://lore.kernel.org/r/CAJCQCtSXJ5qA4bqSPY=oLRMbv-irihVvP7A2uGutEbXQVkoNaw@mail.gmail.com
|
||||
|
||||
In general, ieee80211_agg_start_txq() is usually not called
|
||||
with sta->lock held, only in this one place. But it's always
|
||||
called with sta->ampdu_mlme.mtx held, and that's therefore
|
||||
clearly sufficient.
|
||||
|
||||
Change ieee80211_stop_tx_ba_cb() to also call it without the
|
||||
sta->lock held, by factoring it out of ieee80211_remove_tid_tx()
|
||||
(which is only called in this one place).
|
||||
|
||||
This breaks the locking chain and makes it less likely that
|
||||
we'll have similar locking chain problems in the future.
|
||||
|
||||
Reported-by: Chris Murphy <lists@colorremedies.com>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/agg-tx.c
|
||||
+++ b/net/mac80211/agg-tx.c
|
||||
@@ -9,7 +9,7 @@
|
||||
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
|
||||
* Copyright 2007-2010, Intel Corporation
|
||||
* Copyright(c) 2015-2017 Intel Deutschland GmbH
|
||||
- * Copyright (C) 2018 - 2020 Intel Corporation
|
||||
+ * Copyright (C) 2018 - 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -213,6 +213,8 @@ ieee80211_agg_start_txq(struct sta_info
|
||||
struct ieee80211_txq *txq = sta->sta.txq[tid];
|
||||
struct txq_info *txqi;
|
||||
|
||||
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
|
||||
+
|
||||
if (!txq)
|
||||
return;
|
||||
|
||||
@@ -290,7 +292,6 @@ static void ieee80211_remove_tid_tx(stru
|
||||
ieee80211_assign_tid_tx(sta, tid, NULL);
|
||||
|
||||
ieee80211_agg_splice_finish(sta->sdata, tid);
|
||||
- ieee80211_agg_start_txq(sta, tid, false);
|
||||
|
||||
kfree_rcu(tid_tx, rcu_head);
|
||||
}
|
||||
@@ -889,6 +890,7 @@ void ieee80211_stop_tx_ba_cb(struct sta_
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
||||
bool send_delba = false;
|
||||
+ bool start_txq = false;
|
||||
|
||||
ht_dbg(sdata, "Stopping Tx BA session for %pM tid %d\n",
|
||||
sta->sta.addr, tid);
|
||||
@@ -906,10 +908,14 @@ void ieee80211_stop_tx_ba_cb(struct sta_
|
||||
send_delba = true;
|
||||
|
||||
ieee80211_remove_tid_tx(sta, tid);
|
||||
+ start_txq = true;
|
||||
|
||||
unlock_sta:
|
||||
spin_unlock_bh(&sta->lock);
|
||||
|
||||
+ if (start_txq)
|
||||
+ ieee80211_agg_start_txq(sta, tid, false);
|
||||
+
|
||||
if (send_delba)
|
||||
ieee80211_send_delba(sdata, sta->sta.addr, tid,
|
||||
WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE);
|
||||
@@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/driver-ops.h
|
||||
+++ b/net/mac80211/driver-ops.h
|
||||
@@ -1413,4 +1413,20 @@ static inline void drv_sta_set_4addr(str
|
||||
@@ -1416,4 +1416,20 @@ static inline void drv_sta_set_4addr(str
|
||||
trace_drv_return_void(local);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
void ieee80211_vif_inc_num_mcast(struct ieee80211_sub_if_data *sdata);
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -3665,6 +3665,7 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3670,6 +3670,7 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
u64 ts = status->mactime;
|
||||
struct rate_info ri;
|
||||
u16 rate;
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
if (WARN_ON(!ieee80211_have_rx_timestamp(status)))
|
||||
return 0;
|
||||
@@ -3675,11 +3676,58 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3680,11 +3681,58 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
|
||||
/* Fill cfg80211 rate info */
|
||||
switch (status->encoding) {
|
||||
@@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
break;
|
||||
case RX_ENC_VHT:
|
||||
ri.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
@@ -3687,6 +3735,23 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3692,6 +3740,23 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
ri.nss = status->nss;
|
||||
if (status->enc_flags & RX_ENC_FLAG_SHORT_GI)
|
||||
ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
@@ -124,7 +124,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
@@ -3710,7 +3775,6 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
@@ -3715,7 +3780,6 @@ u64 ieee80211_calculate_rx_timestamp(str
|
||||
ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift));
|
||||
|
||||
if (status->flag & RX_FLAG_MACTIME_PLCP_START) {
|
||||
|
||||
@@ -90,7 +90,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
* ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1461,6 +1461,38 @@ static void sta_apply_mesh_params(struct
|
||||
@@ -1464,6 +1464,38 @@ static void sta_apply_mesh_params(struct
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static int sta_apply_parameters(struct ieee80211_local *local,
|
||||
struct sta_info *sta,
|
||||
struct station_parameters *params)
|
||||
@@ -1648,7 +1680,8 @@ static int sta_apply_parameters(struct i
|
||||
@@ -1651,7 +1683,8 @@ static int sta_apply_parameters(struct i
|
||||
sta_apply_mesh_params(local, sta, params);
|
||||
|
||||
if (params->airtime_weight)
|
||||
|
||||
@@ -222,7 +222,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
/* done */
|
||||
state->split_start = 0;
|
||||
@@ -14712,6 +14782,111 @@ static void nl80211_post_doit(__genl_con
|
||||
@@ -14724,6 +14794,111 @@ static void nl80211_post_doit(__genl_con
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
static __genl_const struct genl_ops nl80211_ops[] = {
|
||||
{
|
||||
.cmd = NL80211_CMD_GET_WIPHY,
|
||||
@@ -15575,6 +15750,14 @@ static const struct genl_small_ops nl802
|
||||
@@ -15587,6 +15762,14 @@ static const struct genl_small_ops nl802
|
||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||
NL80211_FLAG_NEED_RTNL,
|
||||
},
|
||||
|
||||
@@ -234,7 +234,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
/* policy for the key attributes */
|
||||
@@ -14677,6 +14681,106 @@ bad_tid_conf:
|
||||
@@ -14689,6 +14693,106 @@ bad_tid_conf:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
#define NL80211_FLAG_NEED_WIPHY 0x01
|
||||
#define NL80211_FLAG_NEED_NETDEV 0x02
|
||||
#define NL80211_FLAG_NEED_RTNL 0x04
|
||||
@@ -15758,6 +15862,14 @@ static const struct genl_small_ops nl802
|
||||
@@ -15770,6 +15874,14 @@ static const struct genl_small_ops nl802
|
||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||
NL80211_FLAG_NEED_RTNL,
|
||||
},
|
||||
@@ -356,7 +356,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
};
|
||||
|
||||
static struct genl_family nl80211_fam __genl_ro_after_init = {
|
||||
@@ -17384,6 +17496,51 @@ void cfg80211_ch_switch_started_notify(s
|
||||
@@ -17397,6 +17509,51 @@ void cfg80211_ch_switch_started_notify(s
|
||||
}
|
||||
EXPORT_SYMBOL(cfg80211_ch_switch_started_notify);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (err < 0)
|
||||
goto error;
|
||||
changed |= err;
|
||||
@@ -1231,17 +1239,17 @@ static int ieee80211_change_beacon(struc
|
||||
@@ -1234,17 +1242,17 @@ static int ieee80211_change_beacon(struc
|
||||
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
sdata_assert_lock(sdata);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
/**
|
||||
--- a/net/mac80211/driver-ops.h
|
||||
+++ b/net/mac80211/driver-ops.h
|
||||
@@ -1429,4 +1429,40 @@ static inline void drv_sta_set_decap_off
|
||||
@@ -1432,4 +1432,40 @@ static inline void drv_sta_set_decap_off
|
||||
trace_drv_return_void(local);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -3627,7 +3627,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3633,7 +3633,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
IEEE80211_HE_MAC_CAP4_BQR;
|
||||
he_cap_elem->mac_cap_info[4] &= ~m;
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU |
|
||||
IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING |
|
||||
IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX;
|
||||
@@ -3637,7 +3637,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3643,7 +3643,7 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
|
||||
he_cap_elem->phy_cap_info[2] &= ~m;
|
||||
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK |
|
||||
IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK;
|
||||
he_cap_elem->phy_cap_info[3] &= ~m;
|
||||
@@ -3649,13 +3649,13 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
@@ -3655,13 +3655,13 @@ ath11k_mac_filter_he_cap_mesh(struct iee
|
||||
he_cap_elem->phy_cap_info[5] &= ~m;
|
||||
|
||||
m = IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
|
||||
@@ -185,7 +185,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
PFLAG_RANGE(PHY, 7, MAX_NC, 0, 1, 1, "MAX-NC-%d");
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
@@ -631,7 +631,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
@@ -630,7 +630,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
.phy_cap_info[6] =
|
||||
IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT,
|
||||
.phy_cap_info[7] =
|
||||
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
@@ -598,7 +598,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
@@ -597,7 +597,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
.mac_cap_info[4] =
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
|
||||
.mac_cap_info[5] =
|
||||
IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 |
|
||||
@@ -682,7 +682,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
@@ -681,7 +681,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
.mac_cap_info[4] =
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
he_cap_elem->phy_cap_info[0] =
|
||||
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
|
||||
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
|
||||
@@ -1353,7 +1353,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk
|
||||
@@ -1358,7 +1358,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *sk
|
||||
if (elem->mac_cap_info[3] & IEEE80211_HE_MAC_CAP3_OMI_CONTROL)
|
||||
cap |= STA_REC_HE_CAP_OM;
|
||||
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -2748,7 +2748,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2757,7 +2757,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
|
||||
@@ -2792,7 +2792,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2801,7 +2801,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -93,7 +93,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |
|
||||
@@ -2838,7 +2838,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2847,7 +2847,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
@@ -102,7 +102,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.phy_cap_info[0] =
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
|
||||
@@ -2886,7 +2886,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2895,7 +2895,7 @@ static const struct ieee80211_sband_ifty
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -1290,9 +1290,8 @@ static void ath11k_peer_assoc_h_he(struc
|
||||
@@ -1295,9 +1295,8 @@ static void ath11k_peer_assoc_h_he(struc
|
||||
* request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
|
||||
* length.
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
if (sta->vht_cap.vht_supported)
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
|
||||
@@ -596,7 +596,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
@@ -595,7 +595,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] =
|
||||
IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU |
|
||||
IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
|
||||
@@ -680,7 +680,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
@@ -679,7 +679,7 @@ static struct ieee80211_sband_iftype_dat
|
||||
IEEE80211_HE_MAC_CAP2_BSR,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[5] =
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -2747,7 +2747,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2756,7 +2756,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
@@ -2791,7 +2791,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2800,7 +2800,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[1] =
|
||||
IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
|
||||
@@ -2837,7 +2837,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2846,7 +2846,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
@@ -74,7 +74,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU,
|
||||
.phy_cap_info[0] =
|
||||
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
|
||||
@@ -2885,7 +2885,7 @@ static const struct ieee80211_sband_ifty
|
||||
@@ -2894,7 +2894,7 @@ static const struct ieee80211_sband_ifty
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN,
|
||||
.mac_cap_info[3] =
|
||||
IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=m
|
||||
PKG_BUGFIX:=n
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
@@ -26,7 +26,7 @@ PKG_SOURCE_URL:= \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_HASH:=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96
|
||||
PKG_HASH:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.1.1-stable
|
||||
PKG_VERSION:=5.2.0-stable
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=d3e0544dbe7e9587c0f6538cdc671b6492663bb7a4281819538abe6c99cdbd92
|
||||
PKG_HASH:=409b4646c5f54f642de0e9f3544c3b83de7238134f5b1ff93fb44527bf119d05
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/wolfssl/wolfcrypt/settings.h
|
||||
+++ b/wolfssl/wolfcrypt/settings.h
|
||||
@@ -2346,7 +2346,7 @@ extern void uITRON4_free(void *p) ;
|
||||
@@ -2338,7 +2338,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
|
||||
/* warning for not using harden build options (default with ./configure) */
|
||||
|
||||
@@ -11,7 +11,7 @@ RNG regardless of the built settings for wolfssl.
|
||||
|
||||
--- a/wolfcrypt/src/ecc.c
|
||||
+++ b/wolfcrypt/src/ecc.c
|
||||
@@ -11647,21 +11647,21 @@ void wc_ecc_fp_free(void)
|
||||
@@ -11655,21 +11655,21 @@ void wc_ecc_fp_free(void)
|
||||
|
||||
#endif /* FP_ECC */
|
||||
|
||||
@@ -37,7 +37,7 @@ RNG regardless of the built settings for wolfssl.
|
||||
|
||||
--- a/wolfssl/wolfcrypt/ecc.h
|
||||
+++ b/wolfssl/wolfcrypt/ecc.h
|
||||
@@ -647,10 +647,8 @@ WOLFSSL_API
|
||||
@@ -650,10 +650,8 @@ WOLFSSL_API
|
||||
void wc_ecc_fp_free(void);
|
||||
WOLFSSL_LOCAL
|
||||
void wc_ecc_fp_init(void);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 87e43dd63ba429297e439f2dfd1ee8b45981e18b Mon Sep 17 00:00:00 2001
|
||||
From: Juliusz Sosinowicz <juliusz@wolfssl.com>
|
||||
Date: Sat, 12 Feb 2022 00:34:24 +0100
|
||||
Subject: [PATCH] Reported in ZD13631
|
||||
|
||||
`ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain
|
||||
|
||||
References: https://github.com/wolfSSL/wolfssl/issues/4879
|
||||
---
|
||||
src/internal.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/src/internal.c
|
||||
+++ b/src/internal.c
|
||||
@@ -12342,6 +12342,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte*
|
||||
}
|
||||
|
||||
ret = 0; /* clear errors and continue */
|
||||
+ #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
+ ssl->peerVerifyRet = 0;
|
||||
+ #endif
|
||||
args->verifyErr = 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zlib
|
||||
PKG_VERSION:=1.2.11
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
From 5c44459c3b28a9bd3283aaceab7c615f8020c531 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Adler <madler@alumni.caltech.edu>
|
||||
Date: Tue, 17 Apr 2018 22:09:22 -0700
|
||||
Subject: [PATCH] Fix a bug that can crash deflate on some input when using
|
||||
Z_FIXED.
|
||||
|
||||
This bug was reported by Danilo Ramos of Eideticom, Inc. It has
|
||||
lain in wait 13 years before being found! The bug was introduced
|
||||
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
|
||||
option forces the use of fixed Huffman codes. For rare inputs with
|
||||
a large number of distant matches, the pending buffer into which
|
||||
the compressed data is written can overwrite the distance symbol
|
||||
table which it overlays. That results in corrupted output due to
|
||||
invalid distances, and can result in out-of-bound accesses,
|
||||
crashing the application.
|
||||
|
||||
The fix here combines the distance buffer and literal/length
|
||||
buffers into a single symbol buffer. Now three bytes of pending
|
||||
buffer space are opened up for each literal or length/distance
|
||||
pair consumed, instead of the previous two bytes. This assures
|
||||
that the pending buffer cannot overwrite the symbol table, since
|
||||
the maximum fixed code compressed length/distance is 31 bits, and
|
||||
since there are four bytes of pending space for every three bytes
|
||||
of symbol space.
|
||||
---
|
||||
deflate.c | 74 ++++++++++++++++++++++++++++++++++++++++---------------
|
||||
deflate.h | 25 +++++++++----------
|
||||
trees.c | 50 +++++++++++--------------------------
|
||||
3 files changed, 79 insertions(+), 70 deletions(-)
|
||||
|
||||
diff --git a/deflate.c b/deflate.c
|
||||
index 425babc00..19cba873a 100644
|
||||
--- a/deflate.c
|
||||
+++ b/deflate.c
|
||||
@@ -255,11 +255,6 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
int wrap = 1;
|
||||
static const char my_version[] = ZLIB_VERSION;
|
||||
|
||||
- ushf *overlay;
|
||||
- /* We overlay pending_buf and d_buf+l_buf. This works since the average
|
||||
- * output size for (length,distance) codes is <= 24 bits.
|
||||
- */
|
||||
-
|
||||
if (version == Z_NULL || version[0] != my_version[0] ||
|
||||
stream_size != sizeof(z_stream)) {
|
||||
return Z_VERSION_ERROR;
|
||||
@@ -329,9 +324,47 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
|
||||
s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
|
||||
|
||||
- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
|
||||
- s->pending_buf = (uchf *) overlay;
|
||||
- s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
|
||||
+ /* We overlay pending_buf and sym_buf. This works since the average size
|
||||
+ * for length/distance pairs over any compressed block is assured to be 31
|
||||
+ * bits or less.
|
||||
+ *
|
||||
+ * Analysis: The longest fixed codes are a length code of 8 bits plus 5
|
||||
+ * extra bits, for lengths 131 to 257. The longest fixed distance codes are
|
||||
+ * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
|
||||
+ * possible fixed-codes length/distance pair is then 31 bits total.
|
||||
+ *
|
||||
+ * sym_buf starts one-fourth of the way into pending_buf. So there are
|
||||
+ * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
|
||||
+ * in sym_buf is three bytes -- two for the distance and one for the
|
||||
+ * literal/length. As each symbol is consumed, the pointer to the next
|
||||
+ * sym_buf value to read moves forward three bytes. From that symbol, up to
|
||||
+ * 31 bits are written to pending_buf. The closest the written pending_buf
|
||||
+ * bits gets to the next sym_buf symbol to read is just before the last
|
||||
+ * code is written. At that time, 31*(n-2) bits have been written, just
|
||||
+ * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at
|
||||
+ * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1
|
||||
+ * symbols are written.) The closest the writing gets to what is unread is
|
||||
+ * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and
|
||||
+ * can range from 128 to 32768.
|
||||
+ *
|
||||
+ * Therefore, at a minimum, there are 142 bits of space between what is
|
||||
+ * written and what is read in the overlain buffers, so the symbols cannot
|
||||
+ * be overwritten by the compressed data. That space is actually 139 bits,
|
||||
+ * due to the three-bit fixed-code block header.
|
||||
+ *
|
||||
+ * That covers the case where either Z_FIXED is specified, forcing fixed
|
||||
+ * codes, or when the use of fixed codes is chosen, because that choice
|
||||
+ * results in a smaller compressed block than dynamic codes. That latter
|
||||
+ * condition then assures that the above analysis also covers all dynamic
|
||||
+ * blocks. A dynamic-code block will only be chosen to be emitted if it has
|
||||
+ * fewer bits than a fixed-code block would for the same set of symbols.
|
||||
+ * Therefore its average symbol length is assured to be less than 31. So
|
||||
+ * the compressed data for a dynamic block also cannot overwrite the
|
||||
+ * symbols from which it is being constructed.
|
||||
+ */
|
||||
+
|
||||
+ s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
|
||||
+ s->pending_buf_size = (ulg)s->lit_bufsize * 4;
|
||||
|
||||
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
||||
s->pending_buf == Z_NULL) {
|
||||
@@ -340,8 +373,12 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
||||
deflateEnd (strm);
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
- s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
|
||||
- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
|
||||
+ s->sym_buf = s->pending_buf + s->lit_bufsize;
|
||||
+ s->sym_end = (s->lit_bufsize - 1) * 3;
|
||||
+ /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
|
||||
+ * on 16 bit machines and because stored blocks are restricted to
|
||||
+ * 64K-1 bytes.
|
||||
+ */
|
||||
|
||||
s->level = level;
|
||||
s->strategy = strategy;
|
||||
@@ -552,7 +589,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
|
||||
|
||||
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
s = strm->state;
|
||||
- if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
+ if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||||
return Z_BUF_ERROR;
|
||||
do {
|
||||
put = Buf_size - s->bi_valid;
|
||||
@@ -1113,7 +1150,6 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
#else
|
||||
deflate_state *ds;
|
||||
deflate_state *ss;
|
||||
- ushf *overlay;
|
||||
|
||||
|
||||
if (deflateStateCheck(source) || dest == Z_NULL) {
|
||||
@@ -1133,8 +1169,7 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
|
||||
ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
|
||||
ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
|
||||
- overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
|
||||
- ds->pending_buf = (uchf *) overlay;
|
||||
+ ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4);
|
||||
|
||||
if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
|
||||
ds->pending_buf == Z_NULL) {
|
||||
@@ -1148,8 +1183,7 @@ int ZEXPORT deflateCopy (dest, source)
|
||||
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
|
||||
|
||||
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
|
||||
- ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
|
||||
- ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
|
||||
+ ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
|
||||
|
||||
ds->l_desc.dyn_tree = ds->dyn_ltree;
|
||||
ds->d_desc.dyn_tree = ds->dyn_dtree;
|
||||
@@ -1925,7 +1959,7 @@ local block_state deflate_fast(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2056,7 +2090,7 @@ local block_state deflate_slow(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2131,7 +2165,7 @@ local block_state deflate_rle(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
@@ -2170,7 +2204,7 @@ local block_state deflate_huff(s, flush)
|
||||
FLUSH_BLOCK(s, 1);
|
||||
return finish_done;
|
||||
}
|
||||
- if (s->last_lit)
|
||||
+ if (s->sym_next)
|
||||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
diff --git a/deflate.h b/deflate.h
|
||||
index 23ecdd312..d4cf1a98b 100644
|
||||
--- a/deflate.h
|
||||
+++ b/deflate.h
|
||||
@@ -217,7 +217,7 @@ typedef struct internal_state {
|
||||
/* Depth of each subtree used as tie breaker for trees of equal frequency
|
||||
*/
|
||||
|
||||
- uchf *l_buf; /* buffer for literals or lengths */
|
||||
+ uchf *sym_buf; /* buffer for distances and literals/lengths */
|
||||
|
||||
uInt lit_bufsize;
|
||||
/* Size of match buffer for literals/lengths. There are 4 reasons for
|
||||
@@ -239,13 +239,8 @@ typedef struct internal_state {
|
||||
* - I can't count above 4
|
||||
*/
|
||||
|
||||
- uInt last_lit; /* running index in l_buf */
|
||||
-
|
||||
- ushf *d_buf;
|
||||
- /* Buffer for distances. To simplify the code, d_buf and l_buf have
|
||||
- * the same number of elements. To use different lengths, an extra flag
|
||||
- * array would be necessary.
|
||||
- */
|
||||
+ uInt sym_next; /* running index in sym_buf */
|
||||
+ uInt sym_end; /* symbol table full when sym_next reaches this */
|
||||
|
||||
ulg opt_len; /* bit length of current block with optimal trees */
|
||||
ulg static_len; /* bit length of current block with static trees */
|
||||
@@ -325,20 +320,22 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
||||
|
||||
# define _tr_tally_lit(s, c, flush) \
|
||||
{ uch cc = (c); \
|
||||
- s->d_buf[s->last_lit] = 0; \
|
||||
- s->l_buf[s->last_lit++] = cc; \
|
||||
+ s->sym_buf[s->sym_next++] = 0; \
|
||||
+ s->sym_buf[s->sym_next++] = 0; \
|
||||
+ s->sym_buf[s->sym_next++] = cc; \
|
||||
s->dyn_ltree[cc].Freq++; \
|
||||
- flush = (s->last_lit == s->lit_bufsize-1); \
|
||||
+ flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
{ uch len = (uch)(length); \
|
||||
ush dist = (ush)(distance); \
|
||||
- s->d_buf[s->last_lit] = dist; \
|
||||
- s->l_buf[s->last_lit++] = len; \
|
||||
+ s->sym_buf[s->sym_next++] = dist; \
|
||||
+ s->sym_buf[s->sym_next++] = dist >> 8; \
|
||||
+ s->sym_buf[s->sym_next++] = len; \
|
||||
dist--; \
|
||||
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
||||
s->dyn_dtree[d_code(dist)].Freq++; \
|
||||
- flush = (s->last_lit == s->lit_bufsize-1); \
|
||||
+ flush = (s->sym_next == s->sym_end); \
|
||||
}
|
||||
#else
|
||||
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
|
||||
diff --git a/trees.c b/trees.c
|
||||
index 4f4a65011..decaeb7c3 100644
|
||||
--- a/trees.c
|
||||
+++ b/trees.c
|
||||
@@ -416,7 +416,7 @@ local void init_block(s)
|
||||
|
||||
s->dyn_ltree[END_BLOCK].Freq = 1;
|
||||
s->opt_len = s->static_len = 0L;
|
||||
- s->last_lit = s->matches = 0;
|
||||
+ s->sym_next = s->matches = 0;
|
||||
}
|
||||
|
||||
#define SMALLEST 1
|
||||
@@ -948,7 +948,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
||||
|
||||
Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
|
||||
opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
|
||||
- s->last_lit));
|
||||
+ s->sym_next / 3));
|
||||
|
||||
if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
|
||||
|
||||
@@ -1017,8 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
unsigned dist; /* distance of matched string */
|
||||
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
||||
{
|
||||
- s->d_buf[s->last_lit] = (ush)dist;
|
||||
- s->l_buf[s->last_lit++] = (uch)lc;
|
||||
+ s->sym_buf[s->sym_next++] = dist;
|
||||
+ s->sym_buf[s->sym_next++] = dist >> 8;
|
||||
+ s->sym_buf[s->sym_next++] = lc;
|
||||
if (dist == 0) {
|
||||
/* lc is the unmatched char */
|
||||
s->dyn_ltree[lc].Freq++;
|
||||
@@ -1033,30 +1034,7 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
|
||||
s->dyn_dtree[d_code(dist)].Freq++;
|
||||
}
|
||||
-
|
||||
-#ifdef TRUNCATE_BLOCK
|
||||
- /* Try to guess if it is profitable to stop the current block here */
|
||||
- if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
|
||||
- /* Compute an upper bound for the compressed length */
|
||||
- ulg out_length = (ulg)s->last_lit*8L;
|
||||
- ulg in_length = (ulg)((long)s->strstart - s->block_start);
|
||||
- int dcode;
|
||||
- for (dcode = 0; dcode < D_CODES; dcode++) {
|
||||
- out_length += (ulg)s->dyn_dtree[dcode].Freq *
|
||||
- (5L+extra_dbits[dcode]);
|
||||
- }
|
||||
- out_length >>= 3;
|
||||
- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
|
||||
- s->last_lit, in_length, out_length,
|
||||
- 100L - out_length*100L/in_length));
|
||||
- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
|
||||
- }
|
||||
-#endif
|
||||
- return (s->last_lit == s->lit_bufsize-1);
|
||||
- /* We avoid equality with lit_bufsize because of wraparound at 64K
|
||||
- * on 16 bit machines and because stored blocks are restricted to
|
||||
- * 64K-1 bytes.
|
||||
- */
|
||||
+ return (s->sym_next == s->sym_end);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
@@ -1069,13 +1047,14 @@ local void compress_block(s, ltree, dtree)
|
||||
{
|
||||
unsigned dist; /* distance of matched string */
|
||||
int lc; /* match length or unmatched char (if dist == 0) */
|
||||
- unsigned lx = 0; /* running index in l_buf */
|
||||
+ unsigned sx = 0; /* running index in sym_buf */
|
||||
unsigned code; /* the code to send */
|
||||
int extra; /* number of extra bits to send */
|
||||
|
||||
- if (s->last_lit != 0) do {
|
||||
- dist = s->d_buf[lx];
|
||||
- lc = s->l_buf[lx++];
|
||||
+ if (s->sym_next != 0) do {
|
||||
+ dist = s->sym_buf[sx++] & 0xff;
|
||||
+ dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
|
||||
+ lc = s->sym_buf[sx++];
|
||||
if (dist == 0) {
|
||||
send_code(s, lc, ltree); /* send a literal byte */
|
||||
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
|
||||
@@ -1100,11 +1079,10 @@ local void compress_block(s, ltree, dtree)
|
||||
}
|
||||
} /* literal or match pair ? */
|
||||
|
||||
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
|
||||
- Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
|
||||
- "pendingBuf overflow");
|
||||
+ /* Check that the overlay between pending_buf and sym_buf is ok: */
|
||||
+ Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
|
||||
|
||||
- } while (lx < s->last_lit);
|
||||
+ } while (sx < s->sym_next);
|
||||
|
||||
send_code(s, END_BLOCK, ltree);
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=39
|
||||
PKG_RELEASE:=40
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -488,11 +488,11 @@ append_hs20_conn_capab() {
|
||||
}
|
||||
|
||||
append_radius_acct_req_attr() {
|
||||
append bss_conf "radius_acct_req_attr=$1" "$N"
|
||||
[ -n "$1" ] && append bss_conf "radius_acct_req_attr=$1" "$N"
|
||||
}
|
||||
|
||||
append_radius_auth_req_attr() {
|
||||
append bss_conf "radius_auth_req_attr=$1" "$N"
|
||||
[ -n "$1" ] && append bss_conf "radius_auth_req_attr=$1" "$N"
|
||||
}
|
||||
|
||||
append_airtime_sta_weight() {
|
||||
|
||||
@@ -424,3 +424,33 @@
|
||||
}
|
||||
|
||||
|
||||
--- a/src/ap/wnm_ap.c
|
||||
+++ b/src/ap/wnm_ap.c
|
||||
@@ -463,7 +463,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
size_t len)
|
||||
{
|
||||
u8 dialog_token, status_code, bss_termination_delay;
|
||||
- const u8 *pos, *end;
|
||||
+ const u8 *pos, *end, *target_bssid;
|
||||
int enabled = hapd->conf->bss_transition;
|
||||
struct sta_info *sta;
|
||||
|
||||
@@ -510,6 +510,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
wpa_printf(MSG_DEBUG, "WNM: not enough room for Target BSSID field");
|
||||
return;
|
||||
}
|
||||
+ target_bssid = pos;
|
||||
sta->agreed_to_steer = 1;
|
||||
eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta);
|
||||
eloop_register_timeout(2, 0, ap_sta_reset_steer_flag_timer,
|
||||
@@ -529,6 +530,10 @@ static void ieee802_11_rx_bss_trans_mgmt
|
||||
MAC2STR(addr), status_code, bss_termination_delay);
|
||||
}
|
||||
|
||||
+ hostapd_ubus_notify_bss_transition_response(hapd, sta->addr, dialog_token,
|
||||
+ status_code, bss_termination_delay,
|
||||
+ target_bssid, pos, end - pos);
|
||||
+
|
||||
wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries",
|
||||
pos, end - pos);
|
||||
}
|
||||
|
||||
@@ -318,6 +318,16 @@ hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
for (i = 0; i < ARRAY_SIZE(sta->rrm_enabled_capa); i++)
|
||||
blobmsg_add_u32(&b, "", sta->rrm_enabled_capa[i]);
|
||||
blobmsg_close_array(&b, r);
|
||||
|
||||
r = blobmsg_open_array(&b, "extended_capabilities");
|
||||
/* Check if client advertises extended capabilities */
|
||||
if (sta->ext_capability && sta->ext_capability[0] > 0) {
|
||||
for (i = 0; i < sta->ext_capability[0]; i++) {
|
||||
blobmsg_add_u32(&b, "", sta->ext_capability[1 + i]);
|
||||
}
|
||||
}
|
||||
blobmsg_close_array(&b, r);
|
||||
|
||||
blobmsg_add_u32(&b, "aid", sta->aid);
|
||||
#ifdef CONFIG_TAXONOMY
|
||||
r = blobmsg_alloc_string_buffer(&b, "signature", 1024);
|
||||
@@ -372,6 +382,32 @@ hostapd_bss_get_features(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Imported from iw/util.c
|
||||
* https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git/tree/util.c?id=4b25ae3537af48dbf9d0abf94132e5ba01b32c18#n200
|
||||
*/
|
||||
int ieee80211_frequency_to_channel(int freq)
|
||||
{
|
||||
/* see 802.11-2007 17.3.8.3.2 and Annex J */
|
||||
if (freq == 2484)
|
||||
return 14;
|
||||
/* see 802.11ax D6.1 27.3.23.2 and Annex E */
|
||||
else if (freq == 5935)
|
||||
return 2;
|
||||
else if (freq < 2484)
|
||||
return (freq - 2407) / 5;
|
||||
else if (freq >= 4910 && freq <= 4980)
|
||||
return (freq - 4000) / 5;
|
||||
else if (freq < 5950)
|
||||
return (freq - 5000) / 5;
|
||||
else if (freq <= 45000) /* DMG band lower limit */
|
||||
/* see 802.11ax D6.1 27.3.23.2 */
|
||||
return (freq - 5950) / 5;
|
||||
else if (freq >= 58320 && freq <= 70200)
|
||||
return (freq - 56160) / 2160;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
struct ubus_request_data *req, const char *method,
|
||||
@@ -380,12 +416,31 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
|
||||
void *airtime_table, *dfs_table;
|
||||
struct os_reltime now;
|
||||
char ssid[SSID_MAX_LEN + 1];
|
||||
char phy_name[17];
|
||||
char mac_buf[20];
|
||||
size_t ssid_len = SSID_MAX_LEN;
|
||||
u8 channel = 0, op_class = 0;
|
||||
|
||||
if (hapd->conf->ssid.ssid_len < SSID_MAX_LEN)
|
||||
ssid_len = hapd->conf->ssid.ssid_len;
|
||||
|
||||
ieee80211_freq_to_channel_ext(hapd->iface->freq,
|
||||
hapd->iconf->secondary_channel,
|
||||
hostapd_get_oper_chwidth(hapd->iconf),
|
||||
&op_class, &channel);
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_string(&b, "status", hostapd_state_text(hapd->iface->state));
|
||||
blobmsg_printf(&b, "bssid", MACSTR, MAC2STR(hapd->conf->bssid));
|
||||
|
||||
memset(ssid, 0, SSID_MAX_LEN + 1);
|
||||
memcpy(ssid, hapd->conf->ssid.ssid, ssid_len);
|
||||
blobmsg_add_string(&b, "ssid", ssid);
|
||||
|
||||
blobmsg_add_u32(&b, "freq", hapd->iface->freq);
|
||||
blobmsg_add_u32(&b, "channel", channel);
|
||||
blobmsg_add_u32(&b, "op_class", op_class);
|
||||
blobmsg_add_u32(&b, "beacon_interval", hapd->iconf->beacon_int);
|
||||
|
||||
snprintf(phy_name, 17, "%s", hapd->iface->phy);
|
||||
blobmsg_add_string(&b, "phy", phy_name);
|
||||
@@ -1185,6 +1240,129 @@ hostapd_rrm_beacon_req(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
|
||||
|
||||
#ifdef CONFIG_WNM_AP
|
||||
|
||||
static int
|
||||
hostapd_bss_tr_send(struct hostapd_data *hapd, u8 *addr, bool disassoc_imminent, bool abridged,
|
||||
u16 disassoc_timer, u8 validity_period, struct blob_attr *neighbors)
|
||||
{
|
||||
struct blob_attr *cur;
|
||||
struct sta_info *sta;
|
||||
int nr_len = 0;
|
||||
int rem;
|
||||
u8 *nr = NULL;
|
||||
u8 req_mode = 0;
|
||||
|
||||
sta = ap_get_sta(hapd, addr);
|
||||
if (!sta)
|
||||
return UBUS_STATUS_NOT_FOUND;
|
||||
|
||||
if (neighbors) {
|
||||
u8 *nr_cur;
|
||||
|
||||
if (blobmsg_check_array(neighbors,
|
||||
BLOBMSG_TYPE_STRING) < 0)
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
blobmsg_for_each_attr(cur, neighbors, rem) {
|
||||
int len = strlen(blobmsg_get_string(cur));
|
||||
|
||||
if (len % 2)
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
nr_len += (len / 2) + 2;
|
||||
}
|
||||
|
||||
if (nr_len) {
|
||||
nr = os_zalloc(nr_len);
|
||||
if (!nr)
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
}
|
||||
|
||||
nr_cur = nr;
|
||||
blobmsg_for_each_attr(cur, neighbors, rem) {
|
||||
int len = strlen(blobmsg_get_string(cur)) / 2;
|
||||
|
||||
*nr_cur++ = WLAN_EID_NEIGHBOR_REPORT;
|
||||
*nr_cur++ = (u8) len;
|
||||
if (hexstr2bin(blobmsg_data(cur), nr_cur, len)) {
|
||||
free(nr);
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
nr_cur += len;
|
||||
}
|
||||
}
|
||||
|
||||
if (nr)
|
||||
req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
|
||||
|
||||
if (abridged)
|
||||
req_mode |= WNM_BSS_TM_REQ_ABRIDGED;
|
||||
|
||||
if (disassoc_imminent)
|
||||
req_mode |= WNM_BSS_TM_REQ_DISASSOC_IMMINENT;
|
||||
|
||||
if (wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer, validity_period, NULL,
|
||||
NULL, nr, nr_len, NULL, 0))
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum {
|
||||
BSS_TR_ADDR,
|
||||
BSS_TR_DA_IMMINENT,
|
||||
BSS_TR_DA_TIMER,
|
||||
BSS_TR_VALID_PERIOD,
|
||||
BSS_TR_NEIGHBORS,
|
||||
BSS_TR_ABRIDGED,
|
||||
__BSS_TR_DISASSOC_MAX
|
||||
};
|
||||
|
||||
static const struct blobmsg_policy bss_tr_policy[__BSS_TR_DISASSOC_MAX] = {
|
||||
[BSS_TR_ADDR] = { "addr", BLOBMSG_TYPE_STRING },
|
||||
[BSS_TR_DA_IMMINENT] = { "disassociation_imminent", BLOBMSG_TYPE_BOOL },
|
||||
[BSS_TR_DA_TIMER] = { "disassociation_timer", BLOBMSG_TYPE_INT32 },
|
||||
[BSS_TR_VALID_PERIOD] = { "validity_period", BLOBMSG_TYPE_INT32 },
|
||||
[BSS_TR_NEIGHBORS] = { "neighbors", BLOBMSG_TYPE_ARRAY },
|
||||
[BSS_TR_ABRIDGED] = { "abridged", BLOBMSG_TYPE_BOOL },
|
||||
};
|
||||
|
||||
static int
|
||||
hostapd_bss_transition_request(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
struct ubus_request_data *ureq, const char *method,
|
||||
struct blob_attr *msg)
|
||||
{
|
||||
struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
|
||||
struct blob_attr *tb[__BSS_TR_DISASSOC_MAX];
|
||||
struct sta_info *sta;
|
||||
u32 da_timer = 0;
|
||||
u32 valid_period = 0;
|
||||
u8 addr[ETH_ALEN];
|
||||
bool abridged;
|
||||
bool da_imminent;
|
||||
|
||||
blobmsg_parse(bss_tr_policy, __BSS_TR_DISASSOC_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
|
||||
if (!tb[BSS_TR_ADDR])
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if (hwaddr_aton(blobmsg_data(tb[BSS_TR_ADDR]), addr))
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if (tb[BSS_TR_DA_TIMER])
|
||||
da_timer = blobmsg_get_u32(tb[BSS_TR_DA_TIMER]);
|
||||
|
||||
if (tb[BSS_TR_VALID_PERIOD])
|
||||
valid_period = blobmsg_get_u32(tb[BSS_TR_VALID_PERIOD]);
|
||||
|
||||
da_imminent = !!(tb[BSS_TR_DA_IMMINENT] && blobmsg_get_bool(tb[BSS_TR_DA_IMMINENT]));
|
||||
abridged = !!(tb[BSS_TR_ABRIDGED] && blobmsg_get_bool(tb[BSS_TR_ABRIDGED]));
|
||||
|
||||
return hostapd_bss_tr_send(hapd, addr, da_imminent, abridged, da_timer, valid_period,
|
||||
tb[BSS_TR_NEIGHBORS]);
|
||||
}
|
||||
|
||||
enum {
|
||||
WNM_DISASSOC_ADDR,
|
||||
WNM_DISASSOC_DURATION,
|
||||
@@ -1207,14 +1385,10 @@ hostapd_wnm_disassoc_imminent(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
{
|
||||
struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
|
||||
struct blob_attr *tb[__WNM_DISASSOC_MAX];
|
||||
struct blob_attr *cur;
|
||||
struct sta_info *sta;
|
||||
int duration = 10;
|
||||
int rem;
|
||||
int nr_len = 0;
|
||||
u8 *nr = NULL;
|
||||
u8 req_mode = WNM_BSS_TM_REQ_DISASSOC_IMMINENT;
|
||||
u8 addr[ETH_ALEN];
|
||||
bool abridged;
|
||||
|
||||
blobmsg_parse(wnm_disassoc_policy, __WNM_DISASSOC_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
|
||||
@@ -1224,61 +1398,13 @@ hostapd_wnm_disassoc_imminent(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
if (hwaddr_aton(blobmsg_data(tb[WNM_DISASSOC_ADDR]), addr))
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if ((cur = tb[WNM_DISASSOC_DURATION]) != NULL)
|
||||
duration = blobmsg_get_u32(cur);
|
||||
if (tb[WNM_DISASSOC_DURATION])
|
||||
duration = blobmsg_get_u32(tb[WNM_DISASSOC_DURATION]);
|
||||
|
||||
sta = ap_get_sta(hapd, addr);
|
||||
if (!sta)
|
||||
return UBUS_STATUS_NOT_FOUND;
|
||||
abridged = !!(tb[WNM_DISASSOC_ABRIDGED] && blobmsg_get_bool(tb[WNM_DISASSOC_ABRIDGED]));
|
||||
|
||||
if (tb[WNM_DISASSOC_NEIGHBORS]) {
|
||||
u8 *nr_cur;
|
||||
|
||||
if (blobmsg_check_array(tb[WNM_DISASSOC_NEIGHBORS],
|
||||
BLOBMSG_TYPE_STRING) < 0)
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
blobmsg_for_each_attr(cur, tb[WNM_DISASSOC_NEIGHBORS], rem) {
|
||||
int len = strlen(blobmsg_get_string(cur));
|
||||
|
||||
if (len % 2)
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
|
||||
nr_len += (len / 2) + 2;
|
||||
}
|
||||
|
||||
if (nr_len) {
|
||||
nr = os_zalloc(nr_len);
|
||||
if (!nr)
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
}
|
||||
|
||||
nr_cur = nr;
|
||||
blobmsg_for_each_attr(cur, tb[WNM_DISASSOC_NEIGHBORS], rem) {
|
||||
int len = strlen(blobmsg_get_string(cur)) / 2;
|
||||
|
||||
*nr_cur++ = WLAN_EID_NEIGHBOR_REPORT;
|
||||
*nr_cur++ = (u8) len;
|
||||
if (hexstr2bin(blobmsg_data(cur), nr_cur, len)) {
|
||||
free(nr);
|
||||
return UBUS_STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
nr_cur += len;
|
||||
}
|
||||
}
|
||||
|
||||
if (nr)
|
||||
req_mode |= WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED;
|
||||
|
||||
if (tb[WNM_DISASSOC_ABRIDGED] && blobmsg_get_bool(tb[WNM_DISASSOC_ABRIDGED]))
|
||||
req_mode |= WNM_BSS_TM_REQ_ABRIDGED;
|
||||
|
||||
if (wnm_send_bss_tm_req(hapd, sta, req_mode, duration, duration, NULL,
|
||||
NULL, nr, nr_len, NULL, 0))
|
||||
return UBUS_STATUS_UNKNOWN_ERROR;
|
||||
|
||||
return 0;
|
||||
return hostapd_bss_tr_send(hapd, addr, true, abridged, duration, duration,
|
||||
tb[WNM_DISASSOC_NEIGHBORS]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1307,6 +1433,7 @@ static const struct ubus_method bss_methods[] = {
|
||||
UBUS_METHOD("rrm_beacon_req", hostapd_rrm_beacon_req, beacon_req_policy),
|
||||
#ifdef CONFIG_WNM_AP
|
||||
UBUS_METHOD("wnm_disassoc_imminent", hostapd_wnm_disassoc_imminent, wnm_disassoc_policy),
|
||||
UBUS_METHOD("bss_transition_request", hostapd_bss_transition_request, bss_tr_policy),
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -1555,3 +1682,36 @@ void hostapd_ubus_notify_beacon_report(
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, "beacon-report", b.head, -1);
|
||||
}
|
||||
|
||||
void hostapd_ubus_notify_bss_transition_response(
|
||||
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,
|
||||
u8 bss_termination_delay, const u8 *target_bssid,
|
||||
const u8 *candidate_list, u16 candidate_list_len)
|
||||
{
|
||||
#ifdef CONFIG_WNM_AP
|
||||
char *cl_str;
|
||||
u16 i;
|
||||
|
||||
if (!hapd->ubus.obj.has_subscribers)
|
||||
return;
|
||||
|
||||
if (!addr)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_macaddr(&b, "address", addr);
|
||||
blobmsg_add_u8(&b, "dialog-token", dialog_token);
|
||||
blobmsg_add_u8(&b, "status-code", status_code);
|
||||
blobmsg_add_u8(&b, "bss-termination-delay", bss_termination_delay);
|
||||
if (target_bssid)
|
||||
blobmsg_add_macaddr(&b, "target-bssid", target_bssid);
|
||||
if (candidate_list_len > 0) {
|
||||
cl_str = blobmsg_alloc_string_buffer(&b, "candidate-list", candidate_list_len * 2 + 1);
|
||||
for (i = 0; i < candidate_list_len; i++)
|
||||
snprintf(&cl_str[i*2], 3, "%02X", candidate_list[i]);
|
||||
blobmsg_add_string_buffer(&b);
|
||||
}
|
||||
|
||||
ubus_notify(ctx, &hapd->ubus.obj, "bss-transition-response", b.head, -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
struct rrm_measurement_beacon_report *rep,
|
||||
size_t len);
|
||||
|
||||
void hostapd_ubus_notify_bss_transition_response(
|
||||
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,
|
||||
u8 bss_termination_delay, const u8 *target_bssid,
|
||||
const u8 *candidate_list, u16 candidate_list_len);
|
||||
void hostapd_ubus_add(struct hapd_interfaces *interfaces);
|
||||
void hostapd_ubus_free(struct hapd_interfaces *interfaces);
|
||||
|
||||
@@ -91,6 +95,13 @@ static inline void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_notify_bss_transition_response(
|
||||
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,
|
||||
u8 bss_termination_delay, const u8 *target_bssid,
|
||||
const u8 *candidate_list, u16 candidate_list_len)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void hostapd_ubus_add(struct hapd_interfaces *interfaces)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ define Build/Configure
|
||||
| sort | uniq > FEATURE-DUMP.openwrt)
|
||||
$(SED) 's/feature-libbfd=1/feature-libbfd=$(HAVE_LIBBFD)/' \
|
||||
-e 's/feature-libcap=1/feature-libcap=$(HAVE_LIBCAP)/' \
|
||||
-e 's/feature-clang-bpf-global-var=1/feature-clang-bpf-global-var=$(HAVE_CLANG)/' \
|
||||
-e 's/feature-clang-bpf-co-re=1/feature-clang-bpf-co-re=$(HAVE_CLANG)/' \
|
||||
$(PKG_BUILD_DIR)/FEATURE-DUMP.openwrt
|
||||
endef
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
|
||||
PKG_SOURCE_DATE:=2021-03-11
|
||||
PKG_SOURCE_VERSION:=ccb75178cf6a726896729c6904bd623636aa0b29
|
||||
PKG_SOURCE_DATE:=2022-02-19
|
||||
PKG_SOURCE_VERSION:=8d26a1ba3a175016b342cc5e25d340c08ae20eed
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_MIRROR_HASH:=87b1839275c209f9767057d6da5272cae973a064767fa28f380a37fb65e2e643
|
||||
PKG_MIRROR_HASH:=0a692c87811e38022e7446d37fea75cc823d00534d5b91faefc58eba3b6debb1
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
@@ -78,7 +78,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
|
||||
$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
|
||||
endif
|
||||
|
||||
$(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
|
||||
$(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/
|
||||
if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \
|
||||
$(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
From ba068938e629eb1a8b423a54405233e685cedb78 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ba068938e629eb1a8b423a54405233e685cedb78.1647594132.git.chunkeey@gmail.com>
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Thu, 17 Mar 2022 21:29:28 +0100
|
||||
Subject: [PATCH v1 1/2] ata: sata_dwc_460ex: Fix crash due to OOB write
|
||||
To: linux-ide@vger.kernel.org
|
||||
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
|
||||
Jens Axboe <axboe@kernel.dk>,
|
||||
Tejun Heo <tj@kernel.org>,
|
||||
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
|
||||
the driver uses libata's "tag" values from in various arrays.
|
||||
Since the mentioned patch bumped the ATA_TAG_INTERNAL to 32,
|
||||
the value of the SATA_DWC_QCMD_MAX needs to be bumped to 33.
|
||||
|
||||
Otherwise ATA_TAG_INTERNAL cause a crash like this:
|
||||
|
||||
| BUG: Kernel NULL pointer dereference at 0x00000000
|
||||
| Faulting instruction address: 0xc03ed4b8
|
||||
| Oops: Kernel access of bad area, sig: 11 [#1]
|
||||
| BE PAGE_SIZE=4K PowerPC 44x Platform
|
||||
| CPU: 0 PID: 362 Comm: scsi_eh_1 Not tainted 5.4.163 #0
|
||||
| NIP: c03ed4b8 LR: c03d27e8 CTR: c03ed36c
|
||||
| REGS: cfa59950 TRAP: 0300 Not tainted (5.4.163)
|
||||
| MSR: 00021000 <CE,ME> CR: 42000222 XER: 00000000
|
||||
| DEAR: 00000000 ESR: 00000000
|
||||
| GPR00: c03d27e8 cfa59a08 cfa55fe0 00000000 0fa46bc0 [...]
|
||||
| [..]
|
||||
| NIP [c03ed4b8] sata_dwc_qc_issue+0x14c/0x254
|
||||
| LR [c03d27e8] ata_qc_issue+0x1c8/0x2dc
|
||||
| Call Trace:
|
||||
| [cfa59a08] [c003f4e0] __cancel_work_timer+0x124/0x194 (unreliable)
|
||||
| [cfa59a78] [c03d27e8] ata_qc_issue+0x1c8/0x2dc
|
||||
| [cfa59a98] [c03d2b3c] ata_exec_internal_sg+0x240/0x524
|
||||
| [cfa59b08] [c03d2e98] ata_exec_internal+0x78/0xe0
|
||||
| [cfa59b58] [c03d30fc] ata_read_log_page.part.38+0x1dc/0x204
|
||||
| [cfa59bc8] [c03d324c] ata_identify_page_supported+0x68/0x130
|
||||
| [...]
|
||||
|
||||
this is because sata_dwc_dma_xfer_complete() NULLs the
|
||||
dma_pending's next neighbour "chan" (a *dma_chan struct) in
|
||||
this '32' case right here (line ~735):
|
||||
> hsdevp->dma_pending[tag] = SATA_DWC_DMA_PENDING_NONE;
|
||||
|
||||
Then the next time, a dma gets issued; dma_dwc_xfer_setup() passes
|
||||
the NULL'd hsdevp->chan to the dmaengine_slave_config() which then
|
||||
causes the crash.
|
||||
|
||||
Reported-by: ticerex (OpenWrt Forum)
|
||||
Fixes: 28361c403683c ("libata: add extra internal command")
|
||||
Cc: stable@kernel.org # 4.18+
|
||||
Link: https://forum.openwrt.org/t/my-book-live-duo-reboot-loop/122464
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
--- a/drivers/ata/sata_dwc_460ex.c
|
||||
+++ b/drivers/ata/sata_dwc_460ex.c
|
||||
@@ -145,7 +145,7 @@ struct sata_dwc_device {
|
||||
#endif
|
||||
};
|
||||
|
||||
-#define SATA_DWC_QCMD_MAX 32
|
||||
+#define SATA_DWC_QCMD_MAX 33
|
||||
|
||||
struct sata_dwc_device_port {
|
||||
struct sata_dwc_device *hsdev;
|
||||
@@ -14,6 +14,7 @@ migrate_wifi_path() {
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
tplink,archer-c5-v1|\
|
||||
tplink,archer-c7-v1|\
|
||||
tplink,archer-c7-v2|\
|
||||
zyxel,nbg6716)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = &wifi;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
extosc: ref {
|
||||
|
||||
@@ -150,16 +150,27 @@
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x06000000 0x00000101 0x00001313>;
|
||||
pll-data = <0x02000000 0x00000101 0x00001313>;
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
rgmii-gmac0 = <1>;
|
||||
rxdv-delay = <3>;
|
||||
rxd-delay = <3>;
|
||||
txen-delay = <0>;
|
||||
txd-delay = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9533_mikrotik_routerboard-16m.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "mikrotik,routerboard-mapl-2nd", "qca,qca9533";
|
||||
model = "MikroTik RouterBOARD mAPL-2nD (mAP lite)";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_user;
|
||||
led-failsafe = &led_user;
|
||||
led-running = &led_user;
|
||||
led-upgrade = &led_user;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_power_pin &led_lan_pin>;
|
||||
|
||||
power {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
lan {
|
||||
label = "green:lan";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan {
|
||||
label = "green:wlan";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led_user: user {
|
||||
label = "green:user";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&swphy0>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
switch-phy-swap = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
compatible = "syscon", "simple-mfd";
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
led_lan_pin: pinmux_led_lan_pin {
|
||||
pinctrl-single,bits = <0x4 0x0 0xff>;
|
||||
};
|
||||
|
||||
led_power_pin: pinmux_led_power_pin {
|
||||
pinctrl-single,bits = <0x10 0x0 0xff00>;
|
||||
};
|
||||
};
|
||||
102
target/linux/ath79/dts/qca9533_yuncore_a930.dts
Normal file
102
target/linux/ath79/dts/qca9533_yuncore_a930.dts
Normal file
@@ -0,0 +1,102 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca953x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "yuncore,a930", "qca,qca9533";
|
||||
model = "YunCore A930";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð1;
|
||||
led-boot = &led_system;
|
||||
led-failsafe = &led_system;
|
||||
led-running = &led_system;
|
||||
led-upgrade = &led_system;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_system: system {
|
||||
label = "green:system";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x050000 0xfa0000>;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
};
|
||||
|
||||
ð1 {
|
||||
mtd-mac-address = <&art 0x6>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
};
|
||||
32
target/linux/ath79/dts/qca9563_yuncore_xd3200.dts
Normal file
32
target/linux/ath79/dts/qca9563_yuncore_xd3200.dts
Normal file
@@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9563_yuncore_xd4200.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "yuncore,xd3200", "qca,qca9563";
|
||||
model = "YunCore XD3200";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
led-boot = &led_system;
|
||||
led-failsafe = &led_system;
|
||||
led-running = &led_system;
|
||||
led-upgrade = &led_system;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_system: system {
|
||||
label = "green:system";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -220,7 +220,8 @@ glinet,gl-x750)
|
||||
hak5,lan-turtle)
|
||||
ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
|
||||
;;
|
||||
joyit,jt-or750i)
|
||||
joyit,jt-or750i|\
|
||||
yuncore,xd3200)
|
||||
ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
|
||||
;;
|
||||
meraki,mr12|\
|
||||
@@ -347,10 +348,7 @@ tplink,tl-mr6400-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "white:wan" "eth1"
|
||||
ucidef_set_led_netdev "4g" "4G" "white:4g" "usb0"
|
||||
;;
|
||||
tplink,tl-wpa8630-v1|\
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
tplink,tl-wpa8630-v1)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
||||
;;
|
||||
tplink,tl-wr842n-v2)
|
||||
|
||||
@@ -306,6 +306,7 @@ ath79_setup_interfaces()
|
||||
ubnt,nanobeam-ac-gen2|\
|
||||
ubnt,nanostation-ac|\
|
||||
yuncore,a782|\
|
||||
yuncore,xd3200|\
|
||||
yuncore,xd4200)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:wan"
|
||||
@@ -381,10 +382,7 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "2:lan:3" "3:lan:2"
|
||||
;;
|
||||
tplink,tl-wpa8630-v1|\
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
tplink,tl-wpa8630-v1)
|
||||
# port 5 (internal) is the power-line port
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
|
||||
|
||||
@@ -44,7 +44,8 @@ case "$FIRMWARE" in
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,unifiac-pro|\
|
||||
yuncore,a770)
|
||||
yuncore,a770|\
|
||||
yuncore,xd3200)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
;;
|
||||
devolo,dvl1200e|\
|
||||
@@ -227,10 +228,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
tplink,eap225-outdoor-v1|\
|
||||
tplink,eap225-v3|\
|
||||
tplink,eap225-wall-v2|\
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
tplink,eap225-wall-v2)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
|
||||
@@ -587,36 +587,6 @@ define Device/tplink_tl-wpa8630-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630-v1
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9563
|
||||
DEVICE_MODEL := TL-WPA8630P
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
endef
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2-int
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2 (Int.)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2-INT
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2-int
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2.0-eu
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2.0 (EU)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2.0-EU
|
||||
SUPPORTED_DEVICES += tplink,tl-wpa8630p-v2-eu
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2.0-eu
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2.1-eu
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2.1 (EU)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2.1-EU
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2.1-eu
|
||||
|
||||
define Device/tplink_tl-wr1043nd-v1
|
||||
$(Device/tplink-8m)
|
||||
SOC := ar9132
|
||||
@@ -658,6 +628,7 @@ define Device/tplink_tl-wr1043nd-v4
|
||||
DEVICE_VARIANT := v4
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
TPLINK_HWID := 0x10430004
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_BOARD_ID := TLWR1043NDV4
|
||||
SUPPORTED_DEVICES += tl-wr1043nd-v4
|
||||
endef
|
||||
|
||||
@@ -2242,6 +2242,27 @@ define Device/yuncore_a782
|
||||
endef
|
||||
TARGET_DEVICES += yuncore_a782
|
||||
|
||||
define Device/yuncore_a930
|
||||
SOC := qca9533
|
||||
DEVICE_VENDOR := YunCore
|
||||
DEVICE_MODEL := A930
|
||||
IMAGE_SIZE := 16000k
|
||||
IMAGES += tftp.bin
|
||||
IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
|
||||
endef
|
||||
TARGET_DEVICES += yuncore_a930
|
||||
|
||||
define Device/yuncore_xd3200
|
||||
SOC := qca9563
|
||||
DEVICE_VENDOR := YunCore
|
||||
DEVICE_MODEL := XD3200
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 16000k
|
||||
IMAGES += tftp.bin
|
||||
IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
|
||||
endef
|
||||
TARGET_DEVICES += yuncore_xd3200
|
||||
|
||||
define Device/yuncore_xd4200
|
||||
SOC := qca9563
|
||||
DEVICE_VENDOR := YunCore
|
||||
|
||||
@@ -45,6 +45,14 @@ define Device/mikrotik_routerboard-lhg-2nd
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-lhg-2nd
|
||||
|
||||
define Device/mikrotik_routerboard-mapl-2nd
|
||||
$(Device/mikrotik_nor)
|
||||
SOC := qca9533
|
||||
DEVICE_MODEL := RouterBOARD mAPL-2nD (mAP lite)
|
||||
IMAGE_SIZE := 16256k
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_routerboard-mapl-2nd
|
||||
|
||||
define Device/mikrotik_routerboard-sxt-5nd-r2
|
||||
$(Device/mikrotik_nand)
|
||||
SOC := ar9344
|
||||
|
||||
@@ -223,6 +223,41 @@ define Device/tplink_tl-wa901nd-v5
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wa901nd-v5
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9563
|
||||
DEVICE_MODEL := TL-WPA8630P
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
|
||||
DEVICE_COMPAT_VERSION := 2.0
|
||||
DEVICE_COMPAT_MESSAGE := The flash erase blocksize has changed to 4k from the 64k in previous versions, \
|
||||
so the JFFS2 settings partition MUST be reformatted to avoid data corruption. \
|
||||
Backup your settings before upgrading, then during sysupgrade, \
|
||||
de-select "Keep settings" and select "Force" to continue (equivilant to "sysupgrade -n -F").
|
||||
endef
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2-int
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2 (Int.)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2-INT
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2-int
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2.0-eu
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2.0 (EU)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2.0-EU
|
||||
SUPPORTED_DEVICES += tplink,tl-wpa8630p-v2-eu
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2.0-eu
|
||||
|
||||
define Device/tplink_tl-wpa8630p-v2.1-eu
|
||||
$(Device/tplink_tl-wpa8630p-v2)
|
||||
DEVICE_VARIANT := v2.1 (EU)
|
||||
TPLINK_BOARD_ID := TL-WPA8630P-V2.1-EU
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wpa8630p-v2.1-eu
|
||||
|
||||
define Device/tplink_tl-wr703n
|
||||
$(Device/tplink-4mlzma)
|
||||
SOC := ar9331
|
||||
|
||||
@@ -7,7 +7,8 @@ board_config_update
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
mikrotik,routerboard-lhg-2nd)
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-mapl-2nd)
|
||||
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
|
||||
;;
|
||||
mikrotik,routerboard-wapr-2nd)
|
||||
|
||||
@@ -18,6 +18,7 @@ ath79_setup_interfaces()
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-921gs-5hpacd-15s|\
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-mapl-2nd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2|\
|
||||
mikrotik,routerboard-wap-g-5hact2hnd|\
|
||||
mikrotik,routerboard-wapr-2nd)
|
||||
@@ -41,6 +42,7 @@ ath79_setup_macs()
|
||||
mikrotik,routerboard-912uag-2hpnd|\
|
||||
mikrotik,routerboard-921gs-5hpacd-15s|\
|
||||
mikrotik,routerboard-lhg-2nd|\
|
||||
mikrotik,routerboard-mapl-2nd|\
|
||||
mikrotik,routerboard-sxt-5nd-r2|\
|
||||
mikrotik,routerboard-wap-g-5hact2hnd|\
|
||||
mikrotik,routerboard-wapr-2nd)
|
||||
|
||||
@@ -29,6 +29,7 @@ case "$FIRMWARE" in
|
||||
mikrotik,routerboard-wapr-2nd)
|
||||
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +1)
|
||||
;;
|
||||
mikrotik,routerboard-mapl-2nd|\
|
||||
mikrotik,routerboard-wap-g-5hact2hnd)
|
||||
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" +2)
|
||||
;;
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
#endif /* _LINUX_TYPES_H */
|
||||
--- a/net/ipv4/af_inet.c
|
||||
+++ b/net/ipv4/af_inet.c
|
||||
@@ -1441,8 +1441,8 @@ struct sk_buff *inet_gro_receive(struct
|
||||
@@ -1444,8 +1444,8 @@ struct sk_buff *inet_gro_receive(struct
|
||||
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
|
||||
goto out_unlock;
|
||||
|
||||
@@ -534,7 +534,7 @@
|
||||
goto next_ht;
|
||||
--- a/net/ipv6/ip6_offload.c
|
||||
+++ b/net/ipv6/ip6_offload.c
|
||||
@@ -240,7 +240,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
@@ -242,7 +242,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
|
||||
continue;
|
||||
|
||||
iph2 = (struct ipv6hdr *)(p->data + off);
|
||||
|
||||
@@ -94,6 +94,11 @@ tplink,tl-wa850re-v2)
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:signal4" "wlan0" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:signal5" "wlan0" "80" "100"
|
||||
;;
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
||||
;;
|
||||
tplink,tl-wr940n-v3|\
|
||||
tplink,tl-wr940n-v4|\
|
||||
tplink,tl-wr941nd-v6)
|
||||
|
||||
@@ -83,6 +83,13 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
||||
;;
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
# port 5 (internal) is the power-line port
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
|
||||
;;
|
||||
tplink,tl-wr941-v2)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
|
||||
21
target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version
Executable file
21
target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2020 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
ucidef_set_compat_version "2.0"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions/caldata.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath10k/pre-cal-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
tplink,tl-wpa8630p-v2-int|\
|
||||
tplink,tl-wpa8630p-v2.0-eu|\
|
||||
tplink,tl-wpa8630p-v2.1-eu)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -509,24 +509,27 @@ $(eval $(call KernelPackage,sound-soc-hifiberry-dac))
|
||||
|
||||
|
||||
define KernelPackage/sound-soc-hifiberry-dacplus
|
||||
TITLE:=Support for HifiBerry DAC+ / DAC+ Pro
|
||||
TITLE:=Support for HifiBerry DAC+ / DAC+ Pro / Amp2
|
||||
KCONFIG:= \
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS \
|
||||
CONFIG_SND_SOC_PCM512x
|
||||
CONFIG_SND_SOC_PCM512x \
|
||||
CONFIG_SND_SOC_PCM512x_I2C
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/clk/clk-hifiberry-dacpro.ko \
|
||||
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dacplus.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x-i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,68,clk-hifiberry-dacpro snd-soc-pcm512x \
|
||||
snd-soc-hifiberry-dacplus)
|
||||
snd-soc-pcm512x-i2c snd-soc-hifiberry-dacplus)
|
||||
DEPENDS:= \
|
||||
kmod-sound-soc-bcm2835-i2s \
|
||||
+kmod-i2c-bcm2835
|
||||
+kmod-i2c-bcm2835 \
|
||||
+kmod-regmap-i2c
|
||||
$(call AddDepends/sound)
|
||||
endef
|
||||
|
||||
define KernelPackage/sound-soc-hifiberry-dacplus/description
|
||||
This package contains support for HifiBerry DAC+ / DAC+ Pro
|
||||
This package contains support for HifiBerry DAC+ / DAC+ Pro / Amp2
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sound-soc-hifiberry-dacplus))
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-bcm2835.c
|
||||
+++ b/drivers/i2c/busses/i2c-bcm2835.c
|
||||
@@ -51,6 +51,18 @@
|
||||
@@ -56,6 +56,18 @@
|
||||
#define BCM2835_I2C_CDIV_MIN 0x0002
|
||||
#define BCM2835_I2C_CDIV_MAX 0xFFFE
|
||||
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
struct bcm2835_i2c_dev {
|
||||
struct device *dev;
|
||||
void __iomem *regs;
|
||||
@@ -63,8 +75,78 @@ struct bcm2835_i2c_dev {
|
||||
@@ -68,8 +80,78 @@ struct bcm2835_i2c_dev {
|
||||
u32 msg_err;
|
||||
u8 *msg_buf;
|
||||
size_t msg_buf_remaining;
|
||||
@@ -135,7 +135,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
static inline void bcm2835_i2c_writel(struct bcm2835_i2c_dev *i2c_dev,
|
||||
u32 reg, u32 val)
|
||||
{
|
||||
@@ -252,6 +334,7 @@ static void bcm2835_i2c_start_transfer(s
|
||||
@@ -257,6 +339,7 @@ static void bcm2835_i2c_start_transfer(s
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr);
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len);
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c);
|
||||
@@ -143,7 +143,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
}
|
||||
|
||||
static void bcm2835_i2c_finish_transfer(struct bcm2835_i2c_dev *i2c_dev)
|
||||
@@ -278,6 +361,7 @@ static irqreturn_t bcm2835_i2c_isr(int t
|
||||
@@ -283,6 +366,7 @@ static irqreturn_t bcm2835_i2c_isr(int t
|
||||
u32 val, err;
|
||||
|
||||
val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S);
|
||||
@@ -151,7 +151,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR);
|
||||
if (err) {
|
||||
@@ -344,6 +428,13 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
@@ -349,6 +433,13 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
unsigned long time_left;
|
||||
int i;
|
||||
|
||||
@@ -165,7 +165,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
for (i = 0; i < (num - 1); i++)
|
||||
if (msgs[i].flags & I2C_M_RD) {
|
||||
dev_warn_once(i2c_dev->dev,
|
||||
@@ -362,6 +453,10 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
@@ -367,6 +458,10 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
|
||||
bcm2835_i2c_finish_transfer(i2c_dev);
|
||||
|
||||
@@ -176,7 +176,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
if (!time_left) {
|
||||
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C,
|
||||
BCM2835_I2C_C_CLEAR);
|
||||
@@ -372,7 +467,9 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
@@ -377,7 +472,9 @@ static int bcm2835_i2c_xfer(struct i2c_a
|
||||
if (!i2c_dev->msg_err)
|
||||
return num;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -1468,6 +1468,103 @@ command_cleanup:
|
||||
@@ -1475,6 +1475,103 @@ command_cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
* non-error returns are a promise to giveback() the urb later
|
||||
* we drop ownership so next owner (or urb unlink) can get it
|
||||
*/
|
||||
@@ -5366,6 +5463,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
@@ -5376,6 +5473,7 @@ static const struct hc_driver xhci_hc_dr
|
||||
.endpoint_reset = xhci_endpoint_reset,
|
||||
.check_bandwidth = xhci_check_bandwidth,
|
||||
.reset_bandwidth = xhci_reset_bandwidth,
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-bcm2835.c
|
||||
+++ b/drivers/i2c/busses/i2c-bcm2835.c
|
||||
@@ -188,6 +188,7 @@ static int clk_bcm2835_i2c_set_rate(stru
|
||||
@@ -193,6 +193,7 @@ static int clk_bcm2835_i2c_set_rate(stru
|
||||
{
|
||||
struct clk_bcm2835_i2c *div = to_clk_bcm2835_i2c(hw);
|
||||
u32 redl, fedl;
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
u32 divider = clk_bcm2835_i2c_calc_divider(rate, parent_rate);
|
||||
|
||||
if (divider == -EINVAL)
|
||||
@@ -211,6 +212,17 @@ static int clk_bcm2835_i2c_set_rate(stru
|
||||
@@ -216,6 +217,17 @@ static int clk_bcm2835_i2c_set_rate(stru
|
||||
bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_DEL,
|
||||
(fedl << BCM2835_I2C_FEDL_SHIFT) |
|
||||
(redl << BCM2835_I2C_REDL_SHIFT));
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
@@ -193,6 +194,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -194,6 +195,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||
|
||||
@@ -190,7 +190,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
{}, \
|
||||
}; \
|
||||
\
|
||||
@@ -344,6 +355,11 @@ static void __exit fbtft_driver_module_e
|
||||
@@ -347,6 +358,11 @@ static void __exit fbtft_driver_module_e
|
||||
module_init(fbtft_driver_module_init); \
|
||||
module_exit(fbtft_driver_module_exit);
|
||||
|
||||
|
||||
73
target/linux/bcm4908/base-files/lib/functions/bcm4908.sh
Normal file
73
target/linux/bcm4908/base-files/lib/functions/bcm4908.sh
Normal file
@@ -0,0 +1,73 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
|
||||
|
||||
FS_STATE_READY=2
|
||||
|
||||
# $(1): file to read from
|
||||
# $(2): offset in bytes
|
||||
get_hex_u32_le() {
|
||||
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/4 "%02x"'
|
||||
}
|
||||
|
||||
# Setup /tmp/env.config to provide "metadata" UBI volume access
|
||||
#
|
||||
# It can be used with "fw_printenv -c /tmp/env.config"
|
||||
bcm4908_pkgtb_setup_env_config() {
|
||||
local size=$((0x$(get_hex_u32_le /dev/ubi0_1 4)))
|
||||
|
||||
dd if=/dev/ubi0_1 of=/tmp/env.head count=8 iflag=count_bytes
|
||||
dd if=/dev/ubi0_1 of=/tmp/env.body skip=8 iflag=skip_bytes
|
||||
printf "%s\t0x%x\t0x%x\t0x%x" "/tmp/env.body" 0x0 $size $size > /tmp/env.config
|
||||
}
|
||||
|
||||
bcm4908_committed_image_seq() {
|
||||
bcm4908_pkgtb_setup_env_config
|
||||
|
||||
commited="$(fw_printenv -n -c /tmp/env.config COMMITTED)"
|
||||
[ -n "$commited" ] && {
|
||||
seq=$(fw_printenv -n -c /tmp/env.config SEQ | cut -d ',' -f $commited)
|
||||
[ -n "$seq" ] && {
|
||||
echo $seq
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
echo "Failed to read COMMITED and SEQ from metadata1" >&2
|
||||
}
|
||||
|
||||
# Make sure "rootfs_data" UBI volume matches currently flashed image
|
||||
#
|
||||
# On mismatch "rootfs_data" will be wiped and assigned
|
||||
#
|
||||
# $1: UBI volume of "rootfs_data" (e.g. ubi0_123)
|
||||
bcm4908_verify_rootfs_data() {
|
||||
local ubivol="$1"
|
||||
local dir=/tmp/rootfs_data
|
||||
local seq="$(bcm4908_committed_image_seq)"
|
||||
|
||||
[ -z "$seq" ] && return
|
||||
|
||||
mkdir $dir
|
||||
if ! mount -t ubifs /dev/$ubivol $dir; then
|
||||
echo "Failed to mount $ubivol UBI volume" >&2
|
||||
rmdir $dir
|
||||
return
|
||||
fi
|
||||
|
||||
# Wipe rootfs_data if it doesn't belong to us
|
||||
[ "$(readlink $dir/.openwrt-image-seq)" != "$seq" ] && {
|
||||
echo "Removing \"rootfs_data\" content"
|
||||
rm -rf $dir/..?* $dir/.[!.]* $dir/*
|
||||
}
|
||||
|
||||
# If rootfs_data is clean (or was just wiped) claim it
|
||||
[ -z "$(ls -A $dir)" ] && {
|
||||
echo "Assigning \"rootfs_data\" to the current firmware"
|
||||
# Claim this "rootfs_data"
|
||||
ln -s $seq $dir/.openwrt-image-seq
|
||||
# Mark it ready to avoid "mount_root" wiping it again
|
||||
ln -s $FS_STATE_READY $dir/.fs_state
|
||||
}
|
||||
|
||||
umount $dir
|
||||
rmdir $dir
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
|
||||
|
||||
. /lib/functions/bcm4908.sh
|
||||
|
||||
rootfs_create() {
|
||||
local blocks
|
||||
|
||||
blocks=$(cat /sys/class/ubi/ubi0/avail_eraseblocks)
|
||||
[ -z "$blocks" ] && {
|
||||
echo "Failed to read amount of available erase blocks" >&2
|
||||
return
|
||||
}
|
||||
|
||||
# Use 80% of remaining flash size for "rootfs_data"
|
||||
ubimkvol /dev/ubi0 -n 20 -N rootfs_data --lebs $((blocks / 100 * 80))
|
||||
mknod -m 0600 /dev/ubi0_20 c 252 21
|
||||
|
||||
bcm4908_verify_rootfs_data ubi0_20
|
||||
}
|
||||
|
||||
rootfs_prepare() {
|
||||
# Do nothing on CFE devices
|
||||
ubinfo /dev/ubi0 -N metadata1 > /dev/null 2>&1 || return
|
||||
|
||||
# Find UBI volume device (e.g. ubi0_123)
|
||||
local ubivol="$(grep rootfs_data /sys/devices/virtual/ubi/ubi*/ubi*/name | sed -n 's/.*\(ubi\d*_\d*\).*/\1/p')"
|
||||
if [ -n "$ubivol" ]; then
|
||||
bcm4908_verify_rootfs_data $ubivol
|
||||
else
|
||||
echo "Creating \"rootfs_data\" UBI volume"
|
||||
rootfs_create
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main rootfs_prepare
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
|
||||
|
||||
RAMFS_COPY_BIN="bcm4908img expr egrep fdtget fw_printenv fw_setenv tr"
|
||||
. /lib/functions/bcm4908.sh
|
||||
|
||||
RAMFS_COPY_BIN="bcm4908img expr egrep ln fdtget fw_printenv fw_setenv readlink tr"
|
||||
|
||||
PART_NAME=firmware
|
||||
|
||||
@@ -134,17 +136,7 @@ platform_pkgtb_get_image() {
|
||||
}
|
||||
}
|
||||
|
||||
platform_pkgtb_setup_env_config() {
|
||||
local size=$((0x$(get_hex_u32_le /dev/ubi0_1 4)))
|
||||
|
||||
dd if=/dev/ubi0_1 of=/tmp/env.head count=8 iflag=count_bytes
|
||||
dd if=/dev/ubi0_1 of=/tmp/env.body skip=8 iflag=skip_bytes
|
||||
printf "%s\t0x%x\t0x%x\t0x%x" "/tmp/env.body" 0x0 $size $size > /tmp/env.config
|
||||
}
|
||||
|
||||
platform_pkgtb_get_upgrade_index() {
|
||||
platform_pkgtb_setup_env_config
|
||||
|
||||
case "$(fw_printenv -l /tmp -n -c /tmp/env.config COMMITTED)" in
|
||||
1) echo 2;;
|
||||
2) echo 1;;
|
||||
@@ -160,8 +152,6 @@ platform_pkgtb_commit() {
|
||||
local seq2
|
||||
local tmp
|
||||
|
||||
platform_pkgtb_setup_env_config
|
||||
|
||||
# Read current values
|
||||
for valid in $(fw_printenv -l /tmp -n -c /tmp/env.config VALID | tr ',' ' '); do
|
||||
case "$valid" in
|
||||
@@ -272,11 +262,20 @@ platform_check_image() {
|
||||
# upgrade
|
||||
#
|
||||
|
||||
platform_pkgtb_clean_rootfs_data() {
|
||||
local ubidev=$(nand_find_ubi $CI_UBIPART)
|
||||
local ubivol="$(nand_find_volume $ubidev rootfs_data)"
|
||||
|
||||
bcm4908_verify_rootfs_data "$ubivol"
|
||||
}
|
||||
|
||||
platform_do_upgrade_pkgtb() {
|
||||
local cmd="${2:-cat}"
|
||||
local size
|
||||
local idx bootfs_id rootfs_id
|
||||
|
||||
bcm4908_pkgtb_setup_env_config
|
||||
|
||||
idx=$(platform_pkgtb_get_upgrade_index)
|
||||
case "$idx" in
|
||||
1) bootfs_id=3; rootfs_id=4;;
|
||||
@@ -295,6 +294,8 @@ platform_do_upgrade_pkgtb() {
|
||||
|
||||
platform_pkgtb_commit $idx
|
||||
|
||||
CI_UBIPART="image"
|
||||
platform_pkgtb_clean_rootfs_data
|
||||
nand_do_upgrade_success
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
uboot {
|
||||
description = "U-Boot";
|
||||
data = /incbin/("${images_dir}/u-boot/u-boot-nodtb.bin");
|
||||
os = "U-Boot";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
load = <0x1000000>;
|
||||
entry = <0x1000000>;
|
||||
|
||||
hash-1 {
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
|
||||
kernel {
|
||||
description = "Linux kernel";
|
||||
data = /incbin/("${kernel}");
|
||||
@@ -37,10 +51,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
fdt_linux_RAX220 {
|
||||
fdt_uboot {
|
||||
description = "dtb";
|
||||
data = /incbin/("${dts_dir}/broadcom/bcm4908/bcm4908-netgear-raxe500.dtb");
|
||||
arch = "arm64";
|
||||
data = /incbin/("${images_dir}/u-boot/u-boot.dtb");
|
||||
type = "flat_dt";
|
||||
compression = "none";
|
||||
|
||||
@@ -48,9 +61,25 @@
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
|
||||
fdt_linux_RAX220 {
|
||||
description = "dtb";
|
||||
data = /incbin/("${dts_dir}/broadcom/bcm4908/bcm4908-netgear-raxe500.dtb");
|
||||
arch = "arm64";
|
||||
type = "flat_dt";
|
||||
compression = "none";
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "conf_uboot";
|
||||
|
||||
conf_uboot {
|
||||
description = "BRCM 63xxx with uboot";
|
||||
fdt = "fdt_uboot";
|
||||
loadables = "atf", "uboot";
|
||||
};
|
||||
|
||||
conf_lx_RAX220 {
|
||||
description = "BRCM 63xxx linux";
|
||||
kernel = "kernel";
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
From 32942d33d63d27714ed16a4176e5a99547adb6e0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 18 Feb 2022 18:24:59 +0100
|
||||
Subject: [PATCH] phy: phy-brcm-usb: fixup BCM4908 support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Just like every other family BCM4908 should get its own enum value. That
|
||||
is required to properly handle it in chipset conditional code.
|
||||
|
||||
The real change is excluding BCM4908 from the PLL reprogramming code
|
||||
(see brcmusb_usb3_pll_54mhz()). I'm not sure what's the BCM4908
|
||||
reference clock frequency but:
|
||||
1. BCM4908 custom driver from Broadcom's SDK doesn't reprogram PLL
|
||||
2. Doing that in Linux driver stopped PHY handling some USB 3.0 devices
|
||||
|
||||
This change makes USB 3.0 PHY recognize e.g.:
|
||||
1. 04e8:6860 - Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode)
|
||||
2. 1058:259f - Western Digital My Passport 259F
|
||||
|
||||
Broadcom's STB SoCs come with a set of SUN_TOP_CTRL_* registers that
|
||||
allow reading chip family and product ids. Such a block & register is
|
||||
missing on BCM4908 so this commit introduces "compatible" string
|
||||
specific binding.
|
||||
|
||||
Fixes: 4b402fa8e0b7 ("phy: phy-brcm-usb: support PHY on the BCM4908")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20220218172459.10431-1-zajec5@gmail.com
|
||||
Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
||||
---
|
||||
drivers/phy/broadcom/phy-brcm-usb-init.c | 36 ++++++++++++++++++++++++
|
||||
drivers/phy/broadcom/phy-brcm-usb-init.h | 1 +
|
||||
drivers/phy/broadcom/phy-brcm-usb.c | 11 +++++++-
|
||||
3 files changed, 47 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/phy/broadcom/phy-brcm-usb-init.c
|
||||
+++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
enum brcm_family_type {
|
||||
BRCM_FAMILY_3390A0,
|
||||
+ BRCM_FAMILY_4908,
|
||||
BRCM_FAMILY_7250B0,
|
||||
BRCM_FAMILY_7271A0,
|
||||
BRCM_FAMILY_7364A0,
|
||||
@@ -96,6 +97,7 @@ enum brcm_family_type {
|
||||
|
||||
static const char *family_names[BRCM_FAMILY_COUNT] = {
|
||||
USB_BRCM_FAMILY(3390A0),
|
||||
+ USB_BRCM_FAMILY(4908),
|
||||
USB_BRCM_FAMILY(7250B0),
|
||||
USB_BRCM_FAMILY(7271A0),
|
||||
USB_BRCM_FAMILY(7364A0),
|
||||
@@ -203,6 +205,27 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT
|
||||
USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK,
|
||||
ENDIAN_SETTINGS, /* USB_CTRL_SETUP ENDIAN bits */
|
||||
},
|
||||
+ /* 4908 */
|
||||
+ [BRCM_FAMILY_4908] = {
|
||||
+ 0, /* USB_CTRL_SETUP_SCB1_EN_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_SCB2_EN_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_OC3_DISABLE_MASK */
|
||||
+ 0, /* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */
|
||||
+ 0, /* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */
|
||||
+ USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK,
|
||||
+ USB_CTRL_USB_PM_USB_PWRDN_MASK,
|
||||
+ 0, /* USB_CTRL_USB30_CTL1_XHC_SOFT_RESETB_MASK */
|
||||
+ 0, /* USB_CTRL_USB30_CTL1_USB3_IOC_MASK */
|
||||
+ 0, /* USB_CTRL_USB30_CTL1_USB3_IPP_MASK */
|
||||
+ 0, /* USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK */
|
||||
+ 0, /* USB_CTRL_USB_PM_SOFT_RESET_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_CC_DRD_MODE_ENABLE_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP_STRAP_CC_DRD_MODE_ENABLE_SEL_MASK */
|
||||
+ 0, /* USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK */
|
||||
+ 0, /* USB_CTRL_SETUP ENDIAN bits */
|
||||
+ },
|
||||
/* 7250b0 */
|
||||
[BRCM_FAMILY_7250B0] = {
|
||||
USB_CTRL_SETUP_SCB1_EN_MASK,
|
||||
@@ -559,6 +582,7 @@ static void brcmusb_usb3_pll_54mhz(struc
|
||||
*/
|
||||
switch (params->selected_family) {
|
||||
case BRCM_FAMILY_3390A0:
|
||||
+ case BRCM_FAMILY_4908:
|
||||
case BRCM_FAMILY_7250B0:
|
||||
case BRCM_FAMILY_7366C0:
|
||||
case BRCM_FAMILY_74371A0:
|
||||
@@ -1004,6 +1028,18 @@ static const struct brcm_usb_init_ops bc
|
||||
.set_dual_select = usb_set_dual_select,
|
||||
};
|
||||
|
||||
+void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params)
|
||||
+{
|
||||
+ int fam;
|
||||
+
|
||||
+ fam = BRCM_FAMILY_4908;
|
||||
+ params->selected_family = fam;
|
||||
+ params->usb_reg_bits_map =
|
||||
+ &usb_reg_bits_map_table[fam][0];
|
||||
+ params->family_name = family_names[fam];
|
||||
+ params->ops = &bcm7445_ops;
|
||||
+}
|
||||
+
|
||||
void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params)
|
||||
{
|
||||
int fam;
|
||||
--- a/drivers/phy/broadcom/phy-brcm-usb-init.h
|
||||
+++ b/drivers/phy/broadcom/phy-brcm-usb-init.h
|
||||
@@ -64,6 +64,7 @@ struct brcm_usb_init_params {
|
||||
bool suspend_with_clocks;
|
||||
};
|
||||
|
||||
+void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params);
|
||||
void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params);
|
||||
void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params);
|
||||
void brcm_usb_dvr_init_7211b0(struct brcm_usb_init_params *params);
|
||||
--- a/drivers/phy/broadcom/phy-brcm-usb.c
|
||||
+++ b/drivers/phy/broadcom/phy-brcm-usb.c
|
||||
@@ -253,6 +253,15 @@ static const struct attribute_group brcm
|
||||
.attrs = brcm_usb_phy_attrs,
|
||||
};
|
||||
|
||||
+static const struct match_chip_info chip_info_4908 = {
|
||||
+ .init_func = &brcm_usb_dvr_init_4908,
|
||||
+ .required_regs = {
|
||||
+ BRCM_REGS_CTRL,
|
||||
+ BRCM_REGS_XHCI_EC,
|
||||
+ -1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct match_chip_info chip_info_7216 = {
|
||||
.init_func = &brcm_usb_dvr_init_7216,
|
||||
.required_regs = {
|
||||
@@ -288,7 +297,7 @@ static const struct match_chip_info chip
|
||||
static const struct of_device_id brcm_usb_dt_ids[] = {
|
||||
{
|
||||
.compatible = "brcm,bcm4908-usb-phy",
|
||||
- .data = &chip_info_7445,
|
||||
+ .data = &chip_info_4908,
|
||||
},
|
||||
{
|
||||
.compatible = "brcm,bcm7216-usb-phy",
|
||||
@@ -1,30 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 15 Feb 2022 08:27:35 +0100
|
||||
Subject: [PATCH] i2c: brcmstb: fix support for DSL and CM variants
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
DSL and CM (Cable Modem) support 8 B max transfer size and have a custom
|
||||
DT binding for that reason. This driver was checking for a wrong
|
||||
"compatible" however which resulted in an incorrect setup.
|
||||
|
||||
Fixes: e2e5a2c61837 ("i2c: brcmstb: Adding support for CM and DSL SoCs")
|
||||
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/i2c/busses/i2c-brcmstb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-brcmstb.c
|
||||
+++ b/drivers/i2c/busses/i2c-brcmstb.c
|
||||
@@ -640,7 +640,7 @@ static int brcmstb_i2c_probe(struct plat
|
||||
|
||||
/* set the data in/out register size for compatible SoCs */
|
||||
if (of_device_is_compatible(dev->device->of_node,
|
||||
- "brcmstb,brcmper-i2c"))
|
||||
+ "brcm,brcmper-i2c"))
|
||||
dev->data_regsz = sizeof(u8);
|
||||
else
|
||||
dev->data_regsz = sizeof(u32);
|
||||
@@ -17,8 +17,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/bridge/br_device.c
|
||||
+++ b/net/bridge/br_device.c
|
||||
@@ -36,6 +36,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
|
||||
struct ethhdr *eth;
|
||||
@@ -35,6 +35,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
|
||||
const unsigned char *dest;
|
||||
u16 vid = 0;
|
||||
|
||||
+ memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
From da5bc1832b325b15e4cca3b63861ecf48be870ef Mon Sep 17 00:00:00 2001
|
||||
From: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
Date: Sun, 10 Jan 2021 10:58:32 +0000
|
||||
Subject: [PATCH] net: sfp: cope with SFPs that set both LOS normal and LOS
|
||||
inverted
|
||||
|
||||
The SFP MSA defines two option bits in byte 65 to indicate how the
|
||||
Rx_LOS signal on SFP pin 8 behaves:
|
||||
|
||||
bit 2 - Loss of Signal implemented, signal inverted from standard
|
||||
definition in SFP MSA (often called "Signal Detect").
|
||||
bit 1 - Loss of Signal implemented, signal as defined in SFP MSA
|
||||
(often called "Rx_LOS").
|
||||
|
||||
Clearly, setting both bits results in a meaningless situation: it would
|
||||
mean that LOS is implemented in both the normal sense (1 = signal loss)
|
||||
and inverted sense (0 = signal loss).
|
||||
|
||||
Unfortunately, there are modules out there which set both bits, which
|
||||
will be initially interpret as "inverted" sense, and then, if the LOS
|
||||
signal changes state, we will toggle between LINK_UP and WAIT_LOS
|
||||
states.
|
||||
|
||||
Change our LOS handling to give well defined behaviour: only interpret
|
||||
these bits as meaningful if exactly one is set, otherwise treat it as
|
||||
if LOS is not implemented.
|
||||
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://lore.kernel.org/r/E1kyYQa-0004iR-CU@rmk-PC.armlinux.org.uk
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/phy/sfp.c | 36 ++++++++++++++++++++++--------------
|
||||
1 file changed, 22 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -1430,15 +1430,19 @@ static void sfp_sm_link_down(struct sfp
|
||||
|
||||
static void sfp_sm_link_check_los(struct sfp *sfp)
|
||||
{
|
||||
- unsigned int los = sfp->state & SFP_F_LOS;
|
||||
+ const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
|
||||
+ const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
|
||||
+ __be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);
|
||||
+ bool los = false;
|
||||
|
||||
/* If neither SFP_OPTIONS_LOS_INVERTED nor SFP_OPTIONS_LOS_NORMAL
|
||||
- * are set, we assume that no LOS signal is available.
|
||||
+ * are set, we assume that no LOS signal is available. If both are
|
||||
+ * set, we assume LOS is not implemented (and is meaningless.)
|
||||
*/
|
||||
- if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED))
|
||||
- los ^= SFP_F_LOS;
|
||||
- else if (!(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL)))
|
||||
- los = 0;
|
||||
+ if (los_options == los_inverted)
|
||||
+ los = !(sfp->state & SFP_F_LOS);
|
||||
+ else if (los_options == los_normal)
|
||||
+ los = !!(sfp->state & SFP_F_LOS);
|
||||
|
||||
if (los)
|
||||
sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
|
||||
@@ -1448,18 +1452,22 @@ static void sfp_sm_link_check_los(struct
|
||||
|
||||
static bool sfp_los_event_active(struct sfp *sfp, unsigned int event)
|
||||
{
|
||||
- return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
|
||||
- event == SFP_E_LOS_LOW) ||
|
||||
- (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
|
||||
- event == SFP_E_LOS_HIGH);
|
||||
+ const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
|
||||
+ const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
|
||||
+ __be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);
|
||||
+
|
||||
+ return (los_options == los_inverted && event == SFP_E_LOS_LOW) ||
|
||||
+ (los_options == los_normal && event == SFP_E_LOS_HIGH);
|
||||
}
|
||||
|
||||
static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
|
||||
{
|
||||
- return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
|
||||
- event == SFP_E_LOS_HIGH) ||
|
||||
- (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
|
||||
- event == SFP_E_LOS_LOW);
|
||||
+ const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
|
||||
+ const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
|
||||
+ __be16 los_options = sfp->id.ext.options & (los_inverted | los_normal);
|
||||
+
|
||||
+ return (los_options == los_inverted && event == SFP_E_LOS_HIGH) ||
|
||||
+ (los_options == los_normal && event == SFP_E_LOS_LOW);
|
||||
}
|
||||
|
||||
static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn)
|
||||
@@ -0,0 +1,75 @@
|
||||
From dee0f71c39afdaa30af7b94af420ca1d5c0f0349 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Mon, 24 Jan 2022 22:09:43 +0100
|
||||
Subject: [PATCH 5.4 1/2] net: dsa: Move VLAN filtering syncing out of
|
||||
dsa_switch_bridge_leave
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 381a730182f1d174e1950cd4e63e885b1c302051 upstream.
|
||||
|
||||
Most of dsa_switch_bridge_leave was, in fact, dealing with the syncing
|
||||
of VLAN filtering for switches on which that is a global
|
||||
setting. Separate the two phases to prepare for the cross-chip related
|
||||
bugfix in the following commit.
|
||||
|
||||
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Marek Behún <kabel@kernel.org>
|
||||
---
|
||||
net/dsa/switch.c | 31 ++++++++++++++++++++++---------
|
||||
1 file changed, 22 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/net/dsa/switch.c
|
||||
+++ b/net/dsa/switch.c
|
||||
@@ -65,19 +65,12 @@ static int dsa_switch_bridge_join(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int dsa_switch_bridge_leave(struct dsa_switch *ds,
|
||||
- struct dsa_notifier_bridge_info *info)
|
||||
+static int dsa_switch_sync_vlan_filtering(struct dsa_switch *ds,
|
||||
+ struct dsa_notifier_bridge_info *info)
|
||||
{
|
||||
bool unset_vlan_filtering = br_vlan_enabled(info->br);
|
||||
int err, i;
|
||||
|
||||
- if (ds->index == info->sw_index && ds->ops->port_bridge_leave)
|
||||
- ds->ops->port_bridge_leave(ds, info->port, info->br);
|
||||
-
|
||||
- if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave)
|
||||
- ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
|
||||
- info->br);
|
||||
-
|
||||
/* If the bridge was vlan_filtering, the bridge core doesn't trigger an
|
||||
* event for changing vlan_filtering setting upon slave ports leaving
|
||||
* it. That is a good thing, because that lets us handle it and also
|
||||
@@ -103,6 +96,26 @@ static int dsa_switch_bridge_leave(struc
|
||||
if (err && err != EOPNOTSUPP)
|
||||
return err;
|
||||
}
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dsa_switch_bridge_leave(struct dsa_switch *ds,
|
||||
+ struct dsa_notifier_bridge_info *info)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ if (ds->index == info->sw_index && ds->ops->port_bridge_leave)
|
||||
+ ds->ops->port_bridge_leave(ds, info->port, info->br);
|
||||
+
|
||||
+ if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave)
|
||||
+ ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
|
||||
+ info->br);
|
||||
+
|
||||
+ err = dsa_switch_sync_vlan_filtering(ds, info);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From f6edb463510bd936f143907468fc0bf0762b87bf Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Mon, 24 Jan 2022 22:09:44 +0100
|
||||
Subject: [PATCH 5.4 2/2] net: dsa: Avoid cross-chip syncing of VLAN filtering
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 108dc8741c203e9d6ce4e973367f1bac20c7192b upstream.
|
||||
|
||||
Changes to VLAN filtering are not applicable to cross-chip
|
||||
notifications.
|
||||
|
||||
On a system like this:
|
||||
|
||||
.-----. .-----. .-----.
|
||||
| sw1 +---+ sw2 +---+ sw3 |
|
||||
'-1-2-' '-1-2-' '-1-2-'
|
||||
|
||||
Before this change, upon sw1p1 leaving a bridge, a call to
|
||||
dsa_port_vlan_filtering would also be made to sw2p1 and sw3p1.
|
||||
|
||||
In this scenario:
|
||||
|
||||
.---------. .-----. .-----.
|
||||
| sw1 +---+ sw2 +---+ sw3 |
|
||||
'-1-2-3-4-' '-1-2-' '-1-2-'
|
||||
|
||||
When sw1p4 would leave a bridge, dsa_port_vlan_filtering would be
|
||||
called for sw2 and sw3 with a non-existing port - leading to array
|
||||
out-of-bounds accesses and crashes on mv88e6xxx.
|
||||
|
||||
Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
|
||||
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Marek Behún <kabel@kernel.org>
|
||||
---
|
||||
net/dsa/switch.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/net/dsa/switch.c
|
||||
+++ b/net/dsa/switch.c
|
||||
@@ -112,9 +112,11 @@ static int dsa_switch_bridge_leave(struc
|
||||
ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
|
||||
info->br);
|
||||
|
||||
- err = dsa_switch_sync_vlan_filtering(ds, info);
|
||||
- if (err)
|
||||
- return err;
|
||||
+ if (ds->index == info->sw_index) {
|
||||
+ err = dsa_switch_sync_vlan_filtering(ds, info);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
msgs[1].len = this_len;
|
||||
|
||||
@@ -1569,6 +1579,28 @@ static int sfp_sm_mod_hpower(struct sfp
|
||||
@@ -1577,6 +1587,28 @@ static int sfp_sm_mod_hpower(struct sfp
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int sfp_sm_mod_probe(struct sfp *sfp, bool report)
|
||||
{
|
||||
/* SFP module inserted - read I2C data */
|
||||
@@ -1577,14 +1609,20 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1585,14 +1617,20 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
u8 check;
|
||||
int ret;
|
||||
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
dev_err(sfp->dev, "EEPROM short read: %d\n", ret);
|
||||
return -EAGAIN;
|
||||
}
|
||||
@@ -1612,6 +1650,21 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1620,6 +1658,21 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
err = sfp_read(sfp, true, 0, &sfp->diag, sizeof(sfp->diag));
|
||||
if (err < 0) {
|
||||
if (sfp->hwmon_tries--) {
|
||||
@@ -1579,26 +1585,30 @@ static int sfp_sm_mod_hpower(struct sfp
|
||||
@@ -1587,26 +1593,30 @@ static int sfp_sm_mod_hpower(struct sfp
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static int sfp_sm_mod_probe(struct sfp *sfp, bool report)
|
||||
@@ -1609,11 +1619,11 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1617,11 +1627,11 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
u8 check;
|
||||
int ret;
|
||||
|
||||
@@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
ret = sfp_read(sfp, false, 0, &id.base, sizeof(id.base));
|
||||
if (ret < 0) {
|
||||
@@ -1627,6 +1637,33 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1635,6 +1645,33 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
/* Cotsworks do not seem to update the checksums when they
|
||||
* do the final programming with the final module part number,
|
||||
* serial number and date code.
|
||||
@@ -1650,9 +1687,6 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1658,9 +1695,6 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -652,6 +652,7 @@ CONFIG_BPF=y
|
||||
# CONFIG_BPFILTER is not set
|
||||
CONFIG_BPF_JIT=y
|
||||
# CONFIG_BPF_JIT_ALWAYS_ON is not set
|
||||
# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
|
||||
# CONFIG_BPF_STREAM_PARSER is not set
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_BPQETHER is not set
|
||||
@@ -1871,6 +1872,7 @@ CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_HARDENED_USERCOPY=y
|
||||
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
|
||||
# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
|
||||
CONFIG_HARDEN_BRANCH_HISTORY=y
|
||||
CONFIG_HARDEN_EL2_VECTORS=y
|
||||
# CONFIG_HARDLOCKUP_DETECTOR is not set
|
||||
# CONFIG_HAVE_AOUT is not set
|
||||
@@ -3055,6 +3057,7 @@ CONFIG_MISC_FILESYSTEMS=y
|
||||
# CONFIG_MISDN_NETJET is not set
|
||||
# CONFIG_MISDN_SPEEDFAX is not set
|
||||
# CONFIG_MISDN_W6692 is not set
|
||||
CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y
|
||||
# CONFIG_MKISS is not set
|
||||
# CONFIG_MLX4_CORE is not set
|
||||
# CONFIG_MLX4_EN is not set
|
||||
|
||||
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2198,6 +2198,13 @@ config TRIM_UNUSED_KSYMS
|
||||
@@ -2208,6 +2208,13 @@ config TRIM_UNUSED_KSYMS
|
||||
|
||||
If unsure, or if you need to build out-of-tree modules, say N.
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/arch/arm/kernel/vmlinux.lds.h
|
||||
+++ b/arch/arm/kernel/vmlinux.lds.h
|
||||
@@ -22,13 +22,13 @@
|
||||
@@ -22,7 +22,7 @@
|
||||
#define ARM_MMU_DISCARD(x)
|
||||
#else
|
||||
#define ARM_MMU_KEEP(x)
|
||||
@@ -80,6 +80,8 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
+#define ARM_MMU_DISCARD(x) KEEP(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -41,7 +41,7 @@
|
||||
#define PROC_INFO \
|
||||
. = ALIGN(4); \
|
||||
__proc_info_begin = .; \
|
||||
@@ -88,7 +90,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
__proc_info_end = .;
|
||||
|
||||
#define HYPERVISOR_TEXT \
|
||||
@@ -39,11 +39,11 @@
|
||||
@@ -52,11 +52,11 @@
|
||||
#define IDMAP_TEXT \
|
||||
ALIGN_FUNCTION(); \
|
||||
__idmap_text_start = .; \
|
||||
@@ -102,7 +104,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
__hyp_idmap_text_end = .;
|
||||
|
||||
#define ARM_DISCARD \
|
||||
@@ -86,12 +86,12 @@
|
||||
@@ -99,12 +99,12 @@
|
||||
. = ALIGN(8); \
|
||||
.ARM.unwind_idx : { \
|
||||
__start_unwind_idx = .; \
|
||||
@@ -117,20 +119,21 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
__stop_unwind_tab = .; \
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@
|
||||
#define ARM_VECTORS \
|
||||
__vectors_start = .; \
|
||||
.vectors 0xffff0000 : AT(__vectors_start) { \
|
||||
- *(.vectors) \
|
||||
+ KEEP(*(.vectors)) \
|
||||
} \
|
||||
. = __vectors_start + SIZEOF(.vectors); \
|
||||
__vectors_end = .; \
|
||||
@@ -116,7 +116,7 @@
|
||||
__vectors_lma = .; \
|
||||
OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { \
|
||||
.vectors { \
|
||||
- *(.vectors) \
|
||||
+ KEEP(*(.vectors)) \
|
||||
} \
|
||||
.vectors.bhb.loop8 { \
|
||||
*(.vectors.bhb.loop8) \
|
||||
@@ -134,7 +134,7 @@
|
||||
\
|
||||
__stubs_start = .; \
|
||||
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
|
||||
__stubs_lma = .; \
|
||||
.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) { \
|
||||
- *(.stubs) \
|
||||
+ KEEP(*(.stubs)) \
|
||||
} \
|
||||
. = __stubs_start + SIZEOF(.stubs); \
|
||||
__stubs_end = .; \
|
||||
ARM_LMA(__stubs, .stubs); \
|
||||
. = __stubs_lma + SIZEOF(.stubs); \
|
||||
|
||||
@@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
bool
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -402,16 +402,16 @@ config BCH_CONST_T
|
||||
@@ -401,16 +401,16 @@ config BCH_CONST_T
|
||||
# Textsearch support is select'ed if needed
|
||||
#
|
||||
config TEXTSEARCH
|
||||
|
||||
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -3643,6 +3643,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -3641,6 +3641,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
|
||||
@@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
|
||||
#define JFFS2_NODE_ACCURATE 0x2000
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -303,6 +303,12 @@ config ZSTD_DECOMPRESS
|
||||
@@ -302,6 +302,12 @@ config ZSTD_DECOMPRESS
|
||||
|
||||
source "lib/xz/Kconfig"
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -3293,6 +3295,7 @@ static int packet_create(struct net *net
|
||||
@@ -3296,6 +3298,7 @@ static int packet_create(struct net *net
|
||||
mutex_init(&po->pg_vec_lock);
|
||||
po->rollover = NULL;
|
||||
po->prot_hook.func = packet_rcv;
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (sock->type == SOCK_PACKET)
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
@@ -3930,6 +3933,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
@@ -3939,6 +3942,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
|
||||
return 0;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default:
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
@@ -3986,6 +3999,13 @@ static int packet_getsockopt(struct sock
|
||||
@@ -3995,6 +4008,13 @@ static int packet_getsockopt(struct sock
|
||||
case PACKET_VNET_HDR:
|
||||
val = po->has_vnet_hdr;
|
||||
break;
|
||||
|
||||
@@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
+MODULE_ALIAS("nf-flow-table-hw");
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -5743,6 +5743,13 @@ static int nf_tables_flowtable_parse_hoo
|
||||
@@ -5748,6 +5748,13 @@ static int nf_tables_flowtable_parse_hoo
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
|
||||
if (!ops)
|
||||
return -ENOMEM;
|
||||
@@ -5873,10 +5880,19 @@ static int nf_tables_newflowtable(struct
|
||||
@@ -5878,10 +5885,19 @@ static int nf_tables_newflowtable(struct
|
||||
}
|
||||
|
||||
flowtable->data.type = type;
|
||||
@@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
|
||||
flowtable);
|
||||
if (err < 0)
|
||||
@@ -6002,7 +6018,8 @@ static int nf_tables_fill_flowtable_info
|
||||
@@ -6007,7 +6023,8 @@ static int nf_tables_fill_flowtable_info
|
||||
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
|
||||
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
|
||||
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include "br_private.h"
|
||||
@@ -384,6 +388,28 @@ static const struct ethtool_ops br_ethto
|
||||
@@ -382,6 +386,28 @@ static const struct ethtool_ops br_ethto
|
||||
.get_link = ethtool_op_get_link,
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops br_netdev_ops = {
|
||||
.ndo_open = br_dev_open,
|
||||
.ndo_stop = br_dev_stop,
|
||||
@@ -412,6 +438,9 @@ static const struct net_device_ops br_ne
|
||||
@@ -410,6 +436,9 @@ static const struct net_device_ops br_ne
|
||||
.ndo_bridge_setlink = br_setlink,
|
||||
.ndo_bridge_dellink = br_dellink,
|
||||
.ndo_features_check = passthru_features_check,
|
||||
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
|
||||
#if IS_ENABLED(CONFIG_HWMON)
|
||||
struct sfp_diag diag;
|
||||
@@ -1742,6 +1753,12 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
@@ -1750,6 +1761,12 @@ static int sfp_sm_mod_probe(struct sfp *
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -60,7 +60,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1947,11 +1964,12 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
@@ -1955,11 +1972,12 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
break;
|
||||
|
||||
if (sfp->state & SFP_F_TX_FAULT) {
|
||||
@@ -77,7 +77,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
if (timeout > T_WAIT)
|
||||
timeout -= T_WAIT;
|
||||
else
|
||||
@@ -1968,8 +1986,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
@@ -1976,8 +1994,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
|
||||
case SFP_S_INIT:
|
||||
if (event == SFP_E_TIMEOUT && sfp->state & SFP_F_TX_FAULT) {
|
||||
@@ -88,7 +88,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
*/
|
||||
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
||||
sfp->sm_retries == 5);
|
||||
@@ -1988,7 +2006,7 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
@@ -1996,7 +2014,7 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
case SFP_S_INIT_TX_FAULT:
|
||||
if (event == SFP_E_TIMEOUT) {
|
||||
sfp_module_tx_fault_reset(sfp);
|
||||
@@ -97,7 +97,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2012,7 +2030,7 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
@@ -2020,7 +2038,7 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
case SFP_S_TX_FAULT:
|
||||
if (event == SFP_E_TIMEOUT) {
|
||||
sfp_module_tx_fault_reset(sfp);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user