openwrt/staging/xback.git
5 years agoar71xx: update qca-usb-quirks patch
Tomislav Požega [Fri, 19 Jul 2019 04:04:54 +0000 (06:04 +0200)]
ar71xx: update qca-usb-quirks patch

Base address for USB0 has changed from 0x18116c94 on AR934X
to 0x18116d94 on QCA9558. CP Typo remained for years here...

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
(cherry picked from commit fd5aa19480b92045db224a2d2450680e9fe66385)

5 years agomac80211: brcm: improve brcmfmac debugging of firmware crashes
Rafał Miłecki [Sun, 28 Jul 2019 12:09:20 +0000 (14:09 +0200)]
mac80211: brcm: improve brcmfmac debugging of firmware crashes

This provides a complete console messages dump.

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

5 years agomac80211: brcm: update brcmfmac 5.4 patches
Rafał Miłecki [Sun, 28 Jul 2019 11:52:47 +0000 (13:52 +0200)]
mac80211: brcm: update brcmfmac 5.4 patches

Use commits from wireless-drivers-next.git.

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

5 years agotfa-layerscape: fix create_pbl and byte_swap host build
Biwen Li [Fri, 26 Jul 2019 08:23:53 +0000 (16:23 +0800)]
tfa-layerscape: fix create_pbl and byte_swap host build

- make create_pbl and byte_swap as host tools

- fix a bug that maybe use the cross compiler
to compile create_pbl and byte_swap:

# -a option appends the image for Chassis 3 devices in case of non secure boot
aarch64-openwrt-linux-musl-gcc -Wall -Werror -pedantic -std=c99 -O2
 -DVERSION=v1.5(release):reboot-10604-ge9216b3336 -D_GNU_SOURCE -D_XOPEN_SOURCE=700
 -c -o create_pbl.o create_pbl.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
  LD      create_pbl
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
create_pbl.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:43: recipe for target create_pbl failed
make[4]: *** [create_pbl] Error 1
plat/nxp/tools/pbl_ch2.mk:45: recipe for target pbl failed
make[3]: *** [pbl] Error 2

- add tfa- prefix to all tools in order to avoid future clashes with
  other toolnames

Signed-off-by: Biwen Li <biwen.li@nxp.com>
[added missing HOST_CFLAGS, added tfa- prefix to the tools]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 83d5ca2186f7801d94f336e09f8db0a2c5c5d97f)

5 years agotfa-layerscape: fix fiptool host build
Petr Štetiar [Wed, 24 Jul 2019 14:00:39 +0000 (14:00 +0000)]
tfa-layerscape: fix fiptool host build

fiptool is a host tool, used in a firmware generation pipeline, but it's
not treated as such, leading to the build breakage on the hosts which
don't have {Open,Libre}SSL dev package installed:

 In file included from fiptool.h:16:0,
                 from fiptool.c:19:
 fiptool_platform.h:18:27: fatal error: openssl/sha.h:
 No such file or directory
  #  include <openssl/sha.h>

So this patch promotes fiptool into the host tool with proper host
include and library paths under STAGING_DIR.

Ref: https://github.com/openwrt/openwrt/pull/2267
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b8249cef9fedb1e2e3ed4f1b16382c6815e08df1)

5 years agoopenwrt-keyring: update to Git HEAD
Jo-Philipp Wich [Thu, 25 Jul 2019 17:39:51 +0000 (19:39 +0200)]
openwrt-keyring: update to Git HEAD

8080ef3 usign: add 19.07 release build pubkey
e24fe0d usign: use distro agnostic comments
251ded7 usign: fix filename of Stijn's usign key
14f0efc gpg: update snapshots public signing key
14f845b gpg: replace my public GPG key
4f735b8 gpg: add OpenWrt 19.07 signing key
228f8da gpg: add OpenWrt 18.06 v2 signing key
36057d9 gpg: update LEDE 17.01 public signing key
f2989ab Add my public GPG and usign key

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e9216b3336f7a774be7021dd663a433d9ec5edc7)

5 years agourngd: move project to git.openwrt.org
Petr Štetiar [Mon, 17 Jun 2019 13:25:40 +0000 (15:25 +0200)]
urngd: move project to git.openwrt.org

Let's move project to a proper place.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit bec8fb1ee7188bfe7eff0f39e060039623e2575e)

5 years agobuild: add urandom-seed and urngd to default packages set
Petr Štetiar [Mon, 20 May 2019 14:47:23 +0000 (16:47 +0200)]
build: add urandom-seed and urngd to default packages set

urandom-seed content was split from base-files into separate package so
in order to preserve the current functionality and to provide some
fallback mechanism in case jent-rng initialization fails in urngd we
need to add it back.

urngd is OpenWrt's micro non-physical true random number generator based
on timing jitter.

Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f5387b754f98f85bf4a1c8c392a965bdbcb96db6)

5 years agobase-files: move urandom seed bits into separate package
Petr Štetiar [Mon, 20 May 2019 14:38:33 +0000 (16:38 +0200)]
base-files: move urandom seed bits into separate package

So it's possible to install or remove it as needed.

Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 27bfde9c9f789dbfabebf13047e8b042c27cdeef)

5 years agoubox: move getrandom into separate getrandom package
Petr Štetiar [Mon, 20 May 2019 14:41:43 +0000 (16:41 +0200)]
ubox: move getrandom into separate getrandom package

So it's possible to install or remove it as needed.

Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 9b4de712cae9b3d745ea4331a804242505f58619)

5 years agourngd: add micro non-physical true RNG based on timing jitter
Petr Štetiar [Mon, 20 May 2019 12:02:20 +0000 (14:02 +0200)]
urngd: add micro non-physical true RNG based on timing jitter

μrngd is OpenWrt's micro non-physical true random number generator based
on timing jitter.

Using the Jitter RNG core, the rngd provides an entropy source that
feeds into the Linux /dev/random device if its entropy runs low. It
updates the /dev/random entropy estimator such that the newly provided
entropy unblocks /dev/random.

The seeding of /dev/random also ensures that /dev/urandom benefits from
entropy. Especially during boot time, when the entropy of Linux is low,
the Jitter RNGd provides a source of sufficient entropy.

Acked-by: Jo-Philip Wich <jow@mein.io>
Tested-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 714bd89fceee494282984d0ed76e4a3acde419e0)

5 years agomac80211: brcm: backport first set of 5.4 brcmfmac changes
Rafał Miłecki [Sun, 21 Jul 2019 09:23:32 +0000 (11:23 +0200)]
mac80211: brcm: backport first set of 5.4 brcmfmac changes

This doesn't include 9ff8614a3dbe ("brcmfmac: use separate Kconfig file
for brcmfmac") due to a few conflicts with backports changes.

An important change is:
[PATCH 2/7] brcmfmac: change the order of things in brcmf_detach()
which fixes a rmmod crash in the brcmf_txfinalize().

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

5 years agoramips: add support for ASUS RT-AC57U
David Bauer [Wed, 3 Jul 2019 12:50:14 +0000 (14:50 +0200)]
ramips: add support for ASUS RT-AC57U

SoC:   MediaTek MT7621AT
RAM:   128M (Winbond W631GG6KB-15)
FLASH: 16MB (Spansion S25FL128SA)
WiFi:  MediaTek MT7603EN bgn 2SS
WiFi:  MediaTek MT7612EN nac 2SS
BTN:   Reset - WPS
LED:    - Power
        - LAN {1-4}
        - WAN
        - WiFi 2.4 GHz
        - WiFi 5 GHz
        - USB
UART:  UART is present next to the Power LED.
       TX - RX - GND - 3V3 / 57600-8N1
       3V3 is the nearest one to the Power LED.

Installation
------------
Via TFTP:
1. Set your computers IP-Address to 192.168.1.75.
2. Power up the Router with the Reset button pressed.
3. Release the Reset button after 5 seconds.
4. Upload OpenWRT sysupgrade image via TFTP:
 > tftp -4 -v -m binary 192.168.1.1 -c put <IMAGE>

Via SSH:
Note: User/password for SSH is identical with the one used in the
Web-interface.
1. Complete the initial setup wizard.
2. Activate SSH under "Administration" -> "System".
3. Transfer the OpenWrt sysupgrade image via scp:
 > scp owrt.bin admin@192.168.1.1:/tmp
4. Connect via SSH to the router.
 > ssh admin@192.168.1.1
5. Write the OpenWrt image to flash.
 > mtd-write -i /tmp/owrt.bin -d linux
6. Reboot the router
 > reboot

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

5 years agoath79: add support for devolo WiFi pro 1750x
David Bauer [Tue, 11 Jun 2019 15:27:51 +0000 (17:27 +0200)]
ath79: add support for devolo WiFi pro 1750x

Hardware
--------
CPU:   Qualcomm Atheros QCA9558
RAM:   128M DDR2
FLASH: 16MiB
ETH:   1x Atheros AR8035 (PoE in)
WiFi2: QCA9558 3T3R
WiFi5: QCA9880 3T3R
BTN:   1x Reset
LED:   1x LED Power (non-controllable)
       1x LED Status (internal)
       1x LED LAN (controlled by PHY)
       1x LED WLAN
BEEP:  1x GPIO attached piezo beeper
UART:  3.3V GND TX RX (115200-N-8) (3.3V is square pad)
       Header is located next to external-LED header.

Installation
------------
Make sure you set a password for the root user as prompted on first
setup!

1. Upload OpenWRT sysupgrade image via SSH to the device.
Use /tmp as the destination folder on the device.
User is root, password the one set in the web interface.

2. Install OpenWRT with

> sysupgrade -n -F /tmp/<openwrt-image-name>

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

5 years agoar71xx: enable SGMII fixup on Mikrotik wAP AC
Etienne Champetier [Sun, 14 Jul 2019 02:43:28 +0000 (19:43 -0700)]
ar71xx: enable SGMII fixup on Mikrotik wAP AC

fixes intermittent loss of connectivity on 1Gbit port, with log message:
> 803x_aneg_done: SGMII link is not ok

Thanks to David Bauer for pointing me in the right direction.
I just had to figure out the right bus_id, which you find in this log:
> ag71xx ag71xx.1: connected to PHY at gpio-1:00 [uid=004dd074,
  driver=Atheros 8031 ethernet]

Fixes FS#2236

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
[Wrapped commit message - Fixed whitespace erors]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 2a7519e29d6cbbe1eb73623ef35add0ef596fb5f)

5 years agomt7620: disable image generation for Netgear EX2700
Petr Štetiar [Sat, 20 Jul 2019 21:40:20 +0000 (23:40 +0200)]
mt7620: disable image generation for Netgear EX2700

Image generation is currently failing on builbots due to the following
error:

 WARNING: Image file [...] mt7620-ex2700-squashfs-factory.bin is too big

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agox86: add modern network modules to Generic target
Alberto Bursi [Sun, 14 Jul 2019 01:11:00 +0000 (03:11 +0200)]
x86: add modern network modules to Generic target

Many Atom-based embedded/industrial x86 boards can't run 64bit operating
systems due to either processor or board firmware limitations, but they
have modern interfaces (PCIe) or have modern Intel gigabit controllers
onboard.  With the current default package selection for x86 Generic
target their network won't work.

Add the modern gigabit network modules needed or most likely going to be
used as add-in cards, similar to what is the list on x86_64 target.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[fixed whitespace issue]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit bb27cde2579b0273c464e5ccd3dda7d14e84fd23)

5 years agoath25: disable image generation for ubnt2 and ubnt5 devices
Petr Štetiar [Sat, 20 Jul 2019 06:57:23 +0000 (08:57 +0200)]
ath25: disable image generation for ubnt2 and ubnt5 devices

Image generations is currently failing on builbots due to the following
errors:

 mkfwimage -B XS2 -v XS2 [...] ath25-ubnt2-squashfs-sysupgrade.bin
 ERROR: Failed creating firmware layout description - error code: -2

 mkfwimage -B XS5 -v XS5 [...] ath25-ubnt5-squashfs-sysupgrade.bin
 ERROR: Failed creating firmware layout description - error code: -2

That cryptic -2 error simply means, that kernel+rootfs doesn't fit into
the firmware partition.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agogpio-button-hotplug: unify polled and interrupt code
David Bauer [Tue, 2 Jul 2019 21:57:18 +0000 (23:57 +0200)]
gpio-button-hotplug: unify polled and interrupt code

This patch unifies the polled and interrupt-driven gpio_keys code
paths as well implements consistent handling of the debounce
interval set for the GPIO buttons and switches.

Hotplug events will only be fired if

1. The input changes its state and remains stable for the duration
   of the debounce interval (default is 5 ms).

2. In the initial stable (no state-change for duration of the
   debounce interval) state once the driver module gets loaded.

   Switch type inputs will always report their stable state.
   Unpressed buttons will not trigger an event for the initial
   stable state. Whereas pressed buttons will trigger an event.
   This is consistent with upstream's gpio-key driver that uses
   the input subsystem (and dont use autorepeat).

Prior to this patch, this was handled inconsistently for interrupt-based
an polled gpio-keys. Hence this patch unifies the shared logic into the
gpio_keys_handle_button() function and modify both implementations to
handle the initial state properly.

The changes described in 2. ) . can have an impact on the
failsafe trigger. Up until now, the script checked for button
state changes. On the down side, this allowed to trigger the
failsafe by releasing a held button at the right time. On the
plus side, the button's polarity setting didn't matter.

Now, the failsafe will only engage when a button was pressed
at the right moment (same as before), but now it can
theoretically also trigger when the button was pressed the
whole time the kernel booted and well into the fast-blinking
preinit phase. However, the chances that this can happen are
really small. This is because the gpio-button module is usually
up and ready even before the preinit state is entered. So, the
initial pressed button event gets lost and most devices behave
as before.

Bisectors: If this patch causes a device to permanently go into
failsafe or experience weird behavior due to inputs, please
check the following:
 - the GPIO polarity setting for the button
 - the software-debounce value

Run-tested for 'gpio-keys' and 'gpio-keys-polled' on

 - devolo WiFi pro 1200e
 - devolo WiFi pro 1750c
 - devolo WiFi pro 1750x
 - Netgear WNDR4700
 - Meraki MR24
 - RT-AC58U

Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [further
cleanups, simplification and unification]
(cherry picked from commit 27f3f493de0610c74de2ea406641b256bfcc13a9)

5 years agogpio-button-hotplug: fix 4.19 build breakage on malta/be64
Petr Štetiar [Sat, 15 Jun 2019 09:28:05 +0000 (09:28 +0000)]
gpio-button-hotplug: fix 4.19 build breakage on malta/be64

While testing 4.19 build on malta/be64, I've encountered following
error:

 gpio-button-hotplug/gpio-button-hotplug.c:529:18: error: implicit
 declaration of function 'gpio_to_desc'

which is caused by the missing include fixed by this patch.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit dd6d82112a10796dd5aa0f9e9c76ec8e77e7e211)

5 years agoath79: Use -v1 suffix for TP-Link WDR3600/4300
Adrian Schmutzler [Sun, 16 Jun 2019 10:51:57 +0000 (12:51 +0200)]
ath79: Use -v1 suffix for TP-Link WDR3600/4300

In ath79, identifiers tplink_tl-wdr3600 and tplink_tl-wdr4300 have
been used while most other TP-Link devices include the revision.

Although there actually is only one major revision of these
devices, they bear the revision on their bottom (v1.x). TP-Link
also refers to the devices as V1 on its web page.

This patch thus adds -v1 to both so it is more consistent
with other devices and with what you would expect from reading
the on-device sticker and the support pages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoopenvpn: fix handling of list options
Matt Merhar [Sat, 22 Jun 2019 07:05:14 +0000 (03:05 -0400)]
openvpn: fix handling of list options

This addresses an issue where the list option specified in
/etc/config/openvpn i.e. 'tls_cipher' would instead show up in the
generated openvpn-<name>.conf as 'ncp-ciphers'. For context,
'ncp_ciphers' appears after 'tls_cipher' in OPENVPN_LIST from
openvpn.options.

Also, the ordering of the options in the UCI config file is now
preserved when generating the OpenVPN config. The two currently
supported list options deal with cipher preferences.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
(cherry picked from commit 1d4c4cbd20580dd211431ab58460a6eebd5e021e)

5 years agoath79: ar9330: add missing watchdog node
Petr Štetiar [Wed, 17 Jul 2019 13:19:54 +0000 (15:19 +0200)]
ath79: ar9330: add missing watchdog node

It was reported in FS#2385, that Carambola2 doesn't currently have
working watchdog so fix it by adding watchdog node.

Ref: FS#2385
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 0893f28e19afbd9d4081f59df10631d6ef02e0d7)

5 years agoiptables: update to 1.8.3
Deng Qingfang [Wed, 5 Jun 2019 20:24:44 +0000 (04:24 +0800)]
iptables: update to 1.8.3

Update iptables to 1.8.3

ChangeLog:
  https://netfilter.org/projects/iptables/files/changes-iptables-1.8.3.txt

Removed upstream patches:
- 001-extensions_format-security_fixes_in_libip.patch
- 002-include_fix_build_with_kernel_headers_before_4_2.patch
- 003-ebtables-vlan-fix_userspace_kernel_headers_collision.patch

Altered patches:
- 200-configurable_builtin.patch
- 600-shared-libext.patch

No notable size changes

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [lipibtc ABI_VERSION fix]
(cherry picked from commit 299f6cb2da0a443484339aaa51b3d9edcc21ce4e)

5 years agolibroxml: bump to the 3.0.2 version
Rafał Miłecki [Sun, 14 Jul 2019 20:24:54 +0000 (22:24 +0200)]
libroxml: bump to the 3.0.2 version

* Fix for memory leak regression
* Support for (un)escaping

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

5 years agofstools: add direct dependencies on libblobmsg-json and libjson-c
Petr Štetiar [Sun, 14 Jul 2019 20:10:37 +0000 (22:10 +0200)]
fstools: add direct dependencies on libblobmsg-json and libjson-c

The OpenWrt buildroot ABI version rebuild tracker does not handle
transient dependencies, therefore add all libraries linked by
block-mount and blockd as direct dependencies to the corresponding
binary package definition.

This ensures that block-mount and blockd is automatically rebuilt and
relinked if any of these libraries has its ABI_VERSION updated in the
future.

Fixes: FS#2373
[jow: similar fix for procd and 98.42% of commit message]
Signed-off-by: Jo-Philip Wich <jow@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit cbae306815bdfc335eeedc35dc5df3d2d4021a2a)

5 years agobusybox: strip off ALTERNATIVES spec
Yousong Zhou [Fri, 14 Jun 2019 01:49:42 +0000 (01:49 +0000)]
busybox: strip off ALTERNATIVES spec

Now that busybox is a known alternatives provider by opkg, we remove the
ALTERNATIVES spec and add a note to make the implicit situation clear

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry-picked from commit 62be427067ee3883b68bcfb08dfc0c43dce22fa3)

5 years agoopkg: bump to version 2019-06-14
Yousong Zhou [Fri, 14 Jun 2019 01:44:15 +0000 (01:44 +0000)]
opkg: bump to version 2019-06-14

Opkg starting from this version special-cases busybox as alternatives
provider.  There should be no need to add entries to ALTERNATIVES of
busybox package

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry-picked from commit e51b513f75d28306a744637b0fbe7fdd6e3fb813)

5 years agoar71xx: fix nand init issues on some rb2011 devices
Koen Vandeputte [Wed, 27 Mar 2019 09:36:41 +0000 (10:36 +0100)]
ar71xx: fix nand init issues on some rb2011 devices

While flashing lots of RB2011 devices, I noticed that
some of them refused to boot properly, failing over the NAND parameters.

Checking in detail shows that some device seem to use another NAND flash
which only support standard 2048-byte pages, without 512-byte subpage support.

This commit disables usage of these small subpage completely.

Advantages:
- Both NAND's with(out) subpage support are working now
- The nand speed increases a bit (measured roughly 1%) in typical usecases

Disadvantages:
- The maximum storage capacity decreases by ~0.2%
as small changes can consume a full page (2048 bytes) now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: delete leftovers from unused kernel versions
Koen Vandeputte [Fri, 12 Jul 2019 07:35:23 +0000 (09:35 +0200)]
kernel: delete leftovers from unused kernel versions

Commit 000d400baa0a ("kernel: drop everything not on kernel version 4.14")
dropped everything not related to kernel 4.14, but forgot
to remove the parts in kernel-version.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.133
Koen Vandeputte [Wed, 10 Jul 2019 14:51:07 +0000 (16:51 +0200)]
kernel: bump 4.14 to 4.14.133

Refreshed all patches.

Fixes:

- CVE-2019-3900

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agomac80211: Do not build b43legacy on BRCM47xx mips74 subtarget
Hauke Mehrtens [Thu, 11 Jul 2019 23:12:11 +0000 (01:12 +0200)]
mac80211: Do not build b43legacy on BRCM47xx mips74 subtarget

b43legacy needs ssb support and we do not compile the mips74 subtarget
of the brcm47xx target with SSB support. This causes a build failure in
the mac80211 package and only some of the kernel modules are being
created.

I am not aware of any device with a BRCM47xx mips74 CPU which uses a
b43legacy compatible device.

Fixes: FS#2334
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit e05310b9b80f944c718374b449b6fe48d06d412d)

5 years agokernel: cherry pick patch removing __linux__ check
Fredrik Olofsson [Thu, 4 Jul 2019 11:58:15 +0000 (13:58 +0200)]
kernel: cherry pick patch removing __linux__ check

This is already included in newer upstream. Needed to build BPF programs
using the MIPS kernel include files.

Without this patch, clang fails with "#error Use a Linux compiler or
give up." in sgidefs.h when building BPF programs.

Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
(cherry-picked from commit 7d96c301d6afc9f360c26b404e435e8e03c1e207)

5 years agobase-files: Fix path check in get_mac_binary
Adrian Schmutzler [Mon, 8 Jul 2019 08:17:28 +0000 (10:17 +0200)]
base-files: Fix path check in get_mac_binary

Logic was inverted when changing from string check to file check.
Fix it.

Fixes: 8592602d0a88 ("base-files: Really check path in get_mac_binary")
Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 6ed3349308b24a6bac753643970a1f9f56ff6070)

5 years agokernel: bump 4.14 to 4.14.132
Koen Vandeputte [Tue, 9 Jul 2019 10:18:31 +0000 (12:18 +0200)]
kernel: bump 4.14 to 4.14.132

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agowolfssl: Fix package hash
Hauke Mehrtens [Mon, 8 Jul 2019 14:55:14 +0000 (16:55 +0200)]
wolfssl: Fix package hash

Fixes: 3167a57f7262 ("wolfssl: update to 3.15.7, fix Makefile")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agonetsupport: move out mqprio from kmod-sched
Konstantin Demin [Fri, 28 Jun 2019 18:30:50 +0000 (21:30 +0300)]
netsupport: move out mqprio from kmod-sched

Currently, there's unable to install "kmod-sched-mqprio" after
"kmod-sched" (or vice versa), because "sch_mqprio.ko" is
shipped in both packages.

Fixes: f83522fa6361 ("linux: Add kmod-sched-mqprio")
Fixes: 6af639e0bf78 ("linux: Add kmod-sched-act-vlan")
Fixes: 72c7e2dc467c ("linux: Add kmod-sched-flower")
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
[Add cls_flower and act_vlan]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agowolfssl: update to 3.15.7, fix Makefile
Eneas U de Queiroz [Mon, 1 Jul 2019 16:39:59 +0000 (13:39 -0300)]
wolfssl: update to 3.15.7, fix Makefile

This includes a fix for a medium-level potential cache attack with a
variant of Bleichenbacher’s attack.  Patches were refreshed.
Increased FP_MAX_BITS to allow 4096-bit RSA keys.
Fixed poly1305 build option, and some Makefile updates.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 2792daab5ad26e916619052fc7f581cddc1ea53c)

5 years agobase-files: Really check path in get_mac_binary
Adrian Schmutzler [Thu, 4 Jul 2019 21:28:44 +0000 (23:28 +0200)]
base-files: Really check path in get_mac_binary

Currently, path argument is only checked for being not empty.

This changes behavior to actually check whether path exists.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agompc85xx: Use gzip compressed kernel on HiveAP-330
Pawel Dembicki [Thu, 4 Jul 2019 11:17:02 +0000 (13:17 +0200)]
mpc85xx: Use gzip compressed kernel on HiveAP-330

After commit 1e41de2f48 ("mpc85xx: convert TL-WDR4900 v1 to simpleImage")
XZ compression of zImage was enabled. This change exposed a problem with
the HiveAP-330 images, which was fixed by foregoing the compression on
the kernel altogether with commit 98089bb8ba8
("mpc85xx: Use uncompressed kernel on the HiveAP-330").

This patch adds back the gzip compression of the kernel image by
utilizing the generic OpenWRT uImage method instead of relying on
the PowerPC bootwrapper script that did it previously.

Compile-tested: p1020/hiveap-330

Tested-by: Chris Blake <chrisrblake93@gmail.com> [run-tested]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[filled in even more text]

5 years agolantiq: enable STP where referenced
Mathias Kresin [Wed, 3 Jul 2019 07:23:35 +0000 (09:23 +0200)]
lantiq: enable STP where referenced

While moving common used parts to dtsi files, the was disabled by
default but not enabled for all boards using the STP.

Fixes: f519fea4c6db ("lantiq: kernel 4.14: cleanup dts files")
Reported-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
5 years agoar71xx: fix ath79/rb4xx IRQ initialization on kernel 4.14
W. Michael Petullo [Sun, 30 Jun 2019 00:06:20 +0000 (20:06 -0400)]
ar71xx: fix ath79/rb4xx IRQ initialization on kernel 4.14

Apply the same approach as in commit 3b53d6fdbc24 ("ar71xx: fix pci irq
init on kernel 4.14") to fix IRQ initialization for ath79-based chipsets
on rb4xx.

Ref: PR#2182
Acked-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: W. Michael Petullo <mike@flyn.org>
[commit ref fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8c7d6c47a7893db689e50e1917479ad07a96547a)

5 years agofstools: block-mount: fix restart of fstab service
Karel Kočí [Wed, 5 Jun 2019 11:18:41 +0000 (13:18 +0200)]
fstools: block-mount: fix restart of fstab service

Restarting service causes file-systems to be unmounted without being
mounted back. When this service was obsoleted it should have been
implemented in a way that all actions are ignored. Up to this commit
default handler was called when restart was requested. This default
handler just simply calls stop and start. That means that stop called
unmount but start just printed that this service is obsoleted.

This instead implements restart that just prints same message like start
does. It just calls start in reality. This makes restart unavailable for
call.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
(cherry picked from commit 3ead9e7b743b1fbd3b07f5a72a16999abbec9347)

5 years agomvebu: Fix platform.sh for non-generic espressobin versions
Brett Mastbergen [Tue, 25 Jun 2019 20:03:48 +0000 (16:03 -0400)]
mvebu: Fix platform.sh for non-generic espressobin versions

When the non-generic espressobin targets were added these board checks
were not updated.   One side effect of this is that config is not saved
during an upgrade of -emmc,-v7, or -v7-emmc devices.

Signed-off-by: Brett Mastbergen <bmastbergen@untangle.com>
(cherry picked from commit 95c1dc5e8678a1fd87234a4d77c8c6643703023c)

5 years agomvebu: fix regression for non-generic ESPRESSObin versions
Vladimir Vid [Fri, 7 Jun 2019 13:50:50 +0000 (15:50 +0200)]
mvebu: fix regression for non-generic ESPRESSObin versions

When targets for multiple ESPRESSObin devices were added, not all
files were updated which means any ESPRESSObin version beside generic
won't have proper networking, sysupgrade and uboot-env. This patch
fixes the issue.

* fixup network detection
* fixup uboot-env
* fixup platform.sh for sysupgrade

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
(cherry picked from commit bc47285cb3c0125424e628521f905f1f0d7b4cef)

5 years agomvebu: image: fix generic-arm64.bootscript mmc selection
Vladimir Vid [Fri, 7 Jun 2019 13:58:15 +0000 (15:58 +0200)]
mvebu: image: fix generic-arm64.bootscript mmc selection

Not all versions of ESPRESSObin require SD card, but can
be booted from the internal emmc flash (mmc dev 1) instead.
Add a simple check in the bootscript to see which mmc device
is detected and boot from it using mmcdev variable.

Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
(cherry picked from commit 008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4)

5 years agobase-files: use OPENWRT prefix for os-release variables
Bjørn Mork [Tue, 25 Jun 2019 12:20:53 +0000 (14:20 +0200)]
base-files: use OPENWRT prefix for os-release variables

Just stumbled across this LEDE legacy, without finding any real reason
to keep it.  There is a single LEDE_DEVICE_MANUFACTURER_URL dependency
in the luci feed repo which needs to be syncronized.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
[re-added missing commit message]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8a34a54b6aa6e9a5e2983d554fd5b97bec97e891)

5 years agoramips: mt7621: add IRQ for GPIO node
Chuanhong Guo [Tue, 25 Jun 2019 15:19:41 +0000 (23:19 +0800)]
ramips: mt7621: add IRQ for GPIO node

This makes interrupt-based gpio-keys working.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
(cherry picked from commit 110daa16e44bb53941a18396ab6a7d9fdd1fa362)

5 years agouqmi: bump to latest git HEAD
Koen Vandeputte [Thu, 20 Jun 2019 11:08:30 +0000 (13:08 +0200)]
uqmi: bump to latest git HEAD

1965c7139374 uqmi: add explicit check for message type when expecting a response
01944dd7089b uqmi_add_command: fixed command argument assignment

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit 47986dc6ea1d643cd348501da09cd2e3ee2f9ee1)

5 years agokernel: bump 4.14 to 4.14.131
Koen Vandeputte [Thu, 27 Jun 2019 10:37:28 +0000 (12:37 +0200)]
kernel: bump 4.14 to 4.14.131

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agolayerscape: drop pause frame support for aquantia phy
Yangbo Lu [Wed, 12 Jun 2019 06:11:32 +0000 (14:11 +0800)]
layerscape: drop pause frame support for aquantia phy

An aquantia phy patch which dropped pause frame support was
missing when integrated LSDK-19.03 kernel patches into OpenWrt.
Without this patch, LS1043A 10G port would not work. So apply it.

Patch link
https://source.codeaurora.org/external/qoriq/qoriq-components/
linux/commit/?h=linux-4.14&id=66346b115818365cfaf99d292871b19f0a1d2850

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
5 years agokernel: bump 4.14 to 4.14.130
Koen Vandeputte [Tue, 25 Jun 2019 10:54:12 +0000 (12:54 +0200)]
kernel: bump 4.14 to 4.14.130

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoapm821xx: fix bogus key-presses on boot
Christian Lamparter [Sat, 15 Jun 2019 17:13:30 +0000 (19:13 +0200)]
apm821xx: fix bogus key-presses on boot

"There are often transient line events when
the system is powered up and initialized and it
is often necessary for the gpio_chip driver to
clear any interrupt flags in hardware before
setting up the gpio chip, especially the
irqchip portions of it."
<http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017630.html>

This patch adds a fix for the APM821XX's interrupt
controller to clear any bogus pending toggled
interrupts that happens on various APM821XX boards
on boot.

The patch also changes the debouce-interval from the
default 5ms debounce interval to 60ms all around.
The default setting caused on occasions that the button
state became stuck in a pressed state, even though the
button was released.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agompc85xx: Use uncompressed kernel on the HiveAP-330
Chris Blake [Mon, 24 Jun 2019 11:32:45 +0000 (06:32 -0500)]
mpc85xx: Use uncompressed kernel on the HiveAP-330

It seems that newer builds of OpenWRT have a gzip kernel
larger than 2MB~, which for some reason fails to boot on this board.

However, we have 8MB of kernel space and currently the uncompressed
kernel is 6.5MB~, so we have some space to grow until a better
solution is worked out.

Before:
 ## Booting kernel from Legacy Image at ee840000 ...
  Image Name:   Linux-4.19.53
  Created:      2019-06-22  11:17:48 UTC
  Image Type:   PowerPC Linux Kernel Image (gzip compressed)
  Data Size:    2315724 Bytes =  2.2 MB
  Load Address: 00000000
  Entry Point:  00000000
  Verifying Checksum ... OK
 ## Loading init Ramdisk from Legacy Image at 02000000 ...
  Image Name:   OpenWrt fake ramdisk
  Created:      2019-06-22  11:17:48 UTC
  Image Type:   PowerPC Linux RAMDisk Image (uncompressed)
  Data Size:    0 Bytes =  0 kB
  Load Address: 00000000
  Entry Point:  00000000
  Verifying Checksum ... OK
 ## Flattened Device Tree blob at ec000000
  Booting using the fdt blob at 0xec000000
  Uncompressing Kernel Image ... Error: Bad gzipped data
  GUNZIP: uncompress, out-of-mem or overwrite error -
must RESET board to recover
  Loading Ramdisk to 10000000, end 10000000 ... OK
  Loading Device Tree to 00ffa000, end 00fffc78 ... OK
  ft_fixup_l2cache: FDT_ERR_NOTFOUND

After:
 ## Booting kernel from Legacy Image at ee840000 ...
  Image Name:   POWERPC OpenWrt Linux-4.19.53
  Created:      2019-06-22  11:17:48 UTC
  Image Type:   PowerPC Linux Kernel Image (uncompressed)
  Data Size:    6724584 Bytes =  6.4 MB
  Load Address: 00000000
  Entry Point:  00000000
  Verifying Checksum ... OK
 ## Loading init Ramdisk from Legacy Image at 02000000 ...
  Image Name:   OpenWrt fake ramdisk
  Created:      2019-06-22  11:17:48 UTC
  Image Type:   PowerPC Linux RAMDisk Image (uncompressed)
  Data Size:    0 Bytes =  0 kB
  Load Address: 00000000
  Entry Point:  00000000
  Verifying Checksum ... OK
 ## Flattened Device Tree blob at ec000000
  Booting using the fdt blob at 0xec000000
  Loading Kernel Image ... OK
  OK
  Loading Ramdisk to 10000000, end 10000000 ... OK
  Loading Device Tree to 00ffa000, end 00fffc78 ... OK

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [75 cpl limit]
5 years agoipq40xx: Linksys: sysupgrade: Ensure OEM volumes are removed
Jeff Kletsky [Sat, 15 Jun 2019 21:40:56 +0000 (14:40 -0700)]
ipq40xx: Linksys: sysupgrade: Ensure OEM volumes are removed

When OEM volumes are present in the [alt_]firmware partition,
sysupgrade will write a new kernel, but will fail to write
the root file system. The next boot will hang indefinitely

    Waiting for root device /dev/ubiblock0_0...

Modified ipq40xx/base-files/lib/upgrade/linksys.sh
to remove both `squashfs` and `ubifs` if found
on the target firmware partition's UBI device.

Run-tested-on: Linksys EA8300

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[applied some shellcheck suggestions as well]

5 years agokernel: bump 4.14 to 4.14.129
Koen Vandeputte [Mon, 24 Jun 2019 11:45:24 +0000 (13:45 +0200)]
kernel: bump 4.14 to 4.14.129

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agomac80211: update WDS/4addr fix to the version accepted upstream
Stefan Lippers-Hollmann [Sat, 15 Jun 2019 04:35:06 +0000 (06:35 +0200)]
mac80211: update WDS/4addr fix to the version accepted upstream

This updates "{nl,mac}80211: allow 4addr AP operation on crypto
controlled devices" to the version (v3), which was accepted into
upstream mac80211.git and which is tagged for -stable backporting
(v4.18+).

https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git/commit/?id=33d915d9e8ce811d8958915ccd18d71a66c7c495

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[format-patch]

5 years agoiproute2: update ctinfo support
Kevin Darbyshire-Bryant [Wed, 19 Jun 2019 19:25:43 +0000 (20:25 +0100)]
iproute2: update ctinfo support

Follow upstream changes - header file changes only
no functional or executable changes, hence no package bump
required

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit a8f0c02f80fa0c7c55702770b3ca99f6db5405e7)

5 years agokernel: update act_ctinfo
Kevin Darbyshire-Bryant [Wed, 19 Jun 2019 19:21:35 +0000 (20:21 +0100)]
kernel: update act_ctinfo

Follow upstream changes - header file changes
no executable  difference at all

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 5273fb6b21b953428e2f9ea5892872db5aaf22c1)

5 years agoath79: Add SUPPORTED_DEVICES for Archer C7 v1/v2
Adrian Schmutzler [Wed, 17 Apr 2019 13:45:52 +0000 (15:45 +0200)]
ath79: Add SUPPORTED_DEVICES for Archer C7 v1/v2

The identifier for both devices is "archer-c7" on ar71xx, set here:
https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/lib/ar71xx.sh#L348
https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/lib/ar71xx.sh#L511

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: fix uci led oneshot/timer trigger
Robinson Wu [Tue, 4 Jun 2019 03:13:39 +0000 (11:13 +0800)]
base-files: fix uci led oneshot/timer trigger

This patch adds a missing type property which prevented
the creation of oneshot and timer led triggers when they
are specified in the /etc/board.d/01_leds files.

i.e.:

ucidef_set_led_timer "system" "system" "zhuotk:green:system" "1000" "1000"

Fixes: b06a286a4861 ("base-files: cleanup led functions in uci-defaults.sh")
Signed-off-by: Robinson Wu <wurobinson@qq.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agokernel: bump 4.14 to 4.14.128
Koen Vandeputte [Thu, 20 Jun 2019 07:49:08 +0000 (09:49 +0200)]
kernel: bump 4.14 to 4.14.128

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoar71xx: base-files: fix board detect on new MikroTik devices
Henryk Heisig [Sat, 23 Mar 2019 08:35:11 +0000 (08:35 +0000)]
ar71xx: base-files: fix board detect on new MikroTik devices

Move all MikroTik devices to new function to increase script execution
speed.

Machine name in new version of MikroTik RouterBOARD devices add "RB"
before model name:

 Old machine name: MikroTik RouterBOARD 951Ui-2nD
 New:              MikroTik RouterBOARD RB951Ui-2nD

So this patch should fix it for all currently supported MikroTik boards.

Tested-by: Cezary Jackiewicz <cezary@eko.one.pl> [wAP R-2nD]
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
[rebased,commit message facelift,script fixes]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[spotted missing 922UAGS-5HPacD]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.127
Koen Vandeputte [Tue, 18 Jun 2019 10:28:39 +0000 (12:28 +0200)]
kernel: bump 4.14 to 4.14.127

Refreshed all patches.

Fixes:

- CVE-2019-11479
- CVE-2019-11478
- CVE-2019-11477

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.126
Koen Vandeputte [Mon, 17 Jun 2019 11:40:04 +0000 (13:40 +0200)]
kernel: bump 4.14 to 4.14.126

Refreshed all patches.

Altered patches:
- 816-pcie-support-layerscape.patch

This patch also restores the initial implementation
of the ath79 perfcount IRQ issue. (78ee6b1a40b5)
It was wrongfully backported upstream initially and got reverted now.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agomvebu: fixes commit 4089df4f4b0d
George Amanakis [Thu, 13 Jun 2019 04:03:38 +0000 (00:03 -0400)]
mvebu: fixes commit 4089df4f4b0d

err_free_stats has been deprecated. Replace with err_netdev.

Compile-tested on: mvebu
Runtime-tested on: mvebu

Fixes: 4089df4f4b0d ("kernel: bump 4.14 to 4.14.125 (FS#2305 FS#2297)")
Signed-off-by: George Amanakis <gamanakis@gmail.com>
[altered hashes]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit 1e3800df1808b4a5a977c3a9651958611df51c83)

5 years agokernel: backport 4.18 patch adding DMI_PRODUCT_SKU
Rafał Miłecki [Mon, 17 Jun 2019 04:53:07 +0000 (06:53 +0200)]
kernel: backport 4.18 patch adding DMI_PRODUCT_SKU

It's needed for applying some hardware quirks. This fixes:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c:60:20: error: 'DMI_PRODUCT_SKU' undeclared here (not in a function); did you mean 'DMI_PRODUCT_UUID'?
    DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),

Fixes: c52054e568d1 ("mac80211: brcm: backport remaining brcmfmac 5.2 patches")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 4d11c4c3784196ed3e5b5a1f81fa415d99ef32b0)

5 years agomac80211: brcm: backport remaining brcmfmac 5.2 patches
Rafał Miłecki [Sun, 16 Jun 2019 16:56:15 +0000 (18:56 +0200)]
mac80211: brcm: backport remaining brcmfmac 5.2 patches

This improves FullMAC firmware compatibility, adds logging in case of
firmware crash and *may* fix "Invalid packet id" errors.

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

5 years agomac80211: refresh patches
Christian Lamparter [Sat, 15 Jun 2019 17:51:28 +0000 (19:51 +0200)]
mac80211: refresh patches

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoiwinfo: update PKG_MIRROR_HASH
Christian Lamparter [Fri, 14 Jun 2019 22:45:58 +0000 (00:45 +0200)]
iwinfo: update PKG_MIRROR_HASH

This patch updates the PKG_MIRROR_HASH to match the one
of the current version.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoath10k-ct: adjust tx power reduction for US regulatory domain
Sven Eckelmann [Tue, 11 Jun 2019 12:53:12 +0000 (14:53 +0200)]
ath10k-ct: adjust tx power reduction for US regulatory domain

FCC allows maximum antenna gain of 6 dBi. 15.247(b)(4):

> (4) The conducted output power limit
> specified in paragraph (b) of this section
> is based on the use of antennas
> with directional gains that do not exceed
> 6 dBi. Except as shown in paragraph
> (c) of this section, if transmitting
> antennas of directional gain greater
> than 6 dBi are used, the conducted
> output power from the intentional radiator
> shall be reduced below the stated
> values in paragraphs (b)(1), (b)(2),
> and (b)(3) of this section, as appropriate,
> by the amount in dB that the
> directional gain of the antenna exceeds
> 6 dBi.

https://www.gpo.gov/fdsys/pkg/CFR-2013-title47-vol1/pdf/CFR-2013-title47-vol1-sec15-247.pdf

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years agoath10k-ct: fix max antenna gain unit
Sven Eckelmann [Tue, 11 Jun 2019 12:53:12 +0000 (14:53 +0200)]
ath10k-ct: fix max antenna gain unit

Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB
steps). This isn't the case for max_antenna_gain - which is still expected
by the firmware as dB.

The firmware is converting it from dB to the internal (twicepower)
representation when it calculates the limits of a channel. This can be seen
in tpc_stats when configuring "12" as max_antenna_gain. Instead of the
expected 12 (6 dB), the tpc_stats shows 24 (12 dB).

Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years agomac80211: ath10k: adjust tx power reduction for US regulatory domain
Sven Eckelmann [Tue, 11 Jun 2019 12:53:12 +0000 (14:53 +0200)]
mac80211: ath10k: adjust tx power reduction for US regulatory domain

FCC allows maximum antenna gain of 6 dBi. 15.247(b)(4):

> (4) The conducted output power limit
> specified in paragraph (b) of this section
> is based on the use of antennas
> with directional gains that do not exceed
> 6 dBi. Except as shown in paragraph
> (c) of this section, if transmitting
> antennas of directional gain greater
> than 6 dBi are used, the conducted
> output power from the intentional radiator
> shall be reduced below the stated
> values in paragraphs (b)(1), (b)(2),
> and (b)(3) of this section, as appropriate,
> by the amount in dB that the
> directional gain of the antenna exceeds
> 6 dBi.

https://www.gpo.gov/fdsys/pkg/CFR-2013-title47-vol1/pdf/CFR-2013-title47-vol1-sec15-247.pdf

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years agomac80211: ath10k: fix max antenna gain unit
Sven Eckelmann [Tue, 11 Jun 2019 12:53:12 +0000 (14:53 +0200)]
mac80211: ath10k: fix max antenna gain unit

Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB
steps). This isn't the case for max_antenna_gain - which is still expected
by the firmware as dB.

The firmware is converting it from dB to the internal (twicepower)
representation when it calculates the limits of a channel. This can be seen
in tpc_stats when configuring "12" as max_antenna_gain. Instead of the
expected 12 (6 dB), the tpc_stats shows 24 (12 dB).

Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years agomac80211: ath9k: Increase allowed antenna gain to 6 dBi
Sven Eckelmann [Tue, 11 Jun 2019 12:46:28 +0000 (14:46 +0200)]
mac80211: ath9k: Increase allowed antenna gain to 6 dBi

FCC allows maximum antenna gain of 6 dBi. 15.247(b)(4):

> (4) The conducted output power limit
> specified in paragraph (b) of this section
> is based on the use of antennas
> with directional gains that do not exceed
> 6 dBi. Except as shown in paragraph
> (c) of this section, if transmitting
> antennas of directional gain greater
> than 6 dBi are used, the conducted
> output power from the intentional radiator
> shall be reduced below the stated
> values in paragraphs (b)(1), (b)(2),
> and (b)(3) of this section, as appropriate,
> by the amount in dB that the
> directional gain of the antenna exceeds
> 6 dBi.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years agokernel: mt29f_spinand: fix memory leak during page program
Mantas Pucka [Tue, 11 Jun 2019 14:08:48 +0000 (17:08 +0300)]
kernel: mt29f_spinand: fix memory leak during page program

Memory is allocated with devm_kzalloc() on every page program
and leaks until device is closed (which never happens).

Convert to kzalloc() and handle error paths manually.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
5 years agoiwinfo: update to latest git HEAD
Koen Vandeputte [Wed, 12 Jun 2019 12:41:51 +0000 (14:41 +0200)]
iwinfo: update to latest git HEAD

1372f47eff34 iwinfo: Add Mikrotik R11e-5HnDr2

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.125 (FS#2305 FS#2297)
Koen Vandeputte [Tue, 11 Jun 2019 16:25:36 +0000 (18:25 +0200)]
kernel: bump 4.14 to 4.14.125 (FS#2305 FS#2297)

Refreshed all patches.

This bump contains upstream commits which seem to avoid (not properly fix)
the errors as seen in FS#2305 and FS#2297

Altered patches:
- 403-net-mvneta-convert-to-phylink.patch
- 410-sfp-hack-allow-marvell-10G-phy-support-to-use-SFP.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: drop everything not on kernel version 4.14
Daniel Golle [Tue, 11 Jun 2019 23:14:25 +0000 (01:14 +0200)]
kernel: drop everything not on kernel version 4.14

 * Remove testing patches for kernel version 4.19
 * remove targets ar7, ixp4xx, orion
Those targets are still on kernel 4.9, patches for 4.14 were not ready
in time. They may be readded once people prepare and test patches for
kernel 4.14.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agodnsmasq: move feature detection inside a shell func
Yousong Zhou [Tue, 11 Jun 2019 08:26:27 +0000 (08:26 +0000)]
dnsmasq: move feature detection inside a shell func

Resolves openwrt/packages#9219

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 04b45d3a31fac45c472ad3c31d98268d1c309763)

5 years agoOpenWrt v19.07: set branch defaults
Alexander Couzens [Mon, 10 Jun 2019 20:16:09 +0000 (22:16 +0200)]
OpenWrt v19.07: set branch defaults

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years agoversion.mk: use https:// instead of http://
Alexander Couzens [Mon, 10 Jun 2019 23:49:30 +0000 (01:49 +0200)]
version.mk: use https:// instead of http://

Only the repo should not use https. Otherwise the build would need
a wget/uclient_fetch with tls support.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years agoreplace links towards lede-project.org with openwrt.org
Alexander Couzens [Mon, 10 Jun 2019 23:38:46 +0000 (01:38 +0200)]
replace links towards lede-project.org with openwrt.org

Modify VERSION_SUPPORT_URL VERSION_REPO
Replace BUGS variable in toolchain/gcc/common.mk

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years agotoolchain: replace LEDE in help text
Karl Pálsson [Wed, 5 Jun 2019 17:16:52 +0000 (17:16 +0000)]
toolchain: replace LEDE in help text

Use generic wording.

Signed-off-by: Karl Pálsson <karlp@etactica.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [fixed a -> á]
5 years agoramips: Remove redundant LED-cases
Kristian Evensen [Thu, 6 Jun 2019 16:27:39 +0000 (18:27 +0200)]
ramips: Remove redundant LED-cases

01_leds has several redundant LED-cases. This commit cleans
up the file by merging these cases into shared cases.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
5 years agoath79: Add support for TP-Link Archer C25 v1
Adrian Schmutzler [Thu, 9 May 2019 12:55:16 +0000 (14:55 +0200)]
ath79: Add support for TP-Link Archer C25 v1

The TP-Link Archer C25 is a low-cost dual-band router.

Specification:

- CPU: Atheros QCA9561 775 MHz
- RAM: 64 MB
- Flash: 8 MB
- Wifi: 3x3 2.4 GHz (integrated), 1x1 5 GHz QCA9887
- NET: 5x 10/100 Mbps Ethernet

Some LEDs are controlled by an additional 74HC595 chip, but not
all of them as e.g. for the C59.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: Reorder some TP-Link Archer devices in 01_leds
Adrian Schmutzler [Wed, 5 Jun 2019 11:50:21 +0000 (13:50 +0200)]
ath79: Reorder some TP-Link Archer devices in 01_leds

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: mt7620: select kmod-rt2800-pci driver for RT5592
Deng Qingfang [Fri, 7 Jun 2019 16:40:32 +0000 (00:40 +0800)]
ramips: mt7620: select kmod-rt2800-pci driver for RT5592

ASUS RP-N53 and Buffalo WHR-600D use RT5592 for 5GHz wireless
After commit 367813b9b17 the driver for RT5592 (rt2800pci)
is not selected by default anymore, which broke their 5GHz wireless
Add it back to device packages

Fixes: 367813b9b17 ("ramips: mt7620: fix dependencies")
Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agoath79: migrate Archer C7 5GHz radio device paths
David Santamaría Rogado [Tue, 4 Jun 2019 20:06:17 +0000 (22:06 +0200)]
ath79: migrate Archer C7 5GHz radio device paths

When upgrading a TP-Link Archer C7 v2 from ar71xx to ath79,
the 5ghz radio stops working because the device path changed.

Some people subtitute the unsupported QCA9880v1 in the Archer v1
with supported QCA9880v2 radio. Since the stock radio doesn't
work, so it's safe to apply the change also for the Archer v1
images as well.

Also this patch renames the migration file and variables from
wmac to wifi.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[removed comment, added return 0 (not that it matters since uci is
clever, see 00-wmac-migration thread), reworded commit message]

5 years agoath79: Consistently label art partition with lower case
Adrian Schmutzler [Wed, 5 Jun 2019 13:59:30 +0000 (15:59 +0200)]
ath79: Consistently label art partition with lower case

This patch harmonizes the label and alias for art partitions
across ath79. Since lower case seems to be more frequent, use that
consistently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: Read MAC addresses from flash in 11-ath10k-caldata
Adrian Schmutzler [Wed, 5 Jun 2019 13:31:32 +0000 (15:31 +0200)]
ath79: Read MAC addresses from flash in 11-ath10k-caldata

In commit c3a8518 eth0 and eth1 have been swapped for some devices,
but 11-ath10k-caldata has not been updated.
Instead of fixing this by swapping eth0/eth1, this patch will read
addresses from flash (as done for several devices already) so
adjustments due to eth order become obsolete.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: Consistently label info partition
Adrian Schmutzler [Wed, 5 Jun 2019 13:17:01 +0000 (15:17 +0200)]
ath79: Consistently label info partition

The info/product-info partition, which frequently contains MAC
adresses, is typically assigned the 'info' alias in DTS, but
then labelled with 'info', 'product-info' or 'config'.

This leads to different aliases if used for setting MAC adresses
in DTS compared to when using e.g. mtd_get_mac_binary. Occationally,
also multiple switch-case entries are used just because of different
labelling.

This patch relabels those partitions in ath79 to consistently use
'info'.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agompc85xx: re-enable TL-WDR4900v1 images
Pawel Dembicki [Thu, 23 May 2019 18:41:50 +0000 (20:41 +0200)]
mpc85xx: re-enable TL-WDR4900v1 images

This reverts commit 324e94f31bfd ("mpc85xx: disable bricking TL-WDR4900v1 images")

The previous commit fixes the TL-WDR4900v1. Enable the target again.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agompc85xx: convert TL-WDR4900 v1 to simpleImage
Christian Lamparter [Tue, 29 Jan 2019 22:52:27 +0000 (23:52 +0100)]
mpc85xx: convert TL-WDR4900 v1 to simpleImage

Converts the TP-Link WDR4900 v1 to use the simpleImage in the
hopes of prolonging the life of the device. While at it,
the patch makes the fdt.bin an ARTIFACT and sets the KERNEL_SIZE
to 2684 KiB as a precaution since the stock u-boot is using a
fixed kernel size.

Note: Give the image some time, it will take much longer to
extract and boot.

[tested for 4.14/4.19]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Co-authored-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years agoconfig: add xfrm interface support scripts
André Valentin [Sat, 8 Jun 2019 11:48:08 +0000 (13:48 +0200)]
config: add xfrm interface support scripts

This package adds scripts for xfrm interfaces support.
Example configuration via /etc/config/network:

config interface 'xfrm0'
        option proto 'xfrm'
        option mtu '1300'
        option zone 'VPN'
        option tunlink 'wan'
        option ifid 30

config interface 'xfrm0_static'
        option proto 'static'
        option ifname '@xfrm0'
        option ip6addr 'fe80::1/64'
        option ipaddr '10.0.0.1/30'

Now set in strongswan IPsec policy:
  if_id_in = 30
if_id_out = 30

Signed-off-by: André Valentin <avalentin@marcant.net>
5 years agocurl: update to 7.65.1
Hans Dedecker [Mon, 10 Jun 2019 08:02:39 +0000 (10:02 +0200)]
curl: update to 7.65.1

For changes in 7.65.1; see https://curl.haxx.se/changes.html#7_65_1

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agonetsupport: add xfrmi interface support
André Valentin [Sat, 8 Jun 2019 11:48:07 +0000 (13:48 +0200)]
netsupport: add xfrmi interface support

Add support for xfrm interfaces in kernel. XFRM interfaces are used by
the IPsec stack for tunneling.
XFRM interfaces are available since linux 4.19.

Signed-off-by: André Valentin <avalentin@marcant.net>
5 years agokirkwood: image: fix unwanted 2nd inclusion of kernel
Petr Štetiar [Wed, 5 Jun 2019 09:25:44 +0000 (11:25 +0200)]
kirkwood: image: fix unwanted 2nd inclusion of kernel

In commit d2e18dae2892 ("kirkwood: cleanup image build code") the image
build code was refactored, setting KERNEL_IN_UBI=0 which doesn't work as
the KERNEL_IN_UBI needs to be unset in order to make it working as
intended, which leads to factory images with two kernels in them:

 binwalk --keep-going openwrt-kirkwood-cisco_on100-squashfs-factory.bin
 MD5 Checksum:  c33e3d1eb0cb632bf0a4dc287592eb70
 DECIMAL    HEX        DESCRIPTION
 -------------------------------------------------------------------------------
 0          0x0        uImage header [...] "ARM OpenWrt Linux-4.14.123"
 5769216    0x580800   uImage header [...] "ARM OpenWrt Linux-4.14.123"

Cc: Mathias Kresin <dev@kresin.me>
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2285
Fixes: d2e18dae2892 ("kirkwood: cleanup image build code")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agogpio-button-hotplug: gpio-keys: fix always missing first event
Petr Štetiar [Tue, 4 Jun 2019 11:14:41 +0000 (13:14 +0200)]
gpio-button-hotplug: gpio-keys: fix always missing first event

Commit afc056d7dc83 ("gpio-button-hotplug: support interrupt
properties") changed the gpio-keys interrupt handling logic in a way,
that it always misses first event, which causes issues with rc.button
scripts, so this patch restores the previous behaviour.

Fixes: afc056d7dc83 ("gpio-button-hotplug: support interrupt properties")
Reported-by: Kristian Evensen <kristian.evensen@gmail.com>
Tested-by: Kuan-Yi Li <kyli.tw@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [drop state check]
5 years agogpio-button-hotplug: fix wrong initial seen value
Petr Štetiar [Mon, 3 Jun 2019 21:08:01 +0000 (23:08 +0200)]
gpio-button-hotplug: fix wrong initial seen value

Currently the generated event contains wrong seen value, when the button
is pressed for the first time:

 rmmod gpio_button_hotplug; modprobe gpio_button_hotplug
 [ pressing the wps key immediately after modprobe ]
 gpio-keys: create event, name=wps, seen=1088, pressed=1

So this patch adds a check for this corner case and makes seen=0 if the
button is pressed for the first time.

Tested-by: Kuan-Yi Li <kyli.tw@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>