openwrt/staging/dedeckeh.git
4 years agoapm821xx: MR24: enumerate PCIe in device-tree
Christian Lamparter [Wed, 12 Aug 2020 16:26:43 +0000 (18:26 +0200)]
apm821xx: MR24: enumerate PCIe in device-tree

This patch adds the pcie-switch and bridge configuration for
the Meraki MR24.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoapm821xx: add missing cells-values for IIC1
Christian Lamparter [Wed, 12 Aug 2020 16:23:10 +0000 (18:23 +0200)]
apm821xx: add missing cells-values for IIC1

These are copied over from the IIC0.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoapm821xx: DTB: fix warnings related to sata-port warnings
Christian Lamparter [Wed, 12 Aug 2020 16:13:47 +0000 (18:13 +0200)]
apm821xx: DTB: fix warnings related to sata-port warnings

This patch silences the following warnings:
>netgear-wndr4700.dts:168.3-13:Warning (reg_format): /plb/sata@bffd1800/sata-port@0:reg:property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
>netgear-wndr4700.dts:167.26-170.4: Warning (avoid_default_addr_size):/plb/sata@bffd1800/sata-port@0: Relying on default #address-cells value
>netgear-wndr4700.dts:167.26-170.4: Warning (avoid_default_addr_size):/plb/sata@bffd1800/sata-port@0: Relying on default #size-cells value

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoapm821xx: WNDAP6x0: enumerate PCIe in device-tree
Christian Lamparter [Wed, 12 Aug 2020 16:05:06 +0000 (18:05 +0200)]
apm821xx: WNDAP6x0: enumerate PCIe in device-tree

This patch adds the pcie-switch and bridge configuration of the
WNDAP620 and WNDAP660.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoapm821xx: WNDR4700: enumerate PCIe in device-tree
Christian Lamparter [Tue, 11 Aug 2020 23:21:13 +0000 (01:21 +0200)]
apm821xx: WNDR4700: enumerate PCIe in device-tree

This patch adds the pcie-switch and bridge configuration of the
WNDR4700.

This allows to get rid of the legacy firmware monikers and drop
the usbport LED declaration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agooxnas: kd20: revert accedintally commited change
Daniel Golle [Sat, 29 Aug 2020 00:13:56 +0000 (01:13 +0100)]
oxnas: kd20: revert accedintally commited change

Changing the factory image of KD20 was used during testing and wasn't
intended to be included in the commit fixing a SATA bug on oxnas.
Revert that part of the commit.

Fixes: 5793112f75 ("oxnas: reduce size of ATA DMA descriptor space")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agomvebu: LS421DE: add linkstation poweroff driver
Daniel González Cabanelas [Fri, 28 Aug 2020 09:20:46 +0000 (11:20 +0200)]
mvebu: LS421DE: add linkstation poweroff driver

Compile the Linkstation poweroff module for the Buffalo LS421DE.
Without this driver the device remains forever halted if a power off
command is executed.

The driver will also allow to use the WoL feature, which wasn't availabe
in the stock firmware.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years agomvebu: backport linkstation-poweroff upstream driver
Daniel González Cabanelas [Fri, 28 Aug 2020 09:20:36 +0000 (11:20 +0200)]
mvebu: backport linkstation-poweroff upstream driver

Backport the Linkstation poweroff driver from the kernel upstream (commit
a7f79f99541ef)

This driver is required by the Buffalo LinkStation LS421DE for a correct
power off operation. It also allows to use the WoL feature.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years agoramips: rt3883: use lzma-loader for DIR-645
Perry Melange [Wed, 26 Aug 2020 11:46:23 +0000 (13:46 +0200)]
ramips: rt3883: use lzma-loader for DIR-645

The DIR-645 fails to boot if the kernel is large.
Enabling lzma-loader resolves the issue.

Run-tested on D-Link DIR-645.

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
4 years agoramips: add support for Wavlink WL-WN531A6
Georgi Vlaev [Tue, 25 Aug 2020 08:26:21 +0000 (11:26 +0300)]
ramips: add support for Wavlink WL-WN531A6

This patch adds support for Wavlink WL-WN531A6 (Quantum D6).

Specifications:
--------------

* SoC: Mediatek MT7621AT 2C2T, 880MHz
* RAM: 128MB DDR3, Nanya NT5CB64M16GP-EK
* Flash: 16MB SPI NOR flash, GigaDevice GD25Q127CSIG
* WiFi 5GHz: Mediatek MT7615N (4x4:4) on mini PCIE slot.
* WiFi 2.4GHz: Mediatek MT7603EN (2x2:2) on mini PCIE slot.
* Ethernet: MT7630, 5x 1000Base-T
* LED: Power, WAN, LAN(x4), WiFi, WPS, dual color
       "WAVLINK" LED logo on the top cover.
* Buttons: Reset, WPS, "Turbo", touch button on the top
           cover via RH6015C touch sensor.
* UART: UART1: serial console (57600 8n1) on the J4 header
               located below the top heatsink.
        UART2: J12 header, located on the right side of
               the board.
* USB: One USB3 port.
* I2C: J9 header, located below the top heatsink.

Backup the OEM Firmware:
-----------------------

There isn't any firmware released for the WL-WN531A6 on
the Wavlink web site. Reverting back to the OEM firmware is
not possible unless we have a backup of the original OEM
firmware.

The OEM firmware is stored on /dev/mtd4 ("Kernel").

  1) Plug a FAT32 formatted USB flash drive into the USB port.
  2) Navigate to "Setup->USB Storage". Under the "Available
     Network folder" you can see part of the mount point of
     the newly mounted flash drive filesystem - e.g "sda1".
     The full mount point is prefixed with "/media", so in
     this case the mount point becomes "/media/sda1".
  3) Go to http://192.168.10.1/webcmd.shtml .
  4) Type the following line in the "Command" input box:

     dd if=/dev/mtd4ro of=/media/sda1/firmware.bin

  5) Click "Apply"
  6) After few seconds, in the text area should appear this
     output:

        30080+0 records in
      30080+0 records out

  7) Type "sync" in the "Command" input box and click "Apply".
  8) At this point the OEM firmware is stored on the flash
     drive as "firmware.bin". The size of the file is 15040 KB.

Installation:
------------

* Flashing instructions (OEM web interface):
The OEM web interface accepts only files with names containing
"WN531A6". It's also impossible to flash the *-sysupgrade.bin
image, so we have to flash the *-initramfs-kernel.bin first and
use the OpenWrt's upgrade interface to write the sysupgrade
image.

  1) Rename openwrt-ramips-mt7621-wavlink_wl-wn531a6-initramfs-kernel.bin
     to WN531A6.bin.
  2) Connect your computer to the one of the LAN ports of the
     router with an Ethernet cable and open http://192.168.10.1
  3) Browse to Setup -> Firmware Upgrade interface.
  4) Upload the (renamed) OpenWrt image - WN531A6.bin.
  5) Proceed with the firmware installation and give the device
     a few minutes to finish and reboot.
  6) After reboot wait for the "WAVLINK" logo on the top cover
     to turn solid blue, and open http://192.168.1.1
  7) Use the OpenWrt's "Flash Firmware" interface to write the
     OpenWrt sysupgrade image:
     openwrt-ramips-mt7621-wavlink_wl-wn531a6-squashfs-sysupgrade.bin

* Flashing instructions (u-boot TFTP):
  1) Configure a TFTP server on your computer and set its IP
     to 192.168.10.100
  2) Rename the OpenWrt sysupgrade image to firmware.bin and
     place it in the root folder of the TFTP server.
  3) Power off the device and connect an Ethernet cable from
     one of its LAN ports your computer.
  4) Press the "Reset" button (and keep it pressed)
  5) Power on the device.
  6) After a few seconds, when the connected port LAN LED stops
     blinking fast, release the "Reset" button.
  7) Flashing OpenWrt takes less than a minute, system will
     reboot automatically.
  8) After reboot the WAVLINK logo on the top cover will indicate
     the current OpenWrt running status (wait until the logo tunrs
     solid blue).

Revert to the OEM Firmware:
--------------------------
* U-boot TFTP:
  Follow "Flashing instructions (u-boot TFTP)" and use the
  "firmware.bin" backup image.

* OpenWrt "Flash Firmware" interface:
  Upload the "firmware.bin" backup image and select "Force update"
  before continuing.

Notes:
-----
* The MAC address shown on the label at the back of the device
is assigned to the 2.4G WiFi adapter.

  MAC addresses assigned by the OEM firmware:
  2.4G: *:XX (label): factory@0x0004
    5G: *:XX + 1    : factory@0x8004
   WAN: *:XX - 1    : factory@0xe006
   LAN: *:XX - 2    : factory@0xe000

* The I2C bus and UART2 are fully functional. The headers are
not populated.

Signed-off-by: Georgi Vlaev <georgi.vlaev@konsulko.com>
4 years agocurl: move package to packages.git
Paul Spooren [Thu, 27 Aug 2020 08:08:38 +0000 (22:08 -1000)]
curl: move package to packages.git

curl is replaced by uclient-fetch within the OpenWrt build system and we
can therefore move curl to packages.git. This is based on the Hamburg
2019 decision that non essential packages should move outside base.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years agotools/mpc: update to 1.2.0
Hannu Nyman [Mon, 24 Aug 2020 16:44:47 +0000 (19:44 +0300)]
tools/mpc: update to 1.2.0

Update mpc to version 1.2.0.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agoramips: add support for TP-Link TL-WR850N v2
Andrew Freeman [Tue, 16 Jun 2020 04:20:25 +0000 (09:20 +0500)]
ramips: add support for TP-Link TL-WR850N v2

This patch adds support for the TP-Link TL-WR850N v2. This device
is very similar to TP-Link TL-WR840 v4 and TP-Link TL-WR841 v13.

Specifications:
SOC: MediaTek MT7628NN
Flash: 8 MiB SPI
RAM: 64 MiB
WLAN: MediaTek MT7628NN
Ethernet: 5 ports (100M)

Installation Using the integrated tftp capability of the router:
1. Turn off the router.
2. Connect pc to one of the router LAN ports.
3. Set your PC IPv4 address to 192.168.0.66/24.
4. Run any TFTP server on the PC.
5. Put the recovery firmware on the root directory of TFTP server
   and name the file tp_recovery.bin
6. Start the router by pressing power button while holding the
   WPS/Reset button (or both WPS/Reset and WIFI buttons)
7. Router connects to your PC with IPv4 address 192.168.0.2,
   downloads the firmware, installs it and reboots. LEDs are
   flashing. Now you have OpenWrt installed.
8. Change your IPv4 PC address to something in 192.168.1.0/24
   network or use DHCP to get an address from your OpenWrt router.
9. Done! You can login to your router via ssh.

Forum link:
https://forum.openwrt.org/t/add-support-for-tp-link-tl-wr850n-v2/66899

Signed-off-by: Andrew Freeman <labz56@gmail.com>
[squash an tidy up commits, sort nodes]
Signed-off-by: Darsh Patel <darshkpatel@gmail.com>
[minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoat91: explicitly set CONFIG_USB_SUPPORT for sam9x subtarget
Adrian Schmutzler [Thu, 27 Aug 2020 14:10:38 +0000 (16:10 +0200)]
at91: explicitly set CONFIG_USB_SUPPORT for sam9x subtarget

The at91 target sets

  FEATURES:=usb usbgadget ...

in the target Makefile, which sets CONFIG_USB_SUPPORT=y in the
.config file for both subtargets.

However, when building with all kmods, the build fails with the
following error message:

  ERROR: module [...]/drivers/bluetooth/btusb.ko is missing.

It appears that only a part of the bluetooth files are compiled.
The package depends @USB_SUPPORT.

This can be easily healed by adding CONFIG_USB_SUPPORT=y to the
sam9x subtarget configuration. Before the 4.14->5.4 bump, the
same was also set in the target's config-4.14 file along with
several other USB config options that are not reimplemented.

Still, it remains a mystery to me why setting the same symbol
via target kernel config creates a different result than the
feature setting the same symbol in target-metadata.pl.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agohostapd: Fix compile errors after wolfssl update
Hauke Mehrtens [Thu, 27 Aug 2020 10:09:58 +0000 (12:09 +0200)]
hostapd: Fix compile errors after wolfssl update

This fixes the following compile errors after the wolfssl 4.5.0 update:
  LD  wpa_cli
../src/crypto/tls_wolfssl.c: In function 'tls_match_alt_subject':
../src/crypto/tls_wolfssl.c:610:11: error: 'GEN_EMAIL' undeclared (first use in this function); did you mean 'ENAVAIL'?
    type = GEN_EMAIL;
           ^~~~~~~~~
           ENAVAIL
../src/crypto/tls_wolfssl.c:610:11: note: each undeclared identifier is reported only once for each function it appears in
../src/crypto/tls_wolfssl.c:613:11: error: 'GEN_DNS' undeclared (first use in this function)
    type = GEN_DNS;
           ^~~~~~~
../src/crypto/tls_wolfssl.c:616:11: error: 'GEN_URI' undeclared (first use in this function)
    type = GEN_URI;
           ^~~~~~~
../src/crypto/tls_wolfssl.c: In function 'wolfssl_tls_cert_event':
../src/crypto/tls_wolfssl.c:902:20: error: 'GEN_EMAIL' undeclared (first use in this function); did you mean 'ENAVAIL'?
   if (gen->type != GEN_EMAIL &&
                    ^~~~~~~~~
                    ENAVAIL
../src/crypto/tls_wolfssl.c:903:20: error: 'GEN_DNS' undeclared (first use in this function)
       gen->type != GEN_DNS &&
                    ^~~~~~~
../src/crypto/tls_wolfssl.c:904:20: error: 'GEN_URI' undeclared (first use in this function)
       gen->type != GEN_URI)
                    ^~~~~~~
Makefile:2029: recipe for target '../src/crypto/tls_wolfssl.o' failed

Fixes: 00722a720c77 ("wolfssl: Update to version 4.5.0")
Reported-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Use kernel 5.4 by default
Hauke Mehrtens [Wed, 26 Aug 2020 22:34:29 +0000 (00:34 +0200)]
pistachio: Use kernel 5.4 by default

Kernel 5.4 should be stable enough.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoramips: remove further mt7621 code from local ethernet driver
Adrian Schmutzler [Fri, 21 Aug 2020 14:18:23 +0000 (16:18 +0200)]
ramips: remove further mt7621 code from local ethernet driver

While commit 734a8c46e703 focussed on removing stuff directly
selected by the NET_RALINK_* symbols, this patch removes additional
unused mt7621-specific code from the ethernet driver.

As with the previous patch, the main reason is to reduce the amount
of code we have to maintain and care about.

Note that this patch still keeps a few lines with
IS_ENABLED(CONFIG_SOC_MT7621) in mtk_eth_soc.h/.c, as this file is
still selected for the mt7621 subtarget.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomtd-utils: Update to version 2.1.2
Hauke Mehrtens [Mon, 24 Aug 2020 09:53:06 +0000 (11:53 +0200)]
mtd-utils: Update to version 2.1.2

The release notes says this:
As already said, the changes since 2.1.1 are primarily bug fixes, addressing
compiler warnings and issues reported by diagnostic tools, but also build
failures for some configurations.
https://lists.infradead.org/pipermail/linux-mtd/2020-July/081299.html

The size of the ubi-utils ipk increases on mips BE by 0.2%
old:
ubi-utils_2.1.1-1_mips_24kc.ipk: 70992
new:
ubi-utils_2.1.2-1_mips_24kc.ipk: 71109

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agotools: mtd-utils: Update to version 2.1.2
Hauke Mehrtens [Mon, 24 Aug 2020 09:53:23 +0000 (11:53 +0200)]
tools: mtd-utils: Update to version 2.1.2

The release notes says this:
As already said, the changes since 2.1.1 are primarily bug fixes, addressing
compiler warnings and issues reported by diagnostic tools, but also build
failures for some configurations.
https://lists.infradead.org/pipermail/linux-mtd/2020-July/081299.html

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agowolfssl: Update to version 4.5.0
Hauke Mehrtens [Mon, 24 Aug 2020 10:11:29 +0000 (12:11 +0200)]
wolfssl: Update to version 4.5.0

This fixes the following security problems:
* In earlier versions of wolfSSL there exists a potential man in the
  middle attack on TLS 1.3 clients.
* Denial of service attack on TLS 1.3 servers from repetitively sending
  ChangeCipherSpecs messages. (CVE-2020-12457)
* Potential cache timing attacks on public key operations in builds that
  are not using SP (single precision). (CVE-2020-15309)
* When using SGX with EC scalar multiplication the possibility of side-
  channel attacks are present.
* Leak of private key in the case that PEM format private keys are
  bundled in with PEM certificates into a single file.
* During the handshake, clear application_data messages in epoch 0 are
  processed and returned to the application.

Full changelog:
https://www.wolfssl.com/docs/wolfssl-changelog/

Fix a build error on big endian systems by backporting a pull request:
https://github.com/wolfSSL/wolfssl/pull/3255

The size of the ipk increases on mips BE by 1.4%
old:
libwolfssl24_4.4.0-stable-2_mips_24kc.ipk: 386246
new:
libwolfssl24_4.5.0-stable-1_mips_24kc.ipk: 391528

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agocurl: Use wolfssl by default
Hauke Mehrtens [Tue, 25 Aug 2020 22:10:20 +0000 (00:10 +0200)]
curl: Use wolfssl by default

Instead of using mbedtls by default use wolfssl. We now integrate
wolfssl in the default build so use it also as default ssl library for
curl.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agocurl: Fix build with wolfssl
Hauke Mehrtens [Tue, 25 Aug 2020 21:54:44 +0000 (23:54 +0200)]
curl: Fix build with wolfssl

Backport a commit from upstream curl to fix a problem in configure with
wolfssl.

checking size of time_t... configure: error: cannot determine a size for time_t

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoath79: fix ethernet setup for some qca953x devices
Adrian Schmutzler [Wed, 12 Aug 2020 12:26:44 +0000 (14:26 +0200)]
ath79: fix ethernet setup for some qca953x devices

On Comfast CF-E130N v2 and Mikrotik LHG HB board, the config
found in DTS appears to be strange:

- eth0 has "syscon","simple-mfd" set although it's not enabled
- eth1 is enabled redundantly (already "okay" in qca953x.dtsi)
- phy-handle is set for eth1 in DTS although it has a fixed-link
  in qca953x.dtsi

This seems like a copy-paste gone wrong. Remove the named options.

Run-tested on MikroTik LHG 2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agouboot-at91: harmonize indent in Makefile
Adrian Schmutzler [Sun, 23 Aug 2020 20:34:35 +0000 (22:34 +0200)]
uboot-at91: harmonize indent in Makefile

The indent in Makefile is mixed, harmonize it where reasonable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoat91bootstrap: harmonize indent in Makefiles
Adrian Schmutzler [Sun, 23 Aug 2020 20:32:28 +0000 (22:32 +0200)]
at91bootstrap: harmonize indent in Makefiles

The indent in Makefiles is mixed, harmonize it where reasonable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoat91: introduce vendor_model scheme and drop board names
Adrian Schmutzler [Sun, 23 Aug 2020 18:15:17 +0000 (20:15 +0200)]
at91: introduce vendor_model scheme and drop board names

This introduces the vendor_model scheme to this target in order to
harmonize device names within the target and with the rest of
OpenWrt. In addition, custom board names are dropped in favor
of the generic script which takes the compatible.

Use the SUPPORTED_DEVICES variable to store the compatible where it
deviates from the device name, so we can use it in build recipes.

While at it, harmonize a few indents as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoat91: Refresh kernel config
Hauke Mehrtens [Sun, 23 Aug 2020 10:34:47 +0000 (12:34 +0200)]
at91: Refresh kernel config

This was done by running:
make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoat91: change dtb file path
Sandeep Sheriker M [Sat, 22 Aug 2020 19:55:50 +0000 (12:55 -0700)]
at91: change dtb file path

Changing dtb file path since the dtb files are build in KDIR folder
with image- prefix.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
[remove commented lines]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agouboot-at91: bump version to linux4sam-2020.04
Sandeep Sheriker M [Sat, 22 Aug 2020 19:55:49 +0000 (12:55 -0700)]
uboot-at91: bump version to linux4sam-2020.04

Bump version to linux4sam-2020.04 and add patch to fix Wformat-security
warnings.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
4 years agoat91bootstrap: bump version to v3.9.3
Sandeep Sheriker M [Sat, 22 Aug 2020 19:55:48 +0000 (12:55 -0700)]
at91bootstrap: bump version to v3.9.3

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
4 years agoat91: bump linux version to 5.4
Sandeep Sheriker M [Sat, 22 Aug 2020 19:55:47 +0000 (12:55 -0700)]
at91: bump linux version to 5.4

Move patches to 5.4, put config only in subtarget directories.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
[refresh patches, add commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolayerscape: add flashing manual for LS1012FRDM
Pawel Dembicki [Thu, 13 Aug 2020 09:15:56 +0000 (11:15 +0200)]
layerscape: add flashing manual for LS1012FRDM

LS1012FRDM is supported but there's no flashing instruction in README.

This patch adds it.

While at it, add a missing saveenv for MAC address setup.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[add comment about saveenv]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomt76: update to the latest version
Felix Fietkau [Mon, 24 Aug 2020 08:36:36 +0000 (10:36 +0200)]
mt76: update to the latest version

f0beb7cbc443 mt76: mt7663u: fix memory leaks in mt7663u_probe
90c8422d3f56 mt76: mt7915: fix typo in function name
9cbbe4a30eaf mac80211: simplify TX aggregation start
974486ec2642 util: in worker setup, only overwrite function pointer if not NULL
519510277a8b mt76: initialize tx worker function earlier
3c361b1e3f4e mt76: mt7663u: fix dma header initialization
e8d489647c7f mt76: usb: fix use of q->head and q->tail
8124daf53130 mt76: sdio: fix use of q->head and q->tail
3c2cd8580377 mt76: unify queue tx cleanup code
780cdabb8659 mt76: remove qid argument to drv->tx_complete_skb
05aa857861fc mt76: remove swq from struct mt76_sw_queue
e861cb051833 mt76: rely on AQL for burst size limits on tx queueing
3218b914a2fb mt76: remove struct mt76_sw_queue
23529b5e93c1 mt76: mt7603: tune tx ring size
f6ca436ebea4 mt76: mt76x02: tune tx ring size
97e65131440c mt76: mt7603: check for single-stream EEPROM configuration
957b6c5ac273 mt76: mt7615: fix MT_ANT_SWITCH_CON register definition
96a541eedda9 mt76: mt7615: fix antenna selection for testmode tx_frames
b36d7ae096a3 mt76: mt7603: move number of streams detection to eeprom init

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agofirewall: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Mon, 24 Aug 2020 16:04:42 +0000 (18:04 +0200)]
firewall: Fix PKG_MIRROR_HASH

Fixes: 6c57fb7aa93d ("firewall: bump to version 2020-07-05")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agombedtls: update to 2.16.7
Magnus Kroken [Sat, 25 Jul 2020 12:19:28 +0000 (14:19 +0200)]
mbedtls: update to 2.16.7

Mbed TLS 2.16.7 is a maintenance release of the Mbed TLS 2.16 branch,
and provides bug fixes and minor enhancements. This release includes
fixes for security issues and the most severe one is described in more
detail in a security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-07

* Fix a side channel vulnerability in modular exponentiation that could
reveal an RSA private key used in a secure enclave.
* Fix side channel in mbedtls_ecp_check_pub_priv() and
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a private
key that didn't include the uncompressed public key), as well as
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
f_rng argument. An attacker with access to precise enough timing and
memory access information (typically an untrusted operating system
attacking a secure enclave) could fully recover the ECC private key.
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
macros).

Due to Mbed TLS moving from ARMmbed to the Trusted Firmware project, some
changes to the download URLs are required. For the time being, the
ARMmbed/mbedtls Github repository is the canonical source for Mbed TLS.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
[Use https://codeload.github.com and new tar.gz file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoexfat: update to 5.8.7
Rosen Penev [Sat, 1 Aug 2020 22:54:51 +0000 (15:54 -0700)]
exfat: update to 5.8.7

93e2334 exfat: fix build error on linux-5.4,5.5 kernel
01a7b8c exfat: fix name_hash computation on big endian systems
8f92bc0 exfat: fix wrong size update of stream entry by typo

Removed commented material that was for testing compilation.

Removed patch as the error was fixed upstream. First entry above.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agokernel: add ar5523 driver
mohammad rasim [Tue, 11 Aug 2020 19:13:25 +0000 (22:13 +0300)]
kernel: add ar5523 driver

The driver currently only support managed and monitor mode

Changes since v1:
- drop the @DRIVER_11N_SUPPORT dependency

Signed-off-by: mohammad rasim <mohammad.rasim96@gmail.com>
4 years agokernel: backport RTL8366RB patches
Linus Walleij [Tue, 11 Aug 2020 11:11:08 +0000 (13:11 +0200)]
kernel: backport RTL8366RB patches

These upstream patches makes the RTL8366RB DSA switch work
properly with OpenWrt, the D-Link DIR-685 gets network and
can be used as a router, and the same should be applicable
for any other device that want to enable the RTL8366RB
through Device Tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 years agoipset: update to version 7.6
Josef Schlehofer [Fri, 14 Aug 2020 19:18:57 +0000 (21:18 +0200)]
ipset: update to version 7.6

Changelog:
https://ipset.netfilter.org/changelog.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
4 years agouClibc-ng: refresh config and remove several legacy options
Rosen Penev [Fri, 14 Aug 2020 21:30:03 +0000 (14:30 -0700)]
uClibc-ng: refresh config and remove several legacy options

SUSV3_LEGACY_MACROS are completely unused since SUSV3_LEGACY is enabled

HAS_OBSOLETE_BSD_SIGNAL is completely deprecated functionality.

HAS_BSD_RES_CLOSE is completely deprecated functionality.

HAS_FTW is deprecated SUSV4 functionality. Saves ~4.5kb.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agouClibc-ng: update package from 1.0.31 to 1.0.34
Donald Hoskins [Fri, 14 Aug 2020 21:30:02 +0000 (14:30 -0700)]
uClibc-ng: update package from 1.0.31 to 1.0.34

Update package from 1.0.31 to 1.0.34

Tested mips64/octeonplus/octeon3
Build against: OpenWrt SNAPSHOT r13871-546e140382 / LuCI Master git-20.186.79919-0c47989
Build Kernel: 5.4.51

Signed-off-by: Donald Hoskins <grommish@gmail.com>
4 years agocmake: Disable use of package registries
Jeffery To [Mon, 17 Aug 2020 18:10:25 +0000 (02:10 +0800)]
cmake: Disable use of package registries

CMake provides a user package registry (stored in ~/.cmake/packages) and
a system package registry (not available on non-Windows platforms).

The "export(PACKAGE)" command may store information in the user package
registry, and the "find_package()" command may search both user and
system package registries for information.

This sets various variables to disable the use of these package
registries (both saving and retrieval of package information).

This also sets deprecated variables that perform similar functions, in
case external toolchains include older versions of CMake.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agolinux-firmware: add support for Marvell SDIO 8997
Josef Schlehofer [Tue, 18 Aug 2020 12:23:03 +0000 (14:23 +0200)]
linux-firmware: add support for Marvell SDIO 8997

For example, Turris MOX SDIO card is using Marvell (NXP) 88W8997 chip.

Technical specs of 88W8997:
- 28nm
- 802.11 ac wave-2
It should support simultaneous dual-band 2.4 GHz and 5 GHz,
but it requires to support multiSSID for one Wi-Fi card [1], which is
not supported in OpenWrt, yet and if we tried to run two instances of
hostapd, it didn't work well, so it's 2.4 GHz or 5 GHz.
- 2x2 MU-MIMO
- Bluetooth 5.1 with LE support
- Unfortunately, there can be connected only 8 clients at the same time
(limited by FW, however, there exists "enterprise" chip, its equal chip,
it is just different that it uses different FW)

Symlink is necessary as mwifiex_sdio tries to load sd8997_uapsta.bin
[   13.651182] mwifiex_sdio mmc0:0001:1: Direct firmware load for mrvl/sd8997_uapsta.bin failed with error -2
[   13.661065] mwifiex_sdio mmc0:0001:1: Falling back to user helper
[   13.684880] firmware mrvl!sd8997_uapsta.bin: firmware_loading_store: map pages failed
[   13.695910] mwifiex_sdio mmc0:0001:1: Failed to get firmware mrvl/sd8997_uapsta.bin
[   13.703774] mwifiex_sdio mmc0:0001:1: info: _mwifiex_fw_dpc: unregister device

Pali Rohár sent two patches [2] [3] into kernel to fix default firmware name for SD8997, so
the symlink will not be required in the future versions of kernel, which
was accepted and right now, according to my details it was backported to 5.8, 5.7 and 5.4

[1] https://bugs.openwrt.org/index.php?do=details&task_id=3243
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00eb0cb36fad5
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2e1fcac52a9ea

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
4 years agolinux-firmware: update to version 20200817
Josef Schlehofer [Mon, 17 Aug 2020 12:42:24 +0000 (14:42 +0200)]
linux-firmware: update to version 20200817

git log --pretty=oneline --abbrev-commit 20200619..20200817
7a30af1 (HEAD -> master, tag: 20200817, origin/master, origin/main, origin/HEAD) Merge branch 'i915-firmware-updates-08-2020' of git://anongit.freedesktop.org/drm/drm-firmware into main
923bfa6 brcm: Add brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt symlink
33e11ab rtl_bt: Update RTL8822C BT UART firmware to 0x0599_8A4F
1b81373 i915: Add DMC firmware 2.02 for RKL
bdf8d7a i915: Add DMC firmware 2.08 for TGL
1bcdc9a i915: Add HuC firwmare v7.5.0 for TGL
c331aa9 amdgpu: update vega20 firmware for 20.30
a434387 amdgpu: update vega12 firmware for 20.30
49e9ea8 amdgpu: update vega10 firmware for 20.30
d89e9b1 amdgpu: update renoir firmware for 20.30
373c08a amdgpu: update raven2 firmware for 20.30
69ca06e amdgpu: update raven firmware for 20.30
12042c2 amdgpu: update picasso firmware for 20.30
2c9d97a amdgpu: update navi14 firmware for 20.30
eaa3e55 amdgpu: update navi10 firmware for 20.30
9bc3789 linux-firmware: update NXP SDSD-8997 firmware image
6c79b68 Mellanox: Add new mlxsw_spectrum firmware xx.2008.1036
2b823fc (tag: 20200721) linux-firmware: Update AMD SEV firmware
e33306f Merge branch 'qca_0714' of https://github.com/bgodavar/qca_bt_fw into main
1d1c80b Update to 20200629111339 version to aligh SDK. Mainly fix DFS false alarm.
69c7f0b rtl_nic: update firmware for RTL8125B
f39b687 Update binary firmware for MT7663 based devices to include firmware offload feature and low power feature.
3882702 QCA: Add correct bin file for WCN3991
3d3a06f linux-firmware: Update firmware file for Intel Bluetooth AX201
b7849f7 linux-firmware: Update firmware file for Intel Bluetooth AX200
07b0375 linux-firmware: Update firmware file for Intel Bluetooth 9560
44bf1b1 linux-firmware: Update firmware file for Intel Bluetooth 9260
7169ab3 linux-firmware: wilc1000: add wilc1000 v15.4 FW
b1497fc Merge https://github.com/rjliao-qca/qca-btfw into main
c4e04b4 QCA: Update Bluetooth firmware for QCA6390
74ac3b5 Merge https://github.com/bgodavar/qca_wcn3991 into main
1a0c0c2 amdgpu: add UVD firmware for SI asics
24cc617 QCA: Update WCN3991 FW files

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
4 years agokernel: bump 5.4 to 5.4.60
Adrian Schmutzler [Fri, 21 Aug 2020 16:16:42 +0000 (18:16 +0200)]
kernel: bump 5.4 to 5.4.60

Deleted upstream patches:
  generic:
    041-genirq-affinity-Make-affinity-setting-if-activated-o.patch
  ipq806x:
    093-5-v5.8-ipq806x-PCI-qcom-Define-some-PARF-params-needed-for-ipq8064-SoC.patch
    093-6-v5.8-ipq806x-PCI-qcom-Add-support-for-tx-term-offset-for-rev-2_1_0.patch

Merged manually:
  ipq806x:
    093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch
  layerscape:
    804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch

Build-tested: ath79/generic, ipq806x, layerscape/armv7, layerscape/armv8_64b
Run-tested: ipq806x (R7800)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoRevert "scripts/download: add sources CDN as first mirror"
Jo-Philipp Wich [Mon, 24 Aug 2020 13:53:17 +0000 (15:53 +0200)]
Revert "scripts/download: add sources CDN as first mirror"

This reverts commit c737a9ee6a9c47b6e553ac81bf293b1161e59799.

The source CDN has been discontinued in its current form and will take a
while to be reestablished. Even then it makes little sense to put a CDN
before other CDNs such as kernel.org, apache.org, sourceforge etc.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agokernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627
Adrian Schmutzler [Sat, 22 Aug 2020 11:20:07 +0000 (13:20 +0200)]
kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627

For many target we have added CONFIG_WATCHDOG_CORE=y to the target
config due to the following error:

 Package kmod-hwmon-sch5627 is missing dependencies for the following
 libraries:
 watchdog.ko

However, actually the proper way appears to be setting the
dependency for the kmod-hwmon-sch5627 package, as the error message
demands.

Do this in this patch and remove the target config entries added
due to this issue.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoipq806x: replace pci patchset with upstream version
Ansuel Smith [Sat, 8 Aug 2020 14:50:04 +0000 (16:50 +0200)]
ipq806x: replace pci patchset with upstream version

Changes:
- Update patches
- Update dts with new binding
    Tx term offset dropped and replaced with a new compatible

Removed:
- 0071-5-PCI-qcom-Programming-the-PCIE-iATU-for-IPQ806x
    Pci init does the same exact thing (was needed in older kernel version)
- 0071-7-pcie-Set-PCIE-MRRS-and-MPS-to-256B
    Rejected upstream, can't find any reason to have this. No regression with
    testing it on R7800.

Tested on R7800 (ipq8065), R7500 v2 ("ipq8064-v2")

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by: Paul Blazejowski <paulb@blazebox.homeip.net> [R7800]
[rebase and refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoconfig: kernel: fix missed CGROUP_HUGETLB symbol
Yuan Tao [Sat, 22 Aug 2020 11:31:20 +0000 (19:31 +0800)]
config: kernel: fix missed CGROUP_HUGETLB symbol

The symbol KERNEL_CGROUP_HUGETLB is always used whenever KERNEL_CGROUPS is enabled.
The absence of this notation will cause the user to be asked to enter this parameter the first time it is compiled.

Signed-off-by: Yuan Tao <ty@wevs.org>
4 years agobusybox: fix typo in Makefile
Daniel Golle [Sun, 23 Aug 2020 22:58:18 +0000 (23:58 +0100)]
busybox: fix typo in Makefile

'conffiiles' -> 'conffiles'

Fixes: 2e06f8ae24 ("busybox: add selinux variant")
Reported-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agof2fs-tools: add selinux variant
Paul Spooren [Thu, 20 Aug 2020 01:02:24 +0000 (15:02 -1000)]
f2fs-tools: add selinux variant

This variant is build with `libselinux` and required to set labels
during runtime.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years agobusybox: add selinux variant
Paul Spooren [Wed, 19 Aug 2020 21:40:27 +0000 (11:40 -1000)]
busybox: add selinux variant

This commit adds a `selinux` variant which comes with with a number of
SELinux applets and also SELinux label support.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years agoramips: mt7621: use lzma-loader for ZBT-WG3526
Rustam Gaptulin [Sun, 23 Aug 2020 10:02:48 +0000 (15:02 +0500)]
ramips: mt7621: use lzma-loader for ZBT-WG3526

The wg3526 fails to boot if the kernel is large.
Enabling lzma-loader resolves the issue on both the wg3526-16m
and wg3526-32m.

Fixes: FS#3143
Signed-off-by: Rustam Gaptulin <rascal6@gmail.com>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agonat46: update to latest git HEAD
Hans Dedecker [Sun, 23 Aug 2020 18:07:00 +0000 (20:07 +0200)]
nat46: update to latest git HEAD

362640b nat46-module: fix compilation with kernel 5.6

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agotools/ccache: update to 3.7.11
Hannu Nyman [Sun, 23 Aug 2020 14:04:07 +0000 (17:04 +0300)]
tools/ccache: update to 3.7.11

Update ccache to 3.7.11

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agotools/cmake: update to 3.18.2
Hannu Nyman [Sun, 23 Aug 2020 14:11:11 +0000 (17:11 +0300)]
tools/cmake: update to 3.18.2

Update cmake to version 3.18.2.
Refresh patches.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agotools/mpfr: update to 4.1.0
Hannu Nyman [Sun, 23 Aug 2020 14:08:14 +0000 (17:08 +0300)]
tools/mpfr: update to 4.1.0

Update mpfr to version 4.1.0.
Refresh patches.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agobuild: SDK/IB reproducible and faster compression
Paul Spooren [Thu, 13 Aug 2020 23:46:43 +0000 (13:46 -1000)]
build: SDK/IB reproducible and faster compression

Both IB and SDK now use the same logic for packing.

This commit add reproducible multithread compression to the SDK and
corrects the file mtime for both. Previously all files where just copied
over from the build system, generating random mtimes.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years agotools/bison: update to 3.7.1
Hannu Nyman [Sat, 22 Aug 2020 15:19:20 +0000 (18:19 +0300)]
tools/bison: update to 3.7.1

Update GNU bison to version 3.7.1.
Refresh patches.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agocurl: disable zstd support
Hans Dedecker [Sun, 23 Aug 2020 08:47:04 +0000 (10:47 +0200)]
curl: disable zstd support

Fixes package libcurl build issue :

Package libcurl is missing dependencies for the following libraries:
libzstd.so.1

Suggested-by: Syrone Wong <wong.syrone@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agomt76: update to the latest version
Felix Fietkau [Sat, 22 Aug 2020 19:23:42 +0000 (21:23 +0200)]
mt76: update to the latest version

8027c7d95274 mt76: mt7615: fix reading airtime statistics
3743e7c904de mt76: mt7915: optimize mt7915_mac_sta_poll
d2fe5e8330c6 mt76: mt7915: fix variable initialization in sta poll
692065b4c9db mt76: mt7915: only enable hw amsdu for AP and station
b54157df7c27 mt7615: update firmware to version 20200814
888990e159d2 mt76: use threaded NAPI
3a3306e408f2 mt76: mt7915: add 802.11 encap offload support
795b772cd392 mt76: mt7915: add encap offload for 4-address mode stations
55d79ab7fa23 mt76: dma: update q->queued immediately on cleanup
23dbd64d6324 mt76: mt7915: schedule tx tasklet in mt7915_mac_tx_free
5cf34cda70af mt76: mt7915: significantly reduce interrupt load
87a69429069f mt76: add utility functions for deferring work to a kernel thread
2f1318a06d0a mt76: convert from tx tasklet to tx worker thread
72f0979566be mt76: mt7915: add support for accessing mapped registers via bus ops
f9ce5c776c9a mt76: use ieee80211_rx_list to pass frames to the network stack as a batch
25dd8bdae3bf mt76: mt7615: significantly reduce interrupt load
7c5445dec812 mt76: mt7615: release mutex in mt7615_reset_test_set
e68c3e254822 mt76: mt7663s: use NULL instead of 0 in sdio code
4368380e20e7 mt76: mt7663s: fix resume failure
bea386f27914 mt76: mt7663s: fix unable to handle kernel paging request
b8780c44c716 mt76: mt7615: fix possible memory leak in mt7615_tm_set_tx_power
37a1c7ed6796 mt76: mt7615: fix a possible NULL pointer dereference in mt7615_pm_wake_work
8c7c1a207d25 mt76: fix a possible NULL pointer dereference in mt76_testmode_dump

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoath79: fix/improve LED control for TL-WPA8630 v1/v2
Joe Mullally [Fri, 21 Aug 2020 06:02:23 +0000 (07:02 +0100)]
ath79: fix/improve LED control for TL-WPA8630 v1/v2

The TL-WPA8630 v1 and v2 have the same LED Control GPIO configuration
according to the TP-Link GPL sources. Set the GPIO to output to make
it work and set to Active Low. It defaults to LEDs on at bootup.

To turn all LEDs off:
  echo 0 > /sys/class/gpio/tp-link\:led\:control/value
To turn all LEDs on:
  echo 1 > /sys/class/gpio/tp-link\:led\:control/value

Change the "LED" button from BTN_0 to KEY_LIGHTS_TOGGLE to match other
devices and the button guide, and to reduce the number of unintuitive
"BTN_X" inputs.

Fixes: ab74def0db93 ("ath79: add support for TP-Link TL-WPA8630P v2")
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
[shorten commit title, minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoipq806x: create shared DTSI for EA7500 v1 and EA8500
Adrian Schmutzler [Fri, 14 Aug 2020 15:10:00 +0000 (17:10 +0200)]
ipq806x: create shared DTSI for EA7500 v1 and EA8500

Most of the definitions for the two devices are shared, so put
them in a shared DTSI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomac80211: rework encapsulation offload support
Felix Fietkau [Mon, 17 Aug 2020 16:27:25 +0000 (18:27 +0200)]
mac80211: rework encapsulation offload support

Fix a number of deficiencies in the existing API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agokernel: add patch that adds support for running threaded NAPI poll functions
Felix Fietkau [Sun, 26 Jul 2020 13:24:42 +0000 (15:24 +0200)]
kernel: add patch that adds support for running threaded NAPI poll functions

This is helps on workloads with CPU intensive poll functions (e.g. 802.11)
on multicore systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agouml: update to linux 5.4
Felix Fietkau [Thu, 20 Aug 2020 15:14:36 +0000 (17:14 +0200)]
uml: update to linux 5.4

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agocurl: update to version 7.72.0
Josef Schlehofer [Fri, 21 Aug 2020 15:17:47 +0000 (17:17 +0200)]
curl: update to version 7.72.0

Changes in this version can be found here:
https://curl.haxx.se/changes.html#7_72_0

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
4 years agokernel: backport a fix for a regression that broke IRQ affinity on ARM
Felix Fietkau [Fri, 21 Aug 2020 18:44:25 +0000 (20:44 +0200)]
kernel: backport a fix for a regression that broke IRQ affinity on ARM

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agomac80211: add missing return code checks in AQL improvements
Felix Fietkau [Fri, 21 Aug 2020 16:06:50 +0000 (18:06 +0200)]
mac80211: add missing return code checks in AQL improvements

Fixes throughput issues with some drivers (e.g. ath10k)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoramips: remove legacy ethernet driver components for mt7621
Adrian Schmutzler [Fri, 14 Aug 2020 10:01:31 +0000 (12:01 +0200)]
ramips: remove legacy ethernet driver components for mt7621

The mt7621 subtarget has been switched to DSA quite a while ago and
seems to run sufficiently fine. Build with older kernels than 5.4 has
been disabled directly during the kernel bump, so our local ethernet
driver is unused in master since then.

Therefore, let's remove the mt7621-specific parts of "our" ethernet
driver, so we don't have to maintain them and it's obvious to
everybody that they are not used anymore.

This also drops the offloading components as this was specifically
implemented to depend on mt7621.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agopistachio: use generic diag.sh
Adrian Schmutzler [Thu, 20 Aug 2020 20:18:41 +0000 (22:18 +0200)]
pistachio: use generic diag.sh

Remove local diag.sh in favor of generic one and add the required
led-* aliases to DTS.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agopistachio: use vendor_model scheme for device/image name
Adrian Schmutzler [Thu, 20 Aug 2020 20:18:40 +0000 (22:18 +0200)]
pistachio: use vendor_model scheme for device/image name

This uses the vendor_model scheme for the device/image name in
order to make this consistent to most other targets.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agopistachio: Add kmod-ca8210 wpan-tools by default
Hauke Mehrtens [Fri, 21 Aug 2020 09:04:57 +0000 (11:04 +0200)]
pistachio: Add kmod-ca8210 wpan-tools by default

A ca8210 chip is soldered onto the board, add the driver by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Add SC16IS7XX device driver
Hauke Mehrtens [Sat, 15 Aug 2020 14:45:16 +0000 (16:45 +0200)]
pistachio: Add SC16IS7XX device driver

This device is used to control extra UARTs and LEDs on the board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Add extra devices to dts file
Hauke Mehrtens [Sat, 15 Aug 2020 14:42:29 +0000 (16:42 +0200)]
pistachio: Add extra devices to dts file

This adds some extra devices to the DTS file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Add mtd device name from dts
Hauke Mehrtens [Wed, 12 Aug 2020 22:45:12 +0000 (00:45 +0200)]
pistachio: Add mtd device name from dts

Parse the "linux,mtd-name" property also for SPI NAND flashes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Fix Null pointer access in pwm-img.c
Hauke Mehrtens [Tue, 11 Aug 2020 22:52:36 +0000 (00:52 +0200)]
pistachio: Fix Null pointer access in pwm-img.c

This fixes a crash when booting the board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Make patches and configuration apply on to of 5.4
Hauke Mehrtens [Sun, 9 Aug 2020 17:47:17 +0000 (19:47 +0200)]
pistachio: Make patches and configuration apply on to of 5.4

This refreshes the patches, removes patches already applied upstream and
removes the SPI NAND framework to use the upstream version.

In addition it also refreshes the kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agopistachio: Copy kernel 4.14 to 5.4
Hauke Mehrtens [Sun, 9 Aug 2020 17:27:48 +0000 (19:27 +0200)]
pistachio: Copy kernel 4.14 to 5.4

This only copies the patches and configuration without doing any
modification to the files.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Add GigaDevice GD5F4GQ4xC SPI NAND flash
Hauke Mehrtens [Sat, 15 Aug 2020 17:34:00 +0000 (19:34 +0200)]
kernel: Add GigaDevice GD5F4GQ4xC SPI NAND flash

This flash was found on the Imagination Technologies Creator Ci40 (Marduk).

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: wpan: Add kmod-ca8210
Hauke Mehrtens [Sat, 15 Aug 2020 14:44:23 +0000 (16:44 +0200)]
kernel: wpan: Add kmod-ca8210

This device is found on the pistachio marduk board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: wpan: Add missing AUTOLOAD to load kernel module
Hauke Mehrtens [Sat, 15 Aug 2020 14:43:19 +0000 (16:43 +0200)]
kernel: wpan: Add missing AUTOLOAD to load kernel module

These kernel modules were not loaded automatically, fix this by adding
the AUTOLOAD definition.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoath79: add support for TP-Link TL-WR710N v2.1
Adrian Schmutzler [Tue, 18 Aug 2020 11:49:15 +0000 (13:49 +0200)]
ath79: add support for TP-Link TL-WR710N v2.1

This adds support for the TP-Link TL-WR710N v2.1. It is basically a
re-issue of the v1.2.

Specifications:

SoC:       Atheros AR9331
CPU:       400 MHz
Flash:     8 MiB
RAM:       32 MiB
WiFi:      2.4 GHz b/g/n
Ethernet:  2x 100M ports
USB:       1x 2.0

The only difference from the v1 is the TP-Link hardware ID/revision.

Attention:
The TL-WR710N v2.0 (!) has only 4 MB flash and cannot be flashed with
this image. It has a different TPLINK_HWREV, so accidental flashing
of the factory image should be impossible without additional measures.

Unfortunately, the v2.0 in ar71xx has the same board name, so sysupgrade
from ar71xx v2.0 into ath79 v1/v2.1 will not be prevented, but will brick
the device.

Flashing instruction:

Upload the factory image via the OEM firmware GUI upgrade mechanism.

Further notes:

To make implementation easier if somebody desires to port the 4M v2.0,
this already creates two DTSI files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Fabian Eppig <fabian@eppig.de>
4 years agolantiq: remove vmmc node from FritzBox 7412 dts
Aleksander Jan Bajkowski [Tue, 18 Aug 2020 20:25:38 +0000 (22:25 +0200)]
lantiq: remove vmmc node from FritzBox 7412 dts

As described in commit commit 891a7007598d ("lantiq: enable second VPE
on Fritz!Box 7412"):

 The AVM Fritz!Box 7412 does not use the VMMC part of the Lantiq chip but
 rather a proprietary solution based on the DECT chip for the FXS ports.

We can remove last traces of vmmc in dts.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agodnsmasq: abort dhcp_check on interface state
David Bauer [Tue, 18 Aug 2020 13:09:22 +0000 (15:09 +0200)]
dnsmasq: abort dhcp_check on interface state

Abort the dhcp-check based on the interface instead of the carrier
state. In cases where the interface is up but the carrier is down,
netifd won't cause a dnsmasq reload, thus dhcp won't become active
on this interface.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agokernel: bump 5.4 to 5.4.59
Adrian Schmutzler [Wed, 19 Aug 2020 11:25:42 +0000 (13:25 +0200)]
kernel: bump 5.4 to 5.4.59

Removed since added upstream:
  bcm27xx:
    950-0428-staging-vchiq_arm-Add-a-matching-unregister-call.patch
  lantiq:
    0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch

Manually adjusted patches:
  layerscape:
    801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch

Build-tested: ath79/generic, ramips, lantiq/xrx200, lantiq/xway,
   mvebu/cortexa9, sunxi/a53
Run-tested: ipq806x (R7800), layerscape (LS1012A-FRDM, LS1046A-RDB)

Building on layerscape is only possible with workaround from PR #3179.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [layerscape]
4 years agolayerscape: remove useless pairs of kernel patches
Adrian Schmutzler [Wed, 19 Aug 2020 13:41:30 +0000 (15:41 +0200)]
layerscape: remove useless pairs of kernel patches

The layerscape kernel patches appears to be just some uncleaned local
development tree, where patches are sometimes directly followed by
their revert. While this does not seem a problem in the first place,
it becomes incredibly unpleasant when the upstream kernel changes in
the relevant areas and requires rebase.

This removes all these patch-revert pairs and refreshs the rest.

It removes about 44000 lines of entirely useless code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agotreewide: use wpad-basic-wolfssl as default
Petr Štetiar [Mon, 27 Jul 2020 10:30:41 +0000 (12:30 +0200)]
treewide: use wpad-basic-wolfssl as default

In order to support SAE/WPA3-Personal in default images. Replace almost
all occurencies of wpad-basic and wpad-mini with wpad-basic-wolfssl for
consistency. Keep out ar71xx from the list as it won't be in the next
release and would only make backports harder.

Build-tested (build-bot settings):
ath79: generic, ramips: mt7620/mt76x8/rt305x, lantiq: xrx200/xway,
sunxi: a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[rebase, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm27xx: remove no-op patch pair
Adrian Schmutzler [Wed, 19 Aug 2020 11:49:30 +0000 (13:49 +0200)]
bcm27xx: remove no-op patch pair

Patch 1 introduces a change, and patch 2 reverts it again. Remove
both patches and achieve the same outcome.

Refreshed patches for the target as well.

Cc: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agomap: rename type to maptype (FS#3287)
Remi NGUYEN VAN [Sat, 15 Aug 2020 14:03:26 +0000 (23:03 +0900)]
map: rename type to maptype (FS#3287)

"type" is already used as a common option for all protocols types, so
using the same option name for the map type makes the configuration
ambiguous. Luci in particular adds controls for both options and sees
errors when reading the resulting configuration.

Use "maptype" instead, but still fallback to "type" if "maptype" is not
set. This allows configurations to migrate without breaking old
configurations.

This addresses FS#3287.

Signed-off-by: Remi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
4 years agotools/tplink-safeloader: use soft_ver 1.9.1 for archer c6 v2
Alexander Couzens [Mon, 3 Aug 2020 21:51:53 +0000 (23:51 +0200)]
tools/tplink-safeloader: use soft_ver 1.9.1 for archer c6 v2

TP-LINK published a firmware update for the archer c6 v2.
This updates also reached the factory devices. Newer software version
rejects downgrading to 1.2.x. Use 1.9.x to allow installing the factory images
and have a little bit time to change it again.

Tested on archer c6 v2 with firmware 1.3.1

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
4 years agokernel: bump 5.4 to 5.4.58
John Audia [Tue, 11 Aug 2020 16:13:19 +0000 (12:13 -0400)]
kernel: bump 5.4 to 5.4.58

This PR is a blend of several kernel bumps authored by ldir taken from his
staging tree w/ some further adjustments made by me and update_kernel.sh

Summary:
Deleted upstreamed patches:
  generic:
    742-v5.5-net-sfp-add-support-for-module-quirks.patch
    743-v5.5-net-sfp-add-some-quirks-for-GPON-modules.patch
  bcm63xx:
    022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
    024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
  mediatek:
    0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch

Deleted patches applied differently upstream:
  generic:
    641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Manually merged patches:
  generic:
    395-v5.8-net-sch_cake-Take-advantage-of-skb-hash-where-appropriate.patch
  bcm27xx:
    950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch
  layerscape:
    701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch

Build system: x86_64
Build-tested: ath79/generic, bcm27xx/bcm2708, bcm27xx/bcm2711,
  imx6, mvebu/cortexa9, sunxi/a53
Run-tested: Netgear R7800 (ipq806x)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-By: Lucian Cristian <Lucian.cristian@gmail.com> [mvebu]
Tested-By: Curtis Deptuck <curtdept@me.com> [x86/64]
[do not remove 395-v5.8-net-sch_cake-Take-advantage-... patch,
adjust and refresh patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
4 years agoath79: mikrotik: erase firmware on SPI NOR before install
Thibaut VARÈNE [Mon, 17 Aug 2020 10:44:13 +0000 (12:44 +0200)]
ath79: mikrotik: erase firmware on SPI NOR before install

On Mikrotik SPI NOR devices, the firmware partition must be erased when
flashing from stock firmware, otherwise leftover bits (in particular a
kernel signature) can trigger a boot loop.

When booted from initramfs (the only way to install OpenWRT on these
devices), this patch unconditionally erases the firmware partition in
the do_upgrade() stage for all supported SPI NOR devices.

This is forward-ported from ed49d0876 and 20452a8db

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agogeneric: platform/mikrotik: fix incorrect test
Thibaut VARÈNE [Tue, 18 Aug 2020 09:57:31 +0000 (11:57 +0200)]
generic: platform/mikrotik: fix incorrect test

The test is meant to check the result of the preceding kmalloc()

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agoRevert "bcm53xx: remove useless echo in 02_network"
Adrian Schmutzler [Tue, 18 Aug 2020 09:44:10 +0000 (11:44 +0200)]
Revert "bcm53xx: remove useless echo in 02_network"

This reverts commit b1f6a5d9dffd8da30800e9e66ea772554bbba778.

In this particular case, the echo command was _not_ useless, but
converted the newlines back to spaces.

Add a comment into the code to make that obvious for the next one
looking at it like me.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoltq-dsl-base: remove useless echos in lantiq_dsl.sh
Adrian Schmutzler [Mon, 17 Aug 2020 21:23:37 +0000 (23:23 +0200)]
ltq-dsl-base: remove useless echos in lantiq_dsl.sh

The is no reason to catch the output by $() and then echo it again.

Remove the useless echos.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm53xx: remove useless echo in 02_network
Adrian Schmutzler [Mon, 17 Aug 2020 21:16:58 +0000 (23:16 +0200)]
bcm53xx: remove useless echo in 02_network

The output is already produced in the inner $() brackets, no need
to catch and echo it again.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agorockchip: remove useless echo in 40-net-smp-affinity
Adrian Schmutzler [Mon, 17 Aug 2020 21:13:57 +0000 (23:13 +0200)]
rockchip: remove useless echo in 40-net-smp-affinity

The command in the $() brackets will already provide the same output.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoapm821xx: tidy up 10-fix-wifi-mac
Adrian Schmutzler [Mon, 17 Aug 2020 21:09:37 +0000 (23:09 +0200)]
apm821xx: tidy up 10-fix-wifi-mac

This applies some cosmetic style fixes:
- remove useless echo
- remove double equal sign (specific to bash)
- add quotes for -n check

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix syntax error in ar7240_tplink_tl-wa.dtsi
Adrian Schmutzler [Mon, 17 Aug 2020 16:26:55 +0000 (18:26 +0200)]
ath79: fix syntax error in ar7240_tplink_tl-wa.dtsi

The node needs to be terminated by a semicolon.

Fixes: 8484a764df20 ("ath79: ar724x: make sure builtin-switch is
enabled in DT")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>