openwrt/openwrt.git
2 years agomvebu: import patch enabling AQR112 and AQR412 PHY
Daniel Golle [Tue, 2 Nov 2021 00:55:40 +0000 (00:55 +0000)]
mvebu: import patch enabling AQR112 and AQR412 PHY

Copy and refresh patch enabling AQR112 and AQR412 Ethernet PHY from
layerscape (5.4) target to mvebu (5.4) as AQR112 can also be found
in IEI Puzzle devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomvebu: puzzle-m901: add LEDs, fan and reset button
Daniel Golle [Tue, 21 Dec 2021 21:50:32 +0000 (21:50 +0000)]
mvebu: puzzle-m901: add LEDs, fan and reset button

Wire up MCU driver for LEDs, fan and temperature sensor, and add
GPIO reset button just like on the M902 also on the Puzzle M901.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 3684b494ddd540b811de44497f0d11309bfd1911)

2 years agomvebu: puzzle-m902: add GPIO reset button
Daniel Golle [Tue, 21 Dec 2021 21:49:25 +0000 (21:49 +0000)]
mvebu: puzzle-m902: add GPIO reset button

Add reset button to device tree so it has the function expected from
usual OpenWrt devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit ddad936fc60ced1783232af3eddee75347f0d08f)

2 years agomvebu: puzzle-mcu: improve led driver
Daniel Golle [Tue, 21 Dec 2021 21:44:37 +0000 (21:44 +0000)]
mvebu: puzzle-mcu: improve led driver

Set blinking mode using scheduled work instead of blocking which may
result in deadlocks.
Add dynamic kprintf debugging hexdumps of all MCU rx and tx.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 7e4c1cca8a137ca4fe5132b8c058e52ba82defac)

2 years agomvebu: puzzle-m902: add driver for MCU driving LEDs, fan and buzzer
Daniel Golle [Tue, 21 Dec 2021 16:27:16 +0000 (16:27 +0000)]
mvebu: puzzle-m902: add driver for MCU driving LEDs, fan and buzzer

Backport MFD driver for communicating with the on-board MCU found on
IEI World Puzzle appliances.
Improve the driver to support multiple LEDs, apply a default state and
let MCU take care of blinking if timing is within supported range.
Wire up LEDs and fan for Puzzle M902 in device tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit f0c0b18234418c6ed6d35fcf1c6e5b0cbdceed49
with commit 962c58558010bd302793ac24284c4f9db8fe287f squashed)

2 years agobuild: fix opkg install step for large package selection
Alexander Egorenkov [Fri, 9 Apr 2021 23:32:44 +0000 (01:32 +0200)]
build: fix opkg install step for large package selection

When the list of packages to be installed in a built image exceeds a certain
number, then 'opkg install' executed for target '$(curdir)/install' in
package/Makefile fails with: /usr/bin/env: Argument list too long.

On Linux, the length of a command-line parameter is limited by
MAX_ARG_STRLEN to max 128 kB.

* https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/binfmts.h#L15
* https://www.in-ulm.de/~mascheck/various/argmax/

To solve the problem, store the package list being passed to 'opkg install'
in a temporary file and use the shell command substitution to pass the
content of the file to 'opkg install'. This guarantees that the length of
the command-line parameters passed to the bash shell is short.

The following bash script demonstrates the problem:
----------------------------------------------------------------------------
count=${1:-1000}

FILES=""
a_file="/home/egorenar/Repositories/openwrt-rel/bin/targets/alpine/generic/packages/base-files_1414-r16464+19-e887049fbb_arm_cortex-a15_neon-vfpv4.ipk"

for i in $(seq 1 $count); do
FILES="$FILES $a_file"
done

env bash -c "echo $FILES >/dev/null"
echo "$FILES" | wc -c
----------------------------------------------------------------------------

Test run:
----------------------------------------------------------------------------
$ ./test.sh 916
130989
$ ./test.sh 917
./test.sh: line 14: /bin/env: Argument list too long
131132
----------------------------------------------------------------------------

Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
[reword commit subject]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 1854aeec4d37079690309dec3171d0864339f73a)

2 years agotcpdump: libpcap: Remove http://www.us.tcpdump.org mirror
Hauke Mehrtens [Sun, 26 Dec 2021 22:38:52 +0000 (23:38 +0100)]
tcpdump: libpcap: Remove www.us.tcpdump.org mirror

The http://www.us.tcpdump.org mirror will go offline soon, only use the
normal download URL.

Reported-by: Denis Ovsienko <denis@ovsienko.info>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 18bdfc803bef00fad03f90b73b6e65c3c79cb397)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[rebased for OpenWrt 21.02 branch]

2 years agolinux-firmware: amd: consolidate amd's linux-firmware entries
Christian Lamparter [Sun, 19 Dec 2021 12:51:41 +0000 (13:51 +0100)]
linux-firmware: amd: consolidate amd's linux-firmware entries

this patch consolidates the amd64-microcode
(moved to linux-firmware.git, previously this was an extra
debian source package download), amdgpu and radeon firmwares
into a shared "amd" makefile.

this will include a microcode update for ZEN 3 CPUs that
came with the 20211216 linux-firmware bump.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit cf8ee49c9bd37ea3e17abe710353737e0f5f9608)

2 years agolinux-firmware: Update to version 20211216
Hauke Mehrtens [Sat, 18 Dec 2021 11:01:27 +0000 (12:01 +0100)]
linux-firmware: Update to version 20211216

The rtl8723bs firmware was removed and a symlink to the rtl8723bu
firmware was created like it is done in upstream linux-firmware.

The following OpenWrt packages are changing:
* amdgpu-firmware: Multiple updates and new files
* ar3k-firmware: Multiple updates and new files
* ath10k-firmware-qca6174: Updated ath10k/QCA6174/hw3.0/board-2.bin
* bnx2x-firmware: Added bnx2x-e1-7.13.21.0.fw, bnx2x-e1h-7.13.21.0.fw and bnx2x-e2-7.13.21.0.fw
* iwlwifi-firmware-iwl8260c: Updated iwlwifi-8000C-36.ucode
* iwlwifi-firmware-iwl8265: Updated iwlwifi-8265-36.ucode
* iwlwifi-firmware-iwl9000: Updated iwlwifi-9000-pu-b0-jf-b0-46.ucode
* iwlwifi-firmware-iwl9260: Updated iwlwifi-9260-th-b0-jf-b0-46.ucode
* r8169-firmware: Updated rtl8153c-1.fw
* rtl8723bs-firmware: removed
* rtl8723bu-firmware: Added rtlwifi/rtl8723bs_nic.bin symlink
* rtl8822ce-firmware: Updated rtw8822c_fw.bin

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 397dfe4a97e61b87f909181ba60b6187d758635f)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (2012->2021)
2 years agolinux-firmware: update to 20210511
Tomas Lara [Tue, 1 Jun 2021 18:00:15 +0000 (14:00 -0400)]
linux-firmware: update to 20210511

git log --pretty=oneline --abbrev-commit 20201118..20210511

7685cf4 (HEAD, tag: 20210511) nvidia: Update Tegra194 XUSB firmware to v60.09
cf32752 nvidia: Update Tegra186 XUSB firmware to v55.18
cb8ca82 nvidia: Update Tegra210 XUSB firmware to v50.26
f99d6a1 linux-firmware: update firmware for mhdp8546
ecdfcf8 Merge branch 'adlp_dmc_firmware' of git://anongit.freedesktop.org/drm/drm-firmware into main
547b202 Merge https://github.com/suraj714/linux-firmware-venus into main
3d32f21 i915: Add ADL-P DMC Support
3f23f51 amdgpu: add new polaris 12 MC firmware
a2565bb firmware: nvidia: Add VIC firmware for Tegra194
17ec2a5 qcom: add gpu firmwares for sc7280
b653cf4 Merge https://github.com/pkshih/linux-firmware into main
2a96c08 brcm: Add a link to enable khadas VIM2's WiFi
ffc64a2 rtw89: 8852a: update fw to v0.13.8.0
3e3497c rtl_bt: Update RTL8852A BT USB firmware to 0xD9A8_7893
c7b11ed qcom: Add venus firmware files for VPU-2.0
2f4f0f8 rtw89: 8852a: update fw to v0.13.8.0
fa0efef linux-firmware: Update firmware file for Intel Bluetooth AX210
9be3daa linux-firmware: Update firmware file for Intel Bluetooth 9560
687d64a linux-firmware: Update firmware file for Intel Bluetooth 9260
a7f1249 linux-firmware: Update firmware file for Intel Bluetooth AX200
47650a0 linux-firmware: Update firmware file for Intel Bluetooth AX201
195ecf1 linux-firmware: Intel BT 7265: Fix Security Issues
4116d72 linux-firmware: Update firmware file for Intel Bluetooth 8265
ca83c73 qcom: update venus firmware files for v5.4
1334578 Merge branch 'mrvl-prestera' of https://github.com/PLVision/linux-firmware into main
16052e4 mrvl: prestera: Add Marvell Prestera Switchdev firmware 3.0 version
bdf929d rtw88: 8822c: Update normal firmware to v9.9.9
0b558e8 brcm: add missing symlink for Pi Zero W NVRAM file
cfa004c amdgpu: update arcturus firmware from 21.10
d5567c5 amdgpu: update navy flounder firmware from 21.10
ef5ea5d amdgpu: update sienna cichlid firmware from 21.10
f35700f amdgpu: update vega20 firmware from 21.10
1be98f1 amdgpu: update picasso firmware from 21.10
fee0497 amdgpu: update navi14 firmware from 21.10
15003b0 amdgpu: update green sardine firmware from 21.10
64555fb amdgpu: update vega12 firmware from 21.10
eb07276 amdgpu: update navi12 firmware from 21.10
e36c82a amdgpu: update vega10 firmware from 21.10
4a5eaa2 amdgpu: update renoir firmware from 21.10
65eb326 amdgpu: update navi10 firmware from 21.10
8bdca03 amdgpu: update raven2 firmware from 21.10
c9e44ca amdgpu: update raven firmware from 21.10
bc3e610 rtl_nic: add new firmware for RTL8153 and RTL8156 series
8528618 Merge branch 'for-upstream' of git://git.chelsio.net/pub/git/linux-firmware into main
940b7f4 cxgb4: Update firmware to revision 1.25.4.0
f66adc3 Merge branch 'main' of gitolite.kernel.org:/pub/scm/linux/kernel/git/maks/linux-firmware into main
f350e91 Merge https://github.com/rjliao-qca/qca-btfw into main
9bc1bcc Merge https://github.com/Netronome/linux-firmware into main
2f30708 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2438
393f272 brcm: Link CM4's WiFi firmware with DMI machine name.
73144e0 linux-firmware: Update firmware file for Intel Bluetooth AX201
8ab7aba amdgpu: update navi14 smc firmware
4fe6e53 amdgpu: update navi10 SMC firmware
c296849 QCA: Update Bluetooth firmware for QCA6174
d6a18e9 WHENCE: link to similar config file for rtl8821a support
6c419ae nfp: update Agilio SmartNIC flower firmware to rev AOTC-2.14.A.6
af1ca28 amdgpu: add arcturus firmware
0dd245d Merge branch 'sm8250-new-fw' of https://github.com/lumag/linux-firmware into main
55cab07 rtl_bt: Add rtl8723bs_config-OBDA0623.bin symlink
2548d06 brcm: Add nvram for the Chuwi Hi8 (CWI509) tablet
e45c137 brcm: Add nvram for the Predia Basic tablet
d8fa0cf qcom: sm8250: update remoteproc firmware
84af0e0 qcom: update a650 firmware files
3f026a2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x59A_76A3
c82cb46 amdgpu: update sienna cichlid firmware for 20.50
24fe696 amdgpu: update vega20 firmware for 20.50
e05d197 amdgpu: update picasso firmware for 20.50
76d07cd amdgpu: update navi14 firmware for 20.50
b2fc037 amdgpu: update vega12 firmware for 20.50
25451a4 amdgpu: update navi12 firmware for 20.50
b938597 amdgpu: update vega10 firmware for 20.50
2542ba7 amdgpu: update renoir firmware for 20.50
b55d063 amdgpu: update navi10 firmware for 20.50
1a62f28 amdgpu: update raven2 firmware for 20.50
4df488f amdgpu: update raven firmware for 20.50
a29bdb2 amdgpu: add initial support for navy flounder
3568f96 (tag: 20210315) linux-firmware: Update firmware file for Intel Bluetooth AX210
9e96e50 linux-firmware: Update firmware file for Intel Bluetooth AX200
c8d0db5 linux-firmware: Update firmware file for Intel Bluetooth AX201
5e2a387 Merge tag 'iwlwifi-fw-2021-03-05-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware into main
b0d3e31 rtw88: 8822c: Update normal firmware to v9.9.6
5a2fd63 iwlwifi: add new FWs from core59-66 release
4f54906 iwlwifi: update 9000-family firmwares
11b7607 iwlwifi: update 7265D firmware
e425f76 Merge branch 'add-silabs-wf200' of github.com:jerome-pouiller/linux-firmware into main
5ecd13f Mellanox: Add new mlxsw_spectrum firmware xx.2008.2406
58fb90a linux-firmware: add frimware for mediatek bluetooth chip (MT7921)
e576a1b rtw89: 8852a: add firmware v0.9.12.2
048a7cb WHENCE: add missing symlink for BananaPi M3
aa6c6e7 Add symlink for BananaPi M2 to brcmfmac43430-sdio config
58825f7 brcm: Fix Raspberry Pi 4B NVRAM file
520f71b silabs: add new firmware for WF200
f7915a0 amdgpu: add initial firmware for green sardine
80cb579 rtw88: RTL8822C: Update normal firmware to v9.9.5
b79d239 (tag: 20210208) Merge branch 'DG1-guc-huc-ADLS-dmc' of git://anongit.freedesktop.org/drm/drm-firmware into main
66970e1 Merge branch 'qcom-rb5' of https://github.com/lumag/linux-firmware into main
cf6fc2b Mellanox: Add new mlxsw_spectrum firmware xx.2008.2304
391fd50 linux-firmware: add firmware for MT7921
c5e3240 rtw88: RTL8821C: Update firmware to v24.8
d33d2d8 linux-firmware: Update firmware file for Intel Bluetooth AX210
3027ae4 linux-firmware: Update firmware file for Intel Bluetooth AX200
13979c3 linux-firmware: Update firmware file for Intel Bluetooth AX201
348d8a9 i915: Add DMC v2.01 for ADL-S
f33f1f7 i915: Add HuC v7.7.1 for DG1
6a422f5 i915: Add GuC v49.0.1 for DG1
df822a8 qcom: Add venus firmware files for VPU-1.0
11a1db1 qcom: Add SM8250 Compute DSP firmware
e55248b qcom: Add SM8250 Audio DSP firmware
da74cc6 qcom: add firmware files for Adreno a650
0578970 brcm: Link RPi4's WiFi firmware with DMI machine name.
d528862 brcm: Add NVRAM for Vamrs 96boards Rock960
870b805 brcm: Update Raspberry Pi 3B+/4B NVRAM for downstream changes
a28a590 cypress: Fix link direction
060ad8b cypress: Link the new cypress firmware to the old brcm files
0f0aefd brcm: remove old brcm firmwares that have newer cypress variants
f580dc2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x059A_25CB
7df2220 rtl_bt: Update RTL8822C BT(USB I/F) FW to 0x099a_7253
e79405d rtl_bt: Add firmware and config files for RTL8852A BT USB chip
ef3813d rtl_bt: Update RTL8821C BT(USB I/F) FW to 0x829a_7644
646f159 (tag: 20201218) make AP6212 in bananpi m2 plus/zero work
28185ec linux-firmware: Update firmware file for Intel Bluetooth AX210
23da869 linux-firmware: Update firmware file for Intel Bluetooth AX200
2099248 linux-firmware: Update firmware file for Intel Bluetooth AX201
94de5e2 linux-firmware: Update firmware file for Intel Bluetooth 9560
27a3689 linux-firmware: Update firmware file for Intel Bluetooth 9260
5c3c4af Merge branch 'lt9611uxc' of https://github.com/lumag/linux-firmware into main
aaed4a8 Merge branch 'v1.1.6' of https://github.com/irui-wang/linux_fw_vpu_v1.1.6 into main
d8c9865 Merge branch 'master' of https://github.com/sampnimm/linux-firmware-BT into main
63ab3db linux-firmware: add firmware for Lontium LT9611UXC DSI to HDMI bridge
0fe0fe0 mediatek: update MT8173 VPU firmware to v1.1.6
1a08ec9 QCA : Updated firmware files for WCN3991
7455a36 Merge branch 'guc_v49' of git://anongit.freedesktop.org/drm/drm-firmware into main
7eb7fda linux-firmware: Update firmware file for Intel Bluetooth AX210
5cbf459 linux-firmware: Update firmware file for Intel Bluetooth AX210
c487f7d i915: Add GuC firmware v49.0.1 for all platforms
d9ffb07 i915: Remove duplicate KBL DMC entry
b362fd4 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2018
bc9cd0b linux-firmware: Update AMD SEV firmware
54c797a amdgpu: add sienna cichlid firmware for 20.45
1340e9c amdgpu: update vega20 firmware for 20.45
b260c9c amdgpu: update vega12 firmware for 20.45
d683bd5 amdgpu: update vega10 firmware for 20.45
7c81cc2 amdgpu: update renoir firmware for 20.45
3619e57 amdgpu: update navi14 firmware for 20.45
68ce0fb amdgpu: update navi12 firmware for 20.45
e889b80 amdgpu: update navi10 firmware for 20.45
f4edc15 amdgpu: update raven2 firmware for 20.45
e71210f amdgpu: update raven firmware for 20.45

Signed-off-by: Tomas Lara <tl849670@gmail.com>
[rebased; removed brcmfmac changes due to removed firmware]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 441353743095d11c232bb855848a2aa2d1edafa0)

2 years agolinux-firmware: update to version 20210315 and trim down broadcom FW
Josef Schlehofer [Sat, 1 May 2021 06:51:12 +0000 (08:51 +0200)]
linux-firmware: update to version 20210315 and trim down broadcom FW

In there linux-firmware repository located in kernel, there were removed old
broadcom firmware [1] as they seem to be likely vulnerable to KrØØk vulnerability
(CVE-2019-15126), because Cypress released new versions and superseded
by it.

In OpenWrt, there is Makefile for cypress-firmware, which already provides
the same named packages like it was in linux-firmware. For example, cypress-firmware-43455-sdio
provides brcmfmac-firmware-43455-sdio [2].

Changelog between 2020118 and 20210315:
3568f96 (tag: 20210315) linux-firmware: Update firmware file for Intel Bluetooth AX210
9e96e50 linux-firmware: Update firmware file for Intel Bluetooth AX200
c8d0db5 linux-firmware: Update firmware file for Intel Bluetooth AX201
5e2a387 Merge tag 'iwlwifi-fw-2021-03-05-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware into main
b0d3e31 rtw88: 8822c: Update normal firmware to v9.9.6
5a2fd63 iwlwifi: add new FWs from core59-66 release
4f54906 iwlwifi: update 9000-family firmwares
11b7607 iwlwifi: update 7265D firmware
e425f76 Merge branch 'add-silabs-wf200' of github.com:jerome-pouiller/linux-firmware into main
5ecd13f Mellanox: Add new mlxsw_spectrum firmware xx.2008.2406
58fb90a linux-firmware: add frimware for mediatek bluetooth chip (MT7921)
e576a1b rtw89: 8852a: add firmware v0.9.12.2
048a7cb WHENCE: add missing symlink for BananaPi M3
aa6c6e7 Add symlink for BananaPi M2 to brcmfmac43430-sdio config
58825f7 brcm: Fix Raspberry Pi 4B NVRAM file
520f71b silabs: add new firmware for WF200
f7915a0 amdgpu: add initial firmware for green sardine
80cb579 rtw88: RTL8822C: Update normal firmware to v9.9.5
b79d239 (tag: 20210208) Merge branch 'DG1-guc-huc-ADLS-dmc' of git://anongit.freedesktop.org/drm/drm-firmware into main
66970e1 Merge branch 'qcom-rb5' of https://github.com/lumag/linux-firmware into main
cf6fc2b Mellanox: Add new mlxsw_spectrum firmware xx.2008.2304
391fd50 linux-firmware: add firmware for MT7921
c5e3240 rtw88: RTL8821C: Update firmware to v24.8
d33d2d8 linux-firmware: Update firmware file for Intel Bluetooth AX210
3027ae4 linux-firmware: Update firmware file for Intel Bluetooth AX200
13979c3 linux-firmware: Update firmware file for Intel Bluetooth AX201
348d8a9 i915: Add DMC v2.01 for ADL-S
f33f1f7 i915: Add HuC v7.7.1 for DG1
6a422f5 i915: Add GuC v49.0.1 for DG1
df822a8 qcom: Add venus firmware files for VPU-1.0
11a1db1 qcom: Add SM8250 Compute DSP firmware
e55248b qcom: Add SM8250 Audio DSP firmware
da74cc6 qcom: add firmware files for Adreno a650
0578970 brcm: Link RPi4's WiFi firmware with DMI machine name.
d528862 brcm: Add NVRAM for Vamrs 96boards Rock960
870b805 brcm: Update Raspberry Pi 3B+/4B NVRAM for downstream changes
a28a590 cypress: Fix link direction
060ad8b cypress: Link the new cypress firmware to the old brcm files
0f0aefd brcm: remove old brcm firmwares that have newer cypress variants
f580dc2 rtl_bt: Update RTL8822C BT(UART I/F) FW to 0x059A_25CB
7df2220 rtl_bt: Update RTL8822C BT(USB I/F) FW to 0x099a_7253
e79405d rtl_bt: Add firmware and config files for RTL8852A BT USB chip
ef3813d rtl_bt: Update RTL8821C BT(USB I/F) FW to 0x829a_7644
646f159 (tag: 20201218) make AP6212 in bananpi m2 plus/zero work
28185ec linux-firmware: Update firmware file for Intel Bluetooth AX210
23da869 linux-firmware: Update firmware file for Intel Bluetooth AX200
2099248 linux-firmware: Update firmware file for Intel Bluetooth AX201
94de5e2 linux-firmware: Update firmware file for Intel Bluetooth 9560
27a3689 linux-firmware: Update firmware file for Intel Bluetooth 9260
5c3c4af Merge branch 'lt9611uxc' of https://github.com/lumag/linux-firmware into main
aaed4a8 Merge branch 'v1.1.6' of https://github.com/irui-wang/linux_fw_vpu_v1.1.6 into main
d8c9865 Merge branch 'master' of https://github.com/sampnimm/linux-firmware-BT into main
63ab3db linux-firmware: add firmware for Lontium LT9611UXC DSI to HDMI bridge
0fe0fe0 mediatek: update MT8173 VPU firmware to v1.1.6
1a08ec9 QCA : Updated firmware files for WCN3991
7455a36 Merge branch 'guc_v49' of git://anongit.freedesktop.org/drm/drm-firmware into main
7eb7fda linux-firmware: Update firmware file for Intel Bluetooth AX210
5cbf459 linux-firmware: Update firmware file for Intel Bluetooth AX210
c487f7d i915: Add GuC firmware v49.0.1 for all platforms
d9ffb07 i915: Remove duplicate KBL DMC entry
b362fd4 Mellanox: Add new mlxsw_spectrum firmware xx.2008.2018
bc9cd0b linux-firmware: Update AMD SEV firmware
54c797a amdgpu: add sienna cichlid firmware for 20.45
1340e9c amdgpu: update vega20 firmware for 20.45
b260c9c amdgpu: update vega12 firmware for 20.45
d683bd5 amdgpu: update vega10 firmware for 20.45
7c81cc2 amdgpu: update renoir firmware for 20.45
3619e57 amdgpu: update navi14 firmware for 20.45
68ce0fb amdgpu: update navi12 firmware for 20.45
e889b80 amdgpu: update navi10 firmware for 20.45
f4edc15 amdgpu: update raven2 firmware for 20.45
e71210f amdgpu: update raven firmware for 20.45

[1] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=0f0aefd733f70beae4c0246edbd2c158d5ce974c

[2] https://github.com/openwrt/openwrt/blob/eeda8652f1655d4f9c11e9c9f51ddcd3377d119a/package/firmware/cypress-firmware/Makefile#L124

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit ff2bb16730f629d54bde8ba85c75d8614741e3fd)
(removed sinovoip_bananapi-m2-berry)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agolinux-firmware: ath10k: add support for Qualcomm Atheros QCA9377
Josef Schlehofer [Sat, 10 Apr 2021 17:07:40 +0000 (19:07 +0200)]
linux-firmware: ath10k: add support for Qualcomm Atheros QCA9377

Add firmware and board file for Qualcomm Atheros QCA9377 802.11ac Wireless
Network Adapter (rev 31) recognized as [168c:0042].

This card supports standard 1x1 802.11ac Wave2, BT5, and MU-MIMO.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit b2656490855f2a90f8895079a9a3853af6512d83)

2 years agofirmware: intel-microcode: update to 20210608
Tan Zien [Fri, 27 Aug 2021 13:27:11 +0000 (21:27 +0800)]
firmware: intel-microcode: update to 20210608

intel-microcode (3.20210608.2)

  * Correct INTEL-SA-00442 CVE id to CVE-2020-24489 in changelog and
    debian/changelog (3.20210608.1).

intel-microcode (3.20210608.1)

  * New upstream microcode datafile 20210608 (closes: #989615)
    * Implements mitigations for CVE-2020-24511 CVE-2020-24512
      (INTEL-SA-00464), information leakage through shared resources,
      and timing discrepancy sidechannels
    * Implements mitigations for CVE-2020-24513 (INTEL-SA-00465),
      Domain-bypass transient execution vulnerability in some Intel Atom
      Processors, affects Intel SGX.
    * Implements mitigations for CVE-2020-24489 (INTEL-SA-00442), Intel
      VT-d privilege escalation
    * Fixes critical errata on several processors
    * New Microcodes:
      sig 0x00050655, pf_mask 0xb7, 2018-11-16, rev 0x3000010, size 47104
      sig 0x000606a5, pf_mask 0x87, 2021-03-08, rev 0xc0002f0, size 283648
      sig 0x000606a6, pf_mask 0x87, 2021-04-25, rev 0xd0002a0, size 283648
      sig 0x00080664, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048
      sig 0x00080665, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048
      sig 0x000806c1, pf_mask 0x80, 2021-03-31, rev 0x0088, size 109568
      sig 0x000806c2, pf_mask 0xc2, 2021-04-07, rev 0x0016, size 94208
      sig 0x000806d1, pf_mask 0xc2, 2021-04-23, rev 0x002c, size 99328
      sig 0x00090661, pf_mask 0x01, 2021-02-04, rev 0x0011, size 19456
      sig 0x000906c0, pf_mask 0x01, 2021-03-23, rev 0x001d, size 19456
      sig 0x000a0671, pf_mask 0x02, 2021-04-11, rev 0x0040, size 100352
    * Updated Microcodes:
      sig 0x000306f2, pf_mask 0x6f, 2021-01-27, rev 0x0046, size 34816
      sig 0x000306f4, pf_mask 0x80, 2021-02-05, rev 0x0019, size 19456
      sig 0x000406e3, pf_mask 0xc0, 2021-01-25, rev 0x00ea, size 105472
      sig 0x000406f1, pf_mask 0xef, 2021-02-06, rev 0xb00003e, size 31744
      sig 0x00050653, pf_mask 0x97, 2021-03-08, rev 0x100015b, size 34816
      sig 0x00050654, pf_mask 0xb7, 2021-03-08, rev 0x2006b06, size 36864
      sig 0x00050656, pf_mask 0xbf, 2021-03-08, rev 0x4003102, size 30720
      sig 0x00050657, pf_mask 0xbf, 2021-03-08, rev 0x5003102, size 30720
      sig 0x0005065b, pf_mask 0xbf, 2021-04-23, rev 0x7002302, size 27648
      sig 0x00050663, pf_mask 0x10, 2021-02-04, rev 0x700001b, size 24576
      sig 0x00050664, pf_mask 0x10, 2021-02-04, rev 0xf000019, size 24576
      sig 0x00050665, pf_mask 0x10, 2021-02-04, rev 0xe000012, size 19456
      sig 0x000506c9, pf_mask 0x03, 2020-10-23, rev 0x0044, size 17408
      sig 0x000506ca, pf_mask 0x03, 2020-10-23, rev 0x0020, size 15360
      sig 0x000506e3, pf_mask 0x36, 2021-01-25, rev 0x00ea, size 105472
      sig 0x000506f1, pf_mask 0x01, 2020-10-23, rev 0x0034, size 11264
      sig 0x000706a1, pf_mask 0x01, 2020-10-23, rev 0x0036, size 74752
      sig 0x000706a8, pf_mask 0x01, 2020-10-23, rev 0x001a, size 75776
      sig 0x000706e5, pf_mask 0x80, 2020-11-01, rev 0x00a6, size 110592
      sig 0x000806a1, pf_mask 0x10, 2020-11-06, rev 0x002a, size 32768
      sig 0x000806e9, pf_mask 0x10, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806e9, pf_mask 0xc0, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806ea, pf_mask 0xc0, 2021-01-06, rev 0x00ea, size 103424
      sig 0x000806eb, pf_mask 0xd0, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806ec, pf_mask 0x94, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906e9, pf_mask 0x2a, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906ea, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 102400
      sig 0x000906eb, pf_mask 0x02, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906ec, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424
      sig 0x000906ed, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424
      sig 0x000a0652, pf_mask 0x20, 2021-02-07, rev 0x00ea, size 93184
      sig 0x000a0653, pf_mask 0x22, 2021-03-08, rev 0x00ea, size 94208
      sig 0x000a0655, pf_mask 0x22, 2021-03-08, rev 0x00ec, size 94208
      sig 0x000a0660, pf_mask 0x80, 2020-12-08, rev 0x00e8, size 94208
      sig 0x000a0661, pf_mask 0x80, 2021-02-07, rev 0x00ea, size 93184
  * source: update symlinks to reflect id of the latest release, 20210608

intel-microcode (3.20210216.1)

  * New upstream microcode datafile 20210216
    * Mitigates an issue on Skylake Server (H0/M0/U0), Xeon-D 21xx,
      and Cascade Lake Server (B0/B1) when using an active JTAG
      agent like In Target Probe (ITP), Direct Connect Interface
      (DCI) or a Baseboard Management Controller (BMC) to take the
      CPU JTAG/TAP out of reset and then returning it to reset.
    * This issue is related to the INTEL-SA-00381 mitigation.
    * Updated Microcodes:
      sig 0x00050654, pf_mask 0xb7, 2020-12-31, rev 0x2006a0a, size 36864
      sig 0x00050656, pf_mask 0xbf, 2020-12-31, rev 0x4003006, size 53248
      sig 0x00050657, pf_mask 0xbf, 2020-12-31, rev 0x5003006, size 53248
  * source: update symlinks to reflect id of the latest release, 20210216

intel-microcode (3.20201118.1)

  * New upstream microcode datafile 20201118
    * Removes a faulty microcode update from release 2020-11-10 for Tiger Lake
      processors.  Note that Debian already had removed this specific falty
      microcode update on the 3.20201110.1 release
    * Add a microcode update for the Pentium Silver N/J5xxx and Celeron
      N/J4xxx which didn't make it to release 20201110, fixing security issues
      (INTEL-SA-00381, INTEL-SA-00389)
    * Updated Microcodes:
      sig 0x000706a1, pf_mask 0x01, 2020-06-09, rev 0x0034, size 74752
    * Removed Microcodes:
      sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520

intel-microcode (3.20201110.1)

  * New upstream microcode datafile 20201110 (closes: #974533)
    * Implements mitigation for CVE-2020-8696 and CVE-2020-8698,
      aka INTEL-SA-00381: AVX register information leakage;
      Fast-Forward store predictor information leakage
    * Implements mitigation for CVE-2020-8695, Intel SGX information
      disclosure via RAPL, aka INTEL-SA-00389
    * Fixes critical errata on several processor models
    * Reintroduces SRBDS mitigations(CVE-2020-0543, INTEL-SA-00320)
      for Skylake-U/Y, Skylake Xeon E3
    * New Microcodes
      sig 0x0005065b, pf_mask 0xbf, 2020-08-20, rev 0x700001e, size 27648
      sig 0x000806a1, pf_mask 0x10, 2020-06-26, rev 0x0028, size 32768
      sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520
      sig 0x000a0652, pf_mask 0x20, 2020-07-08, rev 0x00e0, size 93184
      sig 0x000a0653, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 94208
      sig 0x000a0655, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 93184
      sig 0x000a0661, pf_mask 0x80, 2020-07-02, rev 0x00e0, size 93184
    * Updated Microcodes
      sig 0x000306f2, pf_mask 0x6f, 2020-05-27, rev 0x0044, size 34816
      sig 0x000406e3, pf_mask 0xc0, 2020-07-14, rev 0x00e2, size 105472
      sig 0x00050653, pf_mask 0x97, 2020-06-18, rev 0x1000159, size 33792
      sig 0x00050654, pf_mask 0xb7, 2020-06-16, rev 0x2006a08, size 35840
      sig 0x00050656, pf_mask 0xbf, 2020-06-18, rev 0x4003003, size 52224
      sig 0x00050657, pf_mask 0xbf, 2020-06-18, rev 0x5003003, size 52224
      sig 0x000506c9, pf_mask 0x03, 2020-02-27, rev 0x0040, size 17408
      sig 0x000506ca, pf_mask 0x03, 2020-02-27, rev 0x001e, size 15360
      sig 0x000506e3, pf_mask 0x36, 2020-07-14, rev 0x00e2, size 105472
      sig 0x000706a8, pf_mask 0x01, 2020-06-09, rev 0x0018, size 75776
      sig 0x000706e5, pf_mask 0x80, 2020-07-30, rev 0x00a0, size 109568
      sig 0x000806e9, pf_mask 0x10, 2020-05-27, rev 0x00de, size 104448
      sig 0x000806e9, pf_mask 0xc0, 2020-05-27, rev 0x00de, size 104448
      sig 0x000806ea, pf_mask 0xc0, 2020-06-17, rev 0x00e0, size 104448
      sig 0x000806eb, pf_mask 0xd0, 2020-06-03, rev 0x00de, size 104448
      sig 0x000806ec, pf_mask 0x94, 2020-05-18, rev 0x00de, size 104448
      sig 0x000906e9, pf_mask 0x2a, 2020-05-26, rev 0x00de, size 104448
      sig 0x000906ea, pf_mask 0x22, 2020-05-25, rev 0x00de, size 103424
      sig 0x000906eb, pf_mask 0x02, 2020-05-25, rev 0x00de, size 104448
      sig 0x000906ec, pf_mask 0x22, 2020-06-03, rev 0x00de, size 103424
      sig 0x000906ed, pf_mask 0x22, 2020-05-24, rev 0x00de, size 103424
      sig 0x000a0660, pf_mask 0x80, 2020-07-08, rev 0x00e0, size 94208
  * 0x806c1: remove the new Tiger Lake update: causes hang on cold/warm boot
    https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/44
    INTEL-SA-00381 AND INTEL-SA-00389 MITIGATIONS ARE THEREFORE NOT INSTALLED
    FOR 0x806c1 TIGER LAKE PROCESSORS by this package update.  Contact your
    system vendor for a firmware update, or wait fo a possible fix in a future
    Intel microcode release.
  * source: update symlinks to reflect id of the latest release, 20201110
  * source: ship new upstream documentation (security.md, releasenote.md)

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
[used different .tar.xz source, but with the same content]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 1add2c0d95efb970ab18485e570b146610740bf2)

2 years agocypress-nvram: fix firmware is not exist for raspberry pi compute 4
Nian Bohung [Mon, 25 Oct 2021 13:26:51 +0000 (06:26 -0700)]
cypress-nvram: fix firmware is not exist for raspberry pi compute 4

Fixes:
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt failed with error -2
Falling back to sysfs fallback for: brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
Falling back to sysfs fallback for: brcm/brcmfmac43455-sdio.txt

Signed-off-by: Nian Bohung <n0404.n0404@gmail.com>
(cherry picked from commit b1db5585557ed069027767a80c31c6f1f2920196)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[improved commit mesage]

2 years agobase-files: fix service_running check
Florian Eckert [Tue, 15 Jun 2021 06:48:18 +0000 (08:48 +0200)]
base-files: fix service_running check

The following command checks if a instance of a service is running.
/etc/init.d/<service> running <instance>

 In the variable `$@`, which is passed to the function
`service_running`, the first argument is always the `instance` which
should be checked. Because all other variables where removed from `$@`
with `shift`.

Before this change the first argument of `$@` was set to the `$service`
Variable. So the function does not work as expected. The `$service`
variable was always the instance which should be checked. This is not
what we want.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit dd681838d370f1f6f6fa1bf1f22b0414322292f3)

2 years agobase-files: upgrade: fix efi partitions size calculation
Javier Marcet [Sat, 4 Apr 2020 15:52:29 +0000 (17:52 +0200)]
base-files: upgrade: fix efi partitions size calculation

We were missing (not using) the last sector of each partition,
compared with the output of gparted.

Signed-off-by: Javier Marcet <javier@marcet.info>
[moved the dot]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 018ada5403f02921be22ee0cf49b88b2700ee105)

2 years agoccache: update to 4.2.1
DENG Qingfang [Thu, 22 Apr 2021 04:28:39 +0000 (12:28 +0800)]
ccache: update to 4.2.1

Update ccache to 4.2.1

While compiling on Gentoo, the ccache can not be compiled due to this
error:

/openwrt/build_dir/host/ccache-4.1/unittest/../src/third_party/doctest.h:4084:47: error: size of array 'altStackMem' is not an integral constant-expression
 4084 |         static char             altStackMem[4 * SIGSTKSZ];
      |                                               ^

This was fixed in ccache version 4.2.1 [1] by upgrading doctest [2].

[1] https://github.com/ccache/ccache/issues/825
[2] https://github.com/doctest/doctest/issues/473

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [refresh patch]
(cherry picked from commit 3ebfd0078d6aa4848ee8f72640266bd0390f790a)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[improved commit message]

2 years agomvebu: Turris Omnia: use SFP module, if present
Klaus Kudielka [Sat, 27 Feb 2021 11:56:10 +0000 (12:56 +0100)]
mvebu: Turris Omnia: use SFP module, if present

Follow the recommendations stated in the Turris Omnia DTS for eth2:

"In case SFP module is present, U-Boot has to enable the sfp node above,
remove phy-handle property, and add managed = "in-band-status" property."

The boot script is written in a way, that it works for all U-Boot
versions deployed by the vendor so far (2015.10-rc2, 2019.07).

Reviewed-by: Noci <noci@noci.work>
Reviewed-by: Justin van Steijn <jvs@fsfe.org>
Reviewed-by: Nico Rikken <nico@nicorikken.eu>
Reviewed-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
(cherry picked from commit 23d2690e5a5410576b587bc96e2c2cf5fc693927)

2 years agomvebu: backport Turris Omnia DTS changes to 5.4
Klaus Kudielka [Sat, 17 Jul 2021 17:32:57 +0000 (19:32 +0200)]
mvebu: backport Turris Omnia DTS changes to 5.4

Kernel 5.4 receives a reduced set, just to make the SFP cage work.
While we are at it, move the patches accepted upstream to the 0xx series.

Reviewed-by: Noci <noci@noci.work>
Reviewed-by: Justin van Steijn <jvs@fsfe.org>
Reviewed-by: Nico Rikken <nico@nicorikken.eu>
Reviewed-by: Julius Schwartzenberg <julius.schwartzenberg@gmail.com>
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
(cherry picked from commit 8138cb8737d1475e6e8d57393500f30384e75a82)

2 years agokernel: bump 5.4 to 5.4.168
Hauke Mehrtens [Mon, 27 Dec 2021 20:59:44 +0000 (20:59 +0000)]
kernel: bump 5.4 to 5.4.168

All updated automatically.

Compile-tested on: lantiq/xrx200, armvirt/64
Runtime-tested on: lantiq/xrx200, armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoapm821xx: fix WD MyBook Live DUO USB-Port
Christian Lamparter [Fri, 24 Dec 2021 13:44:08 +0000 (14:44 +0100)]
apm821xx: fix WD MyBook Live DUO USB-Port

where to begin? the USB regulator settings were just
a part of the issue. With them changed, according to
the forum it still failed when a USB device was
connected to the port with:

dwc2 4bff80000.usbotg: dwc2_restore_global_registers: no global registers to restore
dwc2 4bff80000.usbotg: dwc2_exit_partial_power_down: failed to restore registers
dwc2 4bff80000.usbotg: exit partial_power_down failed
dwc2 4bff80000.usbotg: HC died; cleaning up

One clue was found upstream in
commit cc10ce0c51b1 ("usb: dwc2: disable power_down on Amlogic devices")

|Disable power_down by setting the parameter to
|DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic
|Meson SoCs where USB devices are only recognized when plugged in before
|booting Linux. A hot-plugged USB device was not detected even though the
|device got power (my USB thumb drive for example has an LED which lit
|up).
|[...]

the same method proposed there worked with APM821xx's USB IP-Core.

Link: https://forum.openwrt.org/t/wd-my-book-duo-usb/111926/2
Reported-by: thwe and takimata (openwrt forum)
Fixes: b70d3557e05 ("apm821xx: clean up gpio-hogs")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 832b9cbd741cdb6cc8483b2cddfef6de000ec61d)

2 years agohostapd: only attempt to set qos map if supported by the driver
Felix Fietkau [Thu, 23 Dec 2021 18:18:33 +0000 (19:18 +0100)]
hostapd: only attempt to set qos map if supported by the driver

Fixes issues with brcmfmac

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 5e67cd63c4ff5d8f36c341dfa3355e3a4ac2be81)

2 years agomac80211: optimize airtime fairness code to reduce cpu usage
Felix Fietkau [Tue, 14 Dec 2021 16:58:14 +0000 (17:58 +0100)]
mac80211: optimize airtime fairness code to reduce cpu usage

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 87def9efd8cee66da3bd3961671e580282427c2e)

2 years agokernel: backport the upstream implementation of threaded NAPI to 5.4
Felix Fietkau [Mon, 13 Dec 2021 17:15:07 +0000 (18:15 +0100)]
kernel: backport the upstream implementation of threaded NAPI to 5.4

The workqueue based implementation has a few corner cases and typically lower
performance than the upstream one

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 01bebc070c35d87c24a594fff7ee1911965759aa)

2 years agomac80211: Update toversion 5.10.85
Hauke Mehrtens [Sun, 5 Dec 2021 20:58:31 +0000 (21:58 +0100)]
mac80211: Update toversion 5.10.85

The following patches were backported from upstream before and are not
needed any more:
  package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch
  package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agobcm53xx: sysupgrade: fix support for Luxul's legacy firmware format
Rafał Miłecki [Mon, 13 Dec 2021 17:19:05 +0000 (18:19 +0100)]
bcm53xx: sysupgrade: fix support for Luxul's legacy firmware format

Fixes: c808c55b398c ("bcm53xx: sysupgrade: refactor handling different firmware formats")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 3bcf3e8143160e447c22c0ac3fa66fbcf6a59eef)

2 years agobcm4908: build chk image for Netgear RAXE500
Rafał Miłecki [Fri, 19 Nov 2021 13:48:20 +0000 (14:48 +0100)]
bcm4908: build chk image for Netgear RAXE500

Fixes: 63ba3eaccdde ("bcm4908: start working on Netgear RAXE500 image")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 0e8a5acf6eb4c689b6deed2146010b5b2c54fa78)

2 years agobcm4908: start working on Netgear RAXE500 image
Rafał Miłecki [Fri, 19 Nov 2021 13:32:59 +0000 (14:32 +0100)]
bcm4908: start working on Netgear RAXE500 image

bootfs still needs more work before it's ready.

For some unknown reason model RAXE500 uses board id RAX220.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 63ba3eaccddeb8058b0fabd69197e650735573bc)

2 years agobcm4908: enable MTD_CMDLINE_PARTS
Rafał Miłecki [Fri, 19 Nov 2021 13:32:58 +0000 (14:32 +0100)]
bcm4908: enable MTD_CMDLINE_PARTS

It's needed to support devices with U-Boot. That bootloader passes MTD
layout using cmdline.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 21d28adbc1cc98c55858a73d62b9bf89c3874b08)

2 years agobcm4908: continue work on images for U-Boot based devices
Rafał Miłecki [Fri, 19 Nov 2021 13:32:58 +0000 (14:32 +0100)]
bcm4908: continue work on images for U-Boot based devices

It still isn't ready though - more data needs to be added to the bootfs.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 494c033f9cbad67ea2cee3860894bdfffea65109)

2 years agobcm4908: backport upstream DT commits
Rafał Miłecki [Thu, 18 Nov 2021 16:51:08 +0000 (17:51 +0100)]
bcm4908: backport upstream DT commits

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit d745835ae19caf1999924a434abd25e92cce4343)

2 years agobcm4908: add watchdog support
Rafał Miłecki [Tue, 9 Nov 2021 11:07:59 +0000 (12:07 +0100)]
bcm4908: add watchdog support

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 9565bd9bd61f026effce7ebfe17d413d1adb032f)

2 years agobcm4908: start work on images for devices using U-Boot
Rafał Miłecki [Wed, 3 Nov 2021 17:12:05 +0000 (18:12 +0100)]
bcm4908: start work on images for devices using U-Boot

New BCM4908 family based routers will use U-Boot bootloader. That will
require using a totally different firmware format. Kernel has to be put
in a FIT image.

OpenWrt has some helpers for generating .its files but they don't fit
BCM4908 requirements and there is no simple way of extending any of
them. The best solution seems to be storing an .its template.

BCM4908 bootfs may:
1. contain extra binaries (other than kernel & DTB)
2. include multiple DTB files
3. store device specific U-Boot configurations with custom properties

Such setups are too complex to generate using shell script. Raw .its
file on the other hand seems quire clean & reasonable.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a02c971dff934a11ddadf7ffd850dabcab5a3cdf)

2 years agobcm4908img: detect Linksys images
Rafał Miłecki [Fri, 10 Sep 2021 14:34:48 +0000 (16:34 +0200)]
bcm4908img: detect Linksys images

Linksys uses an extra 0x100 bytes long tail for BCM4908 images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit c4d5e60f6115b9a97318774533ea764bf938c2a9)

2 years agobcm4908img: store offset of tail data
Rafał Miłecki [Fri, 10 Sep 2021 14:34:47 +0000 (16:34 +0200)]
bcm4908img: store offset of tail data

This simplifies some operations as it doesn't have to be caculated over
and over. It will also allow adding support for more vendor formats.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 063038bcef39802aa65c196a162067f66e5c8621)

2 years agobcm63xx-cfe: update to the latest master
Rafał Miłecki [Tue, 22 Jun 2021 11:19:50 +0000 (13:19 +0200)]
bcm63xx-cfe: update to the latest master

e5050f3 linksys: ea9500-v2: add cferam file

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 0b2c1997e988552a4bb52dda88eccf4896fbb61b)

2 years agobcm53xx: sysupgrade: refactor handling different firmware formats
Rafał Miłecki [Sun, 28 Nov 2021 10:54:19 +0000 (11:54 +0100)]
bcm53xx: sysupgrade: refactor handling different firmware formats

List of supported formats grew over time and implementation got a bit
messy. There are multiple functions with format-specific parameters and
commands.

Refactor it by making platform_identify() setup all required info right
after detecting firmware format. This simplifies formats handling in
platform_other_check_image() and platform_do_upgrade() a lot.

This has been tested on:
1. SmartRG SR400ac (TRX): non-NAND sysupgrade
2. Netgear R8000 (CHK): NAND aware and standard sysupgrade-s
3. D-Link DIR-885L (Seama): NAND aware and standard sysupgrade-s
4. Luxul XWR-3150 (LXL): NAND aware and standard sysupgrade-s

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 80041dea7094f46f9ef5402964c95b0a5dcd5f28)

2 years agobcm53xx: sysupgrade: simplify extracting image from Seama seal
Rafał Miłecki [Fri, 26 Nov 2021 17:01:50 +0000 (18:01 +0100)]
bcm53xx: sysupgrade: simplify extracting image from Seama seal

Use "oseama extract" which supports now writing to stdout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit e7bd6cce4c382e33a62c462bf07bafba23b22e1a)

2 years agobcm53xx: enable Linksys EA6300 & EA9200 builds
Rafał Miłecki [Mon, 18 Oct 2021 13:59:43 +0000 (15:59 +0200)]
bcm53xx: enable Linksys EA6300 & EA9200 builds

Both should be supported since:
1. Adding NVMEM driver for NVRAM
2. Using NVRAM info for determining active firmware partition

Linksys EA9500 uses very similar design and works fine.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 287257d676b1120f388120f1dc259e4eefd3b163)

2 years agobcm53xx: backport the latest upstream DT changes
Rafał Miłecki [Sun, 29 Aug 2021 20:53:55 +0000 (22:53 +0200)]
bcm53xx: backport the latest upstream DT changes

This includes:
1. BCM5301X changes from 5.14 and queued 5.15 stuff
2. NSP changes from 5.11 - 5.15 for kernel 5.10

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit bce00f47e5d67e5a33e9d7fa137cbe0a5d3d334b)

2 years agobcm53xx: fix Luxul XWR-3150 LAN ports numbering
Rafał Miłecki [Wed, 21 Apr 2021 05:34:30 +0000 (07:34 +0200)]
bcm53xx: fix Luxul XWR-3150 LAN ports numbering

Port numbers were reverted.

Fixes: c459a6bf482f ("bcm53xx: add support for Luxul FullMAC WiFi devices")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 53546c3e945f5a0a8f8c62311f48c6f21c9ab0a8)

2 years agootrx: update to the latest master
Rafał Miłecki [Mon, 13 Dec 2021 12:47:39 +0000 (13:47 +0100)]
otrx: update to the latest master

56e8e19 otrx: support TRX from stdin when extracting
a37ccaf otrx: support unsorted partitions offsets
1fa145e otrx: extract shared code opening & parsing TRX format
4ecefda otrx: allow validating TRX from stdin
cf01e69 otrx: avoid unneeded fseek() when calculating CRC32

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 942facd14f0a13fa3aeb4238d866e764f5caec8c)

2 years agootrx: use firmware-utils.git to avoid code duplication
Rafał Miłecki [Fri, 30 Jul 2021 11:02:41 +0000 (13:02 +0200)]
otrx: use firmware-utils.git to avoid code duplication

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7c4d79aa1c3595e2be36d1449cf63404f301f748)

2 years agokernel: bump 5.4 to 5.4.163
Hauke Mehrtens [Sun, 5 Dec 2021 16:43:36 +0000 (16:43 +0000)]
kernel: bump 5.4 to 5.4.163

Removed upstreamed:
 target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
 target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
 target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
 target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
 target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch

The following patch does not apply to upstream any more and needs some
more work to make it work fully again. I am not sure if we are still
able to set the UART to a none standard baud rate.
 target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch

These patches needed manually changes:
  target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch
  target/linux/ipq806x/patches-5.4/0065-arm-override-compiler-flags.patch
  target/linux/layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch
  target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
  target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

All others updated automatically.

Compile-tested on: malta/le, armvirt/64, lantiq/xrx200
Runtime-tested on: malta/le, armvirt/64, lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoath79: add support for Xiaomi AIoT Router AC2350
Evgeniy Isaev [Tue, 11 May 2021 08:45:51 +0000 (13:45 +0500)]
ath79: add support for Xiaomi AIoT Router AC2350

Device specifications
* SoC: QCA9563 @ 775MHz (MIPS 74Kc)
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR (EN25QH128)
* Wireless 2.4GHz (SoC): b/g/n, 3x3
* Wireless 5Ghz (QCA9988): a/n/ac, 4x4 MU-MIMO
* IoT Wireless 2.4GHz (QCA6006): currently unusable
* Ethernet (AR8327): 3 LAN × 1GbE, 1 WAN × 1GbE
* LEDs: Internet (blue/orange), System (blue/orange)
* Buttons: Reset
* UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1)
* Power: 12VDC, 1,5A

MAC addresses map (like in OEM firmware)
  art@0x0     88:C3:97:*:57  wan/label
  art@0x1002  88:C3:97:*:2D  lan/wlan2g
  art@0x5006  88:C3:97:*:2C  wlan5g

Obtain SSH Access
1. Download and flash the firmware version 1.3.8 (China).
2. Login to the router web interface and get the value of `stok=` from the
   URL
3. Open a new tab and go to the following URL (replace <STOK> with the stok
   value gained above; line breaks are only for easier handling, please put
   together all four lines into a single URL without any spaces):
     http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev
       ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit
       %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F
       g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A
4. Wait 30-60 seconds (this is the time required to generate keys for the
   SSH server on the router).

Create Full Backup
1. Obtain SSH Access.
2. Create backup of all flash (on router):
    dd if=/dev/mtd0 of=/tmp/ALL.backup
3. Copy backup to PC (on PC):
    scp root@192.168.31.1:/tmp/ALL.backup ./
Tip: backup of the original firmware, taken three times, increases the
chances of recovery :)

Calculate The Password
* Locally using shell (replace "12345/E0QM98765" with your router's serial
  number):
  On Linux
    printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \
    md5sum - | head -c8 && echo
  On macOS
    printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \
    md5 | head -c8
* Locally using python script (replace "12345/E0QM98765" with your
  router's serial number):
    wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py
    python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))'
* Online
    https://www.oxygen7.cn/miwifi/

Debricking (lite)
If you have a healthy bootloader, you can use recovery via TFTP using
programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router
to TFTP recovery mode, hold down the reset button, connect the power
supply, and release the button after about 10 seconds. The router must be
connected directly to the PC via the LAN port.

Debricking
You will need a full dump of your flash, a CH341 programmer, and a clip
for in-circuit programming.

Install OpenWRT
1. Obtain SSH Access.
2. Create script (on router):
    echo '#!/bin/sh' > /tmp/flash_fw.sh
    echo >> /tmp/flash_fw.sh
    echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh
    echo >> /tmp/flash_fw.sh
    echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh
    echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh
    echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh
    echo 'sleep 3' >> /tmp/flash_fw.sh
    echo 'reboot' >> /tmp/flash_fw.sh
    echo >> /tmp/flash_fw.sh
    chmod +x /tmp/flash_fw.sh
3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin`
   to the router (on PC):
    scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \
    root@192.168.31.1:/tmp/openwrt.bin
4. Flash OpenWRT (on router):
    /bin/ash /tmp/flash_fw.sh &
5. SSH connection will be interrupted - this is normal.
6. Wait for the indicator to turn blue.

Signed-off-by: Evgeniy Isaev <isaev.evgeniy@gmail.com>
[improve commit message formatting slightly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 6c148116f778bfd2db88476cee4753b32538eafe)

2 years agoramips: fix tl-mr3020-v3 switch topology to configure vlans via luci
Sergey V. Lobanov [Fri, 26 Nov 2021 17:26:17 +0000 (20:26 +0300)]
ramips: fix tl-mr3020-v3 switch topology to configure vlans via luci

Currently it is not possible to configure VLANs via LUCI on
tplink tl-mr3020-v3. This patch fixes switch topology for the
LUCI interface.

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
[copied commit message from github PR]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit e22c91e144d63ccbd7b76b370a53652c48db1d6f)

2 years agobusybox: update to 1.33.2 bugfix release
Hannu Nyman [Sat, 4 Dec 2021 14:49:42 +0000 (16:49 +0200)]
busybox: update to 1.33.2 bugfix release

Update busybox to 1.33.2, which includes only 5 commits after 1.33.1

  Bug fix release. 1.33.2 has fixes for hush and ash (parsing fixes)
  and unlzma (fix where we could read before beginning of buffer).

https://git.busybox.net/busybox/log/?h=1_33_2

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agomt76: update to the latest version
Felix Fietkau [Fri, 3 Dec 2021 09:56:17 +0000 (10:56 +0100)]
mt76: update to the latest version

71e08471ab56 mt76: eeprom: fix return code on corrected bit-flips
9a8fc6636d83 mt76: move sar_capa configuration in common code
7cdbea1dc82a mt76: only access ieee80211_hdr after mt76_insert_ccmp_hdr
678071ef7029 mt76: mt7615: clear mcu error interrupt status on mt7663

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit fc4398fe71810f3bb5637bdfd0b3975a8ec858f0)

2 years agomac80211: bump PKG_RELEASE
Felix Fietkau [Thu, 2 Dec 2021 13:27:22 +0000 (14:27 +0100)]
mac80211: bump PKG_RELEASE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: fix tx aggregation locking issue
Felix Fietkau [Thu, 2 Dec 2021 13:11:21 +0000 (14:11 +0100)]
mac80211: fix tx aggregation locking issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a1a71a71999001502fa86136dbf8925da8341098)

2 years agomac80211: fix queue assignment of aggregation start requests
Felix Fietkau [Thu, 2 Dec 2021 12:52:18 +0000 (13:52 +0100)]
mac80211: fix queue assignment of aggregation start requests

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 15d8c7aa74c202c530dbd53e53b00e418f0b64f4)

2 years agomt76: update to the latest version
Felix Fietkau [Thu, 2 Dec 2021 10:26:36 +0000 (11:26 +0100)]
mt76: update to the latest version

a6451fea5a3d mt76: mt7615: improve wmm index allocation
1911486414dc mt76: mt7915: improve wmm index allocation
7998a41d1321 mt76: clear sta powersave flag after notifying driver
664475574438 mt76: mt7603: introduce SAR support
5c0da39c940b mt76: mt7915: introduce SAR support
77fc6c439a32 mt76: mt7603: improve reliability of tx powersave filtering
094b3d800835 firmware: update mt7663 rebb firmware to 20200904171623
25237b19bcc1 mt76: eeprom: tolerate corrected bit-flips
1463cb4c6ac2 mt76: mt7921: fix boolreturn.cocci warning
586bad6020f7 mt76: mt7921: use correct iftype data on 6GHz cap init
8ec95c910425 mt76: mt7921s: fix bus hang with wrong privilege
688e30c7d854 firmware: update mt7921 firmware to version 20211014
6fad970893dd mt76: fix key pointer overwrite in mt7921s_write_txwi/mt7663_usb_sdio_write_txwi
95acf972750c mt76: fix 802.3 RX fail by hdr_trans
3f402b0cf6c0 mt76: mt7921s: fix possible kernel crash due to invalid Rx count
929a03a8d65d mt76: connac: fix last_chan configuration in mt76_connac_mcu_rate_txpower_band

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 7e153900566ec1aebdc4f15f5a9d9ff9b9401cc1)

2 years agouboot-lantiq: danube: fix hanging lzma kernel uncompression #2
Mathias Kresin [Sat, 27 Nov 2021 20:43:40 +0000 (21:43 +0100)]
uboot-lantiq: danube: fix hanging lzma kernel uncompression #2

Follow up to commit c744798cad6a13436f2ba9dd3a280cb16d315c85. Managed to
hit the very same issue again while playing with the NOR SPL builds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agolantiq: set maximum kernel size for P2812HNUF3
Mathias Kresin [Sat, 27 Nov 2021 16:28:19 +0000 (17:28 +0100)]
lantiq: set maximum kernel size for P2812HNUF3

The board has a fixed size kernel partition but do not limit the kernel
size during image building.

Disable image building for both boards as well, since the kernel of the
last release as well as master are to big to fit into the 2 MByte kernel
partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agomac80211: backport fix for dealing with stripped IV on rx
Felix Fietkau [Fri, 26 Nov 2021 07:40:55 +0000 (08:40 +0100)]
mac80211: backport fix for dealing with stripped IV on rx

This fixes potental rx drop issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 68189835ac81779f9cf21060dca0c54dcdb0c0a6)

2 years agohostapd: add a patch that allows processing auth requests for peers in blocked state
Felix Fietkau [Wed, 24 Nov 2021 16:02:26 +0000 (17:02 +0100)]
hostapd: add a patch that allows processing auth requests for peers in blocked state

If authentication fails repeatedly e.g. because of a weak signal, the link
can end up in blocked state. If one of the nodes tries to establish a link
again before it is unblocked on the other side, it will block the link to
that other side. The same happens on the other side when it unblocks the
link. In that scenario, the link never recovers on its own.

To fix this, allow restarting authentication even if the link is in blocked
state, but don't initiate the attempt until the blocked period is over.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit f84053af5c0b0a159ea4d3e90b0c06574b4fde8d)

2 years agohostapd: bump PKG_RELEASE
Felix Fietkau [Wed, 24 Nov 2021 14:43:10 +0000 (15:43 +0100)]
hostapd: bump PKG_RELEASE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: bump PKG_RELEASE
Felix Fietkau [Wed, 24 Nov 2021 14:42:45 +0000 (15:42 +0100)]
mac80211: bump PKG_RELEASE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: add a fix for kernel warnings when forwarding packets in mesh mode
Felix Fietkau [Wed, 24 Nov 2021 13:02:09 +0000 (14:02 +0100)]
mac80211: add a fix for kernel warnings when forwarding packets in mesh mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit d439c7d85a05c3548e5566bec292292a4f6b7ef5)

2 years agomac80211: fix regression in SSN handling of addba tx
Felix Fietkau [Wed, 24 Nov 2021 09:45:28 +0000 (10:45 +0100)]
mac80211: fix regression in SSN handling of addba tx

Some drivers that do their own sequence number allocation (e.g. ath9k, mwlwifi) rely
on being able to modify params->ssn on starting tx ampdu sessions.
This was broken by a change that modified it to use sta->tid_seq[tid] instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit ddd977fcc5838eb6bfb6cb9dad99dfe09a8ff67e)

2 years agohostapd: fix goto loop for ubus assoc handler
David Bauer [Tue, 23 Nov 2021 21:25:02 +0000 (22:25 +0100)]
hostapd: fix goto loop for ubus assoc handler

When a ubus event handler denies a association with a non-zero return
value, the code jumps to preceeding code, creating an endless loop until
the event handler accepts the assc request.

Move the ubus handler further up the code to avoid creating such a loop.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agohostapd: enable ht40 in wpa_supplicant when using wider HE modes
Felix Fietkau [Mon, 16 Aug 2021 08:07:55 +0000 (10:07 +0200)]
hostapd: enable ht40 in wpa_supplicant when using wider HE modes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit c26d741d07632451337810aaecd500a0b3cbf44f)

2 years agohostapd: add support for providing vendor specific IE elements
Felix Fietkau [Thu, 24 Jun 2021 13:56:12 +0000 (15:56 +0200)]
hostapd: add support for providing vendor specific IE elements

They can be added as hex digit strings via the 'vendor_elements' option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 1818b038d7275273adbd525b5ee76bc60b7d628c)

2 years agohostapd: add eap_server support
John Crispin [Tue, 6 Apr 2021 12:59:41 +0000 (14:59 +0200)]
hostapd: add eap_server support

This makes it possible to avoid using a RADIUS server for WPA enterprise authentication

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from 98621c97822eb20a80ab2248a253972051ea6f08)

2 years agohostapd: add default values for r0kh/r1kh
Felix Fietkau [Thu, 27 May 2021 11:15:40 +0000 (13:15 +0200)]
hostapd: add default values for r0kh/r1kh

This allows WPA enterprise roaming in the same mobility domain without any
manual key configuration (aside from radius credentials)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 704ab6a002172e76d41612f6d07ff179ef035d10)

2 years agohostapd: add support for configuring the beacon rate
Felix Fietkau [Wed, 26 May 2021 11:04:50 +0000 (13:04 +0200)]
hostapd: add support for configuring the beacon rate

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 46509a51dd63aa49648ad0f130461817f43532d0)

2 years agohostapd: add support for configuring rts threshold
Felix Fietkau [Tue, 18 May 2021 15:46:01 +0000 (17:46 +0200)]
hostapd: add support for configuring rts threshold

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 26da5c235983d215a42983467149e0e5597e8de2)

2 years agohostapd: fix use after free bugs
David Bauer [Wed, 17 Nov 2021 20:46:11 +0000 (21:46 +0100)]
hostapd: fix use after free bugs

Using a pointer one lifter after it freed is not the best idea.
Let's not do that.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry-picked from commit 63c01ad025981eaa841353dc0fc27e5017febe21)

2 years agohostapd: add wmm qos map set by default
Felix Fietkau [Wed, 3 Nov 2021 21:40:53 +0000 (22:40 +0100)]
hostapd: add wmm qos map set by default

This implements the mapping recommendations from RFC8325, with an
update from RFC8622. This ensures that DSCP marked packets are properly
sorted into WMM classes.
The map can be disabled by setting iw_qos_map_set to something invalid
like 'none'

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a5e3def1822431ef6436cb493df77006dbacafd6)

2 years agohostapd: support qos_map_set without CONFIG_INTERWORKING
Felix Fietkau [Thu, 4 Nov 2021 10:45:18 +0000 (11:45 +0100)]
hostapd: support qos_map_set without CONFIG_INTERWORKING

This feature is useful on its own even without full interworking support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit efff3520f4d8fe131c4bd54bb2e098139a7efa4d)

2 years agohostapd: refresh patches
Felix Fietkau [Tue, 23 Nov 2021 16:28:44 +0000 (17:28 +0100)]
hostapd: refresh patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: fix a race condition on adding AP mode wds sta interfaces
Felix Fietkau [Wed, 20 Oct 2021 19:13:10 +0000 (21:13 +0200)]
hostapd: fix a race condition on adding AP mode wds sta interfaces

Both hostapd and netifd attempt to add a VLAN device to a bridge.
Depending on which one wins the race, bridge vlan settings might be incomplete,
or hostapd might run into an error and refuse to service the client.
Fix this by preventing hostapd from adding interfaces to the bridge and
instead rely entirely on netifd handling this properly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit da4be02fcd5d642954b1c9d9855d9e8d1e6205f4)
(cherry-picked from commit 63c01ad025981eaa841353dc0fc27e5017febe21)

2 years agohostapd: fix max_oper_chwidth setting for HE
Felix Fietkau [Tue, 18 May 2021 17:08:28 +0000 (19:08 +0200)]
hostapd: fix max_oper_chwidth setting for HE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2319cf4ec048e50a7d3885d19dc27663b45e258d)

2 years agohostapd: let netifd set bridge port attributes for snooping
Felix Fietkau [Wed, 1 Sep 2021 17:12:27 +0000 (19:12 +0200)]
hostapd: let netifd set bridge port attributes for snooping

Avoids race conditions on bridge member add/remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 17d19a7d4398789ae8da3daf8e0db167d58b0782)

2 years agohostapd: respect fixed channel BW in HE20 mode
Jesus Fernandez Manzano [Tue, 20 Jul 2021 10:13:49 +0000 (12:13 +0200)]
hostapd: respect fixed channel BW in HE20 mode

When using htmode 'HE20' with a radio mode that uses wpa-supplicant
(like mesh or sta), it will default to 40 MHz bw if disable_ht40 is not
set. This commit fixes this behaviour.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
(cherry-picked from commit af83e3ce0ff40dcecbe913676343bf86846294f7)

2 years agohostapd: make proxyarp work with libnl-tiny
Felix Fietkau [Wed, 28 Jul 2021 03:54:29 +0000 (05:54 +0200)]
hostapd: make proxyarp work with libnl-tiny

Remove a dependency on libnl3-route

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit ae1c5d0d6af60d0467899f5730a2f01aa72137f7)

2 years agohostapd: fix a segfault on sta disconnect with proxy arp enabled
Felix Fietkau [Wed, 28 Jul 2021 03:48:38 +0000 (05:48 +0200)]
hostapd: fix a segfault on sta disconnect with proxy arp enabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 5dd1bd5b80feb2dbaad8bdf93779acad74ed199a)

2 years agohostapd: make the snooping interface (for proxyarp) configurable
Felix Fietkau [Tue, 27 Jul 2021 18:28:58 +0000 (20:28 +0200)]
hostapd: make the snooping interface (for proxyarp) configurable

Use the VLAN interface instead of the bridge, to ensure that hostapd receives
untagged DHCP packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 7b46377a0cd9d809a3c340358121de77f005d4cc)
(cherry-picked from commit f1b98fa4fa8a86a9daf2a7177235f28cbd7c53ef)

2 years agohostapd: configure inter-AP communication interface for 802.11r
Felix Fietkau [Fri, 4 Jun 2021 07:12:07 +0000 (09:12 +0200)]
hostapd: configure inter-AP communication interface for 802.11r

In setups using VLAN bridge filtering, hostapd may need to communicate using
a VLAN interface on top of the bridge, instead of using the bridge directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 305c1b8d746b363f655c2f8d5a6497cca10a5d4e)

2 years agohostapd: add additional radius options
John Crispin [Tue, 18 May 2021 15:53:45 +0000 (17:53 +0200)]
hostapd: add additional radius options

- add functionality to configure RADIUS NAS-Id and Operator-Name
- add functionality to configure RADIUS accounting interval
- enable RADIUS "Chargeable User Identity"

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 3bd6c8c728e72444bdf23b8904ef9c52ebb46bb7)

2 years agohostapd: add extra options for hotspot 2.0 / interworking
Felix Fietkau [Tue, 18 May 2021 15:06:48 +0000 (17:06 +0200)]
hostapd: add extra options for hotspot 2.0 / interworking

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit c76f1d8330c679774eb568a423feb57d956b3ca4)

2 years agohostapd: fix civic location option
John Crispin [Tue, 6 Apr 2021 11:24:43 +0000 (13:24 +0200)]
hostapd: fix civic location option

Signed-off-by: John Crispin <john@phrozen.org>
(cherry-picked from commit 937dd79e2a4457a316d67b3091f6da7d14a99168)

2 years agohostapd: enable airtime policy for the -basic variants
Rui Salvaterra [Wed, 25 Nov 2020 23:03:48 +0000 (23:03 +0000)]
hostapd: enable airtime policy for the -basic variants

Airtime policy configuration is extremely useful in multiple BSS scenarios.
Since nowadays most people configure both private and guest networks (at
least), it makes sense to enable it by default, except for the most limited
of the variants.

Size of the hostapd-basic-openssl binary (mipsel 24Kc -O2):
543944 bytes (airtime policy disabled)
548040 bytes (airtime policy enabled)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
(cherry-picked from commit d38f4565828264731f2a9cfe646491fba80315d3)

2 years agohostapd: add patch for disabling automatic bridging of vlan interfaces
Felix Fietkau [Tue, 18 May 2021 10:50:17 +0000 (12:50 +0200)]
hostapd: add patch for disabling automatic bridging of vlan interfaces

netifd is responsible for handling that, except if the vlan bridge
was provided by the config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit cf45caeff16256f9db777e0e652ec3a38cd476a4)

2 years agomt76: update to the latest version
Felix Fietkau [Tue, 23 Nov 2021 16:05:45 +0000 (17:05 +0100)]
mt76: update to the latest version

624c681ef0c6 mt76: mt7921: enable VHT BFee capability
a27dfcb63ccf mt76: connac: fix UC entry is being overwritten
6b691e62470e mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unref
b14365bea586 mt76: mt7921: wake the device before dumping power table
82af16bddfc0 mt76: mt7921: make mt7921_set_channel static
b24598b1c1a9 mt76: connac: add mt76_connac_mcu_get_nic_capability utility routine
5954e3381ff9 mt76: testmode: move chip-specific stats dump before common stats
fd5b612f9aa4 mt76: mt7915: fix rx fcs error count in testmode
d9d26a294f7b mt76: connac: fix the maximum interval schedule scan can support
ed39c882f388 mt76: reduce rx buffer size to 2048
60f3d3adbba6 mt76: move mt76_get_next_pkt_id in mt76.h
67ed4d902c84 mt76: connac: check band caps in mt76_connac_mcu_set_rate_txpower
23c6ec49c000 mt76: make mt76_update_survey() per phy
5ca602fb9455 mt76: mt7915: introduce mt7915_mcu_set_txbf()
c13df42282e9 mt76: mt7915: improve MU stability
dee7dcddcaa0 mt76: use SPDX header file comment style
6fbd47153b3d mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station mode
1b97dd1762ca mt76: mt7921: fix sta_state incorrect implementation
1b89053b5a6f mt76: mt7921: improve code readability for mt7921_update_txs
126649816785 mt76: mt7921: limit txpower according to userlevel power
a5163ac09be2 mt76: mt7921: introduce dedicated control for deep_sleep
e47c04db4d7e mt76: mt7921: fix kernel warning when reset on vif is not sta
063d3611662c mt76: mt7921: fix the coredump is being truncated
12bf28feba7c mt76: fix iv and CCMP header insertion
949327e76ee4 mt76: disable TWT capabilities for the moment
3530254c1bc9 mt76: mt7921: enable HE BFee capability
599e35f5d9b8 mt76: sdio: do not run mt76_txq_schedule directly
3b6d30c28946 mt76: mt7663s: rely on pm reference counting
529d55a79088 mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
ef44ff116ee2 mt76: mt7663s: enable runtime-pm
3a71e71a555e mt76: mt7615: set macwork timeout according to runtime-pm
925d96e443a4 mt76: mt7921: allow chip reset during device restart
63b114d84361 mt76: mt76x0e: fix device hang during suspend/resume
7f5ea5e2fd10 mt7915: check return code of sysfs_create_link
ca64a36908b7 mt76: fix mt76_rates for the multiple devices
f517116bf14c mt76: add mt76_default_basic_rate more devices can rely on
6c70b0100513 mt76: mt7921: fix mgmt frame using unexpected bitrate
c00a9a6b52af mt76: mt7915: fix mgmt frame using unexpected bitrate
0e4089949565 mt76: mt7921: fix endianness in mt7921_mcu_tx_done_event
55f314120ef2 mt76: mt7921: avoid unnecessary spin_lock/spin_unlock in mt7921_mcu_tx_done_event
541cd3276488 mt76: mt7915: fix endianness warning in mt7915_mac_add_txs_skb
817761e87c4f mt76: mt7921: fix endianness warning in mt7921_update_txs
b8eca74bbd7b mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi
5e5e07f0def3 mt76: mt7915: fix potential overflow of eeprom page index
abda4cded420 mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
535899f81a46 mt76: mt7915: fix calling mt76_wcid_alloc with incorrect parameter
adfa1b9a3ca0 mt76: connac: fix mt76_connac_gtk_rekey_tlv usage
2a65b105ea4a mt76: mt7921: enable aspm by default
c57158c82804 mt76: fix build error implicit enumeration conversion
41f607cab83c mt76: mt7921: fix survey-dump reporting
25b4f885a937 mt76: mt76x02: fix endianness warnings in mt76x02_mac.c
e63fadb87fe1 mt76: mt7915: report HE MU radiotap
135ef3e9827a mt76: mt7915: adapt new firmware to update BA winsize for Rx session
7118eacb7ce4 mt76: mt7921: add .set_sar_specs support
f1f6569da408 mt76: mt7915: fix an off-by-one bound check
f7da39467965 mt76 mt7915: take RCU read lock when calling ieee80211_bss_get_elem()
87af8e5c72b1 mt76: mt7915: cleanup -Wunused-but-set-variable
8e2d383fbd92 mt76: mt7915: report tx rate directly from tx status
ddce30977591 mt76: mt7915: remove mt7915_sta_stats
4ccd42029519 mt76: mt7921: introduce testmode support
bbebea7d6dc6 Revert "mt76: fix mt76_rates for the multiple devices"
74dedf9352c5 mt76: mt7615: fix skb use-after-free on mac reset
7201290eda43 mt76: mt7921: Fix out of order process by invalid event pkt
ca1b57e9971a mt76: mt7915: add a missing HT flag for GI parsing
4932c5d80153 of: net: pass the dst buffer to of_get_mac_address()
51d9eb3e6f52 mt76: mt7915: fix endianness warnings in mu radiotap
833ca13014ab mt76: mt7921: Add mt7922 support
8f8ed44d026e mt76: mt7915: add control knobs for thermal throttling
16f18bab6b11 mt76: mt7915: send EAPOL frames at lowest rate
affea639c586 mt76: mt7921: send EAPOL frames at lowest rate
ac00fed412d4 mt76: mt7915: fix potential overflow of eeprom page index [update]
e576ddb76dfa mt76: mt7915: switch proper tx arbiter mode in testmode
222847c3d5eb mt76: mt7915: fix bit fields for HT rate idx
d04814366c83 mt76: add support for setting mcast rate
4602acc9271a mt76: mt7921: fix dma hang in rmmod
ec2cf3bf96fd mt76: connac: fix GTK rekey offload failure on WPA mixed mode
2fdb9d621431 mt76: connac: add support for limiting to maximum regulatory Tx power
489ace63d42c mt76: mt7921: get rid of monitor_vif
22da8d28fcc8 mt76: mt7921: get rid of mt7921_mac_set_beacon_filter
c94130519786 mt76: mt7921: introduce mt7921_mcu_set_beacon_filter utility routine
51cff39d7ad3 mt76: overwrite default reg_ops if necessary
da11c1c6edef mt76: mt7615: move mt7615_mcu_set_p2p_oppps in mt76_connac module
47f50b0aa4b8 mt76: mt7921: report HE MU radiotap
4f48ba4b0254 mt76: mt7915: checkpatch cleanup
bc7ee7d7bdea mt76: mt7915: add HE-LTF into fixed rate command
6a19e40820aa mt76: mt7921: continue to probe driver when fw already downloaded
8b3d8e2de084 mt76: mt7921: fix firmware usage of RA info using legacy rates
17305a54b166 mt76: mt7921: fix kernel warning from cfg80211_calculate_bitrate
801c15577293 mt76: mt7921: fix endianness warnings in mt7921_mac_decode_he_mu_radiotap
0182a5b99a7a mt76: mt7915: update mac timing settings
e2ee9d0a33ed mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD
fa6504aceb4f Revert "mt76: mt7915: checkpatch cleanup"
56b842b72a72 mt76: mt7915: fix wmm index on DBDC cards
8044311f5de5 mt76: mt7915: fix potential NPE in TXS processing
28da4baec7c5 mt76: mt7915: fix he_mcs capabilities for 160mhz
f7088ebe7452 mt76: mt7915: add LED support
ee019046284d mt76: mt7915: introduce bss coloring support
9848094e4bb5 mt76: mt7921: Fix fall-through warning for Clang
5710d0643418 mt76: add a bound check in mt76_calculate_default_rate()
a509cf2b654e mt76: mt7921: move mt7921_queue_rx_skb to mac.c
5a0f2382fcfe mt76: mt7915: rework debugfs queue info
62ffc31f4d7b mt76: mt7915: rename debugfs tx-queues
4750b5c918e5 mt76: mt7921: always wake device if necessary in debugfs
ac6adf74b3f2 mt76: mt7921: update mib counters dumping phy stats
eb75b9266ce6 net:wireless:mt76: fix boolreturn.cocci warnings
d7c4698435b3 mt76: mt7921: fix the inconsistent state between bind and unbind
9dcfba3169c4 mt76: switch from 'pci_' to 'dma_' API
d8b5e42c9a73 mt76: fill boottime_ns in Rx path
8ee6446075f2 mt76: disable BH around napi_schedule() calls
e17d730bf2f6 mt76: mt7915: add LED support [update to v3]
80fe40c9457e mt76: mt7915: enable configured beacon tx rate
c8f0d1d81d05 mt76: mt7915: fix hwmon temp sensor mem use-after-free
3b9ba7e02076 mt76: mt7615: fix hwmon temp sensor mem use-after-free
5e82eceb45cb mt76: mt7921: start reworking tx rate reporting
eb66b5c9ff77 mt76: mt7921: add support for tx status reporting
c8010f170e76 mt76: mt7921: report tx rate directly from tx status
4dc7f3db572b mt76: mt7921: remove mcu rate reporting code
db89c6f86724 mt76: mt7921: remove mt7921_sta_stats
6bb8b4267dbe mt76: move spin_lock_bh to spin_lock in tasklet
0eacf41985da mt76: mt7915: honor all possible error conditions in mt7915_mcu_init()
4dfff296ee6e mt76: mt7915: fix possible infinite loop release semaphore
537ed88dd2d0 mt76: mt7921: robustify hardware initialization flow
e0b846159221 mt76: mt7921: fix retrying release semaphore without end
c55dedcea268 mt76: mt7915: add ethtool stats support
d1d5e8cd3a3e mt76: mt7915: add tx stats gathered from tx-status callbacks
1687189d68b7 mt76: mt7915: add some per-station tx stats to ethtool
f4dde5f765af mt76: mt7915: add tx mu/su counters to mib
9752bf0643c9 mt76: mt7915: add more MIB registers
4727415017c9 mt76: mt7915: add mib counters to ethtool stats
4ca80a749e7f mt76: connac: set 6G phymode in mt76_connac_get_phy_mode{,v2}
3f2a5d39631e mt76: connac: enable 6GHz band for hw scan
817a41826bd7 mt76: connac: add 6GHz support to mt76_connac_mcu_set_channel_domain
a6ab81c21080 mt76: connac: set 6G phymode in single-sku support
ca4f47028a44 mt76: connac: add 6GHz support to mt76_connac_mcu_sta_tlv
d2e192ea81e2 mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss
c3dd12b4c8ae mt76: connac: enable hw amsdu @ 6GHz
91ed2b256c20 mt76: add 6GHz support
de8c4f92621f mt76: mt7921: add 6GHz support
f143aedc1d57 mt76: introduce packet_id idr
bcc8d9e03a5d mt76: remove mt76_wcid pointer from mt76_tx_status_check signature
ccbd84763153 mt76: substitute sk_buff_head status_list with spinlock_t status_lock
69bb59df894c mt76: schedule status timeout at dma completion
03a992645310 mt76: support reading EEPROM data embedded in fdt
75615480b3fe mt76: introduce __mt76_mcu_send_firmware routine
e8e2eae41f94 mt76: drop MCU header size from buffer size in __mt76_mcu_send_firmware
4c455e8b1a20 mt76: mt7915: introduce __mt7915_get_tsf routine
9d49c611a2d7 mt76: mt7915: introduce mt7915_mcu_twt_agrt_update mcu command
f44ca79c9aed mt76: mt7915: introduce mt7915_mac_add_twt_setup routine
2f9555a2f18f mt76: mt7915: enable twt responder capability
440e2db8d541 mt76: mt7915: add twt_stats knob in debugfs
eb5f640f8afa mt76: debugfs: improve queue node readability
53d7eb3b4884 mt76: mt7615: fix monitor mode tear down crash
2aa3d4414826 mt76: mt7921: add delay config for sched scan
47e8e96e8e4d mt76: use a separate CCMP PN receive counter for management frames
5560b08f8e2d mt76: do not access 802.11 header in ccmp check for 802.3 rx skbs
1af0242d1241 mt76: mt7915: replace a 64 bit divsion with a call to div_u64_rem
83598c2e872f mt76: avoid possible infinite loop in mt76_tx_status_check
ebf5b2336591 mt7615/mt7915: fix hwmon device name
8d12f9ed275d mt76: mt7615: mt7622: fix ibss and meshpoint
e7883cdc0b4e mt76: mt7915: improve code readability in mt7915_mcu_sta_bfer_ht
831d5967abb9 wireless: fix spelling of A-MSDU in HE capabilities
f09cb04be261 wireless: align some HE capabilities with the spec
0eeba8f2952d wireless: align HE capabilities A-MPDU Length Exponent Extension
655a6c65b8a7 mt76: mt7915: introduce mt7915_mcu_beacon_check_caps()
4440025d0ba9 mt76: mt7915: fix txbf starec TLV issues
87d2fb6fbff5 mt76: mt7915: improve starec readability of txbf
53c6a3cb7f6b mt76: mt7915: fix sta_rec_wtbl tag len
f517845e4f28 mt76: mt7915: rework starec TLV tags
1df017bc39a3 mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()
6724b0a9a748 mt76: mt7915: set VTA bit in tx descriptor
f1f505cbbb30 mt76: mt7915: set muru platform type
8c9d4b38d258 mt76: mt7915: remove dead code in mt7915_get_et_stats
d0ccc4297935 mt76: rely on phy pointer in mt76_register_debugfs_fops routine signature
0af0af82bb97 mt76: mt7915: introduce mt76 debugfs sub-dir for ext-phy
10e85d62f213 mt76: mt7915: improve code readability for xmit-queue handler
b6051f7713d2 mt76: sdio: export mt76s_alloc_rx_queue and mt76s_alloc_tx routines
9a97c38a309d mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
c02847c05884 mt76: mt7921: get rid of unused variable in mt7921_mac_tx_free
60dd47a0a62e mt76: mt7915: remove dead code in debugfs code
ce74fc020d81 mt76: mt7921: add MU EDCA cmd support
c062f6920356 mt76: mt7921: refactor mac.c to be bus independent
bfa909c833e8 mt76: mt7921: refactor dma.c to be pcie specific
6556bddf26d2 mt76: mt7921: refactor mcu.c to be bus independent
1c8418207c86 mt76: mt7921: refactor init.c to be bus independent
6cf8248c1a44 mt76: mt7921: add MT7921_COMMON module
77600b0c10ac mt76: connac: move mcu reg access utility routines in mt76_connac_lib module
65362a00d07d mt76: mt7663s: rely on mcu reg access utility
956206bb55c3 mt76: mt7921: make all event parser reusable between mt7921s and mt7921e
f0dedcf6aaf0 mt76: mt7921: use physical addr to unify register access
5079d5b0b13c mt76: sdio: move common code in mt76_sdio module
26257594398b mt76: sdio: introduce parse_irq callback
e353424f1b07 mt76: sdio: extend sdio module to support CONNAC2
ddab3dd25f94 mt76: connac: extend mcu_get_nic_capability
b2d9a1748a41 mt76: mt7921: rely on mcu_get_nic_capability
e6ce5d9cbda0 mt76: mt7921: refactor mt7921_mcu_send_message
ce3706a65ccd mt76: mt7921: introduce mt7921s support
3143118baf53 mt76: mt7921s: add reset support
645eac64bece mt76: mt76x0: correct VHT MCS 8/9 tx power eeprom offset
d54796787cb7 mt76: move mt76_sta_stats in mt76.h
094e085abf5a mt76: move mt76_ethtool_worker_info in mt76 module
f80ab6dde63d mt76: mt7915: run mt7915_get_et_stats holding mt76 mutex
4a11cb67dc27 mt76: mt7915: move tx amsdu stats in mib_stats
486da6fa2512 mt76: do not reset MIB counters in get_stats callback
d8837b7c8dcd mt76: mt7921: add some more MIB counters
5ffe086fcd1b mt76: mt7921: introduce stats reporting through ethtool
69154ae23f6b mt76: mt7921: add sta stats accounting in mt7921_mac_add_txs_skb
4b65fbc4e203 mt76: mt7921: move tx amsdu stats in mib_stats
35b8025f466b mt76: mt7921: add per-vif counters in ethtool
cfbbd861eb12 mt76: mt7915: enable HE UL MU-MIMO
a0b94987df80 mt76: mt7915: rework mt7915_mcu_sta_muru_tlv()
5fbb686e9c0c mt76: mt7915: fix missing HE phy cap
b649678c18ca mt76: mt7915: change max rx len limit of hw modules
9d288d7c0c73 mt76: mt7615: apply cached RF data for DBDC
4d2e81d9ecab mt76: mt7915: remove mt7915_mcu_add_he()
2c8c3bcd766c mt76: mt7915: rework .set_bitrate_mask() to support more options
577d45f6e4a0 mt76: mt7915: rework debugfs fixed-rate knob
b68af355f707 mt76: mt7915: fix endiannes warning mt7915_mcu_beacon_check_caps
b52adf981561 mt76: mt7915: add WA firmware log support
ed3d8569c400 mt76: mt7915: add debugfs knobs for MCU utilization
0f49a22314a5 mt76: mt7921: disable 4addr capability
754d4a37ab71 mt76: mt7921: fix mt7921s Kconfig
f81f42fe875f mt76: Print error message when reading EEPROM from mtd failed
fd25a550965d mt76: Make use of the helper macro kthread_run()
1d01257662a6 wireless: mediatek: mt7921: fix Wformat build warning
f6bde7ba82ee mt76: connac: fix unresolved symbols when CONFIG_PM is unset
5dd32475c859 mt76: mt7915: get rid of mt7915_mcu_set_fixed_rate routine
f5cfaaff3dd1 mt76: mt7921: drop offload_flags overwritten
f5ad840ca5c0 mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
29a8a08827b1 mt76: mt7921: fix MT7921E reset failure
f44685f2faee mt76: mt7915: fix return condition in mt7915_tm_reg_backup_restore()
ae8e02ddd2b0 mt76: mt7915: fix SMPS operation fail
e814e15716b0 mt76: reverse the first fragmented frame to 802.11
c9bca3ed9566 mt76: mt7915: fix NULL pointer dereference in mt7915_get_phy_mode
dd054b7e16e7 mt76: only set rx radiotap flag from within decoder functions
f1520c9bb332 mt76: mt7915: add default calibrated data support
0c489ea2865a mt76: testmode: add support to set MAC
91c5da3d0a7c mt76: mt7921: add support for PCIe ID 0x0608/0x0616
ca39b4bbc227 mt76: debugfs: fix queue reporting for mt76-usb
00b6f497e2e8 mt76: mt7921: introduce 160 MHz channel bandwidth support
c1574466c733 mt76: fix possible OOB issue in mt76_calculate_default_rate
9680a17b0aed mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi
78fc0dcdcef0 mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode
05953e7d6fe7 mt76: mt7615: remove dead code in get_omac_idx
39f6c37127c1 mt76: connac: remove PHY_MODE_AX_6G configuration in mt76_connac_get_phy_mode
526591b203f3 mt76: do not pass the received frame with decryption error
256789bb400f mt76: fix the wiphy's available antennas to the correct value
fa187f5cf068 mt76: fix timestamp check in tx_status
11ebf11a3587 mt76: mt7915: fix the wrong SMPS mode
8c69b815ee7f mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in mt7921_config
bc6798f729f9 mt76: move sar utilities to mt76-core module
b1d0ad2e74fe mt76: mt76x02: introduce SAR support
f0a5b1118fa4 mt76: mt7915: fix decap offload corner case with 4-addr VLAN frames
67f93aa9a207 mt76: mt7615: fix decap offload corner case with 4-addr VLAN frames
46261d4bbfb5 mt76: fix possible pktid leak
a7fdd272efee mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files
3d9e13f567a4 mt76: mt7921s: fix the device cannot sleep deeply in suspend
99225b985cbc mt76: mt7615: fix unused tx antenna mask in testmode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(sync with master commit 5aa62cb7996803fa256a7b9f5beef818a7fe34d8)

2 years agomac80211: fix crash in drivers relying on mac80211 retransmitting packets for powersa...
Felix Fietkau [Tue, 23 Nov 2021 12:18:03 +0000 (13:18 +0100)]
mac80211: fix crash in drivers relying on mac80211 retransmitting packets for powersave clients

This showed up primarily on rt2x00

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit d1ea575baa1b53bb477a020974afcec1b1193edc)

2 years agomac80211: backport a few trivial patches
Felix Fietkau [Tue, 19 Oct 2021 09:19:26 +0000 (11:19 +0200)]
mac80211: backport a few trivial patches

No functional changes, just some renames to make it easier to keep mt76 in
sync with upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit e62c5504701c7a665c9cf89ddbcb062f5ade6e37)
(cherry-picked from commit a889dcd3f21e50dc3e7f827ff0e486020562a6f8)

2 years agomac80211: backport AP mode TWT support
Felix Fietkau [Mon, 11 Oct 2021 09:48:49 +0000 (11:48 +0200)]
mac80211: backport AP mode TWT support

Required for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 978e822db354daf974811f2717c6013fa3eb8079)
(cherry-picked from commit af9d31aacc286786a8765a44c2000d2eba02e61c)

2 years agomac80211: backport support for BSS color changes
Felix Fietkau [Fri, 24 Sep 2021 14:53:33 +0000 (16:53 +0200)]
mac80211: backport support for BSS color changes

This is needed for an upcoming mt76 update
also sync iw nl80211 with kernel backports

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2bfac61483db32f8bd1f5b38702b39f206256265)
(cherry-picked from commit 36019ed5893cd11c86a7dbedca1c6a055654a3c0)

2 years agomac80211: add missing change for encap offload on devices with sw rate control
Felix Fietkau [Mon, 16 Aug 2021 12:10:19 +0000 (14:10 +0200)]
mac80211: add missing change for encap offload on devices with sw rate control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 0f6887972adc48449a1f5efaa143fa3f740a8c36)
(cherry-picked from commit 6f2044c2d74dd0ae2cee3b25b2ac084513c0536a)

2 years agomac80211: backport SAR power limit support
Felix Fietkau [Wed, 14 Jul 2021 15:14:35 +0000 (17:14 +0200)]
mac80211: backport SAR power limit support

Needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 890bf06cef20015e2cec0274c87a9a2232691b6b)

2 years agomac80211: merge the virtual time based airtime scheduler
Felix Fietkau [Tue, 6 Jul 2021 12:12:11 +0000 (14:12 +0200)]
mac80211: merge the virtual time based airtime scheduler

Improves airtime fairness, especially for devices with larger firmware buffers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a5888ad6b33840d913438ce664c0e7da7e7f53e6)

2 years agomac80211: set beamformer/beamformee number of antennas in VHT caps
Felix Fietkau [Mon, 22 Nov 2021 12:04:03 +0000 (13:04 +0100)]
mac80211: set beamformer/beamformee number of antennas in VHT caps

Without this, beamforming is probably not working

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit e2c4998f6dca7d9b74a8b01762040ff2c5e38fd7)

2 years agomac80211: fix IBSS/adhoc mode for brcmfmac
Bastian Bittorf [Sun, 19 Sep 2021 11:19:36 +0000 (11:19 +0000)]
mac80211: fix IBSS/adhoc mode for brcmfmac

On systems using brmcfmac (e.g. Raspberry Pi Zero W) without this fix,
the final setup-call:
iw dev wlan0 ibss join ...

fails with returncode 161 and message:
"command failed: Not supported (-95)"

So this patch calls an explicit:
iw dev wlan0 set type ibss
just prior to the 'ibss join' command.

I have tested several ath9k and mt76xx devices
with different revisions: this patch does not harm.

please also apply to stable branch.

Signed-off-by: Bastian Bittorf <bb@npl.de>
(cherry-picked from commit ea5fce3f4616df3e4331e6b4e8e79767bded442c)

2 years agomac80211: allow retry of wifi setup if an iw interface add command fails
Felix Fietkau [Thu, 30 Sep 2021 09:31:19 +0000 (11:31 +0200)]
mac80211: allow retry of wifi setup if an iw interface add command fails

In some cases, spurious failures might be cleared by teardown and retry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 42dda0ed3e941bc36661e29b990e2ee2adf7f508)

2 years agomac80211: fix HT40 mode for 6G band
Felix Fietkau [Mon, 16 Aug 2021 08:05:14 +0000 (10:05 +0200)]
mac80211: fix HT40 mode for 6G band

The channel offset used for VHT segment calculation was missing for HT

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a0d81ba0d5e9d055c55b5e478cb913c217122317)

2 years agomac80211: fix processing HE capabilities (FS#3871)
Felix Fietkau [Thu, 17 Jun 2021 09:04:27 +0000 (11:04 +0200)]
mac80211: fix processing HE capabilities (FS#3871)

Use the right argument to fix setting unsupported capabilities to 0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 49ef4dbee519e006bb998de11e3bdf1c10c43e6a)

2 years agomac80211: fix typo
Felix Fietkau [Thu, 3 Jun 2021 03:38:53 +0000 (05:38 +0200)]
mac80211: fix typo

Remove stray parenthesis

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 2cd1a108290f48fd35373f91056c05277c289687)

2 years agomac80211: do not enable VHT in the default config on 2.4 GHz
Felix Fietkau [Wed, 2 Jun 2021 05:45:31 +0000 (07:45 +0200)]
mac80211: do not enable VHT in the default config on 2.4 GHz

Some drivers advertise it, but it's not supported at the moment

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 42a99b18ff23fa768a6ae5f1076f15cbfa494f24)

2 years agomac80211: fix detecting VHT capabilities when generating the default config
Felix Fietkau [Wed, 2 Jun 2021 05:42:40 +0000 (07:42 +0200)]
mac80211: fix detecting VHT capabilities when generating the default config

The colon does not directly follow the "VHT Capabilities" string

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 3518b793a2f2293e7e9124b5beae7b09887c5e32)