Commit Graph

46127 Commits (c642a97aa6b51352a718449cd715b92f94af4a5d)
 

Author SHA1 Message Date
Adrian Schmutzler c642a97aa6 ath79: add support for TP-Link TL-WDR4300 v1 (IL)
The TL-WDR4300 v1 sold in Israel has a different TPLINK_HWID.

Thanks to Josh4300 for testing on device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8e91b18ab7 ath79: redistribute UBNT variables in Ubiquiti image Makefile
The variables UBNT_BOARD and UBNT_VERSION are defined in the parent
Device/ubnt definition and then overwritten for most of the derived
platform definitions (e.g. Device/ubnt-wa).

Since this mixed use of inheritance and overwriting can be misleading,
this moves the variables to the platform-based definitions.

While at it, reorder the definitions to have order consistent, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 68ef534989 ramips: add label MAC address for Mikrotik RBM33G
The device label contains:
E01: B8:69:F4:xx:xx:07
E02: B8:69:F4:xx:xx:09

The first value corresponds to the address set in hard_config 0x10.

That one is taken for the label MAC address.

Thanks to Martin Schiller for retrieving the information.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 772af7f98d ramips: rt305x: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for the following devices as they
do not set up a MAC address for ethernet in the first place:
- asiarf,awapn2403
- belkin,f7c027
- dlink,dir-615-d
- mofinetwork,mofi3500-3gn
- prolink,pwh2004
- ralink,v22rw-2x2
- unbranded,wr512-3gn-4m
- unbranded,wr512-3gn-8m

While at it, make some DT node labels consistent with the label
property.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler a858d6d0e2 ramips: rt288x: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for ralink,v11st-fe as this device
does not set up a MAC address for ethernet in the first place.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler fef1810897 ramips: mt76x8: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

While at it, change the partition label for zyxel,keenetic-extra-ii
to factory to be consistent with node label and all the other devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler ed975a58e4 ramips: mt7621: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 98d9158d2f ramips: mt7620: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 38866f275d ramips: remove wan_mac setup for evaluation boards
The evaluation boards do not set up a MAC address for eth0
in the first place, so it does not make sense to calculate a WAN
address from the random MAC used there.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 757658f2ab ramips: create common DTSI for TP-Link Archer C20i/C20 v1/C50 v1
The TP-Link Archer C20i/C20 v1/C50 v1 seem to be almost the same,
so creating a common DTSI will reduce duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler c4f6850efc ramips: remove unused DTS variable from DEVICE_VARS
The DTS variable has been removed in 402138d12d ("ramips: Derive
DTS name from device name in Makefile"), but the DEVICE_VARS entry
has been overlooked.

Remove it now since we are not using this variable.

This must _not_ be backported to 19.07, where the variable is still
in use.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Gabor Varga a283b1788a ramips: fix switch port numbering for RT-AC65P/RT-AC85P
The switch LAN port numbers are in reversed order with original config.
With this patch they are fixed.

Port order checked on both devices.

Signed-off-by: Gabor Varga <vargagab@gmail.com>
[merged definitions into appropriate block, extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e00396d584 ramips: add label MAC address for TP-Link Archer C20i
Current OpenWrt MAC setup:
eth0             &rom 0xf100    :48
eth0.2           eth0+1         :49
wlan0 (5 GHz)    &radio 0x8004  different OUI
wlan1 (2.4 GHz)  &radio 0x4     same OUI as wlan0

Label MAC address corresponds to eth0 (&ethernet).

No additional addresses found in hexdump of rom/radio.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
DENG Qingfang 46c74944df ath79: fix typos in DTS
Replace "usb_ochi" with "usb_ohci", and "usb_echi" with "usb_ehci".

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Hans Dedecker 1ec6e7837e glibc: update to latest 2.27 commit (BZ #2503, BZ #2504)
bef0b1cb31 libio: Disable vtable validation for pre-2.1 interposed handles [BZ #25203]
4d5cfeb510 rtld: Check __libc_enable_secure before honoring LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]
92f04eedb5 mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years ago
Koen Vandeputte 487e0631d0 ath10k-firmware: update Candela Tech firmware images
The release notes since last time for wave-1:

  *  November 29, 2019:  Fix IBSS merge issue, related to TSF id leakage bug in firmware code.
                         Thanks for Ahmed Zaki @ Mage-Networks for helping to diagnose and test.

The release notes since last time for wave-2:

  *  December 6, 2019:  Fix 160Mhz problem caused by logic that did not take into account the fact that
                        160Mhz has only 1/2 of the NSS of lower bandwidths in the rate table.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 88ca372b5a kernel: bump 4.19 to 4.19.88
Refreshed all patches.

Remove upstreamed:
- 0004-boot-sq201-from-sda1.patch
- 500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
- 0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch

Altered patches:
- 0011-ARM-dts-Fix-up-SQ201-flash-access.patch
- 400-mtd-add-rootfs-split-support.patch
- 0101-pci-mediatek-backport-fix-pcie.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d395583d69 kernel: bump 4.14 to 4.14.158
Refreshed all patches.

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte a9b9592196 kernel: bump 4.9 to 4.9.206
Refreshed all patches.

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Daniel Golle e964338110 malta: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 2105354968 sunxi: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 414d027ae8 layerscape: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 411e824ec3 kirkwood: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle c1db4d9c56 at91: disable legacy PTYs and virtual terminals
Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle d0d7f5d9e4 mpc85xx: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 8069e9734b ixp4xx: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle dcf48fda05 uml: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle c881769a55 oxnas: disable legacy PTYs and virtual terminals
Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 3ee767086d mac80211: don't call md5sum on non-existing file
If no AP is configured, hostapd-${phy}.conf is not being created,
hence md5sum fails and causes log pollution:

netifd: radio1 (3183): md5sum: can't open '/var/run/hostapd-phy1.conf': No such file or directoy

Hence make sure the file exists when calling md5sum.

Fixes: a5bc9787d4 ("mac80211: add support for dynamically reconfiguring wifi")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 24b97579d2 hostapd: re-introduce process tracking
Before commit 60fb4c92b6 ("hostapd: add ubus reload") netifd was
tracking hostapd/wpa_supplicant and restarting wifi in case of a
process crash. Restore this behaviour by tracking the PIDs of
hostapd and wpa_supplicant.
Also make sure hostapd and/or wpa_supplicant have been started before
emmitting ubus calls to them using ubus wait_for.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 2568db3fff mac80211: track unmanaged interfaces
In addition to wpa_supplicant and hostapd managed interfaces, also
track unmanaged interfaces. This is used to make sure that running
'wifi' always returns into a clean state regardless of what the user
did before.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Felix Fietkau c888e17e06 hostapd: manage instances via procd instead of pidfile
Allows graceful restart of crashing hostapd/wpa_supplicant instances

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: attempt to launch only present services]
5 years ago
Felix Fietkau 4225b83a76 hostapd: fix crash regression triggered by mesh mode
Fixes: 60fb4c92b6 ("hostapd: add ubus reload")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: polish commit message]
5 years ago
Adrian Schmutzler 231dc26867 treewide: remove dts-v1 identifier from DTSI files
The "/dts-v1/;" identifier is supposed to be put once at the beginning
of a device tree file. Thus, it makes no sense to provide it a second
time in to-be-included DTSI files.

This removes the identifier from all DTSI files in /target/linux.

Most of the DTS files in OpenWrt do contain the "/dts-v1/;". It is
missing for most of the following targets, though:
mvebu, ipq806x, mpc85xx, ipq40xx

This does not touch ipq806x for now, as the bump to 4.19 is close.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
David Bauer 1ccf4bb93b hostapd: enable CTRL_IFACE_MIB for hostapd-full
This enables the CTRL_IFACE_MIB symbol for wpad-full and hostapd-full.
If it is not enabled, statistic outputs such as "hostapd_cli all_sta"
are empty.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Olli Asikainen deb835849a brcm47xx: add switch configuration for WNR3500L
Netgear WNR3500L is an already supported device, but out of the
box, the device has no switch configuration and there is no wan.
The correct configuration for this specific model is similar to
some other models. This simple commit adds the correct switch
and the out-of-the-box experience is improved.

Experimentally determined:

Port 0 => WAN
Port 1..4 => LAN
Port 5..7 => unused
Port 8 => CPU

Signed-off-by: Olli Asikainen <olli.asikainen@gmail.com>
Tested-by: Fabian Zaremba <fabian@youremail.eu>
[added port mapping to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 34abfb6e91 ramips: convert mediatek,mtd-eeprom from decimal to hex notation
A small subset of devices uses decimal notation for mediatek,mtd-eeprom
in DTS files. Convert to hexadecimal notation to be consistent with
all the rest.

Also change "0" to "0x0" in the same files for consistency.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Martin Schiller 3a55c7935d ramips: fix number of LAN Ports for Mikrotik RBM33G
The Mikrotik RBM33G has only 2 LAN ports.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[moved node in 02_network to maintain alphabetic sorting]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Walter Sonius a065cd29bf ramips: fix switch port order for TP-Link Archer C20i
Physical port order watched from the backside of the C20i
(from left to right) is: Internet / 1 / 2 / 3 / 4

Physical Port	Switch port
WAN             0
LAN 3           1
LAN 4           2
LAN 1           3
LAN 2           4
(not used)      5
CPU             6

Signed-off-by: Walter Sonius <walterav1984@gmail.com>
[commit message/title improvements]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Christian Lamparter a428606646 ath79: fix WNDR3700/WNDR3800 wifi reg size
"[...] the size component shall be zero."
(See "PCI Bus Binding to: IEEE Std 1275-1994 Rev 2.1"
section "4.1.1 Open Firmware-defined Properties for Child Nodes")

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Hans Dedecker 39d9010c20 iproute2: update to 5.4.0
Update iproute2 to latest stable version, see https://lwn.net/Articles/805654/
for the changes in 5.4.0

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
John Crispin a512123a4b mediatek: fix pcie bringup issue
Signed-off-by: John Crispin <john@phrozen.org>
5 years ago
Jason A. Donenfeld 82a8f91c89 wireguard: bump to 0.0.20191205
* wg-quick: linux: suppress error when finding unused table

This fixes a spurious warning messages seen with recent versions of iproute2
and kernels.

* wg-quick: linux: ensure postdown hooks execute
* wg-quick: linux: have remove_iptables return true
* wg-quick: linux: iptables-* -w is not widely supported

Adding in iptables had some hiccups. For the record, I'm very unhappy about
having to put any firewalling code into wg-quick(8). We'll of course need to
support nftables too at some point if this continues. I'm investigating with
upstream the possibility of adding a sysctl to patch the issue that iptables
is handling now, so hopefully at somepoint down the line we'll be able to shed
this dependency once again.

* send: use kfree_skb_list
* device: prepare skb_list_walk_safe for upstreaming
* send: avoid touching skb->{next,prev} directly

Suggestions from LKML.

* ipc: make sure userspace communication frees wgdevice

Free things properly on error paths.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
5 years ago
Stijn Tintel 157e17e985 ath79: add support for Ubiquiti LiteBeam AC Gen2
Hardware:
* SoC: Atheros AR9342-BL1A
* RAM: 64MB DDR2 (Winbond W9751G6KB-25)
* Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G)
* Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support
* Wifi 2.4GHz: Atheros AR9340 v2
* WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2)
* LEDs: 1x Power, 1x Ethernet
* Buttons: 1x Reset
* UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port

The LEDs do not seem to be connected to any GPIO, so there is currently
no way to control them.

Installation via U-Boot, TFTP and serial console:
* Configure your TFTP server with IP 192.168.1.254
* Connect serial console and power up the device
* Hit any key to stop autoboot
* tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin
* bootm 0x81000000
* copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin
  to /tmp
* sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Stijn Tintel db26f53bb3 ath79: drop IMAGE/factory.bin from ubnt-wa devices
The sysupgrade image contains OpenWrt specific metadata. Having this
metadata in the factory images makes no sense. Drop IMAGE/factory.bin
from Device/ubnt-wa and use the default from Device/ubnt instead.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Kevin Darbyshire-Bryant 89b8dd62ce kernel: act_ctinfo: fix updated backport on 4.14
It turns out my 4.14 testing had a rather large flaw in it and the
'extack' mechanism isn't quite ready.  Remove the extack stuff from this
backport.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Kevin Darbyshire-Bryant 1d608a10a0 kernel: act_ctinfo: update backport
Since the original backports from kernel 5.3 a few things have been
tweaked by kernel bumps & other upstream changes.  Update the backport
to reflect upstream as closely as possible and remove the bitrot.

Functions remain the same, error reporting improved.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Adrian Schmutzler f6385f30bd ath79: fix source of label MAC address for Ubiquiti XM devices
In d421a8b944 ("ath79: read label MAC address from flash instead
of using phy0/phy1") the source of the label MAC address was changed
for devices just reading it from phy0. To get rid of the dependency
from phy startup, addresses were read directly from the flash
locations that are used to initialize the phy MAC addresses.

Unfortunately, it turned out that Ubiquiti XM devices seem to have
different flash locations than expected, and also seem to have
specific locations for different devices (all in art/EEPROM):

0xe012 AR9280 Nanostation M2 - 0x120c
0xe035 AR9280 Nanostation M3 - 0x120c
0xe1b2 AR9280 Rocket M2 - 0x120c
0xe1c3 AR9280 Rocket M3 - 0x120c
0xe1b5 AR9280 Rocket M5 - 0x120c
0xe2d5 AR9280 Bullet M2 Titanium - 0x120c
0xe2b5 AR9280 Nanobridge M5 - 0x120c
0xe202 AR9280 Bullet M2 - 0x120c
0xe232 AR9287 Nanobridge M2 - 0x110c
0xe4a2 AR9285 AirRouter - 0xa0bf
Picostation M2 - 0x120c and 0xa0bf
Nanostation Loco M2 - not in 0x120c, other locations not checked

An additional problem of the Ubiquiti device support in OpenWrt is
that we provide images that match several subvariants of the devices,
which might have different MAC address locations.

Given that reading the address from phy0 in 02_network _is_ working
for the ath79 target in general, it does not seem reasonable to
rebuild a complex MAC address retrieval mechanism which is already
present in the ath9k driver.

So, this patch reverts the label MAC address source for Ubiquiti XM
devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress.

This doesn't affect XW and Unifi AC devices, where the label MAC
address source is defined via device tree.

For alfa-network,ap121f the location 0x1002 is kept, as this has
been verified during device support preparation in PR #2199.

Fixes: d421a8b944 ("ath79: read label MAC address from flash
instead of using phy0/phy1")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Alin Nastac 416d2cc71e gre: add ipv6 parameter to gre interfaces
IPv6 protocol is enabled on all gre interfaces, but gre(v6)tap
interfaces are usually added to a bridge interface, in which case
IPv6 should be enabled only on the bridge interface.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
5 years ago
Hans Dedecker 806339a4cc curl: bump to 7.67.0
For changes in 7.67.0; see https://curl.haxx.se/changes.html#7_67_0

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago