openwrt/staging/stintel.git
23 months agohostapd: enable coredumps
Felix Fietkau [Fri, 16 Dec 2022 12:09:36 +0000 (13:09 +0100)]
hostapd: enable coredumps

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agohostapd: always set a default for the nas identifier
Felix Fietkau [Fri, 16 Dec 2022 11:53:05 +0000 (12:53 +0100)]
hostapd: always set a default for the nas identifier

It is used for both 802.11r and WPA enterprise.
Setting it when not needed is harmless

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomac80211: work around a race condition on detecting a phy while bringing it up
Felix Fietkau [Fri, 16 Dec 2022 10:37:30 +0000 (11:37 +0100)]
mac80211: work around a race condition on detecting a phy while bringing it up

When reloading modules and running wifi, a phy can sometimes be renamed
while in the middle of a hotplug call that tries to detect new phys
This can lead to bogus wifi-device sections being created

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomac80211: fix uninitialized variable in rx->link/link_sta initialization fix
Felix Fietkau [Fri, 16 Dec 2022 10:12:51 +0000 (11:12 +0100)]
mac80211: fix uninitialized variable in rx->link/link_sta initialization fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agohostapd: add support for automatically setting RADIUS own-ip dynamically
Felix Fietkau [Thu, 15 Dec 2022 12:57:04 +0000 (13:57 +0100)]
hostapd: add support for automatically setting RADIUS own-ip dynamically

Some servers use the NAS-IP-Address attribute as a destination address

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:27:02 +0000 (00:27 +0100)]
rpcd: update to latest Git HEAD

7de4820 iwinfo: add "hwmodes_text" to the info output
b3f530b iwinfo: clean up rpc_iwinfo_call_hw_ht_mode()
c46ad61 iwinfo: reuse infos provided by libiwinfo
6c5e900 iwinfo: constify string map arg for rpc_iwinfo_call_int()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoiwinfo: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:18:08 +0000 (00:18 +0100)]
iwinfo: update to latest Git HEAD

8d15809 cli: print current HT mode
8f86dd6 cli: use IWINFO_HTMODE_COUNT
f36b72b cli: use IWINFO_KMGMT_NAMES
91be7e0 cli: use IWINFO_CIPHER_NAMES
49b6ec9 cli: fix printing the scan channel width
b1c8873 cli: fix marking the active channel
9e14e64 utils: add iwinfo_band2ghz() and iwinfo_ghz2band() helpers
e084781 utils: add helper functions to get names by values
d09a77a utils: add iwinfo_htmode_is_{ht|vht|he} helpers
8752977 utils: add and use iwinfo_format_hwmodes()
02f433e lib: add IWINFO_80211_COUNT and IWINFO_80211_NAMES
1d30df1 lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES
aefd0ef lib: use common IWINFO_CIPHER_NAMES strings
a5b30de lib: add IWINFO_OPMODE_COUNT and use it for IWINFO_OPMODE_NAMES
9f29e79 lib: constify and fixup the string array definitions
fddc015 nl80211: mark frequencies where HE operation in not allowed
6d50a7c nl80211: add support for HE htmodes
4ba5713 nl80211: properly get available bands for the hwmode
91b2ada nl80211: update the kernel header nl80211.h
3f619a5 nl80211: fix frequency/channel conversion for the 6G band
a77d915 nl80211: don't guess if a name is an ifname
c27ce71 devices: add usb device MediaTek MT7921AU
14f864e nl80211: add ability to describe USB devices
a5a75fd nl80211: remove ancient wpa_supplicant ctrl socket path
dd4e1ff nl80211: fix wpa supplicant ctrl socket permissions
d638163 fix -Wdangling-else warnings
4aa6c5a fix -Wreturn-type warning
3112726 fix -Wpointer-sign warning
ebd5f84 fix -Wmaybe-uninitialized warning
5469898 fix -Wunused-variable warnings
462b679 fix -Wduplicate-decl-specifier warnings
ccaabb4 fix -Wformat-truncation warnings
50380db enable useful compiler warnings via -Wall

Fixes: https://github.com/openwrt/openwrt/issues/10158
Fixes: https://github.com/openwrt/openwrt/issues/10687
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agorealtek: add Linux Kernel 5.15 as testing version
INAGAKI Hiroshi [Tue, 29 Mar 2022 05:50:13 +0000 (14:50 +0900)]
realtek: add Linux Kernel 5.15 as testing version

Add Linux Kernel 5.15 support for testing.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[APRESIA ApresiaLightGS120GT-SS, Panasonic Switch-M24eG PN28240K, Switch-M48eG PN28480K]
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
TP-Link TL-SG2008P
Tested-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[D-Link DGS-1210-20, DGS-1210-52, Zyxel XGS1010-12]
Tested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Zyxel XGS1250-12]
Tested-by: Lucian Cristian <lucian.cristian@gmail.com> # Zyxel
[HPE 1920-8G, 1920-48G]
Tested-by: Jan Hoffmann <jan@3e8.eu>
23 months agorealtek: enable needs_standalone_vlan_filtering on DSA driver in 5.15
INAGAKI Hiroshi [Mon, 4 Apr 2022 12:25:20 +0000 (21:25 +0900)]
realtek: enable needs_standalone_vlan_filtering on DSA driver in 5.15

To configure VLAN 0, enable needs_standalone_vlan_filtering option
of dsa_switch struct.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: update dsa.c of DSA driver for 5.15
INAGAKI Hiroshi [Wed, 1 Dec 2021 09:38:11 +0000 (18:38 +0900)]
realtek: update dsa.c of DSA driver for 5.15

- rtl83xx_vlan_filtering()

  "struct switchdev_trans *trans" parameter was removed[1] and
  "struct netlink_ext_ack *extack" was added[2].

[1]: https://www.spinics.net/lists/netdev/msg712250.html
[2]: https://www.spinics.net/lists/netdev/msg722496.html

- rtl83xx_vlan_add/del()

  vlan->vid_begin and vlan->vid_end were removed and vlan->vid was
  added[3].

[3]: https://www.spinics.net/lists/netdev/msg712248.html

- rtl83xx_vlan_prepare()

  "port_vlan_prepare" member was removed from "dsa_switch_ops" struct
  in dsa.h[4] and vlan_prepare function should be called from vlan_add
  function. Also, change return type of vlan_add function to int.

[4]: https://www.spinics.net/lists/netdev/msg712252.html

- rtl83xx_port_mdb_add()

  "port_mdb_prepare" member in "dsa_switch_ops" struct was removed and
  preparation need to be done in the function of "port_mdb_add" member
  instead. And also, int type need to be returned on "port_mdb_add"
  member[5].

[5]: https://www.spinics.net/lists/netdev/msg712251.html

- rtl83xx_port_pre_bridge_flags(), rtl83xx_port_bridge_flags()

  The current "port_pre_bridge_flags" member and "port_bridge_flags"
  member in "dsa_switch_ops" in dsa.h has flags of
  "struct switchdev_brport_flags" type instead[6], so adjust to it.
  And, the changed features are passed by flags.mask[7] in
  rtl83xx_port_bridge_flags(), so check it before calling function
  to enable/disable fieature.

[6]: https://lore.kernel.org/lkml/20210212151600.3357121-7-olteanv@gmail.com/
[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e18f4c18ab5b0dd47caaf8377c2e36d66f632a8c

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[shorten final return statement of rtl83xx_port_mdb_add()]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agorealtek: update platform support for 5.15
INAGAKI Hiroshi [Wed, 1 Dec 2021 03:25:54 +0000 (12:25 +0900)]
realtek: update platform support for 5.15

- fw_passed_dtb and others were replaced to get_fdt() function[1]
- __appended_dtb defined by asm/bootinfo.h[2]

[1]: https://www.spinics.net/lists/linux-mips/msg03332.html
[2]: https://www.spinics.net/lists/linux-mips/msg03332.html

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: refresh config-5.15 in all subtargets
INAGAKI Hiroshi [Fri, 9 Sep 2022 16:40:43 +0000 (01:40 +0900)]
realtek: refresh config-5.15 in all subtargets

Refresh config-5.15 in all subtargets by kernel_menuconfig.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: refresh patches in 5.15
INAGAKI Hiroshi [Fri, 9 Sep 2022 16:15:22 +0000 (01:15 +0900)]
realtek: refresh patches in 5.15

Adjust patches for kernel 5.15.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: drop patches of upstreamed fix and changes from 5.15
INAGAKI Hiroshi [Tue, 29 Mar 2022 06:15:07 +0000 (15:15 +0900)]
realtek: drop patches of upstreamed fix and changes from 5.15

- 007-5.16-gpio-realtek...: upstreamed on 5.16 and backported to 5.15.3
- 708-brflood-spi.patch   : upstreamed
- 709-lag-offloading.patch: upstreamed
- 713-v5.12-net-dsa-...   : upstreamed and some implementations are
                            replaced

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: drop patches of upstreamed drivers from 5.15
INAGAKI Hiroshi [Fri, 22 Jul 2022 13:05:51 +0000 (22:05 +0900)]
realtek: drop patches of upstreamed drivers from 5.15

The following drivers were upstreamed and available on 5.15, so drop
from OpenWrt tree.

- realtek-otto-gpio (5.13)
- realtek-rtl-spi (5.12)
- realtek-rtl-intc (5.12)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agorealtek: copy dts/files/patches/configs for 5.15
INAGAKI Hiroshi [Fri, 9 Sep 2022 13:08:16 +0000 (22:08 +0900)]
realtek: copy dts/files/patches/configs for 5.15

Copy dts/files/patches/configs from 5.10 to 5.15.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[refresh with updated DGS-1210 dts files]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agofirmware-utils: fix archive checksum
Sander Vanheule [Thu, 15 Dec 2022 16:44:38 +0000 (17:44 +0100)]
firmware-utils: fix archive checksum

PKG_SOURCE_DATE was modified after updating PKG_MIRROR_HASH, causing the
latter to change. This results in a warning during builds and rejected
downloads.

Fixes: 232879a7b7f8 ("firmware-utils: bump to git HEAD")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agoath79: fix dtc warnings in ruckus zf7372
Christian Lamparter [Thu, 15 Dec 2022 14:29:04 +0000 (15:29 +0100)]
ath79: fix dtc warnings in ruckus zf7372

|:69.4-14: Warning (reg_format): beamforming-2g-gpio@0:reg: property has invalid length (4 bytes)
|:85.4-14: Warning (reg_format): beamforming-5g-gpio@0:reg: property has invalid length (4 bytes)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: fix dtc warnings in eap1750h
Christian Lamparter [Thu, 15 Dec 2022 14:25:45 +0000 (15:25 +0100)]
ath79: fix dtc warnings in eap1750h

|109.3-19: Warning (reg_format): macaddr@0:reg:property has invalid length (8 bytes)
|113.3-24: Warning (reg_format): calibration@1000:reg: property has invalid length (8 bytes)
|117.3-24: Warning (reg_format): calibration@5000:reg: property has invalid length (8 bytes)

also integrate the art-nodes nodes back into the partition-subnode
and change the calibration labels to match what everyone else is
doing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: fix dtc warnings in eap1200h
Christian Lamparter [Thu, 15 Dec 2022 14:20:26 +0000 (15:20 +0100)]
ath79: fix dtc warnings in eap1200h

|109.3-19: Warning (reg_format): macaddr@0:reg:property has invalid length (8 bytes)
|113.3-24: Warning (reg_format): calibration@1000:reg: property has invalid length (8 bytes)
|117.3-24: Warning (reg_format): calibration@5000:reg: property has invalid length (8 bytes)

also integrate the art-nodes nodes back into the partition-subnode
and change the calibration labels to match what everyone else is
doing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: replace reference to legacy qca,disable-2ghz in WatchGuard AP100
Nick Hainke [Thu, 15 Dec 2022 09:45:24 +0000 (10:45 +0100)]
ath79: replace reference to legacy qca,disable-2ghz in WatchGuard AP100

Commit 4c8dd973ef8e ("ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit")
removed "qca,disable-5ghz" and "qca,disable-2ghz".

Signed-off-by: Nick Hainke <vincent@systemli.org>
(converted patch to remove the ieee80211-freq-limit property instead)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: switch to upstream ieee80211-freq-limit for Araknis AN-300-AP-I-N
Nick Hainke [Thu, 15 Dec 2022 09:41:47 +0000 (10:41 +0100)]
ath79: switch to upstream ieee80211-freq-limit for Araknis AN-300-AP-I-N

Commit 4c8dd973ef8e ("ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit")
removed "qca,disable-5ghz" and "qca,disable-2ghz". Switch to upstream
ieee80211-freq-limit.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoath79: convert Winchannel WB2000 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 09:08:39 +0000 (10:08 +0100)]
ath79: convert Winchannel WB2000 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(removed mtd-cal-data property, merged art + addr nodes back into
partition)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: convert Ubiquiti UniFi AP Pro WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:57:28 +0000 (09:57 +0100)]
ath79: convert Ubiquiti UniFi AP Pro WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art node back into partition-node)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: convert OCEDO Raccoon WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:54:57 +0000 (09:54 +0100)]
ath79: convert OCEDO Raccoon WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art into partition node, removed stale uboot label)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: Mercury MW4530R v1 already uses nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:50:39 +0000 (09:50 +0100)]
ath79: Mercury MW4530R v1 already uses nvmem-cells

Remove the caldata extraction in userspace. The board already uses
nvmem-cells since
commit e354b01baf88 ("ath79: calibrate all ar9344 tl-WDRxxxx with nvmem")

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:44:55 +0000 (09:44 +0100)]
ath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoath79: convert Atheros DB120 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:29:57 +0000 (09:29 +0100)]
ath79: convert Atheros DB120 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art-node back into partition-node)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoath79: convert Araknis AN-300-AP-I-N WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:20:22 +0000 (09:20 +0100)]
ath79: convert Araknis AN-300-AP-I-N WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agobcm27xx: bcm2711: add kmod-r8169
Johannes Heimansberg [Mon, 12 Dec 2022 14:39:58 +0000 (15:39 +0100)]
bcm27xx: bcm2711: add kmod-r8169

Some carrier boards [1][2] for the Raspberry Pi CM4 that are specifically
designed to be used as routers come with secondary NICs using a Realtek
RTL8111 Gigabit Ethernet chip.

When using such a board as a router with OpenWrt, it is very helpful
when both NICs are working by default. Since the Raspberry Pi 4 and the
CM4 have plenty of disk space, it should cause no harm to include the
kmod-r8169.

[1] https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767
[2] https://www.waveshare.com/wiki/CM4-DUAL-ETH-MINI

Signed-off-by: Johannes Heimansberg <git@jhe.dedyn.io>
(r8169 should pull in the necessary dependencies.)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agobcm53xx: Patch to support BCMA rev 11
Linus Walleij [Wed, 14 Dec 2022 00:15:48 +0000 (01:15 +0100)]
bcm53xx: Patch to support BCMA rev 11

A backported patch to the BCMA driver necessary to support the
DWL-8610AP and DIR-890L. Patch will be in upstream v6.2.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
23 months agofirmware-utils: bump to git HEAD
Sander Vanheule [Thu, 15 Dec 2022 13:24:25 +0000 (14:24 +0100)]
firmware-utils: bump to git HEAD

Adds support for building TP-Link CPE605v1 factory images

    bd856eff4850 tplink-safeloader: add TP-Link CPE605 v1 Support

Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agokernel: bump 5.10 to 5.10.159
John Audia [Wed, 14 Dec 2022 15:13:21 +0000 (10:13 -0500)]
kernel: bump 5.10 to 5.10.159

Removed upstreamed:
backport-5.10/888-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1]

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.159&id=0a8e66e375736ea12c11f0ef238ba2a8efec460b

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: bump 5.15 to 5.15.83
John Audia [Wed, 14 Dec 2022 15:11:04 +0000 (10:11 -0500)]
kernel: bump 5.15 to 5.15.83

Removed upstreamed:
backport-5.15/883-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1]

All patches automatically rebased

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.83&id=246bcd05ba6cc43b34ac0bb4bac3ea94a4efa07c

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agotools/dosfstools: fix PKG_SOURCE
Stijn Tintel [Wed, 14 Dec 2022 18:11:45 +0000 (20:11 +0200)]
tools/dosfstools: fix PKG_SOURCE

Both mirrors provided in the Makefile only serve gzipped tarballs.

Fixes: #10871
Fixes: 9edfe7dd13d9 ("source: Switch to xz for packages and tools where possible")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
23 months agokernel: add missing symbol to 5.10 config
Stijn Tintel [Wed, 14 Dec 2022 17:17:43 +0000 (19:17 +0200)]
kernel: add missing symbol to 5.10 config

Kernel 5.10.158 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 6801c460b6a7 ("kernel: bump 5.10 to 5.10.158")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
23 months agokernel: add missing symbol to 5.15 config
Stijn Tintel [Wed, 14 Dec 2022 17:10:48 +0000 (19:10 +0200)]
kernel: add missing symbol to 5.15 config

Kernel 5.15.82 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 68426e54eda4 ("kernel: bump 5.15 to 5.15.82")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
23 months agoqoriq: switch to kernel 5.15
Stijn Tintel [Wed, 14 Dec 2022 16:53:39 +0000 (18:53 +0200)]
qoriq: switch to kernel 5.15

The testing kernel has been running fine for months on a rather complex
network setup, with one exception being a crash in
__xfrm_state_delete(). This crash has been fixed in kernel 5.15.82, so
let's switch the qoriq target to kernel 5.15 by default.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
23 months agomac80211: fix connecting multiple wds stations to an AP
Felix Fietkau [Wed, 14 Dec 2022 12:53:40 +0000 (13:53 +0100)]
mac80211: fix connecting multiple wds stations to an AP

A faulty check prevented the AP_VLAN interfaces from being brought up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoipq806x: 5.15: standardize wpq864 partition table
Christian Marangi [Wed, 14 Dec 2022 01:17:24 +0000 (02:17 +0100)]
ipq806x: 5.15: standardize wpq864 partition table

Compex WPQ864 contains a non standard partition table. Each partition
node should be named partition and should contain a valid reg.
Fix an extra "-" present after the reg for SBL2_1 partition.

Also add "0:" to each qcom default partition following smem naming.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoipq806x: 5.15: fix wrong boot-partitions values for split partitions
Christian Marangi [Wed, 14 Dec 2022 01:11:49 +0000 (02:11 +0100)]
ipq806x: 5.15: fix wrong boot-partitions values for split partitions

The refreshed patch actually use the format of <start size start size>
instead of <start end start end>. This cause boot fail since the rootfs
can't be mounted with these wrong values.

Fix it to the correct format in each affected dts.

Fixes: #11498
Fixes: 6134ba4a34db ("ipq806x: 5.15: add boot-partitions binding to fix block warning")
Tested-by: Matt Buczko <mbuczko@hotmail.com> # Askey RT4230W
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agolibpcap: add support for B.A.T.M.A.N. Advanced
Linus Lüssing [Sun, 27 Nov 2022 15:27:47 +0000 (16:27 +0100)]
libpcap: add support for B.A.T.M.A.N. Advanced

This adds support for the layer 2 mesh routing protocol
B.A.T.M.A.N. Advanced. "batadv" can be used to filter on batman-adv
packets. It also allows later filters to look at frames inside the
tunnel when both "version" and "type" are specified.

Documentation for the batman-adv protocol can be found at the following
locations:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/batman-adv.rst
https://www.open-mesh.org/

--

This is a backport of the following upstream pull request:

https://github.com/the-tcpdump-group/libpcap/pull/980
-> "Add support for B.A.T.M.A.N. Advanced #980"

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
23 months agoath79: add support for TP-Link CPE605-v1
Andrew Cameron [Sun, 6 Nov 2022 14:43:37 +0000 (14:43 +0000)]
ath79: add support for TP-Link CPE605-v1

TP-Link CPE605-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on Atheros AR9344

Specifications:
 - 560/450/225 MHz (CPU/DDR/AHB)
 - 1x 10/100 Mbps Ethernet
 - 64 MB of DDR2 RAM
 - 8 MB of SPI-NOR Flash
 - 23dBi high-gain directional antenna and a dedicated metal reflector
 - Power, LAN, WLAN5G green LEDs
 - 3x green RSSI LEDs

Flashing instructions:
 Flash factory image through stock firmware WEB UI or through TFTP
 To get to TFTP recovery just hold reset button while powering on for
 around 4-5 seconds and release.
 Rename factory image to recovery.bin
 Stock TFTP server IP:192.168.0.100
 Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
23 months agoramips: add support for Etisalat S3
Mikhail Zhilkin [Sun, 27 Nov 2022 14:01:58 +0000 (14:01 +0000)]
ramips: add support for Etisalat S3

Etisalat S3 is a wireless WiFi 5 router manufactured by Sercomm company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB
Flash: 128 MiB
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615E): a/n/ac, 4x4
Ethernet: 5x GbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: 1x USB3.0
Button: 2 buttons (Reset & WPS)
LEDs:
   - 1x Status (RGB)
   - 1x 2.4G (blue, hardware, mt76-phy0)
   - 1x 5G (blue, hardware, mt76-phy1)
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

Installation
-----------------
1.  Login to the router web interface under admin account
2.  Navigate to Settings -> Configuration -> Save to Computer
3.  Decode the configuration. For example, using cfgtool.py tool (see
    related section):
       cfgtool.py -u configurationBackup.cfg
4.  Open configurationBackup.xml and find the following line:
    <PARAMETER name="Password" type="string" value="<your router serial \
       is here>" writable="1" encryption="1" password="1"/>
5.  Insert the following line after and save:
<PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/>
6.  Encode the configuration. For example, using cfgtool.py tool:
       cfgtool.py -p configurationBackup.xml
7.  Upload the changed configuration (configurationBackup_changed.cfg) to
    the router
8.  Login to the router web interface (SuperUser:ETxxxxxxxxxx, where
    ETxxxxxxxxxx is the serial number from the backplate label)
9.  Navigate to Settings -> WAN -> Add static IP interface (e.g.
    10.0.0.1/255.255.255.0)
10. Navigate to Settings -> Remote cotrol -> Add SSH, port 22,
    10.0.0.0/255.255.255.0 and interface created before
11. Change IP of your client to 10.0.0.2/255.255.255.0 and connect the
    ethernet cable to the WAN port of the router
12. Connect to the router using SSH shell under SuperUser account
13. Run in SSH shell:
       sh
14. Make a mtd backup (optional, see related section)
15. Change bootflag to Sercomm1 and reboot:
       printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
       reboot
16. Login to the router web interface under admin account
17. Remove dots from the OpenWrt factory image filename
18. Update firmware via web using OpenWrt factory image

Revert to stock
---------------
Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
   printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3

mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
      cd /tmp
      for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
      tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
      tftp -l mtd.md5 -p 10.0.0.2

Recovery
--------
Use sercomm-recovery tool.
Link: https://github.com/danitool/sercomm-recovery
MAC Addresses
-------------
+-----+------------+---------+
| use | address    | example |
+-----+------------+---------+
| LAN | label      | *:50    |
| WAN | label + 11 | *:5b    |
| 2g  | label + 2  | *:52    |
| 5g  | label + 3  | *:53    |
+-----+------------+---------+
The label MAC address was found in Factory 0x21000

cfgtool.py
----------
A tool for decoding and encoding Sercomm configs.
Link: https://github.com/r3d5ky/sercomm_cfg_unpacker
Co-authored-by: Karim Dehouche <karimdplay@gmail.com>
Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
23 months agomac80211: add a fix for a crash in __ieee80211_rx_h_amsdu
Felix Fietkau [Tue, 13 Dec 2022 20:14:18 +0000 (21:14 +0100)]
mac80211: add a fix for a crash in __ieee80211_rx_h_amsdu

Fix initialization of rx->link_sta

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agotreewide: remove DRIVER_11N_SUPPORT
Andre Heider [Sat, 26 Nov 2022 11:58:21 +0000 (12:58 +0100)]
treewide: remove DRIVER_11N_SUPPORT

hostapd's compile time option CONFIG_IEEE80211N was removed almost 3 years
ago, 80.211n/HT is always included since then.

Noticed because `hostapd -v11n` confusingly returned an error.

See hostapd's commit:
f3bcd69603 "Remove CONFIG_IEEE80211N build option"

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agohostapd: fix 350-nl80211_del_beacon_bss.patch
Andre Heider [Fri, 25 Nov 2022 16:37:59 +0000 (17:37 +0100)]
hostapd: fix 350-nl80211_del_beacon_bss.patch

Pass the expected struct:

../src/drivers/driver_nl80211.c: In function 'wpa_driver_nl80211_del_beacon':
../src/drivers/driver_nl80211.c:2945:31: warning: passing argument 1 of 'nl80211_bss_msg' from incompatible pointer type [-Wincompatible-pointer-types]
 2945 |         msg = nl80211_bss_msg(drv, 0, NL80211_CMD_DEL_BEACON);
      |                               ^~~
      |                               |
      |                               struct wpa_driver_nl80211_data *
../src/drivers/driver_nl80211.c:695:50: note: expected 'struct i802_bss *' but argument is of type 'struct wpa_driver_nl80211_data *'
  695 | struct nl_msg * nl80211_bss_msg(struct i802_bss *bss, int flags, uint8_t cmd)
      |                                 ~~~~~~~~~~~~~~~~~^~~

Fixes: 35ff1affe8 "hostapd: update to 2022-05-08"
Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agohostapd: remove an unused function from ubus.c
Andre Heider [Sun, 20 Nov 2022 15:54:59 +0000 (16:54 +0100)]
hostapd: remove an unused function from ubus.c

eee80211_frequency_to_channel() isn't used anymore, which is a leftover from:
2a31e9ca97 "hostapd: add op-class to get_status output"

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agoath9k: add missing dependency on random core
Felix Fietkau [Tue, 13 Dec 2022 09:25:26 +0000 (10:25 +0100)]
ath9k: add missing dependency on random core

Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agogeneric: move pending 870 ca8210 fix crash patch to backport
Christian Marangi [Mon, 12 Dec 2022 22:47:25 +0000 (23:47 +0100)]
generic: move pending 870 ca8210 fix crash patch to backport

Patch got merged upstream in kernel 6.1. Move it to backport to better
track it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agogeneric: fix wrong PTR_ERR use in of net mac address ascii patch
Christian Marangi [Mon, 12 Dec 2022 23:15:28 +0000 (00:15 +0100)]
generic: fix wrong PTR_ERR use in of net mac address ascii patch

nvmem_cell_read return a pointer error when an error occurs. Currently
we convert the pointer error to an int while the rest of the function
return a void* and expcet an error pointer. Fix this PTR_ERR msuse
fixing compilation warning.

Fixes the following compilation warning:
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address':
net/ethernet/eth.c:547:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  547 |                 return PTR_ERR(mac);
      |                        ^~~~~~~~~~~~
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address_ascii':
net/ethernet/eth.c:564:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  564 |                 return PTR_ERR(mac_ascii);
      |                        ^~~~~~~~~~~~~~~~~~

Fixes: 7b863af180da ("kernel: move mac-address-ascii patches to generic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agogemini: Set proper default networks
Linus Walleij [Sun, 11 Dec 2022 23:54:16 +0000 (00:54 +0100)]
gemini: Set proper default networks

Some Gemini devices are NAS type devices and need to ask for
DHCP IP on eth0. Some has a LAN/WAN setup. Add sensible
defaults for all known devices.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
23 months agouml: switch to Kernel 5.15
Christian Lamparter [Sat, 3 Dec 2022 21:20:37 +0000 (22:20 +0100)]
uml: switch to Kernel 5.15

Switch over from testing version.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agobcm53xx: remove MR32's openwrt specific patch for LEDs
Christian Lamparter [Sat, 12 Nov 2022 22:01:33 +0000 (23:01 +0100)]
bcm53xx: remove MR32's openwrt specific patch for LEDs

The patch managed to sneak into v5.15 whereas it was
properly deleted for v5.10.

Fixes: 8f6e2bb17886 ("bcm53xx: remove MR32's specific get_leds_dt code")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agosunxi: fix sunxi-ir kconfig and description
Chukun Pan [Fri, 2 Sep 2022 15:18:10 +0000 (23:18 +0800)]
sunxi: fix sunxi-ir kconfig and description

Removed a20 in description, since it
only works for a10, a13 and a31.
Also refreshed kernel config.

Fixes: #10466
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(moved fixes, refreshed, added CONFIG_DVB_USB=n)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agosunxi: modules: remove useless AddDepends/rtc
Chukun Pan [Thu, 1 Sep 2022 15:18:19 +0000 (23:18 +0800)]
sunxi: modules: remove useless AddDepends/rtc

AddDepends/rtc has been removed in commit 3da7fe6, same here.
Fixes: 3da7fe6 ("kernel: remove useless AddDepends/rtc abstraction")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(RTC_SUPPORT - though this is implied by the TARGET_sunxi)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agosunxi: fix 253-sunxi-h5-add-support-for-nanopi-r1s-h5 patch offset
Christian Lamparter [Sat, 1 Oct 2022 21:47:53 +0000 (23:47 +0200)]
sunxi: fix 253-sunxi-h5-add-support-for-nanopi-r1s-h5 patch offset

This showed up in the log:
|Hunk #1 succeeded at 555 (offset -83 lines).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agokernel: modules/lib-lz4: add lz4hc_compress
Tony Butler [Mon, 28 Nov 2022 03:14:48 +0000 (19:14 -0800)]
kernel: modules/lib-lz4: add lz4hc_compress

enable option `CONFIG_CRYPTO_LZ4HC` to match default kernel config

this only adds the `lz4hc_compress` module, and has no effect on the
`lz4_decompress` module which already supports any flavor

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agolantiq: vr9: include usb driver for fritz 7430
Tony Butler [Fri, 9 Dec 2022 11:13:16 +0000 (03:13 -0800)]
lantiq: vr9: include usb driver for fritz 7430

Reported by user: missing driver for USB; add to image definition
https://github.com/openwrt/openwrt/issues/11326

Resolves: #11326

Signed-off-by: Tony Butler <spudz76@gmail.com>
Acked-by: Aleksander Jan Bajkowski <olek2@wp.pl>
23 months agokernel: Refresh kernel 5.10
Hauke Mehrtens [Sun, 11 Dec 2022 15:41:34 +0000 (16:41 +0100)]
kernel: Refresh kernel 5.10

Make the patches apply cleanly again.

Fixes: 8327e0fb72f0 ("kernel: backport the dev_set_threaded export to 5.10")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agortl8812au-ct: fix build with newer backports cfg80211 api
Felix Fietkau [Sun, 11 Dec 2022 08:48:18 +0000 (09:48 +0100)]
rtl8812au-ct: fix build with newer backports cfg80211 api

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agowolfssl: fix build with /dev/crypto
Chukun Pan [Thu, 1 Dec 2022 15:28:38 +0000 (23:28 +0800)]
wolfssl: fix build with /dev/crypto

Backport upstream patch to fix build error when
/dev/crypto enabled.

https://github.com/wolfSSL/wolfssl/commit/dc9f46a3be00b5e82684a158605189d1278e324c

Fixes: #10944
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
23 months agoumbim: Allow roaming and partner connections
Julio Gonzalez Gil [Sun, 14 Aug 2022 21:06:31 +0000 (23:06 +0200)]
umbim: Allow roaming and partner connections

Allow registration if the SIM is roaming or partner mode, by adding two
new options to the protocol.

Until now, such registration failed because umbim returns exit codes 4 and
5 for such situations.

Signed-off-by: Julio Gonzalez Gil <git@juliogonzalez.es>
23 months agoipq40xx: fix usb driver not loaded for GL-A1300
Weiping Yang [Thu, 8 Dec 2022 04:03:35 +0000 (23:03 -0500)]
ipq40xx: fix usb driver not loaded for GL-A1300

This patch enables USB support for the GL.iNet GL-A1300
Repair the usb driver startup phase is not loaded

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
23 months agolibtracefs: update to 1.6.2
Nick Hainke [Fri, 9 Dec 2022 19:28:23 +0000 (20:28 +0100)]
libtracefs: update to 1.6.2

378a9dd libtracefs: version 1.6.2
e6daa60 libtracefs: Add unit test to test mounting of tracefs_{tracing,debug}_dir()
32acbbf libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agokernel: bump 5.10 to 5.10.158
John Audia [Thu, 8 Dec 2022 13:49:33 +0000 (08:49 -0500)]
kernel: bump 5.10 to 5.10.158

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: bump 5.10 to 5.10.157
John Audia [Tue, 6 Dec 2022 18:22:57 +0000 (13:22 -0500)]
kernel: bump 5.10 to 5.10.157

Manually rebased:
backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
hack-5.10/645-netfilter-connmark-introduce-set-dscpmark.patch

Removed upstreamed:
pending-5.10/706-netfilter-nf_flow_table-add-missing-locking.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.157&id=b8e494240e69f91517256adcd6fda62d0671772d

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: add symbol in generic config for 5.10.157
John Audia [Wed, 7 Dec 2022 09:02:49 +0000 (04:02 -0500)]
kernel: add symbol in generic config for 5.10.157

Add CONFIG_INET_TABLE_PERTURB_ORDER=16 to generic config

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: bump 5.15 to 5.15.82
John Audia [Thu, 8 Dec 2022 13:32:44 +0000 (08:32 -0500)]
kernel: bump 5.15 to 5.15.82

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-stock
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-stock

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: bump 5.15 to 5.15.81
John Audia [Mon, 5 Dec 2022 17:33:26 +0000 (12:33 -0500)]
kernel: bump 5.15 to 5.15.81

Manually rebased:
backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch
hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

Removed upstreamed:
pending-5.15/701-netfilter-nf_flow_table-add-missing-locking.patch[2]

All other patches automatically rebased

1. Rebase by Kevin 'ldir' Darbyshire-Bryant<ldir@darbyshire-bryant.me.uk>
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.81&id=8db9e60cdfdae5b049e32e82323da8f0f989066a

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-stock
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-stock

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: add symbol in generic config for 5.15.81
John Audia [Mon, 5 Dec 2022 17:48:35 +0000 (12:48 -0500)]
kernel: add symbol in generic config for 5.15.81

Add CONFIG_INET_TABLE_PERTURB_ORDER=16 to generic config

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: backport the dev_set_threaded export to 5.10
Felix Fietkau [Sat, 10 Dec 2022 16:36:07 +0000 (17:36 +0100)]
kernel: backport the dev_set_threaded export to 5.10

Fixes mt76 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: backport mtk_wed.h from 5.15 to 5.10
Felix Fietkau [Sat, 10 Dec 2022 16:30:34 +0000 (17:30 +0100)]
kernel: backport mtk_wed.h from 5.15 to 5.10

Fixes mt76 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomt76: update to the latest version
Felix Fietkau [Sat, 10 Dec 2022 12:22:32 +0000 (13:22 +0100)]
mt76: update to the latest version

ec46d7486ab9 sync with upstream
2575de3aea33 wifi: mt76: mt7921: introduce chanctx support
473cebb3c3e1 wifi: mt76: fix bandwidth 80MHz link fail in 6GHz band
de3e77227f62 wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices
f0c191a9f6cd wifi: mt76: mt7996: add missing argument in mt7996_queue_rx_skb()
d3838a52df62 wifi: mt76: mt7996: enable use_cts_prot support
98492dff3bec wifi: mt76: mt7996: enable ack signal support
2a41e7a82f86 wifi: mt76: mt7996: add support to configure spatial reuse parameter set
194cb3392829 mt76: mt7915: add missing of_node_put()
f91d6f3b73ac wifi: mt76: mt7921s: fix slab-out-of-bounds access in sdio host
1ce4970d799f wifi: mt76: mt7915: fix mt7915_rate_txpower_get() resource leaks
379f3fc0fc43 wifi: mt76: mt7996: fix insecure data handling of mt7996_mcu_ie_countdown()
233c272f0f86 wifi: mt76: mt7996: fix insecure data handling of mt7996_mcu_rx_radar_detected()
5616c4cc1d5d wifi: mt76: mt7996: fix integer handling issue of mt7996_rf_regval_set()
f9598e6d4c2c wifi: mt76: mt7915: split mcu chan_mib array up
b252d94bd763 wifi: mt76: mt7915: check return value before accessing free_block_num
f1cc3696d725 wifi: mt76: mt7996: check return value before accessing free_block_num
b94ba58fa698 wifi: mt76: mt7915: check the correctness of event data
35843a1670c0 wifi: mt76: mt7915: drop always true condition of __mt7915_reg_addr()
01a256c1dc41 wifi: mt76: mt7996: drop always true condition of __mt7996_reg_addr()
5185bbab8953 wifi: mt76: mt7996: fix endianness warning in mt7996_mcu_sta_he_tlv
eeb6949c4d06 wifi: mt76: mt76x0: fix oob access in mt76x0_phy_get_target_power
063823aba978 wifi: mt76: mt7921: add support to update fw capability with MTFG table
a44109267e4e wifi: mt76: mt7996: fix unintended sign extension of mt7996_hw_queue_read()
be5dbb781068 wifi: mt76: mt7915: fix unintended sign extension of mt7915_hw_queue_read()
adf9042b6f63 wifi: mt76: fix coverity uninit_use_in_call in mt76_connac2_reverse_frag0_hdr_trans()
551201379efe wifi: mt76: move leds field in leds struct
14fbb6d6e85e wifi: mt76: move leds struct in mt76_phy
81edc468fc62 wifi: mt76: mt7915: enable per-phy led support
bbad827e447f wifi: mt76: mt7615: enable per-phy led support
8e7e7e52fc09 wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails
95c66d651133 wifi: mt76: handle possible mt76_rx_token_consume failures
52d04463a66e wifi: mt76: dma: rely on queue page_frag_cache for wed rx queues
7fae1de12ae7 wifi: mt76: mt7921: resource leaks at mt7921_check_offload_capability()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomac80211: update to linux 6.1-rc8
Felix Fietkau [Sat, 10 Dec 2022 11:36:44 +0000 (12:36 +0100)]
mac80211: update to linux 6.1-rc8

This should help stay in sync with upstream development

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomt76: update to version 2022-12-01
Felix Fietkau [Sat, 10 Dec 2022 12:17:56 +0000 (13:17 +0100)]
mt76: update to version 2022-12-01

3deafbad7061 wifi: mt76: mt7915: fix uninitialized irq_mask
6ca31dc64da4 wifi: mt76: mt7921: introduce remain_on_channel support
7962005b0734 wifi: mt76: connac: rework macros for unified command
3b2882ca704e wifi: mt76: connac: update struct sta_rec_phy
c4d46cb1dd45 wifi: mt76: connac: rework fields for larger bandwidth support in sta_rec_bf
532c322fd72f wifi: mt76: connac: add more unified command IDs
4c43e060726b wifi: mt76: connac: introduce unified event table
4c423058920d wifi: mt76: connac: add more bss info command tags
143d7ab8ef92 wifi: mt76: connac: add more starec command tags
733ef9887b2c wifi: mt76: connac: introduce helper for mt7996 chipset
8e309b5560e1 wifi: mt76: mt7921: fix wrong power after multiple SAR set
d791ed1f5877 wifi: mt76: mt7915: add missing MODULE_PARM_DESC
3b8eed9c3866 wifi: mt76: mt7915: add support to configure spatial reuse parameter set
417cca39bab2 wifi: mt76: introduce rxwi and rx token utility routines
629f8631f54f wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf
13c2dc8993b6 wifi: mt76: add WED RX support to mt76_dma_rx_fill
86e94f4162b7 wifi: mt76: add WED RX support to dma queue alloc
1361519851f3 wifi: mt76: add info parameter to rx_skb signature
a2e5e0667553 wifi: mt76: connac: introduce mt76_connac_mcu_sta_wed_update utility routine
f38faf294310 wifi: mt76: mt7915: enable WED RX support
a887a5feb3d1 wifi: mt76: mt7915: enable WED RX stats
4c23061ebcfc wifi: mt76: mt7915: add basedband Txpower info into debugfs
a9c88ded5cac wifi: mt76: mt7915: enable .sta_set_txpwr support
2c172bb6cd9f wifi: mt76: mt7915: fix band_idx usage
1b88dd07f153 linux-firmware: update firmware for MT7915
6196f6080506 linux-firmware: update firmware for MT7916
daae6ca5d81f linux-firmware: update firmware for MT7986
e7a9f7a0440c wifi: mt76: mt7915: fix unused-but-set warning
340f3be65397 wifi: mt76: fix coverity overrun-call in mt76_get_txpower()
aa7132da0326 wifi: mt76: mt7915: fix endianness of mt7915_mcu_set_obss_spr_pd()
a36017d09324 wifi: mt76: mt7921: Add missing __packed annotation of struct mt7921_clc
66dc48bea883 wifi: mt76: do not send firmware FW_FEATURE_NON_DL region
fa79eeeadc2d mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2()
ff94604b2edd wifi: mt76: mt7915: introduce mt7915_get_power_bound()
5082a58f8082 wifi: mt76: mt7915: enable per bandwidth power limit support
a7b915302147 wifi: mt76: mt7915: fix scene detection flow of spatial reuse
525592c28d6b wifi: mt76: mt7915: rely on band_idx of mt76_phy
cdd7229e769b wifi: mt76: mt7915: mmio: fix naming convention

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agohostapd: use wpa_supplicant for unencrypted mesh connections
Felix Fietkau [Sun, 4 Dec 2022 18:35:36 +0000 (19:35 +0100)]
hostapd: use wpa_supplicant for unencrypted mesh connections

It's more reliable than using iw

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoath79: fix Teltonika RUT230 v1 MAC assignment
David Bauer [Fri, 9 Dec 2022 00:58:03 +0000 (01:58 +0100)]
ath79: fix Teltonika RUT230 v1 MAC assignment

The MAC-Address setup for the Teltonika RUT230 v1 was swapped for the
LAN / WAN ports. Also the Label-MAC was assigned incorrect, as the WiFi
MAC is printed on the case as part of the SSID, however only the LAN
MAC-Address is designated as a MAC-Address.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agorealtek: update GPIO bindings for DGS-1210-10P
Jan-Niklas Burfeind [Fri, 2 Dec 2022 13:55:16 +0000 (14:55 +0100)]
realtek: update GPIO bindings for DGS-1210-10P

add three missing LEDs
 - PoE-Max
 - Link/Act
 - PoE

add two missing buttons
 - mode
 - reset

The last was dropped in
commit 61a3d0075b15 ("realtek: update GPIO bindings in the dts files in dts-5.10")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
23 months agorealtek: d-link: add support for dgs-1210-28mp-f
Andreas Böhler [Sat, 19 Nov 2022 23:43:50 +0000 (00:43 +0100)]
realtek: d-link: add support for dgs-1210-28mp-f

General hardware info:
----------------------

D-Link DGS-1210-28MP rev. F1 is a switch with 24 ethernet ports and 4
combo ports, all ports Gbit capable. It is based on a RTL8382 SoC @ 500MHz,
DRAM 128MB and 32MB flash. 24 ethernet ports are 802.3af/at PoE capable
with a total PoE power budget of 370W.

Power over Ethernet:
--------------------

The PSE hardware consists of three BCM59121 PSE chips, serving 8 ports
each. They are controlled by a Nuvoton MCU.
In order to enable PoE, the realtek-poe package is required. It is
installed by default, but currently it requires the manual editing of
/etc/config/poe. Keep in mind that the port number assignment does not
match on this switch, alway 8 ports are in reversed order: 8-1, 16-9 and
24-17.

LEDs and Buttons:
-----------------

On stock firmware, the mode button is supposed to switch the LED indicators
of all port LEDs between Link Activity and PoE status. The currently
selected mode is visualized using the respective LEDs. PoE Max indicates
that the maximum PoE budget has been reached.
Since there is currently no support for this behavior, these LEDs and
the mode button can be used independently.

Serial connection:
------------------
The UART for the SoC (115200 8N1) is available via unpopulated standard
0.1" pin header marked J6. Pin1 is marked with arrow and square.

Pin 1: Vcc 3.3V
Pin 2: Tx
Pin 3: Rx
Pin 4: Gnd

OEM installation from Web Interface:
------------------------------------

  1. Make sure you are booting using OEM in image 2 slot. If not, switch to
     image2 using the menus
        System > Firmware Information > Boot from image2
        Tools > reboot
  2. Upload image in vendor firmware via Tools > Backup / Upgrade
     Firmware > image1
  3. Toogle startup image via System > Firmware Information > Boot from
     image1
  4. Tools > reboot

Other installation methods not tested, but since the device shares the
board with the DGS-1210-28, the following should work:

Boot initramfs image from U-Boot:
---------------------------------

  1. Press Escape key during `Hit Esc key to stop autoboot` prompt
  2. Press CTRL+C keys to get into real U-Boot prompt
  3. Init network with `rtk network on` command
  4. Load image with `tftpboot 0x8f000000
     openwrt-rtl838x-generic-d-link_dgs-1210-28mp-f-initramfs-kernel.bin`
     command
  5. Boot the image with `bootm` command

Signed-off-by: Andreas Böhler <dev@aboehler.at>
23 months agouboot-bcm4908: update to the latest generic
Rafał Miłecki [Thu, 8 Dec 2022 11:01:43 +0000 (12:01 +0100)]
uboot-bcm4908: update to the latest generic

4435700d18 Remove redundant YYLOC global declaration

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 months agoustream-ssl: update to Git version 2022-12-07
Hauke Mehrtens [Thu, 8 Dec 2022 00:15:11 +0000 (01:15 +0100)]
ustream-ssl: update to Git version 2022-12-07

9217ab4 ustream-openssl: Disable renegotiation in TLSv1.2 and earlier
2ce1d48 ci: fix building with i.MX6 SDK
584f1f6 ustream-openssl: wolfSSL: provide detailed information in debug builds
aa8c48e cmake: add a possibility to set library version

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoCI: kernel: don't checkout and install feeds
Christian Marangi [Wed, 7 Dec 2022 17:12:31 +0000 (18:12 +0100)]
CI: kernel: don't checkout and install feeds

We don't need to checkout feed and install feeds for kernel tests. This
saves up to 2 minutes for each target kernel build test.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: build: skip sdk adapt to external toolchain on cache hit
Christian Marangi [Wed, 7 Dec 2022 17:09:18 +0000 (18:09 +0100)]
CI: build: skip sdk adapt to external toolchain on cache hit

On cache hit, skip sdk adapt to external toolchain. This is needed because we
cache the already extracted sdk and that is already adapted to be used
as external toolchain.

Rerunning the adap step will result in the test to fail for missing file
as the file are already got wrapped to the external toolchain format.

Fixes: 42f0ab028e2e ("CI: build: fix use of sdk as toolchain")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoramips: add support for Wavlink WS-WN572HP3 4G
Jan-Niklas Burfeind [Wed, 30 Nov 2022 20:35:30 +0000 (21:35 +0100)]
ramips: add support for Wavlink WS-WN572HP3 4G

Wavlink WS-WN572HP3 4G is an 802.11ac
dual-band outdoor router with LTE support.

Specifications;
* Soc: MT7621DAT
* RAM: 128MiB
* Flash: NOR 16MiB GD-25Q128ESIG3
* Wi-Fi:
  * MT7613BEN: 5GHz
  * MT7603EN: 2.4GHz
* Ethernet: 2x 1GbE
* USB: None - only used internally
* LTE Modem: Quectel EC200T-EU
* UART: 115200 baud
* LEDs:
  * 7 blue at the front
    * 1 Power
    * 2 LAN / WAN
    * 1 Status
    * 3 RSSI (annotated 4G)
  * 1 green at the bottom (4G LED)
* Buttons: 1 reset button

Installation:
* press and hold the reset button while powering on the device
* keep it pressed for ten seconds
* connect to 192.168.10.1 via webbrowser (chromium/chrome works, at
  least Firefox 106.0.3 does not)
* upload the sysupgrade image, confirm the checksum, wait 2 minutes
  until the device reboots

Revert to stock firmware:
* same as installation but use the recovery image for WL-WN572HP3

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
23 months agocomgt-ncm: add support for quectel modem EC200T-EU
Jan-Niklas Burfeind [Wed, 30 Nov 2022 20:35:29 +0000 (21:35 +0100)]
comgt-ncm: add support for quectel modem EC200T-EU

context_type is an integer mapping of pdptype:
1: IPV4
2: IPV6
3: IPV4V6

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
23 months agoramips: define loadaddr for all UniFi devices
David Bauer [Thu, 17 Nov 2022 21:48:10 +0000 (22:48 +0100)]
ramips: define loadaddr for all UniFi devices

Define the load-address for the DTB of all Ubiquiti UniFi devices using
FIT images. From the GPL code we can assume these boards are affected by
the same relocating issue with the vendor bootloader.

Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agofritz-tools: fritz_tffs_nand: cache already read sector ids
Andre Heider [Wed, 15 Dec 2021 11:48:26 +0000 (12:48 +0100)]
fritz-tools: fritz_tffs_nand: cache already read sector ids

This speeds up the tool significantly, especially when using the "-a"
argument.

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agofritz-tools: fritz_tffs_nand: get rid of struct tffs_sectors
Andre Heider [Wed, 15 Dec 2021 11:21:48 +0000 (12:21 +0100)]
fritz-tools: fritz_tffs_nand: get rid of struct tffs_sectors

This doesn't help and "[0]" gets in the way of bounds checks.

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agofritz-tools: fritz_tffs_nand: exclude oob code when disabled
Andre Heider [Wed, 15 Dec 2021 10:38:20 +0000 (11:38 +0100)]
fritz-tools: fritz_tffs_nand: exclude oob code when disabled

Skip unnecessary stuff if checking the oob data is disabled.

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agofirewall4: add missing PKG_MIRROR_HASH
Jo-Philipp Wich [Wed, 7 Dec 2022 07:54:56 +0000 (08:54 +0100)]
firewall4: add missing PKG_MIRROR_HASH

Fixes: 84183f0d98 ("firewall4: update to latest Git HEAD")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agomediatek: also move &slot0 from dtsi down to board dts
Daniel Golle [Wed, 7 Dec 2022 01:42:53 +0000 (01:42 +0000)]
mediatek: also move &slot0 from dtsi down to board dts

As the referenced MTD partition is only present in the dts, also move
&slot0 down to the dts files.

Fixes: 64e9b62829 ("mediatek: remove redundant flash entry from dtsi")
Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agomediatek: remove redundant flash entry from dtsi
Daniel Golle [Wed, 7 Dec 2022 00:34:55 +0000 (00:34 +0000)]
mediatek: remove redundant flash entry from dtsi

Splitting-off the common parts of Ruijie RG-EW3200GX PRO and
reyee AX3200-E5 went wrong because the flash descriptiom was kept
also in the dtsi. Remove it there, as flash definition is added by
both board dts files.

Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agobuild: add gzip to prereq-build.mk
Tony Butler [Fri, 2 Dec 2022 20:05:08 +0000 (12:05 -0800)]
build: add gzip to prereq-build.mk

gzip has never been checked for, a system without it would be rare, fix
it anyway

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agoCI: build: fix use of sdk as toolchain
Christian Marangi [Mon, 5 Dec 2022 22:23:04 +0000 (23:23 +0100)]
CI: build: fix use of sdk as toolchain

The toolchain included in a sdk have a different format than an external
toolchain tar.

Since sdk is a more integrated setup doesn't use and include wrapper bin
that use the external toolchain config and use an alternative and more
standard way to include all the toolchain headers.

External toolchain use wrapper.sh to append the configured include
header when each tool is called.

Fix the sdk toolchain by reverting their own sdk wrapper scripts and to
simulate an external toolchain build copying what is done in the
toolchain target makefile.

This handle compilation error and warning caused by not using fortify
header on building packages.

Fixes: 006e52545d14 ("CI: build: add support to fallback to sdk for external toolchain")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agobuild: images: squashfs: add help, fix description
Tony Butler [Mon, 28 Nov 2022 12:00:02 +0000 (04:00 -0800)]
build: images: squashfs: add help, fix description

add help text for `TARGET_SQUASHFS_BLOCK_SIZE` to match the only valid
settings accepted by `mksquashfs4` ("block size not power of two or not
between 4096 and 1Mbyte") thus for this setting in "KB", the set:
  `4, 8, 16, 32, 64, 128, 256, 512, 1024`

replace `squashfs-lzma` with `squashfs` in the description for
`TARGET_ROOTFS_SQUASHFS` because it has various compressions, and not
just lzma as it did in the past

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agoath79: optimize the firmware recipe for Netgear NAND devices
Shiji Yang [Tue, 29 Nov 2022 10:13:38 +0000 (18:13 +0800)]
ath79: optimize the firmware recipe for Netgear NAND devices

1. Drop useless character '0xff' before fake filesystem header.
2. Reduce useless padding to shrink the size of the sysupgrade image.
3. Do not check the size of sysupgrade image. It does not make sense to
   check the size of a compressed package.
4. Do not take the size of netgear header into account because it will
   not be written to Flash.
5. Use the default lzma compression dictionary parameter '-d24' to get
   better performance.

Tested on Netgear R6100
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agoath79: convert Netgear R6100 radio calibration to nvmem-cells
Shiji Yang [Tue, 29 Nov 2022 10:13:19 +0000 (18:13 +0800)]
ath79: convert Netgear R6100 radio calibration to nvmem-cells

use nvmem-cells implementation to avoid copying art calibration data
to rootfs.

Tested on Netgear R6100
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agotools/cmake: update to 3.25.1
Hannu Nyman [Tue, 6 Dec 2022 10:33:58 +0000 (12:33 +0200)]
tools/cmake: update to 3.25.1

Update cmake to version 3.25.1

* refresh patches

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agokernel: ca8210: Fix crash by zero initializing data
Hauke Mehrtens [Sun, 20 Nov 2022 20:35:54 +0000 (21:35 +0100)]
kernel: ca8210: Fix crash by zero initializing data

This fixes crashes at bootup on pistachio.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>