openwrt/staging/lynxis.git
6 years agoramips: remove stale get_status_led call
Mathias Kresin [Mon, 23 Jul 2018 05:57:45 +0000 (07:57 +0200)]
ramips: remove stale get_status_led call

The get_status_led() function was removed due to the convertion to dts
alias based status led.

Since we don't need the boardname any longer, the functions.sh include
isn't required any more.

Fixes: c9c4b2116c09 ("ramips: Use dts alias based status led")
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agokernel: don't auto attach ubi on read error
Mathias Kresin [Sun, 8 Jul 2018 21:18:15 +0000 (23:18 +0200)]
kernel: don't auto attach ubi on read error

With a10a204aab26cc ("kernel: make ubi auto-attach check for a tar file
magic") the check for the magic was added without considering a failing
mtd_read(). If the read fails, no check is done and the mount code is
called straight away.

Failing with an error message for such cases seems to me the cleaner way,
as it would allow to spot hidden/workaround issues.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agokernel: handle bad blocks in ubi auto attach code
Mathias Kresin [Sat, 7 Jul 2018 23:47:28 +0000 (01:47 +0200)]
kernel: handle bad blocks in ubi auto attach code

The first block(s) of the ubi mtd device might be bad. We need to take
care on our own to skip the bad block(s) and read the next one(s).

Don't treat recoverable read errors as fatal and check for the UBI magic
if the data of a block could be recovered using ECC or similar.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agokernel: improve ubi auto attach code readability
Mathias Kresin [Sat, 7 Jul 2018 23:38:08 +0000 (01:38 +0200)]
kernel: improve ubi auto attach code readability

Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.

The early return on failed open of the mtd device and mismatching mtd
type allows to get rid of one level of indentation. By jumping to the
cleanup code, a refcount bug is fixed for the wrong flash type condition.

While at it, make clear that we only check for the UBI magic if the read
from flash was successful.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoelfutils: Copy missing libraries to staging and packages
Ted Hess [Tue, 24 Jul 2018 18:32:20 +0000 (14:32 -0400)]
elfutils: Copy missing libraries to staging and packages

Newer shared libraries seem to have the package version as part of their name.
E.g.: libelf-0.173.so

Signed-off-by: Ted Hess <thess@kitschensync.net>
6 years agoutils/curl: Disable libpsl
Daniel Engberg [Tue, 24 Jul 2018 11:59:30 +0000 (13:59 +0200)]
utils/curl: Disable libpsl

Disabled libpsl to fix build issue reported by buildbots

Package libcurl is missing dependencies for the following libraries:
libpsl.so.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agobuild: do not override CCACHE_DIR when ccache is disabled
Jo-Philipp Wich [Tue, 24 Jul 2018 13:23:05 +0000 (15:23 +0200)]
build: do not override CCACHE_DIR when ccache is disabled

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agobuild: prereq-build.mk: fix gcc/g++ SetupHostCommand invocation
Jo-Philipp Wich [Tue, 24 Jul 2018 11:36:28 +0000 (13:36 +0200)]
build: prereq-build.mk: fix gcc/g++ SetupHostCommand invocation

A missing comma caused the first command option to be considered part of
the error message.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoipq40xx: drop bus driver, its a no-op and only does lots of alloc/free
John Crispin [Tue, 24 Jul 2018 07:35:16 +0000 (09:35 +0200)]
ipq40xx: drop bus driver, its a no-op and only does lots of alloc/free

Signed-off-by: John Crispin <john@phrozen.org>
6 years agowireguard-tools: add wireguard_watchdog script
Aleksandr V. Piskunov [Sun, 1 Jul 2018 12:40:31 +0000 (15:40 +0300)]
wireguard-tools: add wireguard_watchdog script

This watchdog script tries to re-resolve hostnames for inactive WireGuard peers.
Use it for peers with a frequently changing dynamic IP.
persistent_keepalive must be set, recommended value is 25 seconds.
Run this script from cron every minute:
echo '* * * * * /usr/bin/wireguard_watchdog' >> /etc/crontabs/root

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
[bump the package release]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agomac80211: backport and update patches for ath10k
Ansuel Smith [Sun, 8 Jul 2018 14:04:15 +0000 (16:04 +0200)]
mac80211: backport and update patches for ath10k

This commit refreshes and updates the VHT160 ath10k support fix patches
and adds a number of backports from ath-next:

 * 8ed05ed06fca ath10k: handle tdls peer events
 * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990
 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz
 * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants
 * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk)
 * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats
 * be8cce96f14d ath10k: add support to configure channel dwell time
 * f40105e67478 ath: add support to get the detected radar specifications
 * 6f6eb1bcbeff ath10k: DFS Host Confirmation
 * 260e629bbf44 ath10k: fix memory leak of tpc_stats
 * 38441fb6fcbb ath10k: support use of channel 173
 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[move backported patches in the 3xx number space, bring in upstream order,
 replace incomplete patch files with git format-patch ones, rewrite commit
 message, fix subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agowireguard: bump to 0.0.20180718
Jason A. Donenfeld [Wed, 18 Jul 2018 23:36:33 +0000 (01:36 +0200)]
wireguard: bump to 0.0.20180718

80b41cd version: bump snapshot
fe5f0f6 recieve: disable NAPI busy polling
e863f40 device: destroy workqueue before freeing queue
81a2e7e wg-quick: allow link local default gateway
95951af receive: use gro call instead of plain call
d9501f1 receive: account for zero or negative budget
e80799b tools: only error on wg show if all interfaces failk

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
[Added commit log to commit description]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agohostapd: remove unused struct hostapd_ubus_iface
Felix Fietkau [Thu, 19 Jul 2018 15:13:25 +0000 (17:13 +0200)]
hostapd: remove unused struct hostapd_ubus_iface

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agorules.mk: replace iremap when using GCC 8
Syrone Wong [Thu, 21 Jun 2018 15:08:11 +0000 (23:08 +0800)]
rules.mk: replace iremap when using GCC 8

The original -iremap is replaced by -fmacro-prefix-map in GCC 8

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
6 years agotoolchain/gcc: add GCC 8.1.0
Syrone Wong [Thu, 21 Jun 2018 15:08:10 +0000 (23:08 +0800)]
toolchain/gcc: add GCC 8.1.0

Changes compared to GCC 7.x

001-revert_register_mode_search.patch dropped

The underlying issue is described at the end of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

It is fixed by the upstream commit:
https://github.com/gcc-mirror/gcc/commit/3fa2798aa887d141d86985240f03e2f3809e7e62

020-PR-libstdc-81797-Add-.NOTPARALLEL-to-include-Makefil.patch dropped due to already upstream

100-PR-rtl-optimization-83496.patch dropped due to already upstream

910-mbsd_multi.patch
modified to fix ambiguous overloaded inform() call error

gcc/input.h
header: define UNKNOWN_LOCATION ((source_location) 0)

-        inform (0, "someone does not honour COPTS correctly, passed %d times",
-         honour_copts);
+        inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
+         honour_copts);

940-no-clobber-stamp-bits.patch dropped due to fixed upstream by another way
upstream commit: https://github.com/gcc-mirror/gcc/commit/87b2d547f8ac9778d66909b8726fe967d1efbc74

950-cpp_file_path_translation.patch dropped, Both -fmacro-prefix-map and -ffile-prefix-map are added
to gcc 8.1.0, if I understand it correctly, we should use -fmacro-prefix-map
usage: -fmacro-prefix-map=@var{old}=@var{new}
upstream commit: https://github.com/gcc-mirror/gcc/commit/859b51f83662d01e4f158ea9327db9ca37fe70b3

-iremap exists as a flag for a long time, for backward compatibility, I think we should keep the
variable name unchanged but change its value in rules.mk for gcc 8.x and higher.

Compile and run tested on x86_64

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
6 years agokernel: backport a change to 4.9 which disables overly aggressive warnings on gcc 8
Felix Fietkau [Sun, 22 Jul 2018 15:05:09 +0000 (17:05 +0200)]
kernel: backport a change to 4.9 which disables overly aggressive warnings on gcc 8

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: backport fixes for GCC 8 errors in syscall definitions
Felix Fietkau [Sun, 22 Jul 2018 14:52:44 +0000 (16:52 +0200)]
kernel: backport fixes for GCC 8 errors in syscall definitions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agobuild: do not alter global default package selection from profiles
Jo-Philipp Wich [Sat, 21 Jul 2018 18:47:10 +0000 (20:47 +0200)]
build: do not alter global default package selection from profiles

This partly reverts ca32373c951c651f4fe5d8f99ddeb8d4f20bbe3e which lets
profiles that suppress packages to alter the package selection for all
devices of the target when building with CONFIG_TARGET_PER_DEVICE_ROOTFS.

In particular, this caused the brcm47xx Edimax PS-1208MFG profile to
disable mtd, dropbear, firewall and other essential packages for all
brcm47xx/generic builds.

To solve this problem, prevent profiles from mangling the global
DEFAULT_PACKAGES selection and restrict the supression of negated
packages to the local PACKAGE variable list only.

Fixes ca32373c95 ("target.mk: let profile remove from DEFAULT_PACKAGES")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoiproute2: tc: backport canonical cake support
Kevin Darbyshire-Bryant [Fri, 20 Jul 2018 11:47:35 +0000 (12:47 +0100)]
iproute2: tc: backport canonical cake support

iproute2's tc was updated to support the recently upstreamed cake qdisc.
Backport this canonical support from upstream into iproute2 v4.17

There is no kernel kmod/userspace tc ABI change in this release from the
previous package bump, so everyone can breath a sigh of relief.

This is largely a code style change, the exception to prove the rule:
option 'autorate_ingress' has been changed to 'autorate-ingress' to fit
in with upstream option naming expectations.

No openwrt package (e.g. sqm-scripts) has knowledge of
'autorate_ingress' thus only users who made their own scripts or used
it within the 'dangerous configuration' options of sqm-scripts will be
affected.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agobuild: fix compile error when a package includes itself in PROVIDES
Felix Fietkau [Fri, 20 Jul 2018 08:40:43 +0000 (10:40 +0200)]
build: fix compile error when a package includes itself in PROVIDES

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoipq806x: dts: Remove device_type = "ethernet-phy"
Rosen Penev [Mon, 16 Jul 2018 18:17:08 +0000 (11:17 -0700)]
ipq806x: dts: Remove device_type = "ethernet-phy"

device_type is deprecated. Upstream doesn't seem to like it either.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agoapm821xx: unify My Book Live Single + Duo images
Christian Lamparter [Mon, 16 Jul 2018 20:56:36 +0000 (22:56 +0200)]
apm821xx: unify My Book Live Single + Duo images

By takimata:
"Come to think of it, an MBL Single board boots up just fine on an
MBL Duo image, and the MBL Single board identifies completely
identical to the MBL Duo
(Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB).
I wonder if there is any downside to just using the MBL Duo firmware
on a MBL Single. I wonder if the two firmwares could even be unified."

<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/9>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agoramips: define common MikroTik RouterBOARD image recipe
Thibaut VARÈNE [Thu, 19 Jul 2018 16:06:21 +0000 (18:06 +0200)]
ramips: define common MikroTik RouterBOARD image recipe

All these devices share the exact same image format.

The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie
slot like its bigger sibling. The usb kmod is necessary for
usb-over-pcie support, which is mandatory for a lot of LTE modules.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
6 years agolantiq: add support for FritzBox 7312
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: add support for FritzBox 7312

The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost
the same as FB7330, but only one ETH-Port and no USB.

Hardware
SoC: Lantiq Xway ARX188 PSB 50812 EL
RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5)
Ethernet: Atheros 8030
Wireless: Atheros AR9227 b/g/n 2x2
DSL: Lantiq ADSL2+
DECT: Dialog SC14441
Buttons: WiFi, DECT
LEDs: Power/DSL, Fon, DECT, WLAN, Info

LEDs
Power: GPIO#44 (active low)
Internet: GPIO#47 (active low)
DECT: GPIO#38 (active low)
WLAN: GPIO#37 (active low)
Info: GPIO#35 (active low)

The Fon LED is labeled as internet in avm gpl sources.

Buttons
WLAN: GPIO#1 (active low)
DECT: GPIO#2 (active low)

Phy
GPIO#03: 25 MHz
GPIO#34: Reset (active low)
GPIO#39: Int
GPIO#42: MII MDIO
GPIO#43: MII MDC

PCIe
GPIO#21: reset (active low)

Installation:

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agolantiq: etop: pass devicetree node to phy driver
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: etop: pass devicetree node to phy driver

Use of_mdiobus_register() to pass the ethernet phy node to the phy
drivers. This is needed for the at8030 phy driver which needs to know
the GPIO which is connected to the ar8030 reset pin.

This driver expects a child in gsw/etop node named "mdio-bus", which has
the ethernet phys defined:

&gsw {
phy-mode = "rmii";
phy-handle = <&phy0>;
mtd-mac-address = <&ath9k_cal 0xa91>;
mtd-mac-address-increment = <(-2)>;

mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;

phy0: ethernet-phy@0 {
reg = <0>;
reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
};
};
};

Fallback to mdiobus_register() if no mdio-bus child node exists. This
way we don't need to touch all xway dts files, for which we don't know
the actual address on the mdio bus.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agobase-files: fix wrong sysctl parameter order
Luiz Angelo Daros de Luca [Tue, 17 Jul 2018 22:41:09 +0000 (19:41 -0300)]
base-files: fix wrong sysctl parameter order

Restarting service sysctl echos multiple errors like:

  sysctl: -e: No such file or directory

After the first filename, all remaining arguments are treated
as files.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
6 years agoath79: fix TP-Link Archer C7 v2 wlan1 MAC address
Aleksandr V. Piskunov [Mon, 16 Jul 2018 18:14:50 +0000 (21:14 +0300)]
ath79: fix TP-Link Archer C7 v2 wlan1 MAC address

The mac address for the 2.4 wireless need to be decremented by one.

Correct MAC adress increments for this board are:
wlan0 (5GHz)   : -2
wlan1 (2.4GHz) : -1
eth1  (LAN)    :  0
eth0  (WAN)    :  1

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
6 years agohostapd: fix conflicts hell
Mathias Kresin [Wed, 11 Jul 2018 20:13:36 +0000 (22:13 +0200)]
hostapd: fix conflicts hell

Add each variant to the matching PROVIDERS variables after evaluating
the respective hostapd*, wpad* and wpa* variant.

Each package providing the same feature will automatically conflict with
all prior packages providing the same feature.

This way we can handle the conflicts automatically without introducing
recursive dependencies.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agohostapd: cleanup package definition
Mathias Kresin [Tue, 10 Jul 2018 19:17:33 +0000 (21:17 +0200)]
hostapd: cleanup package definition

Move common variables and/or values to the package (variant) default.
Add additional values in variant packages if necessary. Remove further
duplicates by introducing new templates.

Remove the ANY_[HOSTAPD|SUPPLICANT_PROVIDERS]_PROVIDERS. The are the
same as the variables without the any prefix. No need to maintain both
variables.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoigmpproxy: run in foreground for procd
Kevin Darbyshire-Bryant [Wed, 18 Jul 2018 16:51:59 +0000 (17:51 +0100)]
igmpproxy: run in foreground for procd

procd needs processes to stay in foreground to remain under its gaze and
control.  Failure to do so means service stop commands fail to actually
stop the process (procd doesn't think it's running 'cos the process has
exited already as part of its forking routing)

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agofirewall3: update to latest git HEAD
Hans Dedecker [Tue, 17 Jul 2018 20:12:57 +0000 (22:12 +0200)]
firewall3: update to latest git HEAD

d2bbeb7 firewall3: make reject types selectable by user

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agodnsmasq: don't use network functions at boottime (FS#1542)
Hans Dedecker [Tue, 17 Jul 2018 11:42:17 +0000 (13:42 +0200)]
dnsmasq: don't use network functions at boottime (FS#1542)

As dnsmasq is started earlier than netifd usage of network.sh functions
at boottime will fail; therefore don't call at boottime the functions
which construct the dhcp pool/relay info.
As interface triggers are installed the dhcp pool/relay info will be
constructed when the interface gets reported as up by netifd.
At the same time also register interface triggers based on DHCP relay
config.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoppp: fix building pptp plugin
Jo-Philipp Wich [Tue, 17 Jul 2018 18:21:39 +0000 (20:21 +0200)]
ppp: fix building pptp plugin

The pptp.so plugin needs to be built with -fPIC as well in order to be
linkable again.

Fixes 888a15ff83 ("ppp: add missing -fPIC to rp-pppoe.so CFLAGS")
Fixes e7397eef69 ("ppp: compile with LTO enabled")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoscripts/dl_github_archive.py: stringify exception
Yousong Zhou [Tue, 17 Jul 2018 17:05:53 +0000 (17:05 +0000)]
scripts/dl_github_archive.py: stringify exception

Closes openwrt/openwrt#1163

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
6 years agoopenvpn: increase procd termination timeout to 15s
Jo-Philipp Wich [Tue, 17 Jul 2018 14:01:46 +0000 (16:01 +0200)]
openvpn: increase procd termination timeout to 15s

Increase the termination timeout to 15s to let OpenVPN properly tear down
its connections, especially when weak links or complex down scripts are
involved.

Fixes FS#859.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agomediatek: fix parallel build issues in image build code
Jo-Philipp Wich [Tue, 17 Jul 2018 12:40:04 +0000 (14:40 +0200)]
mediatek: fix parallel build issues in image build code

Drop the parallel-unsafe custom Build/dtb macro and use the .dtb artifacts
produced by the generic image build code.

Also remove unused .dtb references in the mt7623 subtarget.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agobase-files: network.sh: gracefully handle missing network.interface ubus ns
Jo-Philipp Wich [Tue, 17 Jul 2018 05:47:33 +0000 (07:47 +0200)]
base-files: network.sh: gracefully handle missing network.interface ubus ns

When attempting to use any of the functions in network.sh while netifd is
not started yet, the ubus interface dump query will fail with "Not found",
yielding an empty response.

Subsequently, jsonfilter is invoked with an empty string instead of a valid
JSON document, causing it to emit a second "unexpected end of data" error.

This caused the dnsmasq init script to log the following errors during
early boot on some systems:

    procd: /etc/rc.d/S19dnsmasq: Command failed: Not found.
    procd: /etc/rc.d/S19dnsmasq: Failed to parse json data: unexpected end of data.

Fix the issue by allowing the ubus query to fail with "Not found" but still
logging other failures, and by passing an empty JSON object to jsonfilter
if the interface status cache is empty.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoar71xx: Move F9K1115v2 under ar71xx tiny target
Kin Chan [Mon, 5 Mar 2018 07:30:56 +0000 (07:30 +0000)]
ar71xx: Move F9K1115v2 under ar71xx tiny target

F9K1115v2 has a kernel partition size of 1408 kB.

Since kernel 4.9.x+ the kernel image for this device compiled had exceeded
the kernel partition size limit and thus failing size check.

The kernel image generated for this device
under ar71xx tiny target is 1329.67 kB < 1408 kB.

Signed-off-by: Kin Chan <kcchan1@outlook.com>
6 years agolibrpc: add host build to install h files needed for nfs-kernel-server to get compiled
Peter Wagner [Tue, 3 Jul 2018 06:54:41 +0000 (08:54 +0200)]
librpc: add host build to install h files needed for nfs-kernel-server to get compiled

Signed-off-by: Peter Wagner <tripolar@gmx.at>
6 years agoramips: Use dts alias based status led
Chuanhong Guo [Mon, 16 Jul 2018 08:27:22 +0000 (16:27 +0800)]
ramips: Use dts alias based status led

Also fix several typos in led node name.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years agokernel: insmod phy-broadcom module during preinit
Steffen Förster [Sun, 8 Jul 2018 20:18:07 +0000 (22:18 +0200)]
kernel: insmod phy-broadcom module during preinit

Some HP Thin clients use the broadcom nextreme chip as integrated NIC.
It is connected via PCI express and will only be found automatically if
phy-broadcom is loaded before tg3. This small change makes the thin
client usable for Freifunk with gluon out of the box.

Signed-off-by: Steffen Förster <steffen@chemnitz.freifunk.net>
6 years agopopt: Replace dead upstream site with mirror
Daniel Engberg [Sat, 14 Jul 2018 21:05:29 +0000 (23:05 +0200)]
popt: Replace dead upstream site with mirror

We can safely assume by now that rpm5.org is dead and isn't coming back
so just add another mirror instead.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agopackage/utils/f2fs-tools: Update to 1.11.0
Daniel Engberg [Sat, 14 Jul 2018 20:52:35 +0000 (22:52 +0200)]
package/utils/f2fs-tools: Update to 1.11.0

Update f2fs-tools to 1.11.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agopackage/utils/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:35:34 +0000 (22:35 +0200)]
package/utils/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3
Enable threads
Enable LTO

Numbers on mips_24kc (a few packages):

Old --> New --> LTO and threads
e2fsprogs_*_mips_24kc.ipk: 173 --> 174 --> 154kbyte
libblkid_*_mips_24kc.ipk:  114 --> 114 --> 114kbyte
libext2fs_*_mips_24kc.ipk: 138 --> 139 --> 139kbyte

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agoar71xx: add support for MikroTik RB931-2nD
Thibaut VARÈNE [Thu, 12 Jul 2018 11:43:36 +0000 (13:43 +0200)]
ar71xx: add support for MikroTik RB931-2nD

This patch adds support for the MikroTik RB931-2nD (hAP mini):
https://mikrotik.com/product/RB931-2nD

Specifications:
  * SoC: Qualcomm QCA9533 (650MHz)
  * RAM: 32MiB
  * Storage: 16MiB SPI NOR flash
  * Ethernet: 3x100M
  * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n

Installation:

1. Setup a DHCP/BOOTP Server with the following parameters:
   * DHCP-Option 66 (TFTP server name): pointing to a local TFTP
     server within the same subnet of the DHCP range
   * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename
     of the to be booted image. The usable intramfs files are:
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf
       - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

2. Press the reset button on the board and keep that pressed.

3. Connect the board to your local network via its Internet port.

4. Release the button after the LEDs on the board are turned off.
   Now the board should load and start the initramfs image from
   the TFTP server.

5. Now connect the board via either of its LAN ports (2 or 3).

6. Upload the sysupgrade image to the board with scp:
     $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin

7. Log in to the running system listening on 192.168.1.1 via ssh
   as root (without password):
     $ ssh root@192.168.1.1

8. Flash the uploaded firmware file from the ssh session via the
   sysupgrade command:
     root@OpenWrt:~# sysupgrade /tmp/fw.bin

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
6 years agokernel: leds-apu2 remove boardname check
Lukas Mrtvy [Wed, 11 Jul 2018 08:22:27 +0000 (10:22 +0200)]
kernel: leds-apu2 remove boardname check

'In different versions of coreboot are different names of apu boardname.
No need to check boardname to load module.'

Signed-off-by: Lukas Mrtvy <lukas.mrtvy@gmail.com>
6 years agobrcm63xx: initial support for Sky SR102 router
Andrius Štikonas [Sat, 14 Jul 2018 21:53:47 +0000 (21:53 +0000)]
brcm63xx: initial support for Sky SR102 router

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
SOC:      BCM63168 (BMIPS4350 V8.0 @400MHz)
Flash size: 16 MiB
RAM size:   128 MiB

Heavily based on patch for OpenWRT Chaos Chalmer.
Original patch and more info can be found at:
https://openwrt.org/toh/sky/sr102

Known issues:
 - Wireless and ADSL modem are not working.

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
6 years agoapm821xx: attempt to fix sata access freezes
Christian Lamparter [Sat, 14 Jul 2018 15:21:56 +0000 (17:21 +0200)]
apm821xx: attempt to fix sata access freezes

The original vendor's driver programmed the dma controller's
AHB HPROT values to enable bufferable, privileged mode. This
along with the "same priorty for both channels" could very
well fix the freezes that have been reported on the forum by
@ticerex and @takimata.

<https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/46>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agokmod-sched-cake: bump to 20180716
Kevin Darbyshire-Bryant [Sun, 15 Jul 2018 10:01:15 +0000 (11:01 +0100)]
kmod-sched-cake: bump to 20180716

Bump to the latest cake recipe.

This backports tc class support to kernel 4.9 and other than conditional
kernel compilation pre-processor macros represents the cake that has
gone upstream into kernel 4.19.  Loud cheer!

Fun may be had by changing cake tin classification for packets on
ingress. e.g.

tc filter add dev ifb4eth0 parent 800b: protocol ip u32 match \
ip dport 6981 0xffff action skbedit priority 800b:1

Where 800b: represents the filter handle for the ifb obtained by 'tc
qdisc' and the 1 from 800b:1 represents the cake tin number.  So the
above example puts all incoming packets destined for port 6981 into the
BULK (lowest priority) tin.

f39ab9a Obey tin_order for tc filter classifiers
1e2473f Clean up after latest backport.
82531d0 Reorder includes to fix out of tree compilation
52cbc00 Code style cleanup
6cdb496 Fix argument order for NL_SET_ERR_MSG_ATTR()
cab17b6 Remove duplicate call to qdisc_watchdog_init()
71c7991 Merge branch 'backport-classful'
32aa7fb Fix compilation on Linux 4.9
9f8fe7a Fix compilation on Linux 4.14
ceab7a3 Rework filter classification
aad5436 Fixed version of class stats
be1c549 Add cake-specific class stats
483399d Use tin_order for class dumps
80dc129 Add class dumping
0c8e6c1 Fix dropping when using filters
c220493 Add the minimum class ops
5ed54d2 Start implementing tc filter/class support

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agotools/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:31:37 +0000 (22:31 +0200)]
tools/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agoapm821xx: fix usb-otg on 4.14
Christian Lamparter [Sat, 14 Jul 2018 15:21:55 +0000 (17:21 +0200)]
apm821xx: fix usb-otg on 4.14

Starting with 4.14, the "amcc,dwc-otg" needs to be used
in order to get the usb-otg to work.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agodropbear: close all active clients on shutdown
Christian Schoenebeck [Thu, 12 Jul 2018 02:36:03 +0000 (22:36 -0400)]
dropbear: close all active clients on shutdown

Override the default shutdown action (stop) and close all processes
of dropbear

Since commit 498fe85, the stop action only closes the process
that's listening for new connections, maintaining the ones with
existing clients.
This poses a problem when restarting or shutting-down a device,
because the connections with existing SSH clients, like OpenSSH,
are not properly closed, causing them to hang.

This situation can be avoided by closing all dropbear processes when
shutting-down the system, which closes properly the connections with
current clients.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
[Luis: Rework commit message]
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agomtd: improve check for TRX header being already fixed
Rafał Miłecki [Sun, 15 Jul 2018 21:23:42 +0000 (23:23 +0200)]
mtd: improve check for TRX header being already fixed

First of all lengths should be compared after checking all blocks for
being good/bad. It's because requested length may differ from a final
one if there were some bad blocks.

Secondly it makes sense to also compare crc32 since we already have a
new one calculated.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agocurl: Update to 7.61.0
Daniel Engberg [Sat, 14 Jul 2018 20:26:42 +0000 (22:26 +0200)]
curl: Update to 7.61.0

Update curl to 7.61.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agoodhcp6c: add noserverunicast config option for broken DHCPv6 servers
Hans Dedecker [Sun, 15 Jul 2018 19:53:25 +0000 (21:53 +0200)]
odhcp6c: add noserverunicast config option for broken DHCPv6 servers

Fix broken DHCPv6 servers which provide the server unicast option but
do not reply on DHCPv6 renew messages directed to the IPv6 address
contained in the server unicast option whihc results in broken IPv6
connectivity.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agomtd: support bad blocks within the mtd_fixtrx()
Rafał Miłecki [Sun, 15 Jul 2018 14:51:41 +0000 (16:51 +0200)]
mtd: support bad blocks within the mtd_fixtrx()

Reading MTD data with (p)read doesn't return any error when accessing
bad block. As the result, with current code, CRC32 covers "data" stored
in bad blocks.

That behavior doesn't match CFE's one (bootloader simply skips bad
blocks) and may result in:
1) Invalid CRC32
2) CFE refusing to boot firmware with a following error:
Boot program checksum is invalid

Fix that problem by checking every block before reading its content.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agoinclude/prereq-build.mk: explicitly check for -f flag when using busybox time
Matthias Schiffer [Sat, 14 Jul 2018 13:44:47 +0000 (15:44 +0200)]
include/prereq-build.mk: explicitly check for -f flag when using busybox time

On Debian, busybox does have a time applet, but it does not support the -f
flag. Catch this in prereq check to give users to proper error message.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoinclude/kernel-build.mk: fix kernel rebuild on backport patch changes
Matthias Schiffer [Sat, 14 Jul 2018 11:07:34 +0000 (13:07 +0200)]
include/kernel-build.mk: fix kernel rebuild on backport patch changes

An incorrect variable name was referenced in KERNEL_FILE_DEPENDS, leading
to the omission of the backport-* patch dirs in the generation of the
prepared stamp name.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agokernel: backport page fragment API changes from 4.10+ to 4.9
Felix Fietkau [Sat, 14 Jul 2018 09:38:28 +0000 (11:38 +0200)]
kernel: backport page fragment API changes from 4.10+ to 4.9

mt76 now relies on this API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoppp: add missing -fPIC to rp-pppoe.so CFLAGS
Felix Fietkau [Sat, 14 Jul 2018 08:59:52 +0000 (10:59 +0200)]
ppp: add missing -fPIC to rp-pppoe.so CFLAGS

Fixes build error with LTO

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoramips: ethernet: disable fraglist support
Felix Fietkau [Sat, 14 Jul 2018 06:32:36 +0000 (08:32 +0200)]
ramips: ethernet: disable fraglist support

The code has some remaining issues that cause ethernet hangs, so
disable it for now until we can get it fixed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoubus: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:42:40 +0000 (19:42 +0200)]
ubus: compile with LTO enabled

Reduces total .ipk size by about 1k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoprocd: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:35:40 +0000 (19:35 +0200)]
procd: compile with LTO enabled

Reduces .ipk size on MIPS from 42k to 39k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agodropbear: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:28:54 +0000 (19:28 +0200)]
dropbear: compile with LTO enabled

Reduces size of the .ipk on MIPS from 87k to 84k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agofirewall: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:23:43 +0000 (19:23 +0200)]
firewall: compile with LTO enabled

Reduces .ipk size on MIPS from 41.6k to 41.1k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoiw: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:21:08 +0000 (19:21 +0200)]
iw: compile with LTO enabled

Reduces .ipk size on MIPS from 34k to 33k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoppp: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:17:34 +0000 (19:17 +0200)]
ppp: compile with LTO enabled

Reduces .ipk size on MIPS from 98.5k to 98k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoppp: fix linker flags for the radius plugin
Felix Fietkau [Wed, 11 Jul 2018 17:14:53 +0000 (19:14 +0200)]
ppp: fix linker flags for the radius plugin

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agonetifd: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 16:55:02 +0000 (18:55 +0200)]
netifd: compile with LTO enabled

Reduces .ipk size from 65k to 63k on MIPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agobusybox: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 16:30:03 +0000 (18:30 +0200)]
busybox: compile with LTO enabled

In the default configuration on MIPS, it reduces the .ipk size
from 214k to 207k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agomt76: update to the latest version
Felix Fietkau [Fri, 13 Jul 2018 14:36:39 +0000 (16:36 +0200)]
mt76: update to the latest version

08719b1 mt76: use a per rx queue page fragment cache
4d2c565 mt76x2: reset HW before probe
f622975 mt76x2: fix CCK protection control frame rate
6780375 mt76x2: add frame protection support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoinclude/feeds.mk: rework generation of opkg distfeeds.conf
Matthias Schiffer [Mon, 9 Jul 2018 22:00:01 +0000 (00:00 +0200)]
include/feeds.mk: rework generation of opkg distfeeds.conf

Allow enabling/commenting/disabling each feed individually by using a
tristate config symbol.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agobase-files: fix feed list in PKG_CONFIG_DEPENDS
Matthias Schiffer [Mon, 9 Jul 2018 21:50:28 +0000 (23:50 +0200)]
base-files: fix feed list in PKG_CONFIG_DEPENDS

FEEDS_ENABLED and FEEDS_DISABLED are derived from FEEDS_AVAILABLE, not
FEEDS_INSTALLED.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoinclude/feeds.mk: always add available feeds to PACKAGE_SUBDIRS
Matthias Schiffer [Mon, 9 Jul 2018 20:13:19 +0000 (22:13 +0200)]
include/feeds.mk: always add available feeds to PACKAGE_SUBDIRS

Setting CONFIG_FEED_... symbols combined two different effects: Disabling
a feed in the generated opkg distfeeds.conf, and omitting the feed from
PACKAGE_SUBDIRS.

It does not make sense to omit built feeds from PACKAGE_SUBDIRS, as it will
only lead to packages that can be enabled in .config (and that will
consequently be built) not to be found during rootfs creation, breaking
the build. All feeds that packages are emitted to should simply always be
added to PACKAGE_SUBDIRS instead; the CONFIG_FEED_... only configure the
generated distfeeds.conf like this.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoscripts/feeds: add src-dummy method
Matthias Schiffer [Mon, 9 Jul 2018 20:00:27 +0000 (22:00 +0200)]
scripts/feeds: add src-dummy method

The src-dummy method does not actually obtain any feed, but it can be used
to insert addtional entries into the opkg distfeeds.conf. This is useful to
make package feeds available to users without requiring the corresponding
source feeds to be available during build.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoramips: ethernet: use own page_frag_cache
Felix Fietkau [Thu, 12 Jul 2018 15:19:07 +0000 (17:19 +0200)]
ramips: ethernet: use own page_frag_cache

Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragment.
This can happen if the ethernet driver grabs one or two fragments for rx
ring refill, while other drivers use (and free up) the remaining
fragments. The 32 KiB higher-order page can only be freed once all users
have freed their fragments, which only happens after the rings of all
drivers holding the fragments have wrapped around.

Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoramips: ethernet: use skb_free_frag to free fragments
Felix Fietkau [Thu, 12 Jul 2018 15:18:37 +0000 (17:18 +0200)]
ramips: ethernet: use skb_free_frag to free fragments

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoramips: TP-Link TL-WR902AC v3: add missing wps button
Peter Lundkvist [Mon, 9 Jul 2018 10:54:18 +0000 (12:54 +0200)]
ramips: TP-Link TL-WR902AC v3: add missing wps button

Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
6 years agoramips: TP-Link TL-WR902AC v3: don't build factory image
Peter Lundkvist [Mon, 9 Jul 2018 10:54:17 +0000 (12:54 +0200)]
ramips: TP-Link TL-WR902AC v3: don't build factory image

The line that produces factory image was accidentally left by me while
testing before inital commit.

I came to the conclusion that flashing from OEM firmware does not work
(seems to share this behavior with other tplinks based on mt7628).

I have not done any further analysis, as I was unable to open the
case and attach a serial port (too much glue). Maybe i will try once
more.

So the way to do initial flashing (or un-bricking) is to use the
tftp-recover image. It is possible to revert to OEM firmware with tftp
recovery; in this case the first 512 bytes the image file need to be
cut off.

Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
[add explaination provided via mail as commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agotools: kernel2minor: update to latest version
Mathias Kresin [Mon, 9 Jul 2018 19:53:43 +0000 (21:53 +0200)]
tools: kernel2minor: update to latest version

9fa9190 create reproducible images

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoconfig: extend small_flash feature
Alex Maclean [Mon, 9 Jul 2018 17:09:05 +0000 (18:09 +0100)]
config: extend small_flash feature

Extend the small_flash feature to disable swap, core dumps, and
kernel debug info, and change the squashfs block size to 1024KiB.

Also change squashfs fragment cache to 2 for small_flash to ease memory
usage.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years agokernel: only optimized for size if small_flash
Mathias Kresin [Mon, 9 Jul 2018 18:48:56 +0000 (20:48 +0200)]
kernel: only optimized for size if small_flash

Add a new config option to allow to select the default compile
optimization level for the kernel.

Select the optimization for size by default if the small_flash feature is
set. Otherwise "Optimize for performance" is set.

Add the small_flash feature flag to all (sub)targets which had the
optimization for size in their default kernel config.

Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
setting.

Exceptions to the above are:

  - lantiq, where the optimization for size is only required for the
    xway_legacy subtarget but was set for the whole target
  - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
    plenty of space and an optimization for size doesn't make much sense
  - rb532, which has 128MByte flash

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoar71xx: move boards to tiny subtarget
Mathias Kresin [Thu, 12 Jul 2018 04:29:43 +0000 (06:29 +0200)]
ar71xx: move boards to tiny subtarget

Move boards to the tiny subtarget which break the build if the kernel is
set to "Optimize for performance".

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoverbose.mk: quote SUBMAKE options
李国 [Fri, 6 Jul 2018 10:03:40 +0000 (18:03 +0800)]
verbose.mk: quote SUBMAKE options

build openwrt on centos 6 I should use devtoolset-3 to get gcc 4.9, but
it fail when make menuconfig. so I have to give option HOSTCC='gcc
-Wl,--copy-dt-needed-entries' to make. But it passed to sub make to
HOSTCC=gcc as micro SUBMAKE expand to HOSTCC=gcc
-Wl,--copy-dt-needed-entries. This patch fix this issue.

make -C build menuconfig HOSTCC='gcc -Wl,--copy-dt-needed-entries' V='1'
make: Entering directory `/work/openwrt/openwrt/build'
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld:
lxdialog/checklist.o: undefined reference to symbol 'acs_map'
//lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [mconf] Error 1
make -s -C scripts/config all CC=gcc -Wl,--copy-dt-needed-entries: build
failed. Please re-run make with -j1 V=s to see what's going on
make: *** [scripts/config/mconf] Error 1
make: Leaving directory `/work/openwrt/openwrt/build'

Signed-off-by: 李国 <uxgood.org@gmail.com>
6 years agoarc: Update variables substitutions in u-boot env files
Evgeniy Didin [Mon, 9 Jul 2018 09:31:30 +0000 (12:31 +0300)]
arc: Update variables substitutions in u-boot env files

In the latest version of u-boot (2018.05) there was a swith to
Hush shell for ARC AXS10x boards(arc770/archs38):
commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell").
In Hush shell using "$()" to declare envitonment variables is forbidden,
instead of this "${}" need to be used.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
6 years agomediatek: Fix memory node for U7623
Kristian Evensen [Sat, 7 Jul 2018 13:52:01 +0000 (15:52 +0200)]
mediatek: Fix memory node for U7623

The changed applied to BananaPi R2 in upstream commit c0b0d540db1a,
which was backported to 4.14 in 4.14.53, is also required for the U7623.
Without updating the memory node, the board refuses to boot.

Fixes: d0839e020d0a ("kernel: bump 4.14 to 4.14.53")
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
6 years agokernel: gpio-nct5104d remove boardname check
Lukáš Mrtvý [Wed, 11 Jul 2018 09:33:55 +0000 (11:33 +0200)]
kernel: gpio-nct5104d remove boardname check

'In different versions of coreboot are different names of apu boardname.
No need to check boardname to load module.'

Signed-off-by: Lukáš Mrtvý <lukas.mrtvy@gmail.com>
6 years agonetifd: update to latest git HEAD
Hans Dedecker [Wed, 11 Jul 2018 19:50:05 +0000 (21:50 +0200)]
netifd: update to latest git HEAD

5cf7975 iprule: rework interface based rules to handle dynamic interfaces
57f87ad Introduce new interface event "create" (IFEV_CREATE)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoramips: clean up and fix MT7621 NAND driver issues
Felix Fietkau [Wed, 11 Jul 2018 18:56:42 +0000 (20:56 +0200)]
ramips: clean up and fix MT7621 NAND driver issues

- remove misaligned custom buffer allocation in the NAND driver
- remove broken bounce buffer implementation for 16-byte align

Let the MTD core take care of both

Fixes messages like these:
[  102.820541] Data buffer not 16 bytes aligned: 87daf08c

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: replace bridge port isolate hack with upstream patch backport on 4.14
Felix Fietkau [Wed, 4 Jul 2018 18:14:08 +0000 (20:14 +0200)]
kernel: replace bridge port isolate hack with upstream patch backport on 4.14

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agonetifd: update to the latest version
Felix Fietkau [Wed, 4 Jul 2018 18:15:56 +0000 (20:15 +0200)]
netifd: update to the latest version

c1f6a82 system-linux: add autoneg and link-partner output
e9eff34 system-linux: extend link mode speed definitions
d1251e1 system-linux: adjust bridge isolate mode for upstream attribute naming
03785fb system-linux: fix build error on older kernels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: adjust bridge port isolate patch to match upstream attribute naming
Felix Fietkau [Wed, 4 Jul 2018 17:49:32 +0000 (19:49 +0200)]
kernel: adjust bridge port isolate patch to match upstream attribute naming

Newer kernels have a patch that implements compatible functionality
directly. Adjust the attribute of our own patch in preparation for
dropping it later

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoprocd: update to the latest version, fixes gcc 8 build error
Felix Fietkau [Thu, 5 Jul 2018 09:16:13 +0000 (11:16 +0200)]
procd: update to the latest version, fixes gcc 8 build error

a0372ac procd: increase watchdog fd_buf storage size to fix gcc8 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agomac80211: Expose support for ath9k Dynack
Koen Vandeputte [Mon, 2 Jul 2018 08:23:44 +0000 (10:23 +0200)]
mac80211: Expose support for ath9k Dynack

Enables support for Dynack feature.

When a remote station is far away, we need to compensate for the distance
by allowing more time for an ACK to arrive back before issueing a retransmission.
Currently, it needs to be set fixed to indicate the maximum distance the remote
station will ever be.

While this mostly works for static antennae, it introduces 2 issues:
- If the actual distance is less, speed is reduced due to a lot of wates wait-time
- If the distance becomes greater, retries start to occur and comms can get lost.

Allowing to set it dynamically using dynack ensures the best possible tradeoff
between speed vs distance.

This feature is currently only supported in ath9k.
it is also disabled by default.

Enabling it can be done in 2 ways:
- issue cmd:  iw phy0 set distance auto
- sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink

Disabling it can be done by providing a valid fixed value.

To give an idea of a practical example:

In my usecase, we have mesh wifi device installed on ships/platforms.
Currently, the coverage class is set at 12000m fixed.

When a vessel moved closer (ex. 1500m), the measured link capacity was a lot
lower compared to setting the coverage class fixed to 1500m

Dynack completely solved this, nearly providing double the bandwidth at closer range
compared to the fixed setting of 12000m being used.

Also when a vessel sailed to a distance greater than the fixed setting,
communication was lost as the ACK's never arrived within the max allowed timeframe.

Actual distance: 6010m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        58 Mbit/s

Fixed 6300m:   51 Mbit/s
Dynack:        59 Mbit/s

Fixed 3000m:   13 Mbit/s  (lots of retries)
Dynack:        58 Mbit/s

Actual distance: 1504m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        86 Mbit/s

Fixed 6300m:   55 Mbit/s
Dynack:        87 Mbit/s

Fixed 3000m:   67 Mbit/s
Dynack:        87 Mbit/s

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agokernel: bump 4.14 to 4.14.54
Koen Vandeputte [Tue, 10 Jul 2018 09:52:53 +0000 (11:52 +0200)]
kernel: bump 4.14 to 4.14.54

Rereshed all patches

Reworked patches to match upstream:
335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agoqos-scripts: fix indentation
Moritz Warning [Tue, 10 Jul 2018 16:50:30 +0000 (18:50 +0200)]
qos-scripts: fix indentation

Signed-off-by: Moritz Warning <moritzwarning@web.de>
6 years agowireguard: bump to 0.0.20180708
Jason A. Donenfeld [Tue, 10 Jul 2018 19:29:18 +0000 (21:29 +0200)]
wireguard: bump to 0.0.20180708

* device: print daddr not saddr in missing peer error
* receive: style

Debug messages now make sense again.

* wg-quick: android: support excluding applications

Android now supports excluding certain apps (uids) from the tunnel.

* selftest: ratelimiter: improve chance of success via retry
* qemu: bump default kernel version
* qemu: decide debug kernel based on KERNEL_VERSION

Some improvements to our testing infrastructure.

* receive: use NAPI on the receive path

This is a big change that should both improve preemption latency (by not
disabling it unconditionally) and vastly improve rx performance on most
systems by using NAPI. The main purpose of this snapshot is to test out this
technique.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
6 years agoiproute2: update to 4.17.0
Hans Dedecker [Tue, 10 Jul 2018 10:19:40 +0000 (12:19 +0200)]
iproute2: update to 4.17.0

Update to the latest version of iproute2; see https://lwn.net/Articles/756991/
for a full overview of the changes in 4.17.
Remove upstream patch 002-json_print-fix-hidden-64-bit-type-promotion.
Backport upstream patch 001-rdma-sync-some-IP-headers-with-glibc fixing
rdma compile issue.
At the same time re-organize patch numbering so the OpenWRT specific
patches start at 100.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agohostapd: build with LTO enabled (using jobserver for parallel build)
Felix Fietkau [Tue, 10 Jul 2018 11:48:17 +0000 (13:48 +0200)]
hostapd: build with LTO enabled (using jobserver for parallel build)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agobinutils: remove version 2.27
Felix Fietkau [Tue, 10 Jul 2018 12:21:13 +0000 (14:21 +0200)]
binutils: remove version 2.27

Signed-off-by: Felix Fietkau <nbd@nbd.name>