From 24cfe6f009aceac71a45bd93729346659294c62e Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Mon, 26 Apr 2021 12:20:24 +0800 Subject: [PATCH 01/18] ramips: mt7530 swconfig: fix race condition in register access [ Upstream commit f99c9cd9c4d4c49a676d678327546fd41690fe2a ] The mt7530_{r,w}32 operation over MDIO uses 3 mdiobus operations and does not hold a lock, which causes a race condition when multiple threads try to access a register, they may get unexpected results. To avoid this, handle the MDIO lock manually, and use the unlocked __mdiobus_{read,write} in the critical section. This fixes the "Ghost VLAN" artifact[1] in MT7530/7621 when the VLAN operation and the swconfig LED link status poll race between each other. [1] https://forum.openwrt.org/t/mysterious-vlan-ids-on-mt7621-device/64495 Signed-off-by: DENG Qingfang (cherry picked from commit f99c9cd9c4d4c49a676d678327546fd41690fe2a) Signed-off-by: Tianling Shen --- .../drivers/net/ethernet/mediatek/mt7530.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c index 7003f3efe4..959c777d62 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c @@ -323,9 +323,11 @@ mt7530_r32(struct mt7530_priv *priv, u32 reg) if (priv->bus) { u16 high, low; - mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); - low = mdiobus_read(priv->bus, 0x1f, (reg >> 2) & 0xf); - high = mdiobus_read(priv->bus, 0x1f, 0x10); + mutex_lock(&priv->bus->mdio_lock); + __mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); + low = __mdiobus_read(priv->bus, 0x1f, (reg >> 2) & 0xf); + high = __mdiobus_read(priv->bus, 0x1f, 0x10); + mutex_unlock(&priv->bus->mdio_lock); return (high << 16) | (low & 0xffff); } @@ -340,9 +342,11 @@ static void mt7530_w32(struct mt7530_priv *priv, u32 reg, u32 val) { if (priv->bus) { - mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); - mdiobus_write(priv->bus, 0x1f, (reg >> 2) & 0xf, val & 0xffff); - mdiobus_write(priv->bus, 0x1f, 0x10, val >> 16); + mutex_lock(&priv->bus->mdio_lock); + __mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); + __mdiobus_write(priv->bus, 0x1f, (reg >> 2) & 0xf, val & 0xffff); + __mdiobus_write(priv->bus, 0x1f, 0x10, val >> 16); + mutex_unlock(&priv->bus->mdio_lock); return; } From bb93933829dcb3542940d3fc9cff1d6ad20eaf36 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 3 May 2021 00:08:38 +0200 Subject: [PATCH 02/18] ramips: backport unlocked mdiobus accessors Commit 718e97c5c843 ("ramips: mt7530 swconfig: fix race condition in register access") backports a fix which depends on unlocked MMD accessors, however these were not yet included in Kernel 4.14 and they were not backported yet. Fixes commit 718e97c5c843 ("ramips: mt7530 swconfig: fix race condition in register access") Signed-off-by: David Bauer Signed-off-by: Tianling Shen --- ...0-net-mdiobus-add-unlocked-accessors.patch | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch diff --git a/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch new file mode 100644 index 0000000000..4880c49b13 --- /dev/null +++ b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch @@ -0,0 +1,141 @@ +From b2b8b06f18281c637da274b18e330bc52351637e Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Tue, 2 Jan 2018 10:58:27 +0000 +Subject: [PATCH] net: mdiobus: add unlocked accessors + +commit 34dc08e4be208539b7c4aa8154a610e1736705e8 upstream. + +Add unlocked versions of the bus accessors, which allows access to the +bus with all the tracing. These accessors validate that the bus mutex +is held, which is a basic requirement for all mii bus accesses. + +Reviewed-by: Florian Fainelli +Signed-off-by: Russell King +Signed-off-by: David S. Miller +--- + drivers/net/phy/mdio_bus.c | 65 +++++++++++++++++++++++++++++++------- + include/linux/mdio.h | 3 ++ + 2 files changed, 56 insertions(+), 12 deletions(-) + +--- a/drivers/net/phy/mdio_bus.c ++++ b/drivers/net/phy/mdio_bus.c +@@ -493,6 +493,55 @@ struct phy_device *mdiobus_scan(struct m + EXPORT_SYMBOL(mdiobus_scan); + + /** ++ * __mdiobus_read - Unlocked version of the mdiobus_read function ++ * @bus: the mii_bus struct ++ * @addr: the phy address ++ * @regnum: register number to read ++ * ++ * Read a MDIO bus register. Caller must hold the mdio bus lock. ++ * ++ * NOTE: MUST NOT be called from interrupt context. ++ */ ++int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum) ++{ ++ int retval; ++ ++ WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock)); ++ ++ retval = bus->read(bus, addr, regnum); ++ ++ trace_mdio_access(bus, 1, addr, regnum, retval, retval); ++ ++ return retval; ++} ++EXPORT_SYMBOL(__mdiobus_read); ++ ++/** ++ * __mdiobus_write - Unlocked version of the mdiobus_write function ++ * @bus: the mii_bus struct ++ * @addr: the phy address ++ * @regnum: register number to write ++ * @val: value to write to @regnum ++ * ++ * Write a MDIO bus register. Caller must hold the mdio bus lock. ++ * ++ * NOTE: MUST NOT be called from interrupt context. ++ */ ++int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val) ++{ ++ int err; ++ ++ WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock)); ++ ++ err = bus->write(bus, addr, regnum, val); ++ ++ trace_mdio_access(bus, 0, addr, regnum, val, err); ++ ++ return err; ++} ++EXPORT_SYMBOL(__mdiobus_write); ++ ++/** + * mdiobus_read_nested - Nested version of the mdiobus_read function + * @bus: the mii_bus struct + * @addr: the phy address +@@ -512,11 +561,9 @@ int mdiobus_read_nested(struct mii_bus * + BUG_ON(in_interrupt()); + + mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); +- retval = bus->read(bus, addr, regnum); ++ retval = __mdiobus_read(bus, addr, regnum); + mutex_unlock(&bus->mdio_lock); + +- trace_mdio_access(bus, 1, addr, regnum, retval, retval); +- + return retval; + } + EXPORT_SYMBOL(mdiobus_read_nested); +@@ -538,11 +585,9 @@ int mdiobus_read(struct mii_bus *bus, in + BUG_ON(in_interrupt()); + + mutex_lock(&bus->mdio_lock); +- retval = bus->read(bus, addr, regnum); ++ retval = __mdiobus_read(bus, addr, regnum); + mutex_unlock(&bus->mdio_lock); + +- trace_mdio_access(bus, 1, addr, regnum, retval, retval); +- + return retval; + } + EXPORT_SYMBOL(mdiobus_read); +@@ -568,11 +613,9 @@ int mdiobus_write_nested(struct mii_bus + BUG_ON(in_interrupt()); + + mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); +- err = bus->write(bus, addr, regnum, val); ++ err = __mdiobus_write(bus, addr, regnum, val); + mutex_unlock(&bus->mdio_lock); + +- trace_mdio_access(bus, 0, addr, regnum, val, err); +- + return err; + } + EXPORT_SYMBOL(mdiobus_write_nested); +@@ -595,11 +638,9 @@ int mdiobus_write(struct mii_bus *bus, i + BUG_ON(in_interrupt()); + + mutex_lock(&bus->mdio_lock); +- err = bus->write(bus, addr, regnum, val); ++ err = __mdiobus_write(bus, addr, regnum, val); + mutex_unlock(&bus->mdio_lock); + +- trace_mdio_access(bus, 0, addr, regnum, val, err); +- + return err; + } + EXPORT_SYMBOL(mdiobus_write); +--- a/include/linux/mdio.h ++++ b/include/linux/mdio.h +@@ -257,6 +257,9 @@ static inline u16 ethtool_adv_to_mmd_eee + return reg; + } + ++int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); ++int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); ++ + int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); + int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum); + int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); From 795397e7dda764e20e6462592ceb861d6489d656 Mon Sep 17 00:00:00 2001 From: lean Date: Mon, 3 May 2021 23:57:20 +0800 Subject: [PATCH 03/18] luci-app-kodexplorer: fix php7-mod-dom support Signed-off-by: Tianling Shen --- package/lean/luci-app-kodexplorer/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-kodexplorer/Makefile b/package/lean/luci-app-kodexplorer/Makefile index c5b535955b..14bc8a53bd 100644 --- a/package/lean/luci-app-kodexplorer/Makefile +++ b/package/lean/luci-app-kodexplorer/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for KodExplorer -LUCI_DEPENDS:=+nginx-ssl +unzip +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql +LUCI_DEPENDS:=+nginx-ssl +unzip +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql +php7-mod-dom LUCI_PKGARCH:=all PKG_VERSION:=13 -PKG_DATE:=20200612 +PKG_DATE:=20210503 include $(TOPDIR)/feeds/luci/luci.mk From 9433ca3567f8728def78ca7044ec1b339efbd7c8 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 3 May 2021 03:02:05 +0800 Subject: [PATCH 04/18] luci-app-ssr-plus: drop ss stream-cipher support They're totally unsafe, and deprecated in new designs. All of your data encrypted in these way could be replayed and decrypted. For details, see: https://shadowsocks.org/assets/whitepaper.pdf https://phuker.github.io/shadowsocks-active-probing.html https://github.com/edwardz246003/shadowsocks Signed-off-by: Tianling Shen --- package/lean/luci-app-ssr-plus/Makefile | 4 +- .../model/cbi/shadowsocksr/client-config.lua | 9 ++-- .../root/usr/share/shadowsocksr/subscribe.lua | 43 ++++++++++++++++++- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 6d9a21fba1..8336036b93 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus -PKG_VERSION:=183 -PKG_RELEASE:=11 +PKG_VERSION:=184 +PKG_RELEASE:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \ diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 36ce13a50c..0c2eae5457 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -45,8 +45,8 @@ local encrypt_methods_ss = { "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", - "xchacha20-ietf-poly1305", - -- stream + "xchacha20-ietf-poly1305" + --[[ stream "table", "rc4", "rc4-md5", @@ -62,17 +62,18 @@ local encrypt_methods_ss = { "camellia-256-cfb", "salsa20", "chacha20", - "chacha20-ietf" + "chacha20-ietf" ]] } local encrypt_methods_v2ray_ss = { -- xray_ss "none", "plain", + --[[ stream "aes-128-cfb", "aes-256-cfb", "chacha20", - "chacha20-ietf", + "chacha20-ietf", ]] -- aead "aes-128-gcm", "aes-256-gcm", diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index bdafd05d36..f4a431c662 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -28,6 +28,31 @@ local v2_tj = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray" local log = function(...) print(os.date("%Y-%m-%d %H:%M:%S ") .. table.concat({...}, " ")) end +local encrypt_methods_ss = { + -- aead + "aes-128-gcm", + "aes-192-gcm", + "aes-256-gcm", + "chacha20-ietf-poly1305", + "xchacha20-ietf-poly1305" + --[[ stream + "table", + "rc4", + "rc4-md5", + "aes-128-cfb", + "aes-192-cfb", + "aes-256-cfb", + "aes-128-ctr", + "aes-192-ctr", + "aes-256-ctr", + "bf-cfb", + "camellia-128-cfb", + "camellia-192-cfb", + "camellia-256-cfb", + "salsa20", + "chacha20", + "chacha20-ietf" ]] +} -- 分割字符串 local function split(full, sep) full = full:gsub("%z", "") -- 这里不是很清楚 有时候结尾带个\0 @@ -96,6 +121,15 @@ local function base64Decode(text) return raw end end +-- 检查数组(table)中是否存在某个字符值 +-- https://www.04007.cn/article/135.html +local function checkTabValue(tab) + local revtab = {} + for k,v in pairs(tab) do + revtab[v] = true + end + return revtab +end -- 处理数据 local function processData(szType, content) local result = {type = szType, local_port = 1234, kcp_param = '--nocomp'} @@ -209,8 +243,13 @@ local function processData(szType, content) else result.server_port = host[2] end - result.encrypt_method_ss = method - result.password = password + if checkTabValue(encrypt_methods_ss)[method] then + result.encrypt_method_ss = method + result.password = password + else + -- 1202 年了还不支持 SS AEAD 的屑机场 + result = nil + end elseif szType == "ssd" then result.type = "ss" result.server = content.server From cf553d1b8483232a537700571521c8f5fd021d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 22:55:56 +0100 Subject: [PATCH 05/18] bcm27xx-gpu-fw: update to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed to add support for CM4 and RPI 400. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Tianling Shen --- package/kernel/bcm27xx-gpu-fw/Makefile | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package/kernel/bcm27xx-gpu-fw/Makefile b/package/kernel/bcm27xx-gpu-fw/Makefile index 622d8bb7d2..d34a48d11d 100644 --- a/package/kernel/bcm27xx-gpu-fw/Makefile +++ b/package/kernel/bcm27xx-gpu-fw/Makefile @@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=bcm27xx-gpu-fw -PKG_VERSION:=2020-04-15 -PKG_RELEASE:=9e3c23ce779e8cf44c33d6a25bba249319207f68 +PKG_VERSION:=2021-02-16 +PKG_RELEASE:=ba6259246c702b04ea56ff1034325e476d460ae8 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE) @@ -26,7 +26,7 @@ define Download/bootcode_bin FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin URL:=$(RPI_FIRMWARE_URL) URL_FILE:=bootcode.bin - HASH:=1e3582640b97f6a1ba77b66181fe698767d205f5d4c4315f56d03b398a7e55d1 + HASH:=92fd15eb2468187b69d15a9482d7e8cee3704993c53bb5ba55afe550723c5975 endef $(eval $(call Download,bootcode_bin)) @@ -34,7 +34,7 @@ define Download/fixup_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup.dat - HASH:=ff5aa78aa6fb6202cb6b490d07dda7a844145d4cf82dc005ef8baf8fa936996e + HASH:=3daaf175decee44347fb97ece7738edf230b6fe3a86a8f521652e0052d5b3d6a endef $(eval $(call Download,fixup_dat)) @@ -42,7 +42,7 @@ define Download/fixup_cd_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup_cd.dat - HASH:=e21c05b05bb140dbe99cdb45af3e2e60e61772737b006b4c0b5cf8f609eab8e7 + HASH:=399b10509877cc7cbbaae25757ff44ee9f666931dd5c0996b48d170735a668b0 endef $(eval $(call Download,fixup_cd_dat)) @@ -50,7 +50,7 @@ define Download/fixup_x_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup_x.dat - HASH:=a9a5269358fd3e1f8cc6d5ac31902d449ba8c06be8c8ae211c92f8a170a552c9 + HASH:=3c2a71f349bbc97bc3d9f7592bdd3f06d3d67e1ccd581cbdbb91b67a16304d76 endef $(eval $(call Download,fixup_x_dat)) @@ -58,7 +58,7 @@ define Download/fixup4_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup4.dat - HASH:=78137591cc1b0654fc389e83ba59bf1d2a5ce1f8ba971058d9469e20e3c4e4ea + HASH:=68e9112ac7907af51cbf7f458d241e6136af1be4e968909e34cbffb70f9536b4 endef $(eval $(call Download,fixup4_dat)) @@ -66,7 +66,7 @@ define Download/fixup4cd_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup4cd.dat - HASH:=bd29b478e6d9c31265e61cf8d663f8bcdf096b7e60423b487bb23f44ac11e6f6 + HASH:=399b10509877cc7cbbaae25757ff44ee9f666931dd5c0996b48d170735a668b0 endef $(eval $(call Download,fixup4cd_dat)) @@ -74,7 +74,7 @@ define Download/fixup4x_dat FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat URL:=$(RPI_FIRMWARE_URL) URL_FILE:=fixup4x.dat - HASH:=608871001d2a849016af64d3d9197ed57f90d5f23a554cde3d739ac7b4f7b560 + HASH:=62c0ff21c06a28c24fc537bd1d23625b3452170fbb9fbd950b67a393929c2768 endef $(eval $(call Download,fixup4x_dat)) @@ -82,7 +82,7 @@ define Download/start_elf FILE:=$(RPI_FIRMWARE_FILE)-start.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start.elf - HASH:=d15334b643b34ba1e9fe8ea72d0aff59fb9886b70eee17f05ecfe74c2bcab7de + HASH:=3cc30fc07a6ad99bdd14e6319ed84b6c8813e8cb08bc5fff488c33abb163f746 endef $(eval $(call Download,start_elf)) @@ -90,7 +90,7 @@ define Download/start_cd_elf FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start_cd.elf - HASH:=62054d5b4a1ba58533aa3cb63ec83e6635adfa9093283d462f3bea7eb3d17c80 + HASH:=a4ae5a07b036bd82136373f2ce8a9ad01e41938884568b57c53e4be4c08d0dda endef $(eval $(call Download,start_cd_elf)) @@ -98,7 +98,7 @@ define Download/start_x_elf FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start_x.elf - HASH:=445f0cf6bdc82a9d8d4d92a4678b72436eba9c1e4155ca1c483aa15271dbc26f + HASH:=b566fc8bc4cd1699f40fc73aa72910915421764933f2f2a7ba517b6b14339d09 endef $(eval $(call Download,start_x_elf)) @@ -106,7 +106,7 @@ define Download/start4_elf FILE:=$(RPI_FIRMWARE_FILE)-start4.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start4.elf - HASH:=e58a0a629a98998a225b6bf837c75256625d313130401c223f052f0a42b4f263 + HASH:=abafb4d39c2708389e1421443fdd5e8a86e03bef6ad5282c0b5836587860cc5c endef $(eval $(call Download,start4_elf)) @@ -114,7 +114,7 @@ define Download/start4cd_elf FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start4cd.elf - HASH:=e90d922916dc61d547eb03fae8f182e16edadf5cf10caad1027e95582bc01a0d + HASH:=6df423f4fa82c58efef6db1cf20c4fcbd92465a7fe91f40548c8534c1b5ef7fd endef $(eval $(call Download,start4cd_elf)) @@ -122,7 +122,7 @@ define Download/start4x_elf FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf URL:=$(RPI_FIRMWARE_URL) URL_FILE:=start4x.elf - HASH:=dae73ce30d491dcf780f817131e215b6a34447fcf346acf11ee9080595304ae0 + HASH:=4060e9fedfa99ff91549c8f4324a18417db785d99054ac7fe7d1b5dd5ef232f1 endef $(eval $(call Download,start4x_elf)) From 71e1901781a8b09ec0e2180d404efe75ce61e0b6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 17:42:19 +0200 Subject: [PATCH 06/18] busybox: backport fix for CVE-2021-28831 This backports a fix for the low priority CVE-2021-28831: decompress_gunzip.c in BusyBox through 1.32.1 mishandles the error bit on the huft_build result pointer, with a resultant invalid free or segmentation fault, via malformed gzip data. Signed-off-by: Hauke Mehrtens --- package/utils/busybox/Makefile | 2 +- .../patches/005-backport-CVE-2021-28831.patch | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 package/utils/busybox/patches/005-backport-CVE-2021-28831.patch diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index d14ada98dc..362ae942d8 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.33.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch b/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch new file mode 100644 index 0000000000..7637679a69 --- /dev/null +++ b/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch @@ -0,0 +1,52 @@ +From f25d254dfd4243698c31a4f3153d4ac72aa9e9bd Mon Sep 17 00:00:00 2001 +From: Samuel Sapalski +Date: Wed, 3 Mar 2021 16:31:22 +0100 +Subject: decompress_gunzip: Fix DoS if gzip is corrupt + +On certain corrupt gzip files, huft_build will set the error bit on +the result pointer. If afterwards abort_unzip is called huft_free +might run into a segmentation fault or an invalid pointer to +free(p). + +In order to mitigate this, we check in huft_free if the error bit +is set and clear it before the linked list is freed. + +Signed-off-by: Samuel Sapalski +Signed-off-by: Peter Kaestle +Signed-off-by: Denys Vlasenko +--- + archival/libarchive/decompress_gunzip.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/archival/libarchive/decompress_gunzip.c ++++ b/archival/libarchive/decompress_gunzip.c +@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = { + * each table. + * t: table to free + */ ++#define BAD_HUFT(p) ((uintptr_t)(p) & 1) ++#define ERR_RET ((huft_t*)(uintptr_t)1) + static void huft_free(huft_t *p) + { + huft_t *q; + ++ /* ++ * If 'p' has the error bit set we have to clear it, otherwise we might run ++ * into a segmentation fault or an invalid pointer to free(p) ++ */ ++ if (BAD_HUFT(p)) { ++ p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET)); ++ } ++ + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + while (p) { + q = (--p)->v.t; +@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PAR + * or a valid pointer to a Huffman table, ORed with 0x1 if incompete table + * is given: "fixed inflate" decoder feeds us such data. + */ +-#define BAD_HUFT(p) ((uintptr_t)(p) & 1) +-#define ERR_RET ((huft_t*)(uintptr_t)1) + static huft_t* huft_build(const unsigned *b, const unsigned n, + const unsigned s, const struct cp_ext *cp_ext, + unsigned *m) From 0107a192d5ea4c417e6ac708ef87302728ad88c5 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 22:59:36 +0200 Subject: [PATCH 07/18] ltq-dsl-base: Make package nonshared to fix image builder This package depends on the lantiq target and is only build for that target. A normal package would be build by the SDK builder probably under a different target and then this package will not be selected. Mark it as nonshared to build it when the lantiq target gets build. Fixes: FS#3773, FS#3774 Signed-off-by: Hauke Mehrtens Signed-off-by: Tianling Shen --- package/network/utils/ltq-dsl-base/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/utils/ltq-dsl-base/Makefile b/package/network/utils/ltq-dsl-base/Makefile index e2cfc4004c..4be4ff6a6f 100644 --- a/package/network/utils/ltq-dsl-base/Makefile +++ b/package/network/utils/ltq-dsl-base/Makefile @@ -8,6 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ltq-dsl-base PKG_RELEASE:=2 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/ltq-dsl-base From 669bb7ac3013ccd592868eb9f0eca9a22f487cb3 Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 5 May 2021 12:15:11 +0800 Subject: [PATCH 08/18] luci-app-kodexplorer: fix libxml dependence Signed-off-by: Tianling Shen --- package/lean/luci-app-kodexplorer/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-kodexplorer/Makefile b/package/lean/luci-app-kodexplorer/Makefile index 14bc8a53bd..50e3a675dd 100644 --- a/package/lean/luci-app-kodexplorer/Makefile +++ b/package/lean/luci-app-kodexplorer/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for KodExplorer -LUCI_DEPENDS:=+nginx-ssl +unzip +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql +php7-mod-dom +LUCI_DEPENDS:=+nginx-ssl +unzip +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql +php7-cgi +php7-mod-dom LUCI_PKGARCH:=all PKG_VERSION:=13 -PKG_DATE:=20210503 +PKG_DATE:=20210505 include $(TOPDIR)/feeds/luci/luci.mk From 842d799bb4c6e33c0b95d092e776772e11dfbfc5 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 May 2021 23:20:40 +0200 Subject: [PATCH 09/18] mac80211: Update to backports version 4.19.189-1 The removed patches were applied upstream. Signed-off-by: Hauke Mehrtens Signed-off-by: Tianling Shen --- package/kernel/mac80211/Makefile | 6 +- .../ath/500-ath9k_eeprom_debugfs.patch | 4 +- .../ath/512-ath9k_channelbw_debugfs.patch | 4 +- .../patches/ath/530-ath9k_extra_leds.patch | 10 +-- .../patches/ath/542-ath9k_debugfs_diag.patch | 4 +- .../ath/548-ath9k_enable_gpio_chip.patch | 4 +- .../ath/549-ath9k_enable_gpio_buttons.patch | 2 +- .../mac80211/patches/ath/552-ahb_of.patch | 2 +- .../ath/930-ath10k_add_tpt_led_trigger.patch | 4 +- ...-of-peer_bw_rxnss_override-parameter.patch | 2 +- ...dling-for-VHT160-in-recent-firmwares.patch | 2 +- ...rolling-support-for-various-chipsets.patch | 14 ++-- ...75-ath10k-use-tpt-trigger-by-default.patch | 2 +- ...rt-for-configuring-management-packet.patch | 4 +- ...ble-out-of-bound-access-of-ath10k_ra.patch | 2 +- ...rect-multicast-broadcast-rate-settin.patch | 4 +- ...frameburst-mode-in-default-firmware-.patch | 2 +- ...phy_err-and-use-it-in-the-cfg80211.c.patch | 76 +++++++++---------- ...-code-handling-bandwidth-of-firmware.patch | 2 +- ...-firmware-reporting-160-MHz-channels.patch | 2 +- ...bphy_err-to-take-struct-brcmf_pub-ar.patch | 76 +++++++++---------- ...DFS_OFFLOAD-extended-feature-if-supp.patch | 2 +- ...g80211_ops-pointer-to-another-struct.patch | 2 +- ...rors-when-setting-roaming-parameters.patch | 2 +- ...B-condition-when-setting-interface-c.patch | 10 +-- ...lify-building-interface-combinations.patch | 6 +- ...add-initial-support-for-monitor-mode.patch | 8 +- .../subsys/150-disable_addr_notifier.patch | 6 +- .../mac80211/patches/subsys/210-ap_scan.patch | 2 +- ...d-stop-start-logic-for-software-TXQs.patch | 4 +- ...l-merge-with-minstrel_ht-always-enab.patch | 4 +- .../320-mac80211-Add-TXQ-scheduling-API.patch | 2 +- ...time-accounting-and-scheduling-to-TX.patch | 4 +- ...1-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch | 4 +- ...op-redundant-rcu_read_lock-unlock-ca.patch | 2 +- ...nd-deauth-when-expiring-inactive-STA.patch | 2 +- ...et-set-TDLS-STA-bandwidth-wider-than.patch | 65 ---------------- ...use-TX-while-changing-interface-type.patch | 57 -------------- ...ac80211-fix-fast-rx-encryption-check.patch | 29 ------- ...-station-rate-table-updates-on-assoc.patch | 49 ------------ ...ential-overflow-when-multiplying-to-.patch | 34 --------- .../374-mac80211-fix-rate-mask-reset.patch | 50 ------------ ...c80211-fix-double-free-in-ibss_leave.patch | 69 ----------------- .../522-mac80211_configure_antenna_gain.patch | 4 +- 44 files changed, 146 insertions(+), 499 deletions(-) delete mode 100644 package/kernel/mac80211/patches/subsys/369-mac80211-don-t-set-set-TDLS-STA-bandwidth-wider-than.patch delete mode 100644 package/kernel/mac80211/patches/subsys/370-mac80211-pause-TX-while-changing-interface-type.patch delete mode 100644 package/kernel/mac80211/patches/subsys/371-mac80211-fix-fast-rx-encryption-check.patch delete mode 100644 package/kernel/mac80211/patches/subsys/372-mac80211-fix-station-rate-table-updates-on-assoc.patch delete mode 100644 package/kernel/mac80211/patches/subsys/373-mac80211-fix-potential-overflow-when-multiplying-to-.patch delete mode 100644 package/kernel/mac80211/patches/subsys/374-mac80211-fix-rate-mask-reset.patch delete mode 100644 package/kernel/mac80211/patches/subsys/375-mac80211-fix-double-free-in-ibss_leave.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 39f8a5bce6..79a731833d 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=4.19.161-1 +PKG_VERSION:=4.19.189-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.161/ -PKG_HASH:=01a4173ba180eb8ca67c898239d5accb49a3ea9aea51510e17d5c937d6e93f9a +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.189/ +PKG_HASH:=34a53f743b43cbb25c8e665c3932d8cdd79aa3c081b9e573fae63b5a7407422c PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch b/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch index b6dc45cd96..319db41113 100644 --- a/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/500-ath9k_eeprom_debugfs.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1374,6 +1374,53 @@ void ath9k_deinit_debug(struct ath_softc +@@ -1377,6 +1377,53 @@ void ath9k_deinit_debug(struct ath_softc ath9k_cmn_spectral_deinit_debug(&sc->spec_priv); } @@ -54,7 +54,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1393,6 +1440,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1396,6 +1443,8 @@ int ath9k_init_debug(struct ath_hw *ah) ath9k_tx99_init_debug(sc); ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy); diff --git a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch index 2d4a5688c8..f70d565648 100644 --- a/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/512-ath9k_channelbw_debugfs.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1421,6 +1421,52 @@ static const struct file_operations fops +@@ -1424,6 +1424,52 @@ static const struct file_operations fops .owner = THIS_MODULE }; @@ -53,7 +53,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1442,6 +1488,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1445,6 +1491,8 @@ int ath9k_init_debug(struct ath_hw *ah) debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, &fops_eeprom); diff --git a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch index c13a72cbb0..2f8a6c41e0 100644 --- a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -850,6 +850,9 @@ static inline int ath9k_dump_btcoex(stru +@@ -851,6 +851,9 @@ static inline int ath9k_dump_btcoex(stru #ifdef CPTCFG_MAC80211_LEDS void ath_init_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc); @@ -10,7 +10,7 @@ #else static inline void ath_init_leds(struct ath_softc *sc) { -@@ -991,6 +994,13 @@ void ath_ant_comb_scan(struct ath_softc +@@ -992,6 +995,13 @@ void ath_ant_comb_scan(struct ath_softc #define AIRTIME_USE_NEW_QUEUES BIT(2) #define AIRTIME_ACTIVE(flags) (!!(flags & (AIRTIME_USE_TX|AIRTIME_USE_RX))) @@ -24,7 +24,7 @@ struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1046,9 +1056,8 @@ struct ath_softc { +@@ -1047,9 +1057,8 @@ struct ath_softc { spinlock_t chan_lock; #ifdef CPTCFG_MAC80211_LEDS @@ -192,7 +192,7 @@ #endif --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1466,6 +1466,61 @@ static const struct file_operations fops +@@ -1469,6 +1469,61 @@ static const struct file_operations fops .llseek = default_llseek, }; @@ -254,7 +254,7 @@ int ath9k_init_debug(struct ath_hw *ah) { -@@ -1490,6 +1545,10 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1493,6 +1548,10 @@ int ath9k_init_debug(struct ath_hw *ah) &fops_eeprom); debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_chanbw); diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch index e627c38495..d7e82c9a66 100644 --- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1522,6 +1522,50 @@ static const struct file_operations fops +@@ -1525,6 +1525,50 @@ static const struct file_operations fops #endif @@ -51,7 +51,7 @@ int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); -@@ -1549,6 +1593,8 @@ int ath9k_init_debug(struct ath_hw *ah) +@@ -1552,6 +1596,8 @@ int ath9k_init_debug(struct ath_hw *ah) debugfs_create_file("gpio_led", S_IWUSR, sc->debug.debugfs_phy, sc, &fops_gpio_led); #endif diff --git a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch index eb9eb26a74..d10f312472 100644 --- a/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/ath/548-ath9k_enable_gpio_chip.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau #include "common.h" #include "debug.h" -@@ -1001,6 +1002,14 @@ struct ath_led { +@@ -1002,6 +1003,14 @@ struct ath_led { struct led_classdev cdev; }; @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct ath_softc { struct ieee80211_hw *hw; struct device *dev; -@@ -1058,6 +1067,9 @@ struct ath_softc { +@@ -1059,6 +1068,9 @@ struct ath_softc { #ifdef CPTCFG_MAC80211_LEDS const char *led_default_trigger; struct list_head leds; diff --git a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch index bd71b75e76..d0922253a6 100644 --- a/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/ath/549-ath9k_enable_gpio_buttons.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -1069,6 +1069,7 @@ struct ath_softc { +@@ -1070,6 +1070,7 @@ struct ath_softc { struct list_head leds; #ifdef CONFIG_GPIOLIB struct ath9k_gpio_chip *gpiochip; diff --git a/package/kernel/mac80211/patches/ath/552-ahb_of.patch b/package/kernel/mac80211/patches/ath/552-ahb_of.patch index c16bf424ea..d944e13941 100644 --- a/package/kernel/mac80211/patches/ath/552-ahb_of.patch +++ b/package/kernel/mac80211/patches/ath/552-ahb_of.patch @@ -325,7 +325,7 @@ #include "common.h" #include "debug.h" -@@ -1023,6 +1024,9 @@ struct ath_softc { +@@ -1024,6 +1025,9 @@ struct ath_softc { struct ath_hw *sc_ah; void __iomem *mem; int irq; diff --git a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch index bdf08710e6..61ea3c1a73 100644 --- a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8300,6 +8300,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -8293,6 +8293,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -8584,6 +8599,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -8577,6 +8592,12 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); diff --git a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch index 12f56197ba..64772e8d9d 100644 --- a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch +++ b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch @@ -105,7 +105,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling } --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7391,12 +7391,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a +@@ -7396,12 +7396,7 @@ ath10k_wmi_peer_assoc_fill_10_4(struct a struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf; ath10k_wmi_peer_assoc_fill_10_2(ar, buf, arg); diff --git a/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch b/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch index c26ea96095..5f2f7028c2 100644 --- a/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch +++ b/package/kernel/mac80211/patches/ath/973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch @@ -13,7 +13,7 @@ v2: fix trailing whitespace issue and fix some typos within the commit note 2 files changed, 8 insertions(+), 10 deletions(-) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -4483,13 +4483,6 @@ static struct ieee80211_sta_vht_cap ath1 +@@ -4476,13 +4476,6 @@ static struct ieee80211_sta_vht_cap ath1 vht_cap.cap |= val; } diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 2ae28283dc..a5ffed6979 100644 --- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -464,7 +464,7 @@ v13: { --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -3991,6 +3991,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -3996,6 +3996,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -475,7 +475,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7211,6 +7211,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7216,6 +7216,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -525,7 +525,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -8822,6 +8865,9 @@ static const struct wmi_ops wmi_ops = { +@@ -8827,6 +8870,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -535,7 +535,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8892,6 +8938,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -8897,6 +8943,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -544,7 +544,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -8963,6 +9011,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -8968,6 +9016,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -553,7 +553,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -9033,6 +9083,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -9038,6 +9088,8 @@ static const struct wmi_ops wmi_10_2_4_o .gen_pdev_enable_adaptive_cca = ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, @@ -562,7 +562,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9112,6 +9164,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9117,6 +9169,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, diff --git a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch index e33793bb39..70350540b1 100644 --- a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8616,7 +8616,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -8609,7 +8609,7 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch b/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch index 4f68f04ed2..ee4f4a760d 100644 --- a/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch +++ b/package/kernel/mac80211/patches/ath/977-ath10k-add-support-for-configuring-management-packet.patch @@ -43,7 +43,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss) { switch ((mcs_map >> (2 * nss)) & 0x3) { -@@ -5485,9 +5501,10 @@ static void ath10k_bss_info_changed(stru +@@ -5478,9 +5494,10 @@ static void ath10k_bss_info_changed(stru struct cfg80211_chan_def def; u32 vdev_param, pdev_param, slottime, preamble; u16 bitrate, hw_value; @@ -56,7 +56,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux mutex_lock(&ar->conf_mutex); -@@ -5693,6 +5710,30 @@ static void ath10k_bss_info_changed(stru +@@ -5686,6 +5703,30 @@ static void ath10k_bss_info_changed(stru arvif->vdev_id, ret); } diff --git a/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch b/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch index 1c7c612eea..d4f177f1bc 100644 --- a/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch +++ b/package/kernel/mac80211/patches/ath/978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch @@ -26,7 +26,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux if (ath10k_rates[i].bitrate == bitrate) return hw_value_prefix | ath10k_rates[i].hw_value; } -@@ -5716,22 +5716,22 @@ static void ath10k_bss_info_changed(stru +@@ -5709,22 +5709,22 @@ static void ath10k_bss_info_changed(stru return; } diff --git a/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch b/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch index 26dc801805..f30b0f3658 100644 --- a/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch +++ b/package/kernel/mac80211/patches/ath/979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch @@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -5501,8 +5501,8 @@ static void ath10k_bss_info_changed(stru +@@ -5494,8 +5494,8 @@ static void ath10k_bss_info_changed(stru struct cfg80211_chan_def def; u32 vdev_param, pdev_param, slottime, preamble; u16 bitrate, hw_value; @@ -28,7 +28,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/ enum nl80211_band band; const struct ieee80211_supported_band *sband; -@@ -5675,7 +5675,11 @@ static void ath10k_bss_info_changed(stru +@@ -5668,7 +5668,11 @@ static void ath10k_bss_info_changed(stru if (changed & BSS_CHANGED_MCAST_RATE && !ath10k_mac_vif_chan(arvif->vif, &def)) { band = def.chan->band; diff --git a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch b/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch index 3464839a2b..9bc6d453c3 100644 --- a/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch +++ b/package/kernel/mac80211/patches/brcm/328-v5.0-0002-brcmfmac-enable-frameburst-mode-in-default-firmware-.patch @@ -17,7 +17,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6654,6 +6654,12 @@ static s32 brcmf_config_dongle(struct br +@@ -6657,6 +6657,12 @@ static s32 brcmf_config_dongle(struct br brcmf_configure_arp_nd_offload(ifp, true); diff --git a/package/kernel/mac80211/patches/brcm/346-v5.1-brcmfmac-add-bphy_err-and-use-it-in-the-cfg80211.c.patch b/package/kernel/mac80211/patches/brcm/346-v5.1-brcmfmac-add-bphy_err-and-use-it-in-the-cfg80211.c.patch index 8858b186a7..7ae551619b 100644 --- a/package/kernel/mac80211/patches/brcm/346-v5.1-brcmfmac-add-bphy_err-and-use-it-in-the-cfg80211.c.patch +++ b/package/kernel/mac80211/patches/brcm/346-v5.1-brcmfmac-add-bphy_err-and-use-it-in-the-cfg80211.c.patch @@ -1603,7 +1603,7 @@ Signed-off-by: Kalle Valo return ret; } -@@ -5338,6 +5381,7 @@ static void brcmf_clear_assoc_ies(struct +@@ -5341,6 +5384,7 @@ static void brcmf_clear_assoc_ies(struct static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) { @@ -1611,7 +1611,7 @@ Signed-off-by: Kalle Valo struct brcmf_cfg80211_assoc_ielen_le *assoc_info; struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); u32 req_len; -@@ -5349,7 +5393,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5352,7 +5396,7 @@ static s32 brcmf_get_assoc_ies(struct br err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1620,7 +1620,7 @@ Signed-off-by: Kalle Valo return err; } assoc_info = -@@ -5361,7 +5405,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5364,7 +5408,7 @@ static s32 brcmf_get_assoc_ies(struct br cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1629,7 +1629,7 @@ Signed-off-by: Kalle Valo return err; } conn_info->req_ie_len = req_len; -@@ -5379,7 +5423,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5382,7 +5426,7 @@ static s32 brcmf_get_assoc_ies(struct br cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1638,7 +1638,7 @@ Signed-off-by: Kalle Valo return err; } conn_info->resp_ie_len = resp_len; -@@ -5508,6 +5552,7 @@ brcmf_notify_connect_status_ap(struct br +@@ -5511,6 +5555,7 @@ brcmf_notify_connect_status_ap(struct br struct net_device *ndev, const struct brcmf_event_msg *e, void *data) { @@ -1646,7 +1646,7 @@ Signed-off-by: Kalle Valo static int generation; u32 event = e->event_code; u32 reason = e->reason; -@@ -5525,7 +5570,7 @@ brcmf_notify_connect_status_ap(struct br +@@ -5528,7 +5573,7 @@ brcmf_notify_connect_status_ap(struct br if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) && (reason == BRCMF_E_STATUS_SUCCESS)) { if (!data) { @@ -1655,7 +1655,7 @@ Signed-off-by: Kalle Valo return -EINVAL; } -@@ -5817,6 +5862,7 @@ static void init_vif_event(struct brcmf_ +@@ -5820,6 +5865,7 @@ static void init_vif_event(struct brcmf_ static s32 brcmf_dongle_roam(struct brcmf_if *ifp) { @@ -1663,7 +1663,7 @@ Signed-off-by: Kalle Valo s32 err; u32 bcn_timeout; __le32 roamtrigger[2]; -@@ -5829,7 +5875,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5832,7 +5878,7 @@ static s32 brcmf_dongle_roam(struct brcm bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON; err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); if (err) { @@ -1672,7 +1672,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5841,7 +5887,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5844,7 +5890,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_iovar_int_set(ifp, "roam_off", ifp->drvr->settings->roamoff); if (err) { @@ -1681,7 +1681,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5850,7 +5896,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5853,7 +5899,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER, (void *)roamtrigger, sizeof(roamtrigger)); if (err) { @@ -1690,7 +1690,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5859,7 +5905,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5862,7 +5908,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA, (void *)roam_delta, sizeof(roam_delta)); if (err) { @@ -1699,7 +1699,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5870,25 +5916,26 @@ roam_setup_done: +@@ -5873,25 +5919,26 @@ roam_setup_done: static s32 brcmf_dongle_scantime(struct brcmf_if *ifp) { @@ -1729,7 +1729,7 @@ Signed-off-by: Kalle Valo goto dongle_scantime_out; } -@@ -5920,10 +5967,10 @@ static void brcmf_update_bw40_channel_fl +@@ -5923,10 +5970,10 @@ static void brcmf_update_bw40_channel_fl static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, u32 bw_cap[]) { @@ -1741,7 +1741,7 @@ Signed-off-by: Kalle Valo struct brcmf_chanspec_list *list; struct brcmu_chan ch; int err; -@@ -5942,11 +5989,10 @@ static int brcmf_construct_chaninfo(stru +@@ -5945,11 +5992,10 @@ static int brcmf_construct_chaninfo(stru err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, BRCMF_DCMD_MEDLEN); if (err) { @@ -1754,7 +1754,7 @@ Signed-off-by: Kalle Valo band = wiphy->bands[NL80211_BAND_2GHZ]; if (band) for (i = 0; i < band->n_channels; i++) -@@ -5966,7 +6012,8 @@ static int brcmf_construct_chaninfo(stru +@@ -5969,7 +6015,8 @@ static int brcmf_construct_chaninfo(stru } else if (ch.band == BRCMU_CHAN_BAND_5G) { band = wiphy->bands[NL80211_BAND_5GHZ]; } else { @@ -1764,7 +1764,7 @@ Signed-off-by: Kalle Valo continue; } if (!band) -@@ -5989,8 +6036,8 @@ static int brcmf_construct_chaninfo(stru +@@ -5992,8 +6039,8 @@ static int brcmf_construct_chaninfo(stru /* It seems firmware supports some channel we never * considered. Something new in IEEE standard? */ @@ -1775,7 +1775,7 @@ Signed-off-by: Kalle Valo continue; } -@@ -6036,6 +6083,7 @@ fail_pbuf: +@@ -6039,6 +6086,7 @@ fail_pbuf: static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) { @@ -1783,7 +1783,7 @@ Signed-off-by: Kalle Valo struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); struct ieee80211_supported_band *band; struct brcmf_fil_bwcap_le band_bwcap; -@@ -6082,7 +6130,7 @@ static int brcmf_enable_bw40_2g(struct b +@@ -6085,7 +6133,7 @@ static int brcmf_enable_bw40_2g(struct b err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, BRCMF_DCMD_MEDLEN); if (err) { @@ -1792,7 +1792,7 @@ Signed-off-by: Kalle Valo kfree(pbuf); return err; } -@@ -6113,6 +6161,7 @@ static int brcmf_enable_bw40_2g(struct b +@@ -6116,6 +6164,7 @@ static int brcmf_enable_bw40_2g(struct b static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) { @@ -1800,7 +1800,7 @@ Signed-off-by: Kalle Valo u32 band, mimo_bwcap; int err; -@@ -6148,7 +6197,7 @@ static void brcmf_get_bwcap(struct brcmf +@@ -6151,7 +6200,7 @@ static void brcmf_get_bwcap(struct brcmf bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT; break; default: @@ -1809,7 +1809,7 @@ Signed-off-by: Kalle Valo } } -@@ -6224,7 +6273,7 @@ static void brcmf_update_vht_cap(struct +@@ -6227,7 +6276,7 @@ static void brcmf_update_vht_cap(struct static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg) { struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); @@ -1818,7 +1818,7 @@ Signed-off-by: Kalle Valo u32 nmode = 0; u32 vhtmode = 0; u32 bw_cap[2] = { WLC_BW_20MHZ_BIT, WLC_BW_20MHZ_BIT }; -@@ -6240,7 +6289,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6243,7 +6292,7 @@ static int brcmf_setup_wiphybands(struct (void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode); err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode); if (err) { @@ -1827,7 +1827,7 @@ Signed-off-by: Kalle Valo } else { brcmf_get_bwcap(ifp, bw_cap); } -@@ -6250,7 +6299,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6253,7 +6302,7 @@ static int brcmf_setup_wiphybands(struct err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); if (err) { @@ -1836,7 +1836,7 @@ Signed-off-by: Kalle Valo nchain = 1; } else { for (nchain = 0; rxchain; nchain++) -@@ -6260,7 +6309,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6263,7 +6312,7 @@ static int brcmf_setup_wiphybands(struct err = brcmf_construct_chaninfo(cfg, bw_cap); if (err) { @@ -1845,7 +1845,7 @@ Signed-off-by: Kalle Valo return err; } -@@ -6272,7 +6321,6 @@ static int brcmf_setup_wiphybands(struct +@@ -6275,7 +6324,6 @@ static int brcmf_setup_wiphybands(struct &txbf_bfr_cap); } @@ -1853,7 +1853,7 @@ Signed-off-by: Kalle Valo for (i = 0; i < ARRAY_SIZE(wiphy->bands); i++) { band = wiphy->bands[i]; if (band == NULL) -@@ -6473,7 +6521,7 @@ static void brcmf_wiphy_wowl_params(stru +@@ -6476,7 +6524,7 @@ static void brcmf_wiphy_wowl_params(stru wowl = kmemdup(&brcmf_wowlan_support, sizeof(brcmf_wowlan_support), GFP_KERNEL); if (!wowl) { @@ -1862,7 +1862,7 @@ Signed-off-by: Kalle Valo wiphy->wowlan = &brcmf_wowlan_support; return; } -@@ -6570,7 +6618,7 @@ static int brcmf_setup_wiphy(struct wiph +@@ -6573,7 +6621,7 @@ static int brcmf_setup_wiphy(struct wiph err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist, sizeof(bandlist)); if (err) { @@ -1871,7 +1871,7 @@ Signed-off-by: Kalle Valo return err; } /* first entry in bandlist is number of bands */ -@@ -6619,6 +6667,7 @@ static int brcmf_setup_wiphy(struct wiph +@@ -6622,6 +6670,7 @@ static int brcmf_setup_wiphy(struct wiph static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg) { @@ -1879,7 +1879,7 @@ Signed-off-by: Kalle Valo struct net_device *ndev; struct wireless_dev *wdev; struct brcmf_if *ifp; -@@ -6656,7 +6705,7 @@ static s32 brcmf_config_dongle(struct br +@@ -6659,7 +6708,7 @@ static s32 brcmf_config_dongle(struct br err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1); if (err) { @@ -1888,7 +1888,7 @@ Signed-off-by: Kalle Valo goto default_conf_out; } -@@ -6848,8 +6897,8 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6851,8 +6900,8 @@ static void brcmf_cfg80211_reg_notifier( /* ignore non-ISO3166 country codes */ for (i = 0; i < 2; i++) if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { @@ -1899,7 +1899,7 @@ Signed-off-by: Kalle Valo return; } -@@ -6858,7 +6907,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6861,7 +6910,7 @@ static void brcmf_cfg80211_reg_notifier( err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq)); if (err) { @@ -1908,7 +1908,7 @@ Signed-off-by: Kalle Valo return; } -@@ -6868,7 +6917,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6871,7 +6920,7 @@ static void brcmf_cfg80211_reg_notifier( err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq)); if (err) { @@ -1917,7 +1917,7 @@ Signed-off-by: Kalle Valo return; } brcmf_setup_wiphybands(cfg); -@@ -6914,13 +6963,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -6917,13 +6966,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 u16 *cap = NULL; if (!ndev) { @@ -1933,7 +1933,7 @@ Signed-off-by: Kalle Valo return NULL; } -@@ -6941,7 +6990,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -6944,7 +6993,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 err = wl_init_priv(cfg); if (err) { @@ -1942,7 +1942,7 @@ Signed-off-by: Kalle Valo brcmf_free_vif(vif); goto wiphy_out; } -@@ -6950,7 +6999,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -6953,7 +7002,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 /* determine d11 io type before wiphy setup */ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type); if (err) { @@ -1951,7 +1951,7 @@ Signed-off-by: Kalle Valo goto priv_out; } cfg->d11inf.io_type = (u8)io_type; -@@ -6984,13 +7033,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -6987,13 +7036,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 #endif err = wiphy_register(wiphy); if (err < 0) { @@ -1967,7 +1967,7 @@ Signed-off-by: Kalle Valo goto wiphy_unreg_out; } -@@ -7008,24 +7057,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7011,24 +7060,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802 err = brcmf_fweh_activate_events(ifp); if (err) { @@ -1996,7 +1996,7 @@ Signed-off-by: Kalle Valo brcmf_btcoex_detach(cfg); brcmf_p2p_detach(&cfg->p2p); goto wiphy_unreg_out; -@@ -7045,7 +7094,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7048,7 +7097,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 /* (re-) activate FWEH event handling */ err = brcmf_fweh_activate_events(ifp); if (err) { diff --git a/package/kernel/mac80211/patches/brcm/351-v5.1-0001-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch b/package/kernel/mac80211/patches/brcm/351-v5.1-0001-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch index b28ff817ea..4433313b60 100644 --- a/package/kernel/mac80211/patches/brcm/351-v5.1-0001-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch +++ b/package/kernel/mac80211/patches/brcm/351-v5.1-0001-brcmfmac-improve-code-handling-bandwidth-of-firmware.patch @@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6047,11 +6047,18 @@ static int brcmf_construct_chaninfo(stru +@@ -6050,11 +6050,18 @@ static int brcmf_construct_chaninfo(stru /* assuming the chanspecs order is HT20, * HT40 upper, HT40 lower, and VHT80. */ diff --git a/package/kernel/mac80211/patches/brcm/351-v5.1-0002-brcmfmac-support-firmware-reporting-160-MHz-channels.patch b/package/kernel/mac80211/patches/brcm/351-v5.1-0002-brcmfmac-support-firmware-reporting-160-MHz-channels.patch index 3d92f80b3e..20ff9b8b47 100644 --- a/package/kernel/mac80211/patches/brcm/351-v5.1-0002-brcmfmac-support-firmware-reporting-160-MHz-channels.patch +++ b/package/kernel/mac80211/patches/brcm/351-v5.1-0002-brcmfmac-support-firmware-reporting-160-MHz-channels.patch @@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6048,6 +6048,9 @@ static int brcmf_construct_chaninfo(stru +@@ -6051,6 +6051,9 @@ static int brcmf_construct_chaninfo(stru * HT40 upper, HT40 lower, and VHT80. */ switch (ch.bw) { diff --git a/package/kernel/mac80211/patches/brcm/352-v5.1-brcmfmac-rework-bphy_err-to-take-struct-brcmf_pub-ar.patch b/package/kernel/mac80211/patches/brcm/352-v5.1-brcmfmac-rework-bphy_err-to-take-struct-brcmf_pub-ar.patch index bab3b3a204..79266778d3 100644 --- a/package/kernel/mac80211/patches/brcm/352-v5.1-brcmfmac-rework-bphy_err-to-take-struct-brcmf_pub-ar.patch +++ b/package/kernel/mac80211/patches/brcm/352-v5.1-brcmfmac-rework-bphy_err-to-take-struct-brcmf_pub-ar.patch @@ -1864,7 +1864,7 @@ Signed-off-by: Kalle Valo return ret; } -@@ -5381,7 +5425,7 @@ static void brcmf_clear_assoc_ies(struct +@@ -5384,7 +5428,7 @@ static void brcmf_clear_assoc_ies(struct static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) { @@ -1873,7 +1873,7 @@ Signed-off-by: Kalle Valo struct brcmf_cfg80211_assoc_ielen_le *assoc_info; struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); u32 req_len; -@@ -5393,7 +5437,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5396,7 +5440,7 @@ static s32 brcmf_get_assoc_ies(struct br err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1882,7 +1882,7 @@ Signed-off-by: Kalle Valo return err; } assoc_info = -@@ -5405,7 +5449,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5408,7 +5452,7 @@ static s32 brcmf_get_assoc_ies(struct br cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1891,7 +1891,7 @@ Signed-off-by: Kalle Valo return err; } conn_info->req_ie_len = req_len; -@@ -5423,7 +5467,7 @@ static s32 brcmf_get_assoc_ies(struct br +@@ -5426,7 +5470,7 @@ static s32 brcmf_get_assoc_ies(struct br cfg->extra_buf, WL_ASSOC_INFO_MAX); if (err) { @@ -1900,7 +1900,7 @@ Signed-off-by: Kalle Valo return err; } conn_info->resp_ie_len = resp_len; -@@ -5552,7 +5596,7 @@ brcmf_notify_connect_status_ap(struct br +@@ -5555,7 +5599,7 @@ brcmf_notify_connect_status_ap(struct br struct net_device *ndev, const struct brcmf_event_msg *e, void *data) { @@ -1909,7 +1909,7 @@ Signed-off-by: Kalle Valo static int generation; u32 event = e->event_code; u32 reason = e->reason; -@@ -5570,7 +5614,7 @@ brcmf_notify_connect_status_ap(struct br +@@ -5573,7 +5617,7 @@ brcmf_notify_connect_status_ap(struct br if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) && (reason == BRCMF_E_STATUS_SUCCESS)) { if (!data) { @@ -1918,7 +1918,7 @@ Signed-off-by: Kalle Valo return -EINVAL; } -@@ -5862,7 +5906,7 @@ static void init_vif_event(struct brcmf_ +@@ -5865,7 +5909,7 @@ static void init_vif_event(struct brcmf_ static s32 brcmf_dongle_roam(struct brcmf_if *ifp) { @@ -1927,7 +1927,7 @@ Signed-off-by: Kalle Valo s32 err; u32 bcn_timeout; __le32 roamtrigger[2]; -@@ -5875,7 +5919,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5878,7 +5922,7 @@ static s32 brcmf_dongle_roam(struct brcm bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON; err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); if (err) { @@ -1936,7 +1936,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5887,7 +5931,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5890,7 +5934,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_iovar_int_set(ifp, "roam_off", ifp->drvr->settings->roamoff); if (err) { @@ -1945,7 +1945,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5896,7 +5940,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5899,7 +5943,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER, (void *)roamtrigger, sizeof(roamtrigger)); if (err) { @@ -1954,7 +1954,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5905,7 +5949,7 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5908,7 +5952,7 @@ static s32 brcmf_dongle_roam(struct brcm err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA, (void *)roam_delta, sizeof(roam_delta)); if (err) { @@ -1963,7 +1963,7 @@ Signed-off-by: Kalle Valo goto roam_setup_done; } -@@ -5916,26 +5960,26 @@ roam_setup_done: +@@ -5919,26 +5963,26 @@ roam_setup_done: static s32 brcmf_dongle_scantime(struct brcmf_if *ifp) { @@ -1994,7 +1994,7 @@ Signed-off-by: Kalle Valo goto dongle_scantime_out; } -@@ -5968,7 +6012,8 @@ static int brcmf_construct_chaninfo(stru +@@ -5971,7 +6015,8 @@ static int brcmf_construct_chaninfo(stru u32 bw_cap[]) { struct wiphy *wiphy = cfg_to_wiphy(cfg); @@ -2004,7 +2004,7 @@ Signed-off-by: Kalle Valo struct ieee80211_supported_band *band; struct ieee80211_channel *channel; struct brcmf_chanspec_list *list; -@@ -5989,7 +6034,7 @@ static int brcmf_construct_chaninfo(stru +@@ -5992,7 +6037,7 @@ static int brcmf_construct_chaninfo(stru err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, BRCMF_DCMD_MEDLEN); if (err) { @@ -2013,7 +2013,7 @@ Signed-off-by: Kalle Valo goto fail_pbuf; } -@@ -6012,7 +6057,7 @@ static int brcmf_construct_chaninfo(stru +@@ -6015,7 +6060,7 @@ static int brcmf_construct_chaninfo(stru } else if (ch.band == BRCMU_CHAN_BAND_5G) { band = wiphy->bands[NL80211_BAND_5GHZ]; } else { @@ -2022,7 +2022,7 @@ Signed-off-by: Kalle Valo ch.chspec); continue; } -@@ -6036,7 +6081,7 @@ static int brcmf_construct_chaninfo(stru +@@ -6039,7 +6084,7 @@ static int brcmf_construct_chaninfo(stru /* It seems firmware supports some channel we never * considered. Something new in IEEE standard? */ @@ -2031,7 +2031,7 @@ Signed-off-by: Kalle Valo ch.control_ch_num); continue; } -@@ -6093,8 +6138,8 @@ fail_pbuf: +@@ -6096,8 +6141,8 @@ fail_pbuf: static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) { @@ -2042,7 +2042,7 @@ Signed-off-by: Kalle Valo struct ieee80211_supported_band *band; struct brcmf_fil_bwcap_le band_bwcap; struct brcmf_chanspec_list *list; -@@ -6140,7 +6185,7 @@ static int brcmf_enable_bw40_2g(struct b +@@ -6143,7 +6188,7 @@ static int brcmf_enable_bw40_2g(struct b err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, BRCMF_DCMD_MEDLEN); if (err) { @@ -2051,7 +2051,7 @@ Signed-off-by: Kalle Valo kfree(pbuf); return err; } -@@ -6171,7 +6216,7 @@ static int brcmf_enable_bw40_2g(struct b +@@ -6174,7 +6219,7 @@ static int brcmf_enable_bw40_2g(struct b static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) { @@ -2060,7 +2060,7 @@ Signed-off-by: Kalle Valo u32 band, mimo_bwcap; int err; -@@ -6207,7 +6252,7 @@ static void brcmf_get_bwcap(struct brcmf +@@ -6210,7 +6255,7 @@ static void brcmf_get_bwcap(struct brcmf bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT; break; default: @@ -2069,7 +2069,7 @@ Signed-off-by: Kalle Valo } } -@@ -6282,7 +6327,8 @@ static void brcmf_update_vht_cap(struct +@@ -6285,7 +6330,8 @@ static void brcmf_update_vht_cap(struct static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg) { @@ -2079,7 +2079,7 @@ Signed-off-by: Kalle Valo struct wiphy *wiphy = cfg_to_wiphy(cfg); u32 nmode = 0; u32 vhtmode = 0; -@@ -6299,7 +6345,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6302,7 +6348,7 @@ static int brcmf_setup_wiphybands(struct (void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode); err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode); if (err) { @@ -2088,7 +2088,7 @@ Signed-off-by: Kalle Valo } else { brcmf_get_bwcap(ifp, bw_cap); } -@@ -6309,7 +6355,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6312,7 +6358,7 @@ static int brcmf_setup_wiphybands(struct err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); if (err) { @@ -2097,7 +2097,7 @@ Signed-off-by: Kalle Valo nchain = 1; } else { for (nchain = 0; rxchain; nchain++) -@@ -6319,7 +6365,7 @@ static int brcmf_setup_wiphybands(struct +@@ -6322,7 +6368,7 @@ static int brcmf_setup_wiphybands(struct err = brcmf_construct_chaninfo(cfg, bw_cap); if (err) { @@ -2106,7 +2106,7 @@ Signed-off-by: Kalle Valo return err; } -@@ -6526,12 +6572,13 @@ static void brcmf_wiphy_wowl_params(stru +@@ -6529,12 +6575,13 @@ static void brcmf_wiphy_wowl_params(stru { #ifdef CONFIG_PM struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); @@ -2121,7 +2121,7 @@ Signed-off-by: Kalle Valo wiphy->wowlan = &brcmf_wowlan_support; return; } -@@ -6628,7 +6675,7 @@ static int brcmf_setup_wiphy(struct wiph +@@ -6631,7 +6678,7 @@ static int brcmf_setup_wiphy(struct wiph err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist, sizeof(bandlist)); if (err) { @@ -2130,7 +2130,7 @@ Signed-off-by: Kalle Valo return err; } /* first entry in bandlist is number of bands */ -@@ -6677,7 +6724,7 @@ static int brcmf_setup_wiphy(struct wiph +@@ -6680,7 +6727,7 @@ static int brcmf_setup_wiphy(struct wiph static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg) { @@ -2139,7 +2139,7 @@ Signed-off-by: Kalle Valo struct net_device *ndev; struct wireless_dev *wdev; struct brcmf_if *ifp; -@@ -6715,7 +6762,7 @@ static s32 brcmf_config_dongle(struct br +@@ -6718,7 +6765,7 @@ static s32 brcmf_config_dongle(struct br err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1); if (err) { @@ -2148,7 +2148,7 @@ Signed-off-by: Kalle Valo goto default_conf_out; } -@@ -6896,6 +6943,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6899,6 +6946,7 @@ static void brcmf_cfg80211_reg_notifier( { struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); @@ -2156,7 +2156,7 @@ Signed-off-by: Kalle Valo struct brcmf_fil_country_le ccreq; s32 err; int i; -@@ -6907,7 +6955,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6910,7 +6958,7 @@ static void brcmf_cfg80211_reg_notifier( /* ignore non-ISO3166 country codes */ for (i = 0; i < 2; i++) if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { @@ -2165,7 +2165,7 @@ Signed-off-by: Kalle Valo req->alpha2[0], req->alpha2[1]); return; } -@@ -6917,7 +6965,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6920,7 +6968,7 @@ static void brcmf_cfg80211_reg_notifier( err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq)); if (err) { @@ -2174,7 +2174,7 @@ Signed-off-by: Kalle Valo return; } -@@ -6927,7 +6975,7 @@ static void brcmf_cfg80211_reg_notifier( +@@ -6930,7 +6978,7 @@ static void brcmf_cfg80211_reg_notifier( err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq)); if (err) { @@ -2183,7 +2183,7 @@ Signed-off-by: Kalle Valo return; } brcmf_setup_wiphybands(cfg); -@@ -6973,13 +7021,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -6976,13 +7024,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 u16 *cap = NULL; if (!ndev) { @@ -2199,7 +2199,7 @@ Signed-off-by: Kalle Valo return NULL; } -@@ -7000,7 +7048,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7003,7 +7051,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 err = wl_init_priv(cfg); if (err) { @@ -2208,7 +2208,7 @@ Signed-off-by: Kalle Valo brcmf_free_vif(vif); goto wiphy_out; } -@@ -7009,7 +7057,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7012,7 +7060,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 /* determine d11 io type before wiphy setup */ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type); if (err) { @@ -2217,7 +2217,7 @@ Signed-off-by: Kalle Valo goto priv_out; } cfg->d11inf.io_type = (u8)io_type; -@@ -7043,13 +7091,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7046,13 +7094,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802 #endif err = wiphy_register(wiphy); if (err < 0) { @@ -2233,7 +2233,7 @@ Signed-off-by: Kalle Valo goto wiphy_unreg_out; } -@@ -7067,24 +7115,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7070,24 +7118,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802 err = brcmf_fweh_activate_events(ifp); if (err) { @@ -2262,7 +2262,7 @@ Signed-off-by: Kalle Valo brcmf_btcoex_detach(cfg); brcmf_p2p_detach(&cfg->p2p); goto wiphy_unreg_out; -@@ -7104,7 +7152,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 +@@ -7107,7 +7155,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 /* (re-) activate FWEH event handling */ err = brcmf_fweh_activate_events(ifp); if (err) { diff --git a/package/kernel/mac80211/patches/brcm/383-v5.4-0002-brcmfmac-enable-DFS_OFFLOAD-extended-feature-if-supp.patch b/package/kernel/mac80211/patches/brcm/383-v5.4-0002-brcmfmac-enable-DFS_OFFLOAD-extended-feature-if-supp.patch index 7048d1c690..a631af62e2 100644 --- a/package/kernel/mac80211/patches/brcm/383-v5.4-0002-brcmfmac-enable-DFS_OFFLOAD-extended-feature-if-supp.patch +++ b/package/kernel/mac80211/patches/brcm/383-v5.4-0002-brcmfmac-enable-DFS_OFFLOAD-extended-feature-if-supp.patch @@ -19,7 +19,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6725,6 +6725,11 @@ static int brcmf_setup_wiphy(struct wiph +@@ -6728,6 +6728,11 @@ static int brcmf_setup_wiphy(struct wiph } } diff --git a/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch b/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch index a56be4d35c..29936a0df7 100644 --- a/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch +++ b/package/kernel/mac80211/patches/brcm/392-v5.4-0001-brcmfmac-move-cfg80211_ops-pointer-to-another-struct.patch @@ -24,7 +24,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -7194,7 +7194,6 @@ void brcmf_cfg80211_detach(struct brcmf_ +@@ -7197,7 +7197,6 @@ void brcmf_cfg80211_detach(struct brcmf_ brcmf_pno_detach(cfg); brcmf_btcoex_detach(cfg); wiphy_unregister(cfg->wiphy); diff --git a/package/kernel/mac80211/patches/brcm/414-v5.6-0004-brcmfmac-make-errors-when-setting-roaming-parameters.patch b/package/kernel/mac80211/patches/brcm/414-v5.6-0004-brcmfmac-make-errors-when-setting-roaming-parameters.patch index b15907217e..bdc5ab9ee3 100644 --- a/package/kernel/mac80211/patches/brcm/414-v5.6-0004-brcmfmac-make-errors-when-setting-roaming-parameters.patch +++ b/package/kernel/mac80211/patches/brcm/414-v5.6-0004-brcmfmac-make-errors-when-setting-roaming-parameters.patch @@ -16,7 +16,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -5936,19 +5936,17 @@ static s32 brcmf_dongle_roam(struct brcm +@@ -5939,19 +5939,17 @@ static s32 brcmf_dongle_roam(struct brcm roamtrigger[1] = cpu_to_le32(BRCM_BAND_ALL); err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER, (void *)roamtrigger, sizeof(roamtrigger)); diff --git a/package/kernel/mac80211/patches/brcm/414-v5.6-0006-brcmfmac-add-RSDB-condition-when-setting-interface-c.patch b/package/kernel/mac80211/patches/brcm/414-v5.6-0006-brcmfmac-add-RSDB-condition-when-setting-interface-c.patch index c56ae2c248..a62ac68f2e 100644 --- a/package/kernel/mac80211/patches/brcm/414-v5.6-0006-brcmfmac-add-RSDB-condition-when-setting-interface-c.patch +++ b/package/kernel/mac80211/patches/brcm/414-v5.6-0006-brcmfmac-add-RSDB-condition-when-setting-interface-c.patch @@ -20,7 +20,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6444,6 +6444,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = +@@ -6447,6 +6447,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = * #STA <= 1, #AP <= 1, channels = 1, 2 total * #AP <= 4, matching BI, channels = 1, 4 total * @@ -30,7 +30,7 @@ Signed-off-by: Kalle Valo * p2p, no mchan, and mbss: * * #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 1, 3 total -@@ -6455,6 +6458,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = +@@ -6458,6 +6461,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = * #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 2, 3 total * #STA <= 1, #P2P-DEV <= 1, #AP <= 1, #P2P-CL <= 1, channels = 1, 4 total * #AP <= 4, matching BI, channels = 1, 4 total @@ -41,7 +41,7 @@ Signed-off-by: Kalle Valo */ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) { -@@ -6462,13 +6469,14 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6465,13 +6472,14 @@ static int brcmf_setup_ifmodes(struct wi struct ieee80211_iface_limit *c0_limits = NULL; struct ieee80211_iface_limit *p2p_limits = NULL; struct ieee80211_iface_limit *mbss_limits = NULL; @@ -58,7 +58,7 @@ Signed-off-by: Kalle Valo combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL); if (!combo) goto err; -@@ -6479,16 +6487,36 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6482,16 +6490,36 @@ static int brcmf_setup_ifmodes(struct wi c = 0; i = 0; @@ -99,7 +99,7 @@ Signed-off-by: Kalle Valo wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) | BIT(NL80211_IFTYPE_P2P_DEVICE); -@@ -6497,16 +6525,26 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6500,16 +6528,26 @@ static int brcmf_setup_ifmodes(struct wi c0_limits[i].max = 1; c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO); diff --git a/package/kernel/mac80211/patches/brcm/419-v5.6-0001-brcmfmac-simplify-building-interface-combinations.patch b/package/kernel/mac80211/patches/brcm/419-v5.6-0001-brcmfmac-simplify-building-interface-combinations.patch index 8c231cbe13..1623d483d7 100644 --- a/package/kernel/mac80211/patches/brcm/419-v5.6-0001-brcmfmac-simplify-building-interface-combinations.patch +++ b/package/kernel/mac80211/patches/brcm/419-v5.6-0001-brcmfmac-simplify-building-interface-combinations.patch @@ -18,7 +18,7 @@ Signed-off-by: Kalle Valo --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6471,12 +6471,13 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6474,12 +6474,13 @@ static int brcmf_setup_ifmodes(struct wi struct ieee80211_iface_limit *c0_limits = NULL; struct ieee80211_iface_limit *p2p_limits = NULL; struct ieee80211_iface_limit *mbss_limits = NULL; @@ -33,7 +33,7 @@ Signed-off-by: Kalle Valo n_combos = 1 + !!(p2p && !rsdb) + !!mbss; combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL); -@@ -6486,6 +6487,10 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6489,6 +6490,10 @@ static int brcmf_setup_ifmodes(struct wi wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP); @@ -44,7 +44,7 @@ Signed-off-by: Kalle Valo c = 0; i = 0; -@@ -6497,48 +6502,28 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6500,48 +6505,28 @@ static int brcmf_setup_ifmodes(struct wi c0_limits = kcalloc(2, sizeof(*c0_limits), GFP_KERNEL); if (!c0_limits) goto err; diff --git a/package/kernel/mac80211/patches/brcm/419-v5.6-0002-brcmfmac-add-initial-support-for-monitor-mode.patch b/package/kernel/mac80211/patches/brcm/419-v5.6-0002-brcmfmac-add-initial-support-for-monitor-mode.patch index f64ff1e82a..7cc93fb224 100644 --- a/package/kernel/mac80211/patches/brcm/419-v5.6-0002-brcmfmac-add-initial-support-for-monitor-mode.patch +++ b/package/kernel/mac80211/patches/brcm/419-v5.6-0002-brcmfmac-add-initial-support-for-monitor-mode.patch @@ -139,7 +139,7 @@ Signed-off-by: Kalle Valo case NL80211_IFTYPE_AP: return brcmf_cfg80211_del_ap_iface(wiphy, wdev); case NL80211_IFTYPE_P2P_CLIENT: -@@ -6471,9 +6550,10 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6474,9 +6553,10 @@ static int brcmf_setup_ifmodes(struct wi struct ieee80211_iface_limit *c0_limits = NULL; struct ieee80211_iface_limit *p2p_limits = NULL; struct ieee80211_iface_limit *mbss_limits = NULL; @@ -152,7 +152,7 @@ Signed-off-by: Kalle Valo mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS); p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P); rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB); -@@ -6487,6 +6567,8 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6490,6 +6570,8 @@ static int brcmf_setup_ifmodes(struct wi wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP); @@ -161,7 +161,7 @@ Signed-off-by: Kalle Valo if (p2p) wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) | -@@ -6494,18 +6576,18 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6497,18 +6579,18 @@ static int brcmf_setup_ifmodes(struct wi c = 0; i = 0; @@ -186,7 +186,7 @@ Signed-off-by: Kalle Valo if (p2p) { c0_limits[i].max = 1; c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_DEVICE); -@@ -6554,14 +6636,20 @@ static int brcmf_setup_ifmodes(struct wi +@@ -6557,14 +6639,20 @@ static int brcmf_setup_ifmodes(struct wi if (mbss) { c++; i = 0; diff --git a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch index 1581b3400b..ab80887bde 100644 --- a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1168,14 +1168,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1179,14 +1179,14 @@ int ieee80211_register_hw(struct ieee802 rtnl_unlock(); @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1184,13 +1184,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1195,13 +1195,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif rtnl_lock(); -@@ -1219,10 +1219,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1230,10 +1230,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index c63275baaf..57fd427f8f 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2190,7 +2190,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2192,7 +2192,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch index 5f858000c3..b4fbf136ee 100644 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch +++ b/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch @@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg }; /** -@@ -1226,6 +1227,7 @@ struct ieee80211_local { +@@ -1227,6 +1228,7 @@ struct ieee80211_local { struct sk_buff_head pending[IEEE80211_MAX_QUEUES]; struct tasklet_struct tx_pending_tasklet; @@ -77,7 +77,7 @@ Signed-off-by: Johannes Berg atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES]; -@@ -2047,6 +2049,7 @@ void ieee80211_txq_remove_vlan(struct ie +@@ -2048,6 +2050,7 @@ void ieee80211_txq_remove_vlan(struct ie struct ieee80211_sub_if_data *sdata); void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats, struct txq_info *txqi); diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch index 785ca3cc18..75ba462070 100644 --- a/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch +++ b/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau ccflags-y += -DDEBUG --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -1308,18 +1308,12 @@ static int __init ieee80211_init(void) +@@ -1319,18 +1319,12 @@ static int __init ieee80211_init(void) if (ret) return ret; @@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau rc80211_minstrel_exit(); return ret; -@@ -1327,7 +1321,6 @@ static int __init ieee80211_init(void) +@@ -1338,7 +1332,6 @@ static int __init ieee80211_init(void) static void __exit ieee80211_exit(void) { diff --git a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch index 71088be87a..3c428823c1 100644 --- a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch +++ b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch @@ -163,7 +163,7 @@ Signed-off-by: Johannes Berg unsigned long flags; /* keep last! */ -@@ -1127,6 +1131,11 @@ struct ieee80211_local { +@@ -1128,6 +1132,11 @@ struct ieee80211_local { struct codel_vars *cvars; struct codel_params cparams; diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch index d028ee2496..666dff8aa0 100644 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch +++ b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch @@ -240,7 +240,7 @@ Signed-off-by: Johannes Berg sta->debugfs_dir, --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1136,6 +1136,8 @@ struct ieee80211_local { +@@ -1137,6 +1137,8 @@ struct ieee80211_local { struct list_head active_txqs[IEEE80211_NUM_ACS]; u16 schedule_round[IEEE80211_NUM_ACS]; @@ -259,7 +259,7 @@ Signed-off-by: Johannes Berg INIT_LIST_HEAD(&local->chanctx_list); mutex_init(&local->chanctx_mtx); -@@ -1142,6 +1143,9 @@ int ieee80211_register_hw(struct ieee802 +@@ -1153,6 +1154,9 @@ int ieee80211_register_hw(struct ieee802 if (!local->hw.max_nan_de_entries) local->hw.max_nan_de_entries = IEEE80211_MAX_NAN_INSTANCE_ID; diff --git a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch index 3a210ff238..f6a9591c7f 100644 --- a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch +++ b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch @@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau * mac80211 is capable of taking advantage of many hardware --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1871,6 +1871,10 @@ int ieee80211_if_add(struct ieee80211_lo +@@ -1877,6 +1877,10 @@ int ieee80211_if_add(struct ieee80211_lo + 8 /* rfc1042/bridge tunnel */ - ETH_HLEN /* ethernet hard_header_len */ + IEEE80211_ENCRYPT_HEADROOM; @@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau ret = dev_alloc_name(ndev, ndev->name); --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c -@@ -105,13 +105,15 @@ void mesh_path_assign_nexthop(struct mes +@@ -106,13 +106,15 @@ void mesh_path_assign_nexthop(struct mes static void prepare_for_gate(struct sk_buff *skb, char *dst_addr, struct mesh_path *gate_mpath) { diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch index 0e13e2fecc..92dbcad676 100644 --- a/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch +++ b/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau void mesh_path_timer(struct timer_list *t) --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c -@@ -219,7 +219,7 @@ static struct mesh_path *mpath_lookup(st +@@ -220,7 +220,7 @@ static struct mesh_path *mpath_lookup(st { struct mesh_path *mpath; diff --git a/package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch b/package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch index 5fa8fcddcb..90722a32ce 100644 --- a/package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch +++ b/package/kernel/mac80211/patches/subsys/365-mac80211-IBSS-send-deauth-when-expiring-inactive-STA.patch @@ -54,7 +54,7 @@ Signed-off-by: Johannes Berg } --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -2068,7 +2068,8 @@ void ieee80211_send_auth(struct ieee8021 +@@ -2069,7 +2069,8 @@ void ieee80211_send_auth(struct ieee8021 const u8 *da, const u8 *key, u8 key_len, u8 key_idx, u32 tx_flags); void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, diff --git a/package/kernel/mac80211/patches/subsys/369-mac80211-don-t-set-set-TDLS-STA-bandwidth-wider-than.patch b/package/kernel/mac80211/patches/subsys/369-mac80211-don-t-set-set-TDLS-STA-bandwidth-wider-than.patch deleted file mode 100644 index a88b24d402..0000000000 --- a/package/kernel/mac80211/patches/subsys/369-mac80211-don-t-set-set-TDLS-STA-bandwidth-wider-than.patch +++ /dev/null @@ -1,65 +0,0 @@ -From ebbd7dc7ca856a182769c17c4c8a739cedc064c4 Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Sun, 6 Dec 2020 14:54:44 +0200 -Subject: [PATCH] mac80211: don't set set TDLS STA bandwidth wider than - possible - -[ Upstream commit f65607cdbc6b0da356ef5a22552ddd9313cf87a0 ] - -When we set up a TDLS station, we set sta->sta.bandwidth solely based -on the capabilities, because the "what's the current bandwidth" check -is bypassed and only applied for other types of stations. - -This leads to the unfortunate scenario that the sta->sta.bandwidth is -160 MHz if both stations support it, but we never actually configure -this bandwidth unless the AP is already using 160 MHz; even for wider -bandwidth support we only go up to 80 MHz (at least right now.) - -For iwlwifi, this can also lead to firmware asserts, telling us that -we've configured the TX rates for a higher bandwidth than is actually -available due to the PHY configuration. - -For non-TDLS, we check against the interface's requested bandwidth, -but we explicitly skip this check for TDLS to cope with the wider BW -case. Change this to - (a) still limit to the TDLS peer's own chandef, which gets factored - into the overall PHY configuration we request from the driver, - and - (b) limit it to when the TDLS peer is authorized, because it's only - factored into the channel context in this case. - -Fixes: 504871e602d9 ("mac80211: fix bandwidth computation for TDLS peers") -Signed-off-by: Johannes Berg -Signed-off-by: Luca Coelho -Link: https://lore.kernel.org/r/iwlwifi.20201206145305.fcc7d29c4590.I11f77e9e25ddf871a3c8d5604650c763e2c5887a@changeid -Signed-off-by: Johannes Berg -Signed-off-by: Sasha Levin ---- - net/mac80211/vht.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - ---- a/net/mac80211/vht.c -+++ b/net/mac80211/vht.c -@@ -421,12 +421,18 @@ enum ieee80211_sta_rx_bandwidth ieee8021 - * IEEE80211-2016 specification makes higher bandwidth operation - * possible on the TDLS link if the peers have wider bandwidth - * capability. -+ * -+ * However, in this case, and only if the TDLS peer is authorized, -+ * limit to the tdls_chandef so that the configuration here isn't -+ * wider than what's actually requested on the channel context. - */ - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && -- test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW)) -- return bw; -- -- bw = min(bw, ieee80211_chan_width_to_rx_bw(bss_width)); -+ test_sta_flag(sta, WLAN_STA_TDLS_WIDER_BW) && -+ test_sta_flag(sta, WLAN_STA_AUTHORIZED) && -+ sta->tdls_chandef.chan) -+ bw = min(bw, ieee80211_chan_width_to_rx_bw(sta->tdls_chandef.width)); -+ else -+ bw = min(bw, ieee80211_chan_width_to_rx_bw(bss_width)); - - return bw; - } diff --git a/package/kernel/mac80211/patches/subsys/370-mac80211-pause-TX-while-changing-interface-type.patch b/package/kernel/mac80211/patches/subsys/370-mac80211-pause-TX-while-changing-interface-type.patch deleted file mode 100644 index ce9776c112..0000000000 --- a/package/kernel/mac80211/patches/subsys/370-mac80211-pause-TX-while-changing-interface-type.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b26b5e0861578fa7cdf444b1aa61d06f739eb306 Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Fri, 22 Jan 2021 17:11:16 +0100 -Subject: [PATCH] mac80211: pause TX while changing interface type - -[ Upstream commit 054c9939b4800a91475d8d89905827bf9e1ad97a ] - -syzbot reported a crash that happened when changing the interface -type around a lot, and while it might have been easy to fix just -the symptom there, a little deeper investigation found that really -the reason is that we allowed packets to be transmitted while in -the middle of changing the interface type. - -Disallow TX by stopping the queues while changing the type. - -Fixes: 34d4bc4d41d2 ("mac80211: support runtime interface type changes") -Reported-by: syzbot+d7a3b15976bf7de2238a@syzkaller.appspotmail.com -Link: https://lore.kernel.org/r/20210122171115.b321f98f4d4f.I6997841933c17b093535c31d29355be3c0c39628@changeid -Signed-off-by: Johannes Berg -Signed-off-by: Sasha Levin ---- - net/mac80211/ieee80211_i.h | 1 + - net/mac80211/iface.c | 6 ++++++ - 2 files changed, 7 insertions(+) - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -1057,6 +1057,7 @@ enum queue_stop_reason { - IEEE80211_QUEUE_STOP_REASON_FLUSH, - IEEE80211_QUEUE_STOP_REASON_TDLS_TEARDOWN, - IEEE80211_QUEUE_STOP_REASON_RESERVE_TID, -+ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE, - - IEEE80211_QUEUE_STOP_REASONS, - }; ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -1621,6 +1621,10 @@ static int ieee80211_runtime_change_ifty - if (ret) - return ret; - -+ ieee80211_stop_vif_queues(local, sdata, -+ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE); -+ synchronize_net(); -+ - ieee80211_do_stop(sdata, false); - - ieee80211_teardown_sdata(sdata); -@@ -1641,6 +1645,8 @@ static int ieee80211_runtime_change_ifty - err = ieee80211_do_open(&sdata->wdev, false); - WARN(err, "type change: do_open returned %d", err); - -+ ieee80211_wake_vif_queues(local, sdata, -+ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE); - return ret; - } - diff --git a/package/kernel/mac80211/patches/subsys/371-mac80211-fix-fast-rx-encryption-check.patch b/package/kernel/mac80211/patches/subsys/371-mac80211-fix-fast-rx-encryption-check.patch deleted file mode 100644 index f6ce40ac24..0000000000 --- a/package/kernel/mac80211/patches/subsys/371-mac80211-fix-fast-rx-encryption-check.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b70798906c4c85314511cf6d5cae98385861fc07 Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Fri, 18 Dec 2020 19:47:17 +0100 -Subject: [PATCH] mac80211: fix fast-rx encryption check - -[ Upstream commit 622d3b4e39381262da7b18ca1ed1311df227de86 ] - -When using WEP, the default unicast key needs to be selected, instead of -the STA PTK. - -Signed-off-by: Felix Fietkau -Link: https://lore.kernel.org/r/20201218184718.93650-5-nbd@nbd.name -Signed-off-by: Johannes Berg -Signed-off-by: Sasha Levin ---- - net/mac80211/rx.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -4019,6 +4019,8 @@ void ieee80211_check_fast_rx(struct sta_ - - rcu_read_lock(); - key = rcu_dereference(sta->ptk[sta->ptk_idx]); -+ if (!key) -+ key = rcu_dereference(sdata->default_unicast_key); - if (key) { - switch (key->conf.cipher) { - case WLAN_CIPHER_SUITE_TKIP: diff --git a/package/kernel/mac80211/patches/subsys/372-mac80211-fix-station-rate-table-updates-on-assoc.patch b/package/kernel/mac80211/patches/subsys/372-mac80211-fix-station-rate-table-updates-on-assoc.patch deleted file mode 100644 index 693904b495..0000000000 --- a/package/kernel/mac80211/patches/subsys/372-mac80211-fix-station-rate-table-updates-on-assoc.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 1d3a84f92f75bb0c2f981a75f507f55afed12f2c Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Mon, 1 Feb 2021 09:33:24 +0100 -Subject: [PATCH] mac80211: fix station rate table updates on assoc - -commit 18fe0fae61252b5ae6e26553e2676b5fac555951 upstream. - -If the driver uses .sta_add, station entries are only uploaded after the sta -is in assoc state. Fix early station rate table updates by deferring them -until the sta has been uploaded. - -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau -Link: https://lore.kernel.org/r/20210201083324.3134-1-nbd@nbd.name -[use rcu_access_pointer() instead since we won't dereference here] -Signed-off-by: Johannes Berg -Signed-off-by: Greg Kroah-Hartman ---- - net/mac80211/driver-ops.c | 5 ++++- - net/mac80211/rate.c | 3 ++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/net/mac80211/driver-ops.c -+++ b/net/mac80211/driver-ops.c -@@ -128,8 +128,11 @@ int drv_sta_state(struct ieee80211_local - } else if (old_state == IEEE80211_STA_AUTH && - new_state == IEEE80211_STA_ASSOC) { - ret = drv_sta_add(local, sdata, &sta->sta); -- if (ret == 0) -+ if (ret == 0) { - sta->uploaded = true; -+ if (rcu_access_pointer(sta->sta.rates)) -+ drv_sta_rate_tbl_update(local, sdata, &sta->sta); -+ } - } else if (old_state == IEEE80211_STA_ASSOC && - new_state == IEEE80211_STA_AUTH) { - drv_sta_remove(local, sdata, &sta->sta); ---- a/net/mac80211/rate.c -+++ b/net/mac80211/rate.c -@@ -941,7 +941,8 @@ int rate_control_set_rates(struct ieee80 - if (old) - kfree_rcu(old, rcu_head); - -- drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta); -+ if (sta->uploaded) -+ drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta); - - ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta)); - diff --git a/package/kernel/mac80211/patches/subsys/373-mac80211-fix-potential-overflow-when-multiplying-to-.patch b/package/kernel/mac80211/patches/subsys/373-mac80211-fix-potential-overflow-when-multiplying-to-.patch deleted file mode 100644 index f5d9d843f5..0000000000 --- a/package/kernel/mac80211/patches/subsys/373-mac80211-fix-potential-overflow-when-multiplying-to-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 2a4b99ffcda9f6739d4deb7bd7d2e0ed8444dda7 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Fri, 5 Feb 2021 17:53:52 +0000 -Subject: [PATCH] mac80211: fix potential overflow when multiplying to u32 - integers - -[ Upstream commit 6194f7e6473be78acdc5d03edd116944bdbb2c4e ] - -The multiplication of the u32 variables tx_time and estimated_retx is -performed using a 32 bit multiplication and the result is stored in -a u64 result. This has a potential u32 overflow issue, so avoid this -by casting tx_time to a u64 to force a 64 bit multiply. - -Addresses-Coverity: ("Unintentional integer overflow") -Fixes: 050ac52cbe1f ("mac80211: code for on-demand Hybrid Wireless Mesh Protocol") -Signed-off-by: Colin Ian King -Link: https://lore.kernel.org/r/20210205175352.208841-1-colin.king@canonical.com -Signed-off-by: Johannes Berg -Signed-off-by: Sasha Levin ---- - net/mac80211/mesh_hwmp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/net/mac80211/mesh_hwmp.c -+++ b/net/mac80211/mesh_hwmp.c -@@ -355,7 +355,7 @@ static u32 airtime_link_metric_get(struc - */ - tx_time = (device_constant + 10 * test_frame_len / rate); - estimated_retx = ((1 << (2 * ARITH_SHIFT)) / (s_unit - err)); -- result = (tx_time * estimated_retx) >> (2 * ARITH_SHIFT); -+ result = ((u64)tx_time * estimated_retx) >> (2 * ARITH_SHIFT); - return (u32)result; - } - diff --git a/package/kernel/mac80211/patches/subsys/374-mac80211-fix-rate-mask-reset.patch b/package/kernel/mac80211/patches/subsys/374-mac80211-fix-rate-mask-reset.patch deleted file mode 100644 index 36d5bee123..0000000000 --- a/package/kernel/mac80211/patches/subsys/374-mac80211-fix-rate-mask-reset.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4311a94e7598ca19311b04eb965556b5bb33accd Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Fri, 12 Feb 2021 11:22:14 +0100 -Subject: [PATCH] mac80211: fix rate mask reset - -[ Upstream commit 1944015fe9c1d9fa5e9eb7ffbbb5ef8954d6753b ] - -Coverity reported the strange "if (~...)" condition that's -always true. It suggested that ! was intended instead of ~, -but upon further analysis I'm convinced that what really was -intended was a comparison to 0xff/0xffff (in HT/VHT cases -respectively), since this indicates that all of the rates -are enabled. - -Change the comparison accordingly. - -I'm guessing this never really mattered because a reset to -not having a rate mask is basically equivalent to having a -mask that enables all rates. - -Reported-by: Colin Ian King -Fixes: 2ffbe6d33366 ("mac80211: fix and optimize MCS mask handling") -Fixes: b119ad6e726c ("mac80211: add rate mask logic for vht rates") -Reviewed-by: Colin Ian King -Link: https://lore.kernel.org/r/20210212112213.36b38078f569.I8546a20c80bc1669058eb453e213630b846e107b@changeid -Signed-off-by: Johannes Berg -Signed-off-by: Sasha Levin ---- - net/mac80211/cfg.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -2779,14 +2779,14 @@ static int ieee80211_set_bitrate_mask(st - continue; - - for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) { -- if (~sdata->rc_rateidx_mcs_mask[i][j]) { -+ if (sdata->rc_rateidx_mcs_mask[i][j] != 0xff) { - sdata->rc_has_mcs_mask[i] = true; - break; - } - } - - for (j = 0; j < NL80211_VHT_NSS_MAX; j++) { -- if (~sdata->rc_rateidx_vht_mcs_mask[i][j]) { -+ if (sdata->rc_rateidx_vht_mcs_mask[i][j] != 0xffff) { - sdata->rc_has_vht_mcs_mask[i] = true; - break; - } diff --git a/package/kernel/mac80211/patches/subsys/375-mac80211-fix-double-free-in-ibss_leave.patch b/package/kernel/mac80211/patches/subsys/375-mac80211-fix-double-free-in-ibss_leave.patch deleted file mode 100644 index e5245811bc..0000000000 --- a/package/kernel/mac80211/patches/subsys/375-mac80211-fix-double-free-in-ibss_leave.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 7da363fba2fc8526dbf3f966bac6f03fec98f095 Mon Sep 17 00:00:00 2001 -From: Markus Theil -Date: Sat, 13 Feb 2021 14:36:53 +0100 -Subject: [PATCH] mac80211: fix double free in ibss_leave - -commit 3bd801b14e0c5d29eeddc7336558beb3344efaa3 upstream. - -Clear beacon ie pointer and ie length after free -in order to prevent double free. - -================================================================== -BUG: KASAN: double-free or invalid-free \ -in ieee80211_ibss_leave+0x83/0xe0 net/mac80211/ibss.c:1876 - -CPU: 0 PID: 8472 Comm: syz-executor100 Not tainted 5.11.0-rc6-syzkaller #0 -Call Trace: - __dump_stack lib/dump_stack.c:79 [inline] - dump_stack+0x107/0x163 lib/dump_stack.c:120 - print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:230 - kasan_report_invalid_free+0x51/0x80 mm/kasan/report.c:355 - ____kasan_slab_free+0xcc/0xe0 mm/kasan/common.c:341 - kasan_slab_free include/linux/kasan.h:192 [inline] - __cache_free mm/slab.c:3424 [inline] - kfree+0xed/0x270 mm/slab.c:3760 - ieee80211_ibss_leave+0x83/0xe0 net/mac80211/ibss.c:1876 - rdev_leave_ibss net/wireless/rdev-ops.h:545 [inline] - __cfg80211_leave_ibss+0x19a/0x4c0 net/wireless/ibss.c:212 - __cfg80211_leave+0x327/0x430 net/wireless/core.c:1172 - cfg80211_leave net/wireless/core.c:1221 [inline] - cfg80211_netdev_notifier_call+0x9e8/0x12c0 net/wireless/core.c:1335 - notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 - call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2040 - call_netdevice_notifiers_extack net/core/dev.c:2052 [inline] - call_netdevice_notifiers net/core/dev.c:2066 [inline] - __dev_close_many+0xee/0x2e0 net/core/dev.c:1586 - __dev_close net/core/dev.c:1624 [inline] - __dev_change_flags+0x2cb/0x730 net/core/dev.c:8476 - dev_change_flags+0x8a/0x160 net/core/dev.c:8549 - dev_ifsioc+0x210/0xa70 net/core/dev_ioctl.c:265 - dev_ioctl+0x1b1/0xc40 net/core/dev_ioctl.c:511 - sock_do_ioctl+0x148/0x2d0 net/socket.c:1060 - sock_ioctl+0x477/0x6a0 net/socket.c:1177 - vfs_ioctl fs/ioctl.c:48 [inline] - __do_sys_ioctl fs/ioctl.c:753 [inline] - __se_sys_ioctl fs/ioctl.c:739 [inline] - __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 - do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 - entry_SYSCALL_64_after_hwframe+0x44/0xa9 - -Reported-by: syzbot+93976391bf299d425f44@syzkaller.appspotmail.com -Signed-off-by: Markus Theil -Link: https://lore.kernel.org/r/20210213133653.367130-1-markus.theil@tu-ilmenau.de -Signed-off-by: Johannes Berg -Signed-off-by: Greg Kroah-Hartman ---- - net/mac80211/ibss.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/mac80211/ibss.c -+++ b/net/mac80211/ibss.c -@@ -1869,6 +1869,8 @@ int ieee80211_ibss_leave(struct ieee8021 - - /* remove beacon */ - kfree(sdata->u.ibss.ie); -+ sdata->u.ibss.ie = NULL; -+ sdata->u.ibss.ie_len = 0; - - /* on the next join, re-program HT parameters */ - memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa)); diff --git a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch index ebf46c6a4c..147eb6edcc 100644 --- a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2458,6 +2458,19 @@ static int ieee80211_get_tx_power(struct +@@ -2460,6 +2460,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3847,6 +3860,7 @@ const struct cfg80211_ops mac80211_confi +@@ -3849,6 +3862,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, From 37590aa02a53d4aec9d12cf6fbf3f4a7a80b517a Mon Sep 17 00:00:00 2001 From: Alan Swanson Date: Tue, 27 Apr 2021 16:24:05 +0100 Subject: [PATCH 10/18] dnsmasq: Update to version 2.85 Fixes issue with merged DNS requests in 2.83/2.84 not being retried on the firsts failed request causing lookup failures. Also fixes the following security problem in dnsmasq: * CVE-2021-3448: If specifiying the source address or interface to be used when contacting upstream name servers such as: server=8.8.8.8@1.2.3.4, server=8.8.8.8@1.2.3.4#66 and server=8.8.8.8@eth0 then all would use the same socket bound to the explicitly configured port. Now only server=8.8.8.8@1.2.3.4#66 will use the explicitly configured port and the others random source ports. Remove upstreamed patches and update remaining patch. Signed-off-by: Alan Swanson [refreshed old runtime support patch] Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/Makefile | 4 ++-- ...00-remove-old-runtime-kernel-support.patch | 21 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index fcba34c7fe..b1d41fe86a 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.84 +PKG_VERSION:=2.85 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=603195c64b73137609b07e1024ae0b37f652b2f5fe467dce66985b3d1850050c +PKG_HASH:=ad98d3803df687e5b938080f3d25c628fe41c878752d03fbc6199787fee312fa PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index bd11806ae0..b601bce1a9 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -1,4 +1,4 @@ -From 7df4c681678612d196b4e1eec24963d181fdb28a Mon Sep 17 00:00:00 2001 +From 02fbe60e1c7e74d2ba57109575e7bfc238b1b5d4 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sun, 5 Apr 2020 17:18:23 +0100 Subject: [PATCH] drop runtime old kernel support @@ -8,9 +8,8 @@ Signed-off-by: Kevin Darbyshire-Bryant src/dnsmasq.c | 4 ---- src/dnsmasq.h | 5 +--- src/ipset.c | 64 ++++----------------------------------------------- - src/netlink.c | 3 +-- src/util.c | 19 --------------- - 5 files changed, 6 insertions(+), 89 deletions(-) + 4 files changed, 5 insertions(+), 87 deletions(-) --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -27,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1125,7 +1125,7 @@ extern struct daemon { +@@ -1144,7 +1144,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -36,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1306,9 +1306,6 @@ int read_write(int fd, unsigned char *pa +@@ -1326,9 +1326,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -139,18 +138,6 @@ Signed-off-by: Kevin Darbyshire-Bryant if (ret == -1) my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); ---- a/src/netlink.c -+++ b/src/netlink.c -@@ -92,8 +92,7 @@ char *netlink_init(void) - iov.iov_len = 100; - iov.iov_base = safe_malloc(iov.iov_len); - -- if (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && -- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) -+ if (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) - return _("warning: failed to set NETLINK_NO_ENOBUFS on netlink socket"); - - return NULL; --- a/src/util.c +++ b/src/util.c @@ -786,22 +786,3 @@ int wildcard_matchn(const char* wildcard From d887cecd15a4646a0f1012da2d651ecbf678331a Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 5 May 2021 21:02:05 +0800 Subject: [PATCH 11/18] dnsmasq: refresh patches --- .../dnsmasq/patches/910-mini-ttl.patch | 18 +++++------ .../patches/911-dnsmasq-filter-aaaa.patch | 30 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package/network/services/dnsmasq/patches/910-mini-ttl.patch b/package/network/services/dnsmasq/patches/910-mini-ttl.patch index f6988f4f5c..88e7bbe383 100644 --- a/package/network/services/dnsmasq/patches/910-mini-ttl.patch +++ b/package/network/services/dnsmasq/patches/910-mini-ttl.patch @@ -1,6 +1,6 @@ --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1042,7 +1042,7 @@ extern struct daemon { +@@ -1059,7 +1059,7 @@ extern struct daemon { int max_logs; /* queue limit */ int cachesize, ftabsize; int port, query_port, min_port, max_port; @@ -11,15 +11,15 @@ struct dhcp_context *dhcp, *dhcp6; --- a/src/option.c +++ b/src/option.c -@@ -168,6 +168,7 @@ struct myoption { - #define LOPT_SINGLE_PORT 359 - #define LOPT_SCRIPT_TIME 360 +@@ -170,6 +170,7 @@ struct myoption { #define LOPT_PXE_VENDOR 361 -+#define LOPT_MINTTL 362 + #define LOPT_DYNHOST 362 + #define LOPT_LOG_DEBUG 363 ++#define LOPT_MINTTL 364 #ifdef HAVE_GETOPT_LONG static const struct option opts[] = -@@ -286,6 +287,7 @@ static const struct myoption opts[] = +@@ -288,6 +289,7 @@ static const struct myoption opts[] = { "dhcp-name-match", 1, 0, LOPT_NAME_MATCH }, { "dhcp-broadcast", 2, 0, LOPT_BROADCAST }, { "neg-ttl", 1, 0, LOPT_NEGTTL }, @@ -27,7 +27,7 @@ { "max-ttl", 1, 0, LOPT_MAXTTL }, { "min-cache-ttl", 1, 0, LOPT_MINCTTL }, { "max-cache-ttl", 1, 0, LOPT_MAXCTTL }, -@@ -413,6 +415,7 @@ static struct { +@@ -417,6 +419,7 @@ static struct { { 't', ARG_ONE, "", gettext_noop("Specify default target in an MX record."), NULL }, { 'T', ARG_ONE, "", gettext_noop("Specify time-to-live in seconds for replies from /etc/hosts."), NULL }, { LOPT_NEGTTL, ARG_ONE, "", gettext_noop("Specify time-to-live in seconds for negative caching."), NULL }, @@ -35,7 +35,7 @@ { LOPT_MAXTTL, ARG_ONE, "", gettext_noop("Specify time-to-live in seconds for maximum TTL to send to clients."), NULL }, { LOPT_MAXCTTL, ARG_ONE, "", gettext_noop("Specify time-to-live ceiling for cache."), NULL }, { LOPT_MINCTTL, ARG_ONE, "", gettext_noop("Specify time-to-live floor for cache."), NULL }, -@@ -2823,6 +2826,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma +@@ -2835,6 +2838,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma case 'T': /* --local-ttl */ case LOPT_NEGTTL: /* --neg-ttl */ @@ -43,7 +43,7 @@ case LOPT_MAXTTL: /* --max-ttl */ case LOPT_MINCTTL: /* --min-cache-ttl */ case LOPT_MAXCTTL: /* --max-cache-ttl */ -@@ -2834,6 +2838,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma +@@ -2846,6 +2850,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ret_err(gen_err); else if (option == LOPT_NEGTTL) daemon->neg_ttl = (unsigned long)ttl; diff --git a/package/network/services/dnsmasq/patches/911-dnsmasq-filter-aaaa.patch b/package/network/services/dnsmasq/patches/911-dnsmasq-filter-aaaa.patch index 8e8af93820..42f69957bb 100644 --- a/package/network/services/dnsmasq/patches/911-dnsmasq-filter-aaaa.patch +++ b/package/network/services/dnsmasq/patches/911-dnsmasq-filter-aaaa.patch @@ -11,35 +11,35 @@ Subject: [PATCH] add filter-aaaa option --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -269,7 +269,8 @@ - #define OPT_IGNORE_CLID 59 +@@ -270,7 +270,8 @@ struct event_desc { #define OPT_SINGLE_PORT 60 #define OPT_LEASE_RENEW 61 --#define OPT_LAST 62 -+#define OPT_FILTER_AAAA 62 -+#define OPT_LAST 63 + #define OPT_LOG_DEBUG 62 +-#define OPT_LAST 63 ++#define OPT_FILTER_AAAA 63 ++#define OPT_LAST 64 #define OPTION_BITS (sizeof(unsigned int)*8) #define OPTION_SIZE ( (OPT_LAST/OPTION_BITS)+((OPT_LAST%OPTION_BITS)!=0) ) --- a/src/option.c +++ b/src/option.c -@@ -169,6 +169,7 @@ struct myoption { - #define LOPT_SCRIPT_TIME 360 - #define LOPT_PXE_VENDOR 361 - #define LOPT_MINTTL 362 -+#define LOPT_FILTER_AAAA 363 +@@ -171,6 +171,7 @@ struct myoption { + #define LOPT_DYNHOST 362 + #define LOPT_LOG_DEBUG 363 + #define LOPT_MINTTL 364 ++#define LOPT_FILTER_AAAA 365 #ifdef HAVE_GETOPT_LONG static const struct option opts[] = -@@ -343,6 +344,7 @@ static const struct myoption opts[] = - { "dumpfile", 1, 0, LOPT_DUMPFILE }, - { "dumpmask", 1, 0, LOPT_DUMPMASK }, +@@ -347,6 +348,7 @@ static const struct myoption opts[] = { "dhcp-ignore-clid", 0, 0, LOPT_IGNORE_CLID }, + { "dynamic-host", 1, 0, LOPT_DYNHOST }, + { "log-debug", 0, 0, LOPT_LOG_DEBUG }, + { "filter-aaaa", 0, 0, LOPT_FILTER_AAAA }, { NULL, 0, 0, 0 } }; -@@ -524,6 +526,7 @@ static struct { +@@ -530,6 +532,7 @@ static struct { { LOPT_DUMPFILE, ARG_ONE, "", gettext_noop("Path to debug packet dump file"), NULL }, { LOPT_DUMPMASK, ARG_ONE, "", gettext_noop("Mask which packets to dump"), NULL }, { LOPT_SCRIPT_TIME, OPT_LEASE_RENEW, NULL, gettext_noop("Call dhcp-script when lease expiry changes."), NULL }, @@ -49,7 +49,7 @@ Subject: [PATCH] add filter-aaaa option --- a/src/rfc1035.c +++ b/src/rfc1035.c -@@ -1926,6 +1926,16 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, +@@ -1913,6 +1913,16 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, } } From 0aaa145e349cb5524d4f3bce50c67ddcea089db1 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 5 May 2021 22:27:36 +0800 Subject: [PATCH 12/18] qt: add missing dependencies Signed-off-by: Tianling Shen --- package/lean/qt5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/qt5/Makefile b/package/lean/qt5/Makefile index ee3794ffb9..595bc2e587 100644 --- a/package/lean/qt5/Makefile +++ b/package/lean/qt5/Makefile @@ -15,7 +15,7 @@ QT5_VERSION_PATCH:=2 PKG_NAME:=qt5 PKG_VERSION:=$(QT5_VERSION_MAJOR_MINOR)$(if $(QT5_VERSION_PATCH),.$(QT5_VERSION_PATCH)) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=qt-everywhere-src-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://mirrors.tencent.com/qt/archive/qt/$(QT5_VERSION_MAJOR_MINOR)/$(PKG_VERSION)/single/ \ @@ -60,7 +60,7 @@ endef define Package/qt5-network $(call Package/qt5/Default) TITLE+=network - DEPENDS+=+qt5-core +libopenssl + DEPENDS+=+qt5-core +krb5-libs +libopenssl endef define Package/qt5-sql From b1723be7bfbe549de24b6c0c48163486626fd34d Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 3 May 2021 03:40:13 +0800 Subject: [PATCH 13/18] luci-app-ssr-plus: add basic ss server support Signed-off-by: Tianling Shen Co-authored-by: Mattraks --- package/lean/luci-app-ssr-plus/Makefile | 16 ++++- .../model/cbi/shadowsocksr/server-config.lua | 38 ++++++++++ .../luasrc/model/cbi/shadowsocksr/server.lua | 34 ++++++++- .../root/etc/init.d/shadowsocksr | 72 ++++++++++++------- 4 files changed, 131 insertions(+), 29 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 8336036b93..92d09a5efd 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,14 +2,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=184 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2 \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs \ @@ -27,7 +29,9 @@ LUCI_DEPENDS:=+coreutils +coreutils-base64 +dns2socks +dnsmasq-full +ipset +ip-f +PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2:redsocks2 \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-local \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server:shadowsocks-libev-ss-server \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust:shadowsocks-rust-sslocal \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR:shadowsocksr-libev-ssr-local \ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR:shadowsocksr-libev-ssr-redir \ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-ssr-server \ @@ -55,18 +59,26 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks bool "Include Shadowsocks Libev" default y +config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server + bool "Include Shadowsocks Server" + default y if i386||x86_64||arm + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust bool "Include Shadowsocks Rust (AEAD cipher only)" depends on aarch64||arm||i386||mips||mipsel||x86_64 default y if aarch64 +config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server + bool "Include Shadowsocks Rust Server" + default y if aarch64 + config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR bool "Include ShadowsocksR Libev" default y config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server bool "Include ShadowsocksR Server" - default y if aarch64||arm||i386||x86_64 + default n config PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs bool "Include Shadowsocks Simple Obfs Plugin" diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua index 1fe01f5182..fe3fc4b22e 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua @@ -32,6 +32,32 @@ local encrypt_methods = { "chacha20-ietf" } +local encrypt_methods_ss = { + -- aead + "aes-128-gcm", + "aes-192-gcm", + "aes-256-gcm", + "chacha20-ietf-poly1305", + "xchacha20-ietf-poly1305" + --[[ stream + "table", + "rc4", + "rc4-md5", + "aes-128-cfb", + "aes-192-cfb", + "aes-256-cfb", + "aes-128-ctr", + "aes-192-ctr", + "aes-256-ctr", + "bf-cfb", + "camellia-128-cfb", + "camellia-192-cfb", + "camellia-256-cfb", + "salsa20", + "chacha20", + "chacha20-ietf" ]] +} + local protocol = {"origin"} obfs = {"plain", "http_simple", "http_post"} @@ -55,6 +81,9 @@ o.rmempty = false o = s:option(ListValue, "type", translate("Server Type")) o:value("socks5", translate("Socks5")) +if nixio.fs.access("/usr/bin/ssserver") or nixio.fs.access("/usr/bin/ss-server") then + o:value("ss", translate("Shadowsocks")) +end if nixio.fs.access("/usr/bin/ssr-server") then o:value("ssr", translate("ShadowsocksR")) end @@ -71,6 +100,7 @@ o = s:option(Value, "timeout", translate("Connection Timeout")) o.datatype = "uinteger" o.default = 60 o.rmempty = false +o:depends("type", "ss") o:depends("type", "ssr") o = s:option(Value, "username", translate("Username")) @@ -88,6 +118,13 @@ end o.rmempty = false o:depends("type", "ssr") +o = s:option(ListValue, "encrypt_method_ss", translate("Encrypt Method")) +for _, v in ipairs(encrypt_methods_ss) do + o:value(v) +end +o.rmempty = false +o:depends("type", "ss") + o = s:option(ListValue, "protocol", translate("Protocol")) for _, v in ipairs(protocol) do o:value(v) @@ -107,6 +144,7 @@ o:depends("type", "ssr") o = s:option(Flag, "fast_open", translate("TCP Fast Open")) o.rmempty = false +o:depends("type", "ss") o:depends("type", "ssr") return m diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua index d8c3565d33..9af220c5e0 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua @@ -28,6 +28,32 @@ local encrypt_methods = { "chacha20-ietf" } +local encrypt_methods_ss = { + -- aead + "aes-128-gcm", + "aes-192-gcm", + "aes-256-gcm", + "chacha20-ietf-poly1305", + "xchacha20-ietf-poly1305" + --[[ stream + "table", + "rc4", + "rc4-md5", + "aes-128-cfb", + "aes-192-cfb", + "aes-256-cfb", + "aes-128-ctr", + "aes-192-ctr", + "aes-256-ctr", + "bf-cfb", + "camellia-128-cfb", + "camellia-192-cfb", + "camellia-256-cfb", + "salsa20", + "chacha20", + "chacha20-ietf" ]] +} + local protocol = { "origin", "verify_deflate", @@ -76,7 +102,7 @@ o.rmempty = false o = sec:option(DummyValue, "type", translate("Server Type")) function o.cfgvalue(...) - return Value.cfgvalue(...) or "ssr" + return Value.cfgvalue(...) or "ss" end o = sec:option(DummyValue, "server_port", translate("Server Port")) @@ -95,6 +121,12 @@ function o.cfgvalue(...) return v and v:upper() or "-" end +o = sec:option(DummyValue, "encrypt_method_ss", translate("Encrypt Method")) +function o.cfgvalue(...) + local v = Value.cfgvalue(...) + return v and v:upper() or "-" +end + o = sec:option(DummyValue, "protocol", translate("Protocol")) function o.cfgvalue(...) return Value.cfgvalue(...) or "-" diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index a690454727..90a2109eb1 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -22,7 +22,6 @@ tcp_config_file= udp_config_file= shunt_config_file= local_config_file= -server_config_file= shunt_dns_config_file= tmp_local_port= ARG_UDP= @@ -228,26 +227,43 @@ start_dns() { } gen_service_file() { - if [ $(uci_get_by_name $1 fast_open) == "1" ]; then - fastopen="true" + if [ $(uci_get_by_name $2 fast_open) == "1" ]; then + local fastopen="true" else - fastopen="false" + local fastopen="false" + fi + if [ $1 == "ssr" ]; then + cat <<-EOF >$3 + { + "server": "0.0.0.0", + "server_ipv6": "::", + "server_port": $(uci_get_by_name $2 server_port), + "mode": "tcp_and_udp", + "password": "$(uci_get_by_name $2 password)", + "timeout": $(uci_get_by_name $2 timeout 60), + "method": "$(uci_get_by_name $2 encrypt_method)", + "protocol": "$(uci_get_by_name $2 protocol)", + "protocol_param": "$(uci_get_by_name $2 protocol_param)", + "obfs": "$(uci_get_by_name $2 obfs)", + "obfs_param": "$(uci_get_by_name $2 obfs_param)", + "fast_open": $fastopen + } + EOF + else + cat <<-EOF >$3 + { + "server": "0.0.0.0", + "server_ipv6": "::", + "server_port": $(uci_get_by_name $2 server_port), + "mode": "tcp_and_udp", + "password": "$(uci_get_by_name $2 password)", + "timeout": $(uci_get_by_name $2 timeout 60), + "method": "$(uci_get_by_name $2 encrypt_method_ss)", + "protocol": "socks", + "fast_open": $fastopen + } + EOF fi - cat <<-EOF >$2 - { - "server": "0.0.0.0", - "server_ipv6": "::", - "server_port": $(uci_get_by_name $1 server_port), - "password": "$(uci_get_by_name $1 password)", - "timeout": $(uci_get_by_name $1 timeout 60), - "method": "$(uci_get_by_name $1 encrypt_method)", - "protocol": "$(uci_get_by_name $1 protocol)", - "protocol_param": "$(uci_get_by_name $1 protocol_param)", - "obfs": "$(uci_get_by_name $1 obfs)", - "obfs_param": "$(uci_get_by_name $1 obfs_param)", - "fast_open": $fastopen - } - EOF } get_name() { @@ -674,15 +690,19 @@ start_server() { iptables -N SSR-SERVER-RULE && iptables -t filter -I INPUT -j SSR-SERVER-RULE fi fi - if [ "$(uci_get_by_name $1 type ssr)" == "ssr" ]; then - gen_service_file $1 $server_config_file/ssr-server$server_count.json - ln_start_bin $(first_type ssr-server) ssr-server -c $server_config_file/ssr-server$server_count.json -u - echolog "Server:ShadowsocksR Server$server_count Started!" - else + local type=$(uci_get_by_name $1 type) + case "$type" in + ss | ssr) + gen_service_file ${type} $1 $TMP_PATH/ssr-server$server_count.json + ln_start_bin $(first_type ${type}server ${type}-server) ${type}-server -c $TMP_PATH/ssr-server$server_count.json + echolog "Server: $(get_name ${type}) Server$server_count Started!" + ;; + socks5) [ -e /proc/sys/net/ipv6 ] && local listenip='-i ::' ln_start_bin $(first_type microsocks) microsocks $listenip -p $(uci_get_by_name $1 server_port) -1 -u $(uci_get_by_name $1 username) -P $(uci_get_by_name $1 password) ssr-server$server_count echolog "Server:Socks5 Server$server_count Started!" - fi + ;; + esac iptables -t filter -A SSR-SERVER-RULE -p tcp --dport $(uci_get_by_name $1 server_port) -j ACCEPT iptables -t filter -A SSR-SERVER-RULE -p udp --dport $(uci_get_by_name $1 server_port) -j ACCEPT return 0 @@ -851,7 +871,7 @@ stop() { killall -q -9 v2ray-plugin obfs-local xray-plugin rm -f /var/lock/ssr-monitor.lock if [ -f "/var/dnsmasq.d/dnsmasq-ssrplus.conf" ]; then - rm -rf /var/dnsmasq.d/dnsmasq-ssrplus.conf $TMP_DNSMASQ_PATH $TMP_PATH/*-ssr-*.json + rm -rf /var/dnsmasq.d/dnsmasq-ssrplus.conf $TMP_DNSMASQ_PATH $TMP_PATH/*-ssr-*.json $TMP_PATH/ssr-server*.json /etc/init.d/dnsmasq restart >/dev/null 2>&1 fi del_cron From 5f0f4cb2b0d9d85f316a361afadb82cd40712552 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 7 May 2021 17:24:17 +0800 Subject: [PATCH 14/18] target: update wget pkg name Signed-off-by: Tianling Shen --- include/target.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index de9fb5016b..05120e22e1 100644 --- a/include/target.mk +++ b/include/target.mk @@ -11,7 +11,7 @@ DEVICE_TYPE?=router # Default packages - the really basic set DEFAULT_PACKAGES:=base-files libc libgcc dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd \ -block-mount kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl ca-certificates \ +block-mount kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget-ssl libustream-openssl ca-certificates \ default-settings luci luci-app-ddns luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \ luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic \ luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \ From 4690eb00977b23b444691dc48154f814ef70835b Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Thu, 6 May 2021 14:51:29 +0800 Subject: [PATCH 15/18] luci-app-ssr-plus: add vless gRPC support Signed-off-by: Tianling Shen --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 6 ++++++ .../luasrc/view/shadowsocksr/ssrurl.htm | 3 +++ .../luci-app-ssr-plus/root/etc/ssrplus/china_ssr.txt | 4 ++-- .../luci-app-ssr-plus/root/etc/ssrplus/gfw_list.conf | 2 ++ .../root/usr/share/shadowsocksr/gen_config.lua | 9 +++++++-- .../root/usr/share/shadowsocksr/subscribe.lua | 3 +++ 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 0c2eae5457..90abeb591b 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -332,6 +332,7 @@ o:value("kcp", "mKCP") o:value("ws", "WebSocket") o:value("h2", "HTTP/2") o:value("quic", "QUIC") +o:value("grpc", "gRPC") o.rmempty = true o:depends("type", "v2ray") @@ -381,6 +382,11 @@ o = s:option(Value, "h2_path", translate("HTTP/2 Path")) o:depends("transport", "h2") o.rmempty = true +-- gRPC +o = s:option(Value, "serviceName", translate("serviceName")) +o:depends("transport", "grpc") +o.rmempty = true + -- [[ QUIC部分 ]]-- o = s:option(ListValue, "quic_security", translate("QUIC Security")) o:depends("transport", "quic") diff --git a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm index 106312812b..87f9211ee7 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm @@ -338,6 +338,9 @@ function import_ssr_url(btn, urlname, sid) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_security')[0].value = queryParam.quicSecurity || "none"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_key')[0].value = queryParam.key; break; + case "grpc": + document.getElementsByName('cbid.shadowsocksr.' + sid + '.serviceName')[0].value = queryParam.serviceName; + break; default: if (queryParam.security == "xtls") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.xtls')[0].checked = true; diff --git a/package/lean/luci-app-ssr-plus/root/etc/ssrplus/china_ssr.txt b/package/lean/luci-app-ssr-plus/root/etc/ssrplus/china_ssr.txt index a050aec670..6ab0c9fb16 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/ssrplus/china_ssr.txt +++ b/package/lean/luci-app-ssr-plus/root/etc/ssrplus/china_ssr.txt @@ -1712,7 +1712,6 @@ 59.153.116.0/22 59.153.136.0/22 59.153.152.0/22 -59.153.156.0/22 59.153.164.0/22 59.153.168.0/22 59.153.172.0/22 @@ -4144,6 +4143,8 @@ 103.166.50.0/23 103.166.52.0/23 103.166.54.0/23 +103.166.84.0/23 +103.166.138.0/23 103.192.0.0/22 103.192.4.0/22 103.192.8.0/22 @@ -4215,7 +4216,6 @@ 103.198.156.0/22 103.198.180.0/22 103.198.196.0/22 -103.198.200.0/22 103.198.216.0/22 103.198.220.0/22 103.198.224.0/22 diff --git a/package/lean/luci-app-ssr-plus/root/etc/ssrplus/gfw_list.conf b/package/lean/luci-app-ssr-plus/root/etc/ssrplus/gfw_list.conf index a03e3979b4..d4f8e80651 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/ssrplus/gfw_list.conf +++ b/package/lean/luci-app-ssr-plus/root/etc/ssrplus/gfw_list.conf @@ -9440,6 +9440,8 @@ server=/hpto.net/127.0.0.1#5335 ipset=/hpto.net/gfwlist server=/pricelesshonolulu.com/127.0.0.1#5335 ipset=/pricelesshonolulu.com/gfwlist +server=/facebook-hardware.com/127.0.0.1#5335 +ipset=/facebook-hardware.com/gfwlist server=/adblockplus.org/127.0.0.1#5335 ipset=/adblockplus.org/gfwlist server=/shopee.co.id/127.0.0.1#5335 diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 4ab0dd4df9..e60b69c37b 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -117,7 +117,7 @@ local Xray = { -- 底层传输配置 streamSettings = { network = server.transport or "tcp", - security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil, + security = (server.xtls == '1') and "xtls" or (server.tls == '1'or server.transport == "grpc") and "tls" or nil, tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and { -- tls fingerprint = server.fingerprint, @@ -169,9 +169,14 @@ local Xray = { security = server.quic_security, key = server.quic_key, header = {type = server.quic_guise} + } or nil, + grpcSettings = (server.transport == "grpc") and { + -- grpc + serviceName = server.serviceName or "", + multiMode = (server.mux == "1") and true or false } or nil }, - mux = (server.mux == "1" and server.xtls ~= "1") and { + mux = (server.mux == "1" and server.xtls ~= "1" and server.transport ~= "grpc") and { -- mux enabled = true, concurrency = tonumber(server.concurrency) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index f4a431c662..5bd2871c89 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -352,6 +352,9 @@ local function processData(szType, content) result.quic_key = params.key result.quic_security = params.quicSecurity or "none" end + if params.type == 'grpc' then + result.serviceName = params.serviceName + end if params.security == "tls" then result.tls = "1" result.tls_host = params.sni or host[1] From 6680b7efacb1e0d0613a634e914b5c95f60969bf Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 1 Feb 2021 13:08:51 +0100 Subject: [PATCH 16/18] mt76: update to the latest version 4ba1709 mt76: mt7603: add additional EEPROM chip ID Signed-off-by: David Bauer Signed-off-by: Tianling Shen --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 3d431b30b2..e6795174d0 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-03-10 -PKG_SOURCE_VERSION:=08054d5ab1350fcb8563feb90e6ab7f8f4a0a1b7 -PKG_MIRROR_HASH:=b41a3cab1485c68befb1dcb4c1e426d41705db1b2a57851dafd6e8f75eeea3d7 +PKG_SOURCE_DATE:=2021-02-01 +PKG_SOURCE_VERSION:=4ba1709c399b2f78ee987c1f0aff2b5da623244b +PKG_MIRROR_HASH:=c05975e8ba2baff5601d9e5a7b391d186814e249b4af35f61188c39704f48bda PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 From 72ff5718760d428d7466bf767c6b9b231e1aaa7a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 15 Feb 2021 01:21:18 +0100 Subject: [PATCH 17/18] mt76: update to the latest version 5c768de mt76: mt76x0: disable GTK offloading Signed-off-by: David Bauer Signed-off-by: Tianling Shen --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index e6795174d0..2e6b84d6e2 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-02-01 -PKG_SOURCE_VERSION:=4ba1709c399b2f78ee987c1f0aff2b5da623244b -PKG_MIRROR_HASH:=c05975e8ba2baff5601d9e5a7b391d186814e249b4af35f61188c39704f48bda +PKG_SOURCE_DATE:=2021-02-15 +PKG_SOURCE_VERSION:=5c768dec13389700ff3fa3d25083fb43d8e7adda +PKG_MIRROR_HASH:=2ef0cf233bedc20e77c61cd6dd6085e162cce5c2719b5285bcdd8bf92ebf88eb PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 From dabe73bc08e65643dade0b399928929243db6c40 Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 28 Jun 2020 22:04:50 +0300 Subject: [PATCH 18/18] kernel: video: add multimedia-input driver Signed-off-by: Lucian Cristian [rebase commit, apply review recommendations] Signed-off-by: AmadeusGhost [rebase commit, only apply generic part] Signed-off-by: Tianling Shen --- package/kernel/linux/modules/video.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 9acc19d470..65d1ed877e 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -221,6 +221,24 @@ endef $(eval $(call KernelPackage,fb-tft-ili9486)) +define KernelPackage/multimedia-input + SUBMENU:=$(VIDEO_MENU) + TITLE:=Multimedia input support + KCONFIG:=CONFIG_RC_CORE \ + CONFIG_LIRC=y \ + CONFIG_RC_DECODERS=y \ + CONFIG_RC_DEVICES=y + FILES:=$(LINUX_DIR)/drivers/media/rc/rc-core.ko + AUTOLOAD:=$(call AutoProbe,rc-core) +endef + +define KernelPackage/multimedia-input/description + Enable multimedia input. +endef + +$(eval $(call KernelPackage,multimedia-input)) + + define KernelPackage/drm SUBMENU:=$(VIDEO_MENU) TITLE:=Direct Rendering Manager (DRM) support