Commit Graph

55971 Commits

Author SHA1 Message Date
Felix Fietkau
d07d47d0e3 mac80211: fix a regression in processing management frames for AP VLAN interfaces
Fixes re-assoc of WDS stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
581f2b15b2 hostapd: enable coredumps
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
c2fde432b3 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>
2022-12-16 14:32:47 +01:00
Felix Fietkau
133a1e2f37 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>
2022-12-16 14:32:47 +01:00
Felix Fietkau
92acd9f3e8 mac80211: fix uninitialized variable in rx->link/link_sta initialization fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
2fb38b77a2 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>
2022-12-16 14:32:47 +01:00
Jo-Philipp Wich
d15b1fbed7 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>
2022-12-16 00:55:51 +01:00
Jo-Philipp Wich
4a4d0bf78d 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>
2022-12-16 00:55:51 +01:00
INAGAKI Hiroshi
88db7461cf 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>
2022-12-15 20:54:12 +01:00
INAGAKI Hiroshi
69055a5412 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>
2022-12-15 20:54:03 +01:00
INAGAKI Hiroshi
109962d8bf 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>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
1f153558a3 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>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
f3a9975549 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>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
aa528eec73 realtek: refresh patches in 5.15
Adjust patches for kernel 5.15.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
23881c91e5 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>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
a9d5a8bc79 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>
2022-12-15 20:52:40 +01:00
INAGAKI Hiroshi
8fb15ea52a 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>
2022-12-15 20:52:09 +01:00
Sander Vanheule
fef55d5ffd 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: 232879a7b7 ("firmware-utils: bump to git HEAD")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-12-15 17:47:05 +01:00
Christian Lamparter
d8da5002a2 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>
2022-12-15 15:45:47 +01:00
Christian Lamparter
0dacf14495 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>
2022-12-15 15:45:47 +01:00
Christian Lamparter
0f227720f9 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>
2022-12-15 15:45:47 +01:00
Nick Hainke
4146701469 ath79: replace reference to legacy qca,disable-2ghz in WatchGuard AP100
Commit 4c8dd973ef ("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>
2022-12-15 15:45:47 +01:00
Nick Hainke
ae5cb164cd ath79: switch to upstream ieee80211-freq-limit for Araknis AN-300-AP-I-N
Commit 4c8dd973ef ("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>
2022-12-15 15:45:47 +01:00
Nick Hainke
08c114ee16 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>
2022-12-15 15:45:47 +01:00
Nick Hainke
fd456106aa 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>
2022-12-15 15:45:47 +01:00
Nick Hainke
f63cf33aa7 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>
2022-12-15 15:45:47 +01:00
Nick Hainke
783936c1f7 ath79: Mercury MW4530R v1 already uses nvmem-cells
Remove the caldata extraction in userspace. The board already uses
nvmem-cells since
commit e354b01baf ("ath79: calibrate all ar9344 tl-WDRxxxx with nvmem")

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-15 15:45:35 +01:00
Nick Hainke
4845b60525 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>
2022-12-15 15:08:09 +01:00
Nick Hainke
21495c92dc 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>
2022-12-15 15:08:09 +01:00
Nick Hainke
1b125aabf4 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>
2022-12-15 15:08:08 +01:00
Johannes Heimansberg
708ea56fb9 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>
2022-12-15 15:08:08 +01:00
Linus Walleij
1bef8d62d4 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>
2022-12-15 15:08:08 +01:00
Sander Vanheule
232879a7b7 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>
2022-12-15 14:24:25 +01:00
John Audia
90120a1552 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>
2022-12-14 23:37:28 +01:00
John Audia
b6fa423907 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>
2022-12-14 23:34:50 +01:00
Stijn Tintel
bd911b4538 tools/dosfstools: fix PKG_SOURCE
Both mirrors provided in the Makefile only serve gzipped tarballs.

Fixes: #10871
Fixes: 9edfe7dd13 ("source: Switch to xz for packages and tools where possible")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-14 20:29:36 +02:00
Stijn Tintel
b3dd15ca0a 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: 6801c460b6 ("kernel: bump 5.10 to 5.10.158")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-14 20:29:36 +02:00
Stijn Tintel
f9bd655f16 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: 68426e54ed ("kernel: bump 5.15 to 5.15.82")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-14 19:12:33 +02:00
Stijn Tintel
230f2fccd1 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>
2022-12-14 18:53:39 +02:00
Felix Fietkau
b7a7a97037 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>
2022-12-14 13:54:02 +01:00
Christian Marangi
823ddab80e
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>
2022-12-14 02:23:22 +01:00
Christian Marangi
266b261d39
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: 6134ba4a34 ("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>
2022-12-14 02:23:22 +01:00
Linus Lüssing
26d10bad7c 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>
2022-12-14 01:06:26 +01:00
Andrew Cameron
550e5b2184 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>
2022-12-13 23:17:27 +01:00
Mikhail Zhilkin
0ec8d991c2 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>
2022-12-13 23:06:20 +01:00
Felix Fietkau
a4339c5a21 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>
2022-12-13 21:14:43 +01:00
Andre Heider
7c63295bf4 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>
2022-12-13 10:54:50 +01:00
Andre Heider
2d36f60d88 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>
2022-12-13 10:54:50 +01:00
Andre Heider
3bc060440a 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>
2022-12-13 10:54:50 +01:00
Felix Fietkau
e046500fe9 ath9k: add missing dependency on random core
Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-13 10:25:27 +01:00