openwrt/staging/wigyori.git
4 years agoramips: append tail to WF2881 initramfs image
Sungbo Eo [Fri, 7 Feb 2020 11:26:05 +0000 (20:26 +0900)]
ramips: append tail to WF2881 initramfs image

Stock firmware has a vendor-defined tail at the end of uImage for image
validation. This patch enables OpenWrt installation from stock firmware
without having to access the UART console.

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoath79: add support for TP-Link TL-WA830RE v1
Christian Buschau [Wed, 5 Feb 2020 21:05:39 +0000 (22:05 +0100)]
ath79: add support for TP-Link TL-WA830RE v1

This ports support for the TL-WA830RE v1 range extender from ar71xx to
ath79.

Specifications:
- SOC: Atheros AR7240
- CPU: 400MHz
- Flash: 4 MiB (Spansion S25FL032P)
- RAM: 32 MiB (Zentel A3S56D40FTP-G5)
- WLAN: Atheros AR9280 bgn 2x2
- Ethernet: 1 port (100M)

Flash instructions:
- install from u-boot with tftp (requires serial access)
  > setenv ipaddr a.b.c.d
  > setenv serverip e.f.g.h
  > tftpboot 0x80000000 \
      openwrt-ath79-tiny-tplink_tl-wa830re-v1-squashfs-factory.bin
  > erase 0x9f020000 +0x3c0000
  > cp.b 0x80000000 0x9f020000 0x3c0000
  > bootm 0x9f020000
- flash factory image from OEM WebUI
- sysupgrade from ar71xx image

The device seems to be a clone of the following devices not yet
added to ath79:
- tl-wa701nd-v1
- tl-wa730re-v1
- tl-wa801nd-v1
- tl-wa901nd-v1

Signed-off-by: Christian Buschau <christian.buschau@mailbox.org>
[make use of ar7240_tplink.dtsi, add note about clones]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: reorganize DTSI for ar7240 TP-Link devices
Adrian Schmutzler [Tue, 11 Feb 2020 00:31:05 +0000 (01:31 +0100)]
ath79: reorganize DTSI for ar7240 TP-Link devices

The current set of TP-Link devices with ar7240 SoC all share
the same DTSI file. As the latter is very similar to the
definition required for the to-be-supported TP-Link TL-WA devices
with ar7240, this patch splits the definitions into a shared part
for all TP-Link devices (ar7240_tplink.dtsi) and a file containing
the specific setup for the present TL-WR devices
(ar7240_tplink_tl-wr.dtsi), equivalent to the former
ar7240_tplink_tl-wr74xn-v1.dtsi.

While at it, remove unused firmware partition label and rename
pinmux_switch_led_pins.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: restore pin state on probe for ar934x-spi
Chuanhong Guo [Sun, 9 Feb 2020 15:05:04 +0000 (23:05 +0800)]
ath79: restore pin state on probe for ar934x-spi

If bootloader doesn't terminate its last spi operation properly
before starting kernel, our first transfer in kernel becomes a
continuous transfer to that request instead of a new one.
Fix this flaw by restoring IOC register, which restored all pin
state to default.

Fixes: ebf0d8dade ("ath79: add new ar934x spi driver")
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agouci: fix PKG_SOURCE_VERSION value
Hans Dedecker [Sun, 9 Feb 2020 20:47:21 +0000 (21:47 +0100)]
uci: fix PKG_SOURCE_VERSION value

Fixes PKG_SOURCE_VERSION value which was wrongly set in commit f6e07c8284

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agowireguard-tools: bump to 1.0.20200206
Jason A. Donenfeld [Fri, 7 Feb 2020 12:27:05 +0000 (13:27 +0100)]
wireguard-tools: bump to 1.0.20200206

* wg-quick: android: split uids into multiple commands

Newer android's ndc implementations have limits on uid size, so we have to
break these into several lists.

* man: document dynamic debug trick for Linux

This comes up occasionally, so it may be useful to mention its
possibility in the man page. At least the Arch Linux and Ubuntu kernels
support dynamic debugging, so this advice will at least help somebody. So that
you don't have to go digging into the commit, this adds this helpful tidbit
to the man page for getting debug logs on Linux:

 # modprobe wireguard && echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control

* extract-{handshakes,keys}: rework for upstream kernel

These tools will now use the source code from the running kernel instead of
from the old monolithic repo. Essential for the functioning of Wireshark.

* netlink: remove libmnl requirement

We no longer require libmnl. It turns out that inlining the small subset of
libmnl that we actually use results in a smaller binary than the overhead of
linking to the external library. And we intend to gradually morph this code
into something domain specific as a libwg emerges. Performance has also
increased, thanks to the inliner. On all platforms, wg(8) only needs a normal
libc. Compile time on my system is still less than one second. So all in all
we have: smaller binary, zero dependencies, faster performance.

Packagers should no longer have their wireguard-tools package depend on
libmnl.

* embeddable-wg-library: use newer string_list
* netlink: don't pretend that sysconf isn't a function

Small cleanups.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoprocd: update to latest git HEAD
Hans Dedecker [Sun, 9 Feb 2020 18:21:11 +0000 (19:21 +0100)]
procd: update to latest git HEAD

Fixes c0c988e179a75d33c82ed0621d954fc0ac2c0c14

bcb8655 instance: add 'requirejail' attribute

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agobrcm63xx: apply updated compatibles for selecting board_info
Adrian Schmutzler [Sat, 8 Feb 2020 18:30:39 +0000 (19:30 +0100)]
brcm63xx: apply updated compatibles for selecting board_info

When changing compatibles in e4ba8c82947e ("brcm63xx: use more systematic
names for image and DTS files"), I forgot to update them in kernel
patches as well. So, do it now.

Fixes: e4ba8c82947e ("brcm63xx: use more systematic names for image and DTS files")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobrcm63xx: be more specific about SOC names
Adrian Schmutzler [Sun, 5 Jan 2020 12:14:43 +0000 (13:14 +0100)]
brcm63xx: be more specific about SOC names

This uses the specific SOC names for several devices where the
Chip ID was used incorrectly before.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobrcm63xx: align DTS model with Makefile and compatible
Adrian Schmutzler [Mon, 30 Dec 2019 22:12:53 +0000 (23:12 +0100)]
brcm63xx: align DTS model with Makefile and compatible

Since the model string in DTS is not required to derive board name
anymore, we can now align it with the model name in Makefile and
the compatible.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobrcm63xx: use compatible instead of manually setting board name
Adrian Schmutzler [Mon, 30 Dec 2019 20:58:34 +0000 (21:58 +0100)]
brcm63xx: use compatible instead of manually setting board name

This patch removes the translation of device model name into a
board name in lib/brcm63xx.sh. The latter has been actually totally
useless as we have the compatible which can be used instead of
the board name (and actually is at other targets like ath79 or ramips).

The change requires updating the base-files with the new
identifiers based on compatible.

With all "board names" replaced by the compatible, we do not need
the old scripts to detect board name anymore and can also remove
the obsolete treatment of "legacy" devices without DTS, as there
are none of those left. So, this patch removes the target-specific
board detection and uses the standard procedure in
package/base-files/files/lib/preinit/02_sysinfo

This also fixes several cases where the board name was not set or
evaluated correctly:
- asmax,ar1004g in 02_network
- telsey,magic in 09_fix_crc/02_network
- brcm,bcm96338gw in 02_network
- brcm,bcm96338w in 02_network
- brcm,bcm96348gw in 02_network
- dynalink,rta1025w in 02_network
- huawei,echolife-hg520v in 02_network
- several cases in diag.sh

The following orphaned identifiers are removed from board.d files:
- dmv-s0

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobrcm63xx: remove unneeded line break for DEVICE_PACKAGES
Adrian Schmutzler [Mon, 30 Dec 2019 19:37:35 +0000 (20:37 +0100)]
brcm63xx: remove unneeded line break for DEVICE_PACKAGES

In brcm63xx image Makefile DEVICE_PACKAGE definitions are split
into multiple lines with no apparent need.

Merge them into one line to increase readability and maintainability.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobrcm63xx: use more systematic names for image and DTS files
Adrian Schmutzler [Sun, 29 Dec 2019 00:55:54 +0000 (01:55 +0100)]
brcm63xx: use more systematic names for image and DTS files

This changes brcm63xx target to achieve consistency between image
names, device nodes names, compatible, DTS name and device name
as much as possible. As with other targets, having consistent
names is supposed to make life easier for developers and reduces
the number of "variables" in the system. In particular, applying
the DTS scheme will make it easier to find the correct file and
architecture.

DTS files are named based on the increasingly common
soc-vendor-model scheme, using hyphens for separation as this seems
to be the kernel way. Since the compatible is not used at the
moment, I took the chance to also align them with this patch.

For the SOC, the already existing CFE_CHIP_ID can be exploiting
for all but two devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: move b43 install function to broadcom.mk
Sungbo Eo [Sat, 8 Feb 2020 06:53:45 +0000 (15:53 +0900)]
kernel: move b43 install function to broadcom.mk

Most of the broadcom packaging codes were moved to broadcom.mk in commit
7f984dab1c52 ("mac80211: move broadcom packaging code to broadcom.mk"),
but b43/install still remained. Move it now.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agokernel: fix typos in KernelPackage description
Sungbo Eo [Sat, 8 Feb 2020 00:50:41 +0000 (09:50 +0900)]
kernel: fix typos in KernelPackage description

Fixes: ed2839ac4190 ("kernel/modules: add kmod-pmbus-zl6100 module")
Fixes: bbcb9de93547 ("Add package for gpio rotary encoder")
Fixes: 76854589829a ("package/kernel: package kmod-input-matrixkmap")
Fixes: 8bfef353850a ("kernel: rename kmod-switch-rtl8366_smi to
       kmod-switch-rtl8366-smi to avoid underscores in package names")
Fixes: f03bf608b151 ("kernel: Add dummy sound driver")
Fixes: dda5d9b78643 ("ramips: rename pwm kernel module")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agohostapd: remove erroneous $(space) redefinition
Jo-Philipp Wich [Sat, 8 Feb 2020 10:34:41 +0000 (11:34 +0100)]
hostapd: remove erroneous $(space) redefinition

The $(space) definition in the hostapd Makefile ceased to work with
GNU Make 4.3 and later, leading to syntax errors in the generated
Kconfig files.

Drop the superfluous redefinition and reuse the working $(space)
declaration from rules.mk to fix this issue.

Fixes: GH#2713
Ref: https://github.com/openwrt/openwrt/pull/2713#issuecomment-583722469
Reported-by: Karel Kočí <cynerd@email.cz>
Suggested-by: Jonas Gorski <jonas.gorski@gmail.com>
Tested-by: Shaleen Jain <shaleen@jain.sh>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoramips: fix device name of netis WF-2881 to WF2881
Sungbo Eo [Tue, 8 Oct 2019 13:21:13 +0000 (22:21 +0900)]
ramips: fix device name of netis WF-2881 to WF2881

The correct model name of WF-2881 is WF2881 without hyphen. The former used
boardnames are not added to SUPPORTED_DEVICES, to make it explicit that the
sysupgrade-tar image, which is newly added in the previous commit, should
not be used to upgrade from older version.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[adjust commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: use nand_do_upgrade for netis WF-2881
Sungbo Eo [Wed, 2 Oct 2019 13:12:28 +0000 (22:12 +0900)]
ramips: use nand_do_upgrade for netis WF-2881

WF-2881 sysupgrade image uses UBI rootfs, but still relies on
default_do_upgrade. Because of this, config backup is not restored after
sysupgrade. It can be fixed by switching to nand_do_upgrade and
sysupgrade-tar image. default_do_upgrade does not handle sysupgrade-tar
properly, so one should use factory image to upgrade from older version.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoath79: add LED trigger for TL-WR902AC v1 WAN LED
Lech Perczak [Thu, 30 Jan 2020 23:47:16 +0000 (00:47 +0100)]
ath79: add LED trigger for TL-WR902AC v1 WAN LED

Inspired by commit c48b571ad708, add an LED trigger for the WAN LED on top of
the TP-Link TL-WR902AC v1. Currently, only the LED on the port itself shows the
link state, while the LED on top of the device stays dark.

The WAN port of the device is a hybrid LAN/WAN one, hence why the LED at the
port was labeled LAN.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
4 years agoath79: add support for Atheros AR934x HS UART
Daniel Golle [Sun, 2 Feb 2020 16:02:11 +0000 (18:02 +0200)]
ath79: add support for Atheros AR934x HS UART

AR934x chips also got the 'old' qca,ar9330-uart in addition to the
'new' ns16550a compatible one. Add support for UART1 clock selector as
well as device-tree bindings in ar934x.dtsi to make use of that uart.

Reported-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
Daniel Golle [Thu, 6 Feb 2020 18:02:25 +0000 (20:02 +0200)]
ath79: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE

On AR934x this UART is usually not initialized by the bootloader
as it is only used as a secondary serial port while the primary
UART is a newly introduced NS16550-compatible.
In order to make use of the ar933x-uart on AR934x without RTS/CTS
hardware flow control, one needs to set the
UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this
UART is used as primary/console, the bootloader on AR934x typically
doesn't set those bits.
Setting them explicitely on AR933x does not do any harm, so just set
them unconditionally.

Tested-by: Chuanhong Guo <gch981213@gmail.com
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agobcm53xx: build images for Luxul ABR-4500 and XBR-4500 routers
Dan Haab [Wed, 5 Feb 2020 17:37:44 +0000 (10:37 -0700)]
bcm53xx: build images for Luxul ABR-4500 and XBR-4500 routers

Luxul ABR-4500 and XBR-4500 devices are wired routers with 5 Ethernet
ports and 1 USB 3.0 port. Flashing requires using Luxul firmware 6.4.0
or newer and uploading firmware using "Firmware Update" web UI page.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
4 years agofirmware-utils: add lxlfw tool for generating Luxul firmwares
Dan Haab [Wed, 5 Feb 2020 17:37:43 +0000 (10:37 -0700)]
firmware-utils: add lxlfw tool for generating Luxul firmwares

It's a simple tool prepending image with a Luxul header.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
4 years agoath79: ag71xx: use netif_receive_skb_list on 4.19
Chuanhong Guo [Tue, 7 Jan 2020 00:12:03 +0000 (16:12 -0800)]
ath79: ag71xx: use netif_receive_skb_list on 4.19

This new function make batch processing of network packets possible,
which slightly improves performance.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Tested-by: Rosen Penev <rosenp@gmail.com>
4 years agokernel: remove duplicate flash chip definition
Daniel Golle [Wed, 5 Feb 2020 15:43:03 +0000 (17:43 +0200)]
kernel: remove duplicate flash chip definition

XTX XT25F128A shares it's chip ID with XM25QH128A which got identical
features. Hence there it makes no sense to add it to the driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: use ar934x-spi for ar933x as well
Chuanhong Guo [Thu, 6 Feb 2020 14:30:14 +0000 (22:30 +0800)]
ath79: use ar934x-spi for ar933x as well

ar933x appears to have the same spi controller as ar934x but it's
not mentioned in datasheet at all. Use new spi driver instead to
gain more flash operating performance.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoath79: add new ar934x spi driver
Chuanhong Guo [Wed, 5 Feb 2020 12:25:45 +0000 (20:25 +0800)]
ath79: add new ar934x spi driver

A new shift mode was introduced since ar934x which has a way better
performance than current bitbang driver and can handle higher spi
clock properly. This commit adds a new driver to make use of this
new feature.
This new driver has chipselect properly configured and we don't need
cs-gpios hack in dts anymore. Remove them.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agomac80211: brcm: backport remaining 5.6 kernel patches
Rafał Miłecki [Thu, 6 Feb 2020 10:36:15 +0000 (11:36 +0100)]
mac80211: brcm: backport remaining 5.6 kernel patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agowireguard: bump to 0.0.20200205
Jason A. Donenfeld [Wed, 5 Feb 2020 13:46:46 +0000 (14:46 +0100)]
wireguard: bump to 0.0.20200205

* compat: support building for RHEL-8.2
* compat: remove RHEL-7.6 workaround

Bleeding edge RHEL users should be content now (which includes the actual
RedHat employees I've been talking to about getting this into the RHEL kernel
itself). Also, we remove old hacks for versions we no longer support anyway.

* allowedips: remove previously added list item when OOM fail
* noise: reject peers with low order public keys

With this now being upstream, we benefit from increased fuzzing coverage of
the code, uncovering these two bugs.

* netns: ensure non-addition of peers with failed precomputation
* netns: tie socket waiting to target pid

An added test to our test suite for the above and a small fix for high-load CI
scenarios.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoramips: add support for I-O DATA WN-AX1167GR2
INAGAKI Hiroshi [Mon, 26 Aug 2019 11:27:22 +0000 (20:27 +0900)]
ramips: add support for I-O DATA WN-AX1167GR2

I-O DATA WN-AX1167GR2 is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 128 MiB
- Flash : NAND 128 MiB
- WLAN : MediaTek MT7615D (2.4/5 GHz, 2T2R)
- Ethernet : 5x 10/100/1000 Mbps
  - Switch : MediaTek MT7621A (MT7530)
- LEDs/Input : 2x/3x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J5: Vcc, TX, RX, NC, GND
  - 57600 bps

Flash instruction using initramfs image:

1. Boot WN-AX1167GR2 normally
2. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
3. Select the OpenWrt initramfs image and click update ("更新")
button to perform firmware update
4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade
image
5. Wait ~120 seconds to complete flashing

Notes:

- configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode
for MT7615D chip is not supported in mt76 driver
- last 0x80000 (512 KiB) in NAND flash is not used on stock firmware
- stock firmware requires "customized uImage header" by MSTC
(MitraStar Technology Corp.), but U-Boot doesn't
  - uImage magic (0x0 - 0x3) : 0x434F4D42 (COMB)
  - header crc32 (0x4 - 0x7) : with data length and data crc32
  - image name (0x20 - 0x37) : model ID and firmware versions
  - data length (0x38 - 0x3b): kernel + rootfs
  - data crc32 (0x3c - 0x3f) : kernel + rootfs

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
4 years agoramips: add support for I-O DATA WN-DX1167R
INAGAKI Hiroshi [Tue, 9 Apr 2019 05:48:31 +0000 (14:48 +0900)]
ramips: add support for I-O DATA WN-DX1167R

I-O DATA WN-DX1167R is a 2.4/5 GHz band 11ac rotuer, based on MediaTek
MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 128 MiB
- Flash : NAND 128 MiB
- WLAN : MediaTek MT7615D (2.4/5 GHz, 2T2R)
- Ethernet : 5x 10/100/1000 Mbps
  - Switch : MediaTek MT7621A (MT7530)
- LEDs/Input : 2x/3x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J5: Vcc, TX, RX, NC, GND
  - 57600 bps

Flash instruction using initramfs image:

1. Boot WN-DX1167R normally
2. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
3. Select the OpenWrt initramfs image and click update ("更新")
button to perform firmware update
4. On the initramfs image, perform sysupgrade with squashfs-sysupgrade
image
5. Wait ~120 seconds to complete flashing

Notes:

- configuration in DeviceTree of DBDC (Dual-Band-Dual-Concurrent) mode
for MT7615D chip is not supported in mt76 driver
- last 0x80000 (512 KiB) in NAND flash is not used on stock firmware
- stock firmware requires "customized uImage header" by MSTC
(MitraStar Technology Corp.), but U-Boot doesn't
  - uImage magic (0x0 - 0x3) : 0x434F4D43 (COMC)
  - header crc32 (0x4 - 0x7) : with data length and data crc32
  - image name (0x20 - 0x37) : model ID and firmware versions
  - data length (0x38 - 0x3b): kernel + rootfs
  - data crc32 (0x3c - 0x3f) : kernel + rootfs

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
4 years agoramips: extend and rename wr1201-factory-header
INAGAKI Hiroshi [Tue, 24 Sep 2019 18:02:04 +0000 (03:02 +0900)]
ramips: extend and rename wr1201-factory-header

This commit adds the ability to set custom uImage magic to
Build/wr1201-factory-header and renames it to
"Build/custom-initramfs-uimage".

Custom uImage header in initramfs image is required on following
devices:

- I-O DATA WN-AX1167GR2
- I-O DATA WN-AX2033GR
- I-O DATA WN-AX2033GR2
- I-O DATA WN-DX1167R

While at it, fix typo in comment.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[shorten commit title, minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoRevert "iwinfo: update to latest Git HEAD"
Jo-Philipp Wich [Wed, 5 Feb 2020 14:31:34 +0000 (15:31 +0100)]
Revert "iwinfo: update to latest Git HEAD"

This reverts commit 96424c143dd818b391d9b8da18249eca1d2e6c83.

The commit changed libiwinfo's internal ABI which breaks a number of
downstream projects, including LuCI and rpcd-mod-iwinfo.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoprocd: support 'requirejail' attribute
Kevin Darbyshire-Bryant [Thu, 30 Jan 2020 18:32:00 +0000 (18:32 +0000)]
procd: support 'requirejail' attribute

Bump procd package to reduce log spam related to missing jail binaries
in a non-jail capable system.

bcb8655 instance: add 'requirejail' attribute

An additional jail attribute 'requirejail' can now be used to indicate
mandatory use of a jailed environment and hence prevent process startup
in the event that the jail subsystem is unavailable.

Procd will now only log errors if jail is unavailable and 1) is a mandatory
requirement or 2) a procd debug level of at least 2 is in use.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoiwinfo: update to latest Git HEAD
David Bauer [Tue, 4 Feb 2020 13:53:52 +0000 (14:53 +0100)]
iwinfo: update to latest Git HEAD

eba5a20 iwinfo: add device id for BCM43602
a6914dc iwinfo: add BSS load element to scan result
bb21698 iwinfo: add device id for Atheros AR9287
7483398 iwinfo: add device id for MediaTek MT7615E

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agobrcm2708: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Tue, 4 Feb 2020 18:02:53 +0000 (19:02 +0100)]
brcm2708: update to latest patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobrcm2708-gpu-fw: update to latest firmware
Álvaro Fernández Rojas [Tue, 4 Feb 2020 18:02:20 +0000 (19:02 +0100)]
brcm2708-gpu-fw: update to latest firmware

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agokernel: add support for GD25D05 SPI NOR
Koen Vandeputte [Mon, 6 Jan 2020 13:10:42 +0000 (14:10 +0100)]
kernel: add support for GD25D05 SPI NOR

This chip is used on newer RB912UAG-5HPnD r2 boards:

Before:

[    0.642553] m25p80 spi0.0: unrecognized JEDEC id bytes: c8, 40, 10
[    0.649381] NAND flash driver for the RouterBOARD 91x series

After:

[    0.641714] m25p80 spi0.0: found gd25d05, expected m25p80
[    0.649916] m25p80 spi0.0: gd25d05 (64 Kbytes)
[    0.655122] Creating 4 MTD partitions on "spi0.0":
[    0.660164] 0x000000000000-0x00000000c000 : "routerboot"
[    0.667782] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.675073] 0x00000000d000-0x00000000e000 : "bios"
[    0.682613] 0x00000000e000-0x00000000f000 : "soft_config"
[    0.690304] NAND flash driver for the RouterBOARD 91x series

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.19 to 4.19.101
Koen Vandeputte [Tue, 4 Feb 2020 12:17:37 +0000 (13:17 +0100)]
kernel: bump 4.19 to 4.19.101

Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.14 to 4.14.169
Koen Vandeputte [Tue, 4 Feb 2020 11:04:59 +0000 (12:04 +0100)]
kernel: bump 4.14 to 4.14.169

Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoramips: remove unnecessary execute permission bit
Sungbo Eo [Tue, 4 Feb 2020 16:00:15 +0000 (01:00 +0900)]
ramips: remove unnecessary execute permission bit

dts file does not need to be executable. 644 is enough.

Fixes: f098c612b6db ("ramips: create shared DTSI for Netgear EX2700 and WN3000RP v3")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agomediatek: remove unnecessary execute permission bit
Sungbo Eo [Tue, 4 Feb 2020 15:54:45 +0000 (00:54 +0900)]
mediatek: remove unnecessary execute permission bit

kernel config and patch files do not need to be executable. 644 is enough.

Fixes: 01c8f2e97cc6 ("mediatek: bump to v4.19")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agouboot-envtools: ath79: add Netgear WNDR3700v2
Michal Cieslakiewicz [Mon, 20 Jan 2020 20:20:09 +0000 (21:20 +0100)]
uboot-envtools: ath79: add Netgear WNDR3700v2

Add Netgear WNDR3700v2 to the list of supported boards.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
[rebase, adjusted commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: WNDR3700 v1/v2: make u-boot env partition writable
Michal Cieslakiewicz [Mon, 3 Feb 2020 18:54:31 +0000 (19:54 +0100)]
ath79: WNDR3700 v1/v2: make u-boot env partition writable

Remove read-only flag from U-boot environment partition for Netgear
WNDR3700 v1 and v2 so u-boot-envtools can modify data there.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years agomediatek: remove KERNEL_PATCHVER overwrite for mt7629
Adrian Schmutzler [Tue, 4 Feb 2020 11:15:45 +0000 (12:15 +0100)]
mediatek: remove KERNEL_PATCHVER overwrite for mt7629

Since whole target has been bumped to kernel 4.19 in 01c8f2e97cc6
("mediatek: bump to v4.19") we do not need the overwrite in mt7629
subtarget anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomediatek: bump to v4.19
John Crispin [Tue, 4 Feb 2020 06:46:52 +0000 (07:46 +0100)]
mediatek: bump to v4.19

Signed-off-by: John Crispin <john@phrozen.org>
4 years agobcm4xxx: fix iwinfo behaviour
John Crispin [Tue, 28 Jan 2020 10:28:03 +0000 (11:28 +0100)]
bcm4xxx: fix iwinfo behaviour

Signed-off-by: John Crispin <john@phrozen.org>
4 years agoath79: add support for COMFAST CF-E560AC
August Huber [Sun, 26 Jan 2020 16:55:11 +0000 (11:55 -0500)]
ath79: add support for COMFAST CF-E560AC

This commit adds support for the COMFAST CF-E560AC, an ap143 based
in-wall access point.

Specifications:
 - SoC: Qualcomm Atheros QCA9531
 - RAM: 128 MB DDR2 (Winbond W971GG6SB-25)
 - Storage: 16 MB NOR (Winbond 25Q128JVSO)
 - WAN: 1x 10/100 PoE ethernet (48v)
 - LAN: 4x 10/100 ethernet
 - WLAN1: QCA9531 - 802.11b/g/n - 2x SKY85303-21 FEM
 - WLAN2: QCA9886 - 802.11ac/n/a - 2x SKY85735-11 FEM
 - USB: one external USB2.0 port
 - UART: 3.3v, 2.54mm headers already populated on board
 - LED: 7x external
 - Button: 1x external
 - Boot: U-Boot 1.1.4 (pepe2k/u-boot_mod)

MAC addressing:

- stock
  LAN    *:40 (label)
  WAN    *:41
  5G     *:42
  2.4G   *:4a

- flash (art partition)
  0x0    *:40 (label)
  0x6    *:42
  0x1002 *:41
  0x5006 *:43

This device contains valid MAC addresses in art 0x0, 0x6, 0x1002 and
0x5006, however the vendor firmware only reads from art:0x0 for the LAN
interface and then increments in 02_network. They also jump 8 addresses
for the second wifi interface (2.4 GHz). This behavior has been duplicated
in the DTS and ath10k hotplug to align addresses with the vendor firmware
v2.6.0.

Recovery instructions:

This device contains built-in u-boot tftp recovery.

1. Configure PC with static IP 192.168.1.10/24 and tftp server.
2. Place desired image at /firmware_auto.bin at tftp root.
3. Connect device to PC, and power on.
4. Device will fetch flash from tftp, flash and reboot into new image.

Signed-off-by: August Huber <auh@google.com>
[move jtag_disable_pins, remove unnecessary statuses in DTS, remove
duplicate entry in 11-ath10k-caldata, remove hub_port0 label in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: WNDR3700 v2: add dash before version in device name
Michal Cieslakiewicz [Mon, 20 Jan 2020 20:19:29 +0000 (21:19 +0100)]
ath79: WNDR3700 v2: add dash before version in device name

Adapt Netgear WNDR3700v2 device identification string to ath79 naming
scheme by changing from 'wndr3700v2' to 'wndr3700-v2' (affects config,
makefile, init scripts and device tree definition).

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years agomt76: update to the latest version
Felix Fietkau [Sun, 2 Feb 2020 19:07:47 +0000 (20:07 +0100)]
mt76: update to the latest version

8f33a1e936fd mt76: mt7615: report firmware log event messages
43db699b1ad8 mt76: mt7615: increment the MAC address of the secondary PHY (DBDC)
161d1c73c62a mt7615: use local MAC address for the second PHY
9453dbe921b9 mt76: set dma-done flag for flushed descriptors
65745c5ac503 mt76: fix handling full tx queues in mt76_dma_tx_queue_skb_raw
14f37f8d86eb mt76: dma: do not write cpu_idx on rx queue reset until after refill
99ce68625473 mt76: mt7603: increase dma mcu rx ring size
62c447e2c75f mt76: enable Airtime Queue Limit support
1c258940d818 mt76: mt7615: report TSF information
2d22ef618712 mt76: mt7615: add per-phy mib statistics
8d690f3bfbc4 mt76: mt7615: add a get_stats() callback
b06177ce387c mt76: move dev_irq tracepoint in mt76 module
5ac9889c33f1 mt76: move mac_txdone tracepoint in mt76 module
7801ebd775e3 mt76: mt7615: add tracing support
fd877a17cc0a mt76: mt76x2: get rid of leftover target
039471502578 mt76: mt7615: initialize radar specs from host driver
b208305e6275 mt76: mt7615: fix endianness in mt7615_mcu_set_eeprom
fd1fa6860666 mt76: move WIPHY_FLAG_HAS_CHANNEL_SWITCH in mt76_phy_init
c94afbe3d70a mt76: mt7615: remove leftover routine declaration
29fec3a9b0b4 mt76: rely on mac80211 utility routines to compute airtime
2bb518752b3f mt76: mt76x02u: avoid overwrite max_tx_fragments
a0f1ff0473b5 mt76: mt76u: check tx_status_data pointer in mt76u_tx_tasklet
a5dca118bf40 mt76: mt76u: add mt76u_process_rx_queue utility routine
06caaf0d33b4 mt76: mt76u: add mt76_queue to mt76u_get_next_rx_entry signature
cf8e2590e46b mt76: mt76u: add mt76_queue to mt76u_refill_rx signature
0077b30ce2c8 mt76: mt76u: use mt76_queue as mt76u_complete_rx context
06d466b86981 mt76: mt76u: add queue id parameter to mt76u_submit_rx_buffers
580ddd175eee mt76: mt76u: move mcu buffer allocation in mt76x02u drivers
acc227e14d95 mt76: mt76u: introduce mt76u_free_rx_queue utility routine
aa28404bf287 mt76: mt76u: stop/free all possible rx queues
885fe4a29bb9 mt76: mt76u: add mt76u_alloc_rx_queue utility routine
c85dec848303 mt76: mt76u: add queue parameter to mt76u_rx_urb_alloc
ca7991699109 mt76: mt76u: resume all rx queue in mt76u_resume_rx
e2a39697fb0a mt76: mt76u: introduce mt76u_alloc_mcu_queue utility routine
39fb59ce927b mt76: mt76u: add {read/write}_extended utility routines
8c6cf328eb1f mt76: mt76u: take into account different queue mapping for 7663
e742618fc5ce mt76: mt76u: introduce mt76u_skb_dma_info routine
23b3328e52fe mt76: mt76u: add endpoint to mt76u_bulk_msg signature
82bedb294534 mt76: mt76u: introduce MT_DRV_RX_DMA_HDR flag
2db2bab099d0 firmware: update mt7615 N9 firmware to 20200107155603
60e27689603d firmware: update MT7615 CR4 firmware to 20190121161307
d15a4bbb3f69 mt76: mt7615: add __aligned(4) to txp structs
1c4ff4f2dc7f mt76: mt7615: move mmio related code from pci.c to mmio.c
51b1eb7a4902 mt76: mt7615: split up firmware loading functions
f84b590b6454 mt76: mt7615: store N9 firmware version instead of CR4
92bafd4b1bfc mt76: mt7615: fix MT_INT_TX_DONE_ALL definition for MT7622
13a4269a1bfa mt76: mt7615: add dma and tx queue initialization for MT7622
ab94a85efb18 mt76: mt7615: add eeprom support for MT7622
f0b02d8115b0 mt76: mt7615: add calibration free support for MT7622
fd3ae9a342ae mt76: mt7615: disable 5 GHz on MT7622
80d3681b404d mt76: mt7615: implement probing and firmware loading on MT7622
79808e62324e mt76: mt7615: implement DMA support for MT7622
bddcbb25cd0e mt76: mt7615: decrease rx ring size for MT7622
6cd5c381eaee mt76: mt7615: disable DBDC on MT7622
f66b480434e9 mt76: mt7615: add Kconfig entry for MT7622
68f38eea39b5 firmware: add firmware for MT7622 built-in WiFi
7882bbd25c38 mt76: mt7615: fix and rework tx power handling
0f06914acfb4 mt76: mt7615: implement hardware reset support
db97358df47e mt76: mt7615: add support for testing hardware reset
b9d9f91b1522 mt76: mt7615: fix adding active monitor interfaces
fd216cb5b2f9 mt76: mt7615: fix monitor mode on second PHY
269de7c22957 firmware: fix version number for upcoming mt7615 mcu v2 support patches
9f8c6c4a20b4 mt76: mt7615: simplify mcu_set_bmc flow
ff32af25f83e mt76: mt7615: simplify mcu_set_sta flow
f16433cd7889 mt76: mt7615: add a helper to encapsulate sta_rec operation
77b9d8586307 mt76: mt7615: add starec operating flow for firmware v2
170b21f9ec78 mt76: mt7615: use new tag sta_rec_wtbl
648ce1aaa493 mt76: mt7615: switch mt7615_mcu_set_tx_ba to v2 format
721673759d82 mt76: mt7615: switch mt7615_mcu_set_rx_ba to v2 format

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agomediatek: add wmac devicetree node for MT7622
John Crispin [Sun, 15 Dec 2019 22:15:29 +0000 (23:15 +0100)]
mediatek: add wmac devicetree node for MT7622

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agouci: update to version 2020-01-27
Hans Dedecker [Sun, 2 Feb 2020 17:46:00 +0000 (18:46 +0100)]
uci: update to version 2020-01-27

e8d8373 file: fix segfault in uci_parse_option
aa5e77a file: fix segfault in uci_parse_config

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agokernel: hwmon: package mcp3021 module
Daniel Golle [Sun, 2 Feb 2020 15:47:38 +0000 (17:47 +0200)]
kernel: hwmon: package mcp3021 module

Package kernel module for Linear Technology MCP3021/3221 I2C connected
current and voltage monitor chips.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: add common definition for Device/tplink-v2
Adrian Schmutzler [Wed, 29 Jan 2020 23:00:31 +0000 (00:00 +0100)]
ath79: add common definition for Device/tplink-v2

This adds a shared definition Device/tplink-v2 to common-tp-link.mk.
Though currently only one device in ath79 uses it, putting it in
the common file seems more organized. The definitions are based
on the implementation in ramips target, where a lot of devices
is using tplink-v2-* commands already.

The '-V "ver. 2.0"' suffix for Archer D50 v1 can be removed because
it's default in Build/tplink-v2-image anyway.

While at it, add TPLINK_HWREVADD and TPLINK_HVERSION to DEVICE_VARS,
which seems to have been overlooked when adding Archer D50 v1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: rename tplink-loader-okli to tplink-safeloader-okli
Adrian Schmutzler [Wed, 29 Jan 2020 23:06:38 +0000 (00:06 +0100)]
ath79: rename tplink-loader-okli to tplink-safeloader-okli

This renames Device/tplink-loader-okli to Device/tplink-safeloader-okli
since the latter more accurately describes the combination of
tplink-safeloader and loader-okli use there. The old version might
be confused with other uses of the okli loader.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: rename Device/tplink to Device/tplink-v1
Adrian Schmutzler [Wed, 29 Jan 2020 22:52:09 +0000 (23:52 +0100)]
ath79: rename Device/tplink to Device/tplink-v1

As we have tplink-v2-header and tplink-v2-image recipes as well,
this patch renames the Device/tplink definition to Device/tplink-v1,
as it's using the tplink-v1-* commands. This should provide easier
distinction in the future.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomvebu: image: align subtargets makefile names
Tomasz Maciej Nowak [Fri, 31 Jan 2020 15:46:14 +0000 (16:46 +0100)]
mvebu: image: align subtargets makefile names

Align subtargets makefiles names to actual subtargets.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomvebu: image: sort devices alphabetically
Tomasz Maciej Nowak [Fri, 31 Jan 2020 15:46:13 +0000 (16:46 +0100)]
mvebu: image: sort devices alphabetically

This sorts the devices in image Makefiles alphabetically.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fixed sorting in one case, add commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: add support for TP-Link RE200 v2
Andreas Böhler [Tue, 28 Jan 2020 15:17:41 +0000 (16:17 +0100)]
ramips: add support for TP-Link RE200 v2

TP-Link RE200 v2 is a wireless range extender with Ethernet and 2.4G and 5G
WiFi with internal antennas. It's based on MediaTek MT7628AN+MT7610EN.

Specifications
--------------

- MediaTek MT7628AN (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet
- UART header on PCB (57600 8n1)
- 8x LED (GPIO-controlled), 2x button

There are 2.4G and 5G LEDs in red and green which are controlled
separately.

MAC addresses
-------------

The MAC address assignment matches stock firmware, i.e.:
LAN : *:0D
2.4G: *:0E
5G  : *:0F

Installation
------------

Web Interface
-------------

It is possible to upgrade to OpenWrt via the web interface. Simply flash
the -factory.bin from OEM. In contrast to a stock firmware, this will not
overwrite U-Boot.

Serial console
--------------

Opening the case is quite hard, since it is welded together. Rename the
OpenWrt factory image to "test.bin", then plug in the device and quickly
press "2" to enter flash mode (no line feed). Follow the prompts until
OpenWrt is installed.

Unfortunately, this devices does not offer a recovery mode or a tftp
installation method. If the web interface upgrade fails, you have to open
your device and attach serial console.

Additonal notes
---------------

It is possible to flash back to stock by using tplink-safeloader to create
a sysupgrade image based on a stock update. After the first boot, it is
necessary upgrade to another stock image, otherwise subsequent boots
fail with LZMA ERROR 1 and you have to attach serial to recover the device.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
[remove DEVICE_VARS change]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: collect and harmonize TP-Link image variants in common file
Adrian Schmutzler [Wed, 29 Jan 2020 17:21:53 +0000 (18:21 +0100)]
ramips: collect and harmonize TP-Link image variants in common file

This moves the various variants of common device definitions for
TP-Link devices to a common Makefile common-tp-link.mk. This
provides the opportunity to reorganize and move parameters between
individual device definitions and the common ones.

While at it, also use the common definitions for previously
independent definitions where appropriate.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agocypress-firmware: update to v4.14.77-2020_0115
Álvaro Fernández Rojas [Sat, 1 Feb 2020 09:54:00 +0000 (10:54 +0100)]
cypress-firmware: update to v4.14.77-2020_0115

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agokernel: connmark set-dscpmark follow upstreamimg attempt
Kevin Darbyshire-Bryant [Tue, 3 Dec 2019 14:00:05 +0000 (14:00 +0000)]
kernel: connmark set-dscpmark follow upstreamimg attempt

I'm having another attempt at trying to getting the 'store dscp into
conntrack connmark' functionality into upstream kernel, since the
restore function (act_ctinfo) has been accepted.

The syntax has changed from 'savedscp' to 'set-dscpmark' since that
conforms more closely with existing functionality.

4.14 backport is more of a hack since the structure versioning
mechanism isn't in place.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoiptables: set-dscpmark follow upstreamimg attempt
Kevin Darbyshire-Bryant [Tue, 3 Dec 2019 10:35:08 +0000 (10:35 +0000)]
iptables: set-dscpmark follow upstreamimg attempt

I'm having another attempt at trying to getting the 'store dscp into
conntrack connmark' functionality into upstream kernel, since the
restore function (act_ctinfo) has been accepted.

The syntax has changed from 'savedscp' to 'set-dscpmark' since that
conforms more closely with existing functionality.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoath79: add support for Ubiquiti NanoStation Loco M (XW)
Roger Pueyo Centelles [Wed, 18 Sep 2019 13:17:56 +0000 (15:17 +0200)]
ath79: add support for Ubiquiti NanoStation Loco M (XW)

This commit adds support for the NanoStation Loco M2/M5 XW devices
on the ath79 target (support was long ago available on ar71xx).

Specifications:

 - AR9342 SoC @ 535 MHz
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
 - AR8032 switch
 - 2T2R 5 GHz radio, 22 dBm
 - 13 dBi built-in antenna
 - POWER/LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1) on PCB

Flashing via TFTP:

 - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
   button on the device or on the PoE supply pressed
 - Power on the device via PoE (keep reset button pressed)
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button
 - The device starts a TFTP server at 192.168.1.20
 - Set a static IP on the computer (e.g., 192.168.1.21/24)
 - Upload via tftp the factory image:
   $ tftp 192.168.1.20
   tftp> bin
   tftp> trace
   tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-xw-squashfs-factory.bin

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agoath79: do not set inherited phy-mode/status properties again
Adrian Schmutzler [Mon, 27 Jan 2020 14:36:32 +0000 (15:36 +0100)]
ath79: do not set inherited phy-mode/status properties again

There are several cases where phy-mode and status properties are
set again in DTS(I) files although those were set to the same values
in parent DTSI files already. Remove those cases (and thus also stop
their proliferation by copy/paste).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: harmonize ethernet-phy naming scheme
Adrian Schmutzler [Mon, 27 Jan 2020 13:15:56 +0000 (14:15 +0100)]
ath79: harmonize ethernet-phy naming scheme

A minority of ethernet-phy definitions seems to use numbers in label,
name and reg property relatively random. This patch aligns their
use to have the same numeric value for all of them.

While at it, improve order of properties/add newlines for the ethX
nodes where necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomediatek: mt7623: remove left-over fragments of mt7623a-rfb-emmc
Adrian Schmutzler [Thu, 30 Jan 2020 17:55:21 +0000 (18:55 +0100)]
mediatek: mt7623: remove left-over fragments of mt7623a-rfb-emmc

The image creation for the mt7623a-rfb-emmc has been removed during
a patch refresh without specific comment. The corresponding base-files
entries and DTS patches for 4.14 are still there.

Since mt7623 is pretty dead and nobody has missed this device, let's
just remove the rest.

Fixes: 050da2107a7e ("mediatek: backport upstream mediatek patches")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: John Crispin <john@phrozen.org>
4 years agoramips: use tpt DTS trigger for TP-Link TL-MR3020 v3 and TL-WA801ND v5
Jan Alexander [Wed, 29 Jan 2020 14:03:18 +0000 (15:03 +0100)]
ramips: use tpt DTS trigger for TP-Link TL-MR3020 v3 and TL-WA801ND v5

This converts the TP-Link TL-MR3020v3 board to use the WLAN throughput
LED trigger in order to react to all VAPs.

It also moves the WLAN trigger config of the TP-Link TL-WA801NDv5 to the
DTS and merges the now identical LAN LED configs.

Verified these changes on a TL-MR3020v3.

Signed-off-by: Jan Alexander <jan@nalx.net>
[changed commit title and extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoRevert "ramips: fix NETGEAR R6260 EEPROM offset"
David Bauer [Thu, 30 Jan 2020 11:37:28 +0000 (12:37 +0100)]
Revert "ramips: fix NETGEAR R6260 EEPROM offset"

This reverts commit 4716c843d62a5a4c37e7886f54bcf446aa26e786.

Netgear seems to use different partition layouts on the R6260, which
would require us to dynamically detect the position of (at least) the
factory partition.

Revert this fix to avoid breaking existing installations until a better
solution has been worked out.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agokernel: add support for XTX xt25f128 SPI-NOR flash chips
Daniel Golle [Thu, 30 Jan 2020 09:31:26 +0000 (11:31 +0200)]
kernel: add support for XTX xt25f128 SPI-NOR flash chips

This fixes support for Teltonika RUT9xx which in recent versions of
the device uses xt25f128b flash.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoramips: remove duplicate DEVICE_PACKAGES for TP-Link Archer C20i
Adrian Schmutzler [Wed, 29 Jan 2020 19:27:25 +0000 (20:27 +0100)]
ramips: remove duplicate DEVICE_PACKAGES for TP-Link Archer C20i

DEVICE_PACKAGES is specified twice for the same device. Remove the
first (=older) assignment.

Fixes: 40692f0fb55c ("ramips: mt7620: select only the matching mt76 driver")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for GL.iNet 6408/6416 (GL.iNet V1)
Adrian Schmutzler [Sun, 8 Dec 2019 19:18:58 +0000 (20:18 +0100)]
ath79: add support for GL.iNet 6408/6416 (GL.iNet V1)

This ports the GL.iNet 6408/6416 from ar71xx.

The GL-Connect GL.iNet v1 routers are basically a TP-Link TL-WR710N with
more DRAM/Flash and console/GPIO header in the same small form-factor.

Specifications:
 - SoC: Atheros AR9331
 - CPU: 400 MHz
 - Flash: 8/16 MiB
 - RAM: 64 MiB
 - WiFi: 2.4 GHz b/g/n (SoC)
 - Ethernet: 2x 100M ports (LAN/WAN)
 - USB: 1x 2.0

The difference between 6408 and 6416 is just the flash size. It looks like
only the 16 MiB version has been advertised, while the 6408 is a modified
version. There are also 1-port versions sold by third parties.

Installation:
Install the sysupgrade image via stock firmware GUI or upload it via uboot
(web-based). The device will be available at 192.168.1.1.

Attention: In ar71xx, the same board name is used for both flash versions.
So, please make sure you flash the correct ath79 image when upgrading.

This has been device-tested on a GL.iNet 6416.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoopkg: update to latest Git HEAD
Jo-Philipp Wich [Sat, 25 Jan 2020 13:27:10 +0000 (14:27 +0100)]
opkg: update to latest Git HEAD

80d161e opkg: Fix -Wformat-overflow warning
c09fe20 libopkg: fix skipping of leading whitespace when parsing checksums

Fixes: CVE-2020-7982
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoramips: fix NETGEAR R6260 EEPROM offset
David Bauer [Tue, 28 Jan 2020 20:19:16 +0000 (21:19 +0100)]
ramips: fix NETGEAR R6260 EEPROM offset

The EEPROM offset for the NETGEAR R6260 is incorrect, thus no valid
calibration data is used.

Fix this only for the NETGEAR R6260, as it's currently unknown whether
or not other boards are affected.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoramips: add support for GL.iNet microuter-N300
David Bauer [Sun, 5 Jan 2020 23:31:24 +0000 (00:31 +0100)]
ramips: add support for GL.iNet microuter-N300

The GL.iNet microuter-N300 (internally referred as MT300N-v4) is a
pocket-size travel router. It is essentially identical to the VIXMINI
(internally referred as MT300N-v3) but with double the RAM and
SPI-flash.

Additionally, set the label-mac for both the VIXMINI as well as the
microuter-N300.

Hardware
--------
SoC:   MediaTek MT7628NN
RAM:   128M DDR2
FLASH: 16M
LED:   Power - WLAN
BTN:   Reset
UART:  115200 8N1
       TX and RX are labled on the board as pads next to the SoC

Installation via web-interface
------------------------------
1. Visit the web-interface at 192.168.8.1
   Note: The ethernet port is by default WAN. So you need to connect to
   the router via WiFi

2. Navigate to the Update tab on the left side.

3. Select "Local Update"

4. Upload the OpenWrt sysupgrade image.
   Note: Make sure you select not to preserve the configuration.

Installation via U-Boot
-----------------------
1. Hold down the reset button while powering on the device.
   Wait for the LED to flash 5 times.

2. Assign yourself a static IPv4 in 192.168.1.0/24

3. Upload the OpenWrt sysupgrade image at 192.168.1.1.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agohostapd: add back support for passing CSA events from sta/mesh to AP interfaces
Felix Fietkau [Tue, 28 Jan 2020 15:27:53 +0000 (16:27 +0100)]
hostapd: add back support for passing CSA events from sta/mesh to AP interfaces

Fixes handling CSA when using AP+STA or AP+Mesh
This change was accidentally dropped in commit 167028b75
("hostapd: Update to version 2.9 (2019-08-08)")

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agomac80211: backport airtime queue limits support
Felix Fietkau [Sat, 18 Jan 2020 17:44:00 +0000 (18:44 +0100)]
mac80211: backport airtime queue limits support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agomac80211: backport fix for an no-ack tx status issue
Felix Fietkau [Sat, 18 Jan 2020 17:41:08 +0000 (18:41 +0100)]
mac80211: backport fix for an no-ack tx status issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agowireguard: bump to 0.0.20200128
Jason A. Donenfeld [Tue, 28 Jan 2020 15:55:16 +0000 (16:55 +0100)]
wireguard: bump to 0.0.20200128

This fixes a few small oversights for the 5.5 compat layer.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agohostapd: unconditionally enable ap/mesh for wpa-cli
Felix Fietkau [Tue, 28 Jan 2020 13:12:08 +0000 (14:12 +0100)]
hostapd: unconditionally enable ap/mesh for wpa-cli

Without this change, wpa-cli features depend on which wpad build variant was
used to build the wpa-cli package

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoocteon: apply vendor_model scheme to device definition/image name
Adrian Schmutzler [Sat, 18 Jan 2020 01:18:49 +0000 (02:18 +0100)]
octeon: apply vendor_model scheme to device definition/image name

This updates the device definition name for octeon target to provide
more useful names for the images and be consistent with the increasing
number of targets following that scheme.

Since the target is not using device tree yet, this does not touch
board_name and thus sets BOARD_NAME in image Makefile to ensure
sysupgrade is still working.

While at it, move Build block before Device blocks and remove trailing
whitespace for CMDLINE.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomediatek: use consistent naming scheme for device nodes
Adrian Schmutzler [Tue, 14 Jan 2020 14:38:51 +0000 (15:38 +0100)]
mediatek: use consistent naming scheme for device nodes

This harmonizes the device node names (and thus the image names, too)
between subtargets of the mediatek target. So far, each subtarget
has somewhat used its own naming scheme. Now, we use the vendor_device
syntax there, too.

Since DTS names have different patterns and the target only contains
a few devices, this does not replace DEVICE_DTS by a calculated
default value (like for other targets).

SUPPORTED_DEVICES is adjusted based on the node rename where necessary,
though it looks like for several older devices it was not set up
correctly so far.

While at it, this also changes the DTS name for u7623-02-emmc-512m
to all-lower-case.

Cc: John Crispin <john@phrozen.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: use older kernel for explicitly setting dependencies
Adrian Schmutzler [Fri, 24 Jan 2020 22:40:22 +0000 (23:40 +0100)]
kernel: use older kernel for explicitly setting dependencies

It is generally more desirable to use older kernel versions for
dependencies, as this will require less changes when newer kernels
are added (they will by default select the newer packages).

Since we currently only have two kernels (4.14 and 4.19) in master,
this patch applies this logic by converting all LINUX_4_19 symbols
to their inverted LINUX_4_14 equivalents.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agohostapd: remove some bashisms
Sven Roederer [Wed, 25 Dec 2019 17:46:14 +0000 (18:46 +0100)]
hostapd: remove some bashisms

"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[remove shebang, slightly facelift commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago6in4/6in4.sh: remove some bashism (usage of [[)
Sven Roederer [Wed, 25 Dec 2019 17:43:45 +0000 (18:43 +0100)]
6in4/6in4.sh: remove some bashism (usage of [[)

"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
4 years agonetifd/config.sh: remove some bashism (usage of [[)
Sven Roederer [Wed, 25 Dec 2019 17:42:13 +0000 (18:42 +0100)]
netifd/config.sh: remove some bashism (usage of [[)

"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
4 years agomvebu: remove bashism
Sven Roederer [Wed, 25 Dec 2019 17:39:00 +0000 (18:39 +0100)]
mvebu: remove bashism

"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[split patch, remove shebang, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobase-files: remove some bashisms
Sven Roederer [Wed, 25 Dec 2019 17:39:00 +0000 (18:39 +0100)]
base-files: remove some bashisms

"[[" is a bash extension for test. As the ash-implementation is
not fully compatible we drop its usage.
Also change to "=" for simple test, which is sufficient. (see d6ac8ca76c04ed)

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[split patch, removed shebang]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobuild: Add KBUILD_HOSTLDLIBS
Hauke Mehrtens [Fri, 17 Jan 2020 17:47:33 +0000 (18:47 +0100)]
build: Add KBUILD_HOSTLDLIBS

In Linux kernel commit 8377bd2b9ee1 ("kbuild: Rename HOST_LOADLIBES to
KBUILD_HOSTLDLIBS") HOST_LOADLIBES was renamed to KBUILD_HOSTLDLIBS.
This patch adapts the OpenWrt kernel build to this new variable. Without
this change the kernel host tools would not link against the libraries
found in the staging directory.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
4 years agokernel: sfp: add Nokia SFP fix from net-next
Scott Roberts [Fri, 24 Jan 2020 04:45:53 +0000 (21:45 -0700)]
kernel: sfp: add Nokia SFP fix from net-next

Add Nokia GPON ONT SFP fix for tx_fault in net-next.

Signed-off-by: Scott Roberts <ttocsr@gmail.com>
4 years agolantiq: ltq-ptm: vr9: fix skb handling in ptm_hard_start_xmit()
Martin Schiller [Tue, 21 Jan 2020 09:42:33 +0000 (10:42 +0100)]
lantiq: ltq-ptm: vr9: fix skb handling in ptm_hard_start_xmit()

Call skb_orphan(skb) to call the owner's destructor function and make
the skb unowned.

This is necessary to prevent sk_wmem_alloc of a socket from overflowing,
which leads to ENOBUFS errors on application level.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 years agombedtls: update to 2.16.4
Magnus Kroken [Sat, 25 Jan 2020 17:33:41 +0000 (18:33 +0100)]
mbedtls: update to 2.16.4

Fixes side channel vulnerabilities in mbed TLS' implementation of ECDSA.

Release announcement:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.4-and-2.7.13-released

Security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2019-12

Fixes:
 * CVE-2019-18222: Side channel attack on ECDSA

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
4 years agoipq40xx: fix misplaced cells-sizes in WPJ419's dts
Christian Lamparter [Sun, 26 Jan 2020 00:12:50 +0000 (01:12 +0100)]
ipq40xx: fix misplaced cells-sizes in WPJ419's dts

This patch fixes the occurences of the following warning
message from the dtc:

Warning (reg_format): /soc/spi@78b5000/flash0@0/partitions/partition@0:reg:
property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq-wifi: drop deprecated .bin support
Christian Lamparter [Sat, 18 Jan 2020 23:00:52 +0000 (00:00 +0100)]
ipq-wifi: drop deprecated .bin support

This patch converts the Qxwlan E2600AC image away from
the deprecated .bin file and to the new .qca4019 method.

As a result, we no longer need to carry around the
legacy support for handling .bin files.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: add support for EnGenius EMD1
Yen-Ting-Shen [Fri, 1 Nov 2019 06:00:40 +0000 (14:00 +0800)]
ipq40xx: add support for EnGenius EMD1

SOC:     IPQ4018 / QCA Dakota
CPU:     Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:    256 MiB
NOR:     32 MiB
ETH:     Qualcomm Atheros QCA8072 (1 port)
WLAN1:   Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2:   Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT:   RESET Button
LEDS:    White, Blue, Red, Orange

Flash instruction:

From EnGenius firmware to OpenWrt firmware:

In Firmware Upgrade page, upgrade your openwrt-ipq40xx-generic-engenius_emd1-squashfs-factory.bin directly.

From OpenWrt firmware to EnGenius firmware:

1. Setup a TFTP server on your computer and configure static IP to 192.168.99.8
   Put the EnGenius firmware in the TFTP server directory on your computer.
2. Power up EMD1. Press 4 and then press any key to enter u-boot.
3. Download EnGenius firmware
   (IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-emd1-nor-fw-s.img
4. Flash the firmware
   (IPQ40xx) # imgaddr=0x84000000 && source 0x84000000:script
5. Reboot
   (IPQ40xx) # reset

Signed-off-by: Yen-Ting-Shen <frank.shen@senao.com>
[removed BOARD_NAME]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: Add support for D-Link DAP-2610
Fredrik Olofsson [Tue, 10 Sep 2019 09:25:53 +0000 (11:25 +0200)]
ipq40xx: Add support for D-Link DAP-2610

Specifications
==============
- SOC: IPQ4018
- RAM: DDR3 256MB
- Flash: SPI NOR 16MB
- WiFi:
    - 2.4GHz: IPQ4018, 2x2, front end SKY85303-11
    - 5GHz: IPQ4018, 2x2, front end SKY85717-21
- Ethernet: 1x 10/100/1000Mbps, POE 802.3af
- PHY: QCA8072
- UART: GND, blocked, 3.3V, RX, TX / 115200 8N1
- LED: 1x red / green
- Button: 1x reset / factory default
- U-Boot bootloader with tftp and "emergency web server" accessible
  using serial port.

Installation
============
Flash factory image from D-Link web UI. Constraints in the D-Link web UI
makes the factory image unnecessarily large. Flash again using
sysupgrade from inside OpenWrt to reclaim some flash space.

Return to stock D-Link firmware
===============================
Partition layout is preserved, and it is possible to return to the stock
firmware simply by downloading it from D-Link and writing it to the
firmware partition.

    # mtd -r write dap2610-firmware.bin firmware

Quirks
======
To be flashable from the D-Link http server, the firmware must be larger
then 6MB, and the size in the firmware header must match the actual file
size. Also, the boot loader verifies the checksum of the firmware before
each boot, thus the jffs2 must be after the checksum covered part. This
is solved in the factory image by having the rootfs at the very end of
the image (without pad-rootfs).

The sysupgrade image which does not have to be flashable from the D-Link
web UI may be smaller, and the checksum in the firmware header only
covers the kernel part of the image.

Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
[added WRGG Variables to DEVICE_VARS, squashed spi pinconf/mux,
added emd1's gmac0 config,fix dtc warnings]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agotools/gmp: update to 6.2.0
Hannu Nyman [Sat, 25 Jan 2020 09:24:38 +0000 (11:24 +0200)]
tools/gmp: update to 6.2.0

Update GNU gmp to version 6.2.0

Release notes:  https://gmplib.org/gmp6.2.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agolantiq: tidy up image/Makefile
Adrian Schmutzler [Fri, 24 Jan 2020 17:51:36 +0000 (18:51 +0100)]
lantiq: tidy up image/Makefile

This harmonizes indent for Build blocks and removes multiple empty
lines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolantiq: fix setting SOC to DEFAULT_SOC
Adrian Schmutzler [Fri, 24 Jan 2020 17:48:47 +0000 (18:48 +0100)]
lantiq: fix setting SOC to DEFAULT_SOC

This adds the missing assignment of DEFAULT_SOC to the SOC variable
by default.

Fixes: 09ee51c614d9 ("lantiq: define SOC only once for uniform targets")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolantiq: define SOC only once for uniform targets
Adrian Schmutzler [Fri, 24 Jan 2020 17:38:53 +0000 (18:38 +0100)]
lantiq: define SOC only once for uniform targets

In lantiq there are several subtarget where all devices have the
same value set to the SOC variable for each device individually.

This patch introduces a non-device-dependent variable DEFAULT_SOC,
which is used if no specific SOC is set for a device, and thus reduces
the number of redundant definitions drastically.

This is applied to all subtargets except xway, as only the latter has
two different SOCs.

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