openwrt/openwrt.git
4 years agonetifd: add dynamic wireless reconfiguration
Daniel Golle [Thu, 31 Oct 2019 10:30:11 +0000 (11:30 +0100)]
netifd: add dynamic wireless reconfiguration

 7a723d0 wireless: add ubus method for reloading configuration
 e15147c wireless: make reconf opt-in and allow serializing configuration

Set new option 'reconf' in 'wifi-device' section to enable dynamic
re-configuration on that radio.
If necessary, also set option 'serialize' which forced netifd to
configure interfaces of wireless devices one-by-one.
Both options are disabled by default.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agokernel: bump 4.19 to 4.19.82
Koen Vandeputte [Wed, 6 Nov 2019 16:19:11 +0000 (17:19 +0100)]
kernel: bump 4.19 to 4.19.82

Refreshed all patches.

Remove upstreamed:
- 950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.14 to 4.14.152
Koen Vandeputte [Wed, 6 Nov 2019 16:18:34 +0000 (17:18 +0100)]
kernel: bump 4.14 to 4.14.152

Refreshed all patches.

Altered patches:
- 301-arch-support-layerscape.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.9 to 4.9.199
Koen Vandeputte [Wed, 6 Nov 2019 16:11:03 +0000 (17:11 +0100)]
kernel: bump 4.9 to 4.9.199

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoath79: fix SUPPORTED_DEVICES for TP-Link TL-WR1043ND v3
Adrian Schmutzler [Mon, 11 Nov 2019 18:03:20 +0000 (19:03 +0100)]
ath79: fix SUPPORTED_DEVICES for TP-Link TL-WR1043ND v3

In ar71xx, the board name for the TL-WR1043ND v3 is equal to v2:
tl-wr1043nd-v2

Fix SUPPORTED_DEVICES for v3 in ath79 accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolantiq: remove redundant WiFi LED on FRITZ!Box 7320
Manuel Kock [Mon, 11 Nov 2019 12:01:33 +0000 (13:01 +0100)]
lantiq: remove redundant WiFi LED on FRITZ!Box 7320

The led wireless trigger is already set correctly to phy0tpt through the
alias in the device tree.

Signed-off-by: Manuel Kock <github.web@manu.li>
[rephrased commit title]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agofwtool: update to latest Git head
Petr Štetiar [Sat, 9 Nov 2019 13:33:13 +0000 (14:33 +0100)]
fwtool: update to latest Git head

Includes following changes:

 9d9d4c284786 fix possible garbage in unitialized char* struct members
 dbc1b1b71b24 fix possible copy of null buffer and validation of unitialized header
 76d53deef8bb crc32: add missing stdint.h dependency
 e5666ed3b47c add cram based unit tests
 abe0cf7de053 add initial GitLab CI support
 e43042507b4f iron out extra compiler warnings
 5df0cd6e1523 convert into CMake project
 a7dc0526f819 refactor into separate Git project

adds missing PKG_LICENSE field and converts the package build to utilize
CMake.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agox86,tegra,mvebu: image: use common reproducible IMG_PART_SIGNATURE
Paul Spooren [Mon, 4 Nov 2019 20:55:23 +0000 (10:55 -1000)]
x86,tegra,mvebu: image: use common reproducible IMG_PART_SIGNATURE

These targets are currently using more or less same SIGNATURE variable
which provides unique partition ID/signature, so it makes sense to
refactor it out into common IMG_PART_SIGNATURE variable which could be
reused by all targets.

This is another step in the direction of reproducible OpenWrt images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[split into separate commit, renamed to IMG_PART_SIGNATURE]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobuild: image: add common and reproducible IMG_PART_SIGNATURE variable
Paul Spooren [Mon, 4 Nov 2019 20:55:23 +0000 (10:55 -1000)]
build: image: add common and reproducible IMG_PART_SIGNATURE variable

x86, mvebu and tegra targets are currently using more or less same
SIGNATURE variable which provides unique partition ID/signature, so it
makes sense to refactor it out into common variable which could be
reused by all targets.  While at it, make the content of the variable
reproducible.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-March/016148.html
Signed-off-by: Paul Spooren <mail@aparcar.org>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
[renamed to IMG_PARTSIGNATURE, reworked with epoch+vermagic hash]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoramips: split further base-files across subtargets
Adrian Schmutzler [Mon, 11 Nov 2019 13:48:17 +0000 (14:48 +0100)]
ramips: split further base-files across subtargets

As started in 19724e28c81e ("ramips: split base-files into
subtargets"), this moves some smaller left-over files to the
appropriate base-files folder of their subtarget:

- /etc/init.d/bootcount
- /etc/uci-defaults/04_led_migration

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix identifier for Nanostation M in ath9k caldata extraction
Adrian Schmutzler [Sun, 10 Nov 2019 23:15:36 +0000 (00:15 +0100)]
ath79: fix identifier for Nanostation M in ath9k caldata extraction

When Nanostation M was renamed from ubnt,nano-m to ubnt,nanostation-m
in commit f1396ac753cc ("ath79: align naming of Ubiquiti Nanostation M"),
the caldata extraction in 10-ath9k-eeprom was overlooked.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agofirmware: intel-microcode: bump to 20190918
Zoltan HERPAI [Sat, 9 Nov 2019 12:01:50 +0000 (13:01 +0100)]
firmware: intel-microcode: bump to 20190918

  * New upstream microcode datafile 20190918

      *Might* contain mitigations for INTEL-SA-00247 (RAMBleed), given
      the set of processors being updated.
  * Updated Microcodes:
      sig 0x000306d4, pf_mask 0xc0, 2019-06-13, rev 0x002e, size 19456
      sig 0x000306f4, pf_mask 0x80, 2019-06-17, rev 0x0016, size 18432
      sig 0x00040671, pf_mask 0x22, 2019-06-13, rev 0x0021, size 14336
      sig 0x000406f1, pf_mask 0xef, 2019-06-18, rev 0xb000038, size 30720
      sig 0x00050654, pf_mask 0xb7, 2019-07-31, rev 0x2000064, size 33792
      sig 0x00050657, pf_mask 0xbf, 2019-08-12, rev 0x500002b, size 51200
      sig 0x00050662, pf_mask 0x10, 2019-06-17, rev 0x001c, size 32768
      sig 0x00050663, pf_mask 0x10, 2019-06-17, rev 0x7000019, size 24576
      sig 0x00050664, pf_mask 0x10, 2019-06-17, rev 0xf000017, size 24576
      sig 0x00050665, pf_mask 0x10, 2019-06-17, rev 0xe00000f, size 19456

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Sun, 10 Nov 2019 20:33:47 +0000 (21:33 +0100)]
rpcd: update to latest Git HEAD

77ad0de plugin: avoid truncating numeric values

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoramips: correct Netgear WNDR3700v5 button flag
David Bauer [Sun, 10 Nov 2019 19:54:38 +0000 (20:54 +0100)]
ramips: correct Netgear WNDR3700v5 button flag

This adjusts the GPIO state flag to ACTIVE_LOW as FCC pictures indicate
the base board is identical to the one of the R6220.

Fixes commit 3459013257e0 ("ramips: correct R6220 button flag")

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agofirmware: intel-microcode: bump to 20190618
Zoltan HERPAI [Sun, 25 Aug 2019 20:34:13 +0000 (22:34 +0200)]
firmware: intel-microcode: bump to 20190618

  * Implements MDS mitigation (RIDL, Fallout, Zombieload), INTEL-SA-00223
    CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091
  * Updated Microcodes:
    sig 0x000206d6, pf_mask 0x6d, 2019-05-21, rev 0x061f, size 18432
    sig 0x000206d7, pf_mask 0x6d, 2019-05-21, rev 0x0718, size 19456

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agofirmware: intel-microcode: bump to 20190514
Zoltan HERPAI [Thu, 16 May 2019 10:32:14 +0000 (12:32 +0200)]
firmware: intel-microcode: bump to 20190514

  * New Microcodes:
    sig 0x00030678, pf_mask 0x02, 2019-04-22, rev 0x0838, size 52224
    sig 0x00030678, pf_mask 0x0c, 2019-04-22, rev 0x0838, size 52224
    sig 0x00030679, pf_mask 0x0f, 2019-04-23, rev 0x090c, size 52224
    sig 0x000406c3, pf_mask 0x01, 2019-04-23, rev 0x0368, size 69632
    sig 0x000406c4, pf_mask 0x01, 2019-04-23, rev 0x0411, size 68608
    sig 0x00050657, pf_mask 0xbf, 2019-02-27, rev 0x5000021, size 47104
    sig 0x000806e9, pf_mask 0x10, 2018-10-18, rev 0x009e, size 98304
    sig 0x000806eb, pf_mask 0xd0, 2018-10-25, rev 0x00a4, size 99328
    sig 0x000806ec, pf_mask 0x94, 2019-02-12, rev 0x00b2, size 98304
    sig 0x000906ec, pf_mask 0x22, 2018-09-29, rev 0x00a2, size 98304
    sig 0x000906ed, pf_mask 0x22, 2019-02-04, rev 0x00b0, size 97280

  * Updated Microcodes:
    sig 0x000206a7, pf_mask 0x12, 2019-02-17, rev 0x002f, size 12288
    sig 0x000306a9, pf_mask 0x12, 2019-02-13, rev 0x0021, size 14336
    sig 0x000306c3, pf_mask 0x32, 2019-02-26, rev 0x0027, size 23552
    sig 0x000306d4, pf_mask 0xc0, 2019-03-07, rev 0x002d, size 19456
    sig 0x000306e4, pf_mask 0xed, 2019-03-14, rev 0x042e, size 16384
    sig 0x000306e7, pf_mask 0xed, 2019-03-14, rev 0x0715, size 17408
    sig 0x000306f2, pf_mask 0x6f, 2019-03-01, rev 0x0043, size 34816
    sig 0x000306f4, pf_mask 0x80, 2019-03-01, rev 0x0014, size 18432
    sig 0x00040651, pf_mask 0x72, 2019-02-26, rev 0x0025, size 21504
    sig 0x00040661, pf_mask 0x32, 2019-02-26, rev 0x001b, size 25600
    sig 0x00040671, pf_mask 0x22, 2019-03-07, rev 0x0020, size 14336
    sig 0x000406e3, pf_mask 0xc0, 2019-04-01, rev 0x00cc, size 100352
    sig 0x000406f1, pf_mask 0xef, 2019-03-02, rev 0xb000036, size 30720
    sig 0x00050654, pf_mask 0xb7, 2019-04-02, rev 0x200005e, size 32768
    sig 0x00050662, pf_mask 0x10, 2019-03-23, rev 0x001a, size 32768
    sig 0x00050663, pf_mask 0x10, 2019-03-23, rev 0x7000017, size 24576
    sig 0x00050664, pf_mask 0x10, 2019-03-23, rev 0xf000015, size 23552
    sig 0x00050665, pf_mask 0x10, 2019-03-23, rev 0xe00000d, size 19456
    sig 0x000506c9, pf_mask 0x03, 2019-01-15, rev 0x0038, size 17408
    sig 0x000506ca, pf_mask 0x03, 2019-03-01, rev 0x0016, size 15360
    sig 0x000506e3, pf_mask 0x36, 2019-04-01, rev 0x00cc, size 100352
    sig 0x000506f1, pf_mask 0x01, 2019-03-21, rev 0x002e, size 11264
    sig 0x000706a1, pf_mask 0x01, 2019-01-02, rev 0x002e, size 73728
    sig 0x000806e9, pf_mask 0x10, 2019-04-01, rev 0x00b4, size 98304
    sig 0x000806e9, pf_mask 0xc0, 2019-04-01, rev 0x00b4, size 99328
    sig 0x000806ea, pf_mask 0xc0, 2019-04-01, rev 0x00b4, size 99328
    sig 0x000806eb, pf_mask 0xd0, 2019-03-30, rev 0x00b8, size 98304
    sig 0x000806ec, pf_mask 0x94, 2019-03-30, rev 0x00b8, size 97280
    sig 0x000906e9, pf_mask 0x2a, 2019-04-01, rev 0x00b4, size 99328
    sig 0x000906ea, pf_mask 0x22, 2019-04-01, rev 0x00b4, size 98304
    sig 0x000906eb, pf_mask 0x02, 2019-04-01, rev 0x00b4, size 99328
    sig 0x000906ec, pf_mask 0x22, 2019-02-14, rev 0x00ae, size 98304
    sig 0x000906ed, pf_mask 0x22, 2019-03-17, rev 0x00b8, size 97280
  * Implements MDS mitigation (RIDL, Fallout, Zombieload), INTEL-SA-00223
    CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agomac80211: Fix dependencies of kmod-rsi91x-usb
Hauke Mehrtens [Sat, 9 Nov 2019 19:10:58 +0000 (20:10 +0100)]
mac80211: Fix dependencies of kmod-rsi91x-usb

Instead of depending on kmod-usb2 make it depend on the normal USB
dependencies. This should hopefully fix some problems seen in the build
bot builds for powerpc_8540.

In addition also activate DRIVER_11N_SUPPORT support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agostrace: Fix build on PowerPC
Hauke Mehrtens [Sat, 9 Nov 2019 19:07:18 +0000 (20:07 +0100)]
strace: Fix build on PowerPC

This patch breaks building on PowerPC, like the mpc85xx_generic
target for me.

Fixes: FS#2585
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoramips: correct R6220 button flag
David Bauer [Sat, 9 Nov 2019 18:10:51 +0000 (19:10 +0100)]
ramips: correct R6220 button flag

All buttons on the Netgear R6220 are active-low while they are flagged
as active-high.

The GPIO status reads the following for no buttons pressed:

root@64367-r6220:~# cat /sys/kernel/debug/gpio
gpio-7   (                    |wps                 ) in  hi
gpio-8   (                    |wifi                ) in  hi
gpio-14  (                    |reset               ) in  hi

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agonghttp2: Fix pkgconfig file
Rosen Penev [Sun, 3 Nov 2019 02:54:04 +0000 (19:54 -0700)]
nghttp2: Fix pkgconfig file

lib and includedir point to the host, not staging_dir.

Note that prefix and exec_prefix is overriden to point to staging_dir.

As CMAKE_INSTTALL is passed, switched InstallDev to use cmake.mk's rule.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agolibevent2: Fix pkgconfig directories
Rosen Penev [Sat, 2 Nov 2019 21:37:26 +0000 (14:37 -0700)]
libevent2: Fix pkgconfig directories

includedir and libdir are set to /usr/include and /usr/lib . This breaks
compilation with packages such as tmux that use pkgconfig to find libevent

Also added PKG_LICENSE_FILES.

Simplified the InstallDev section by using cmake.mk's default rule.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agoipset: update to 7.4
DENG Qingfang [Mon, 4 Nov 2019 12:16:31 +0000 (20:16 +0800)]
ipset: update to 7.4

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agouboot-envtools: Add TARGET_LDFLAGS to fix PIE and RELRO
Hauke Mehrtens [Thu, 7 Nov 2019 20:01:40 +0000 (21:01 +0100)]
uboot-envtools: Add TARGET_LDFLAGS to fix PIE and RELRO

Forward the OpenWrt TARGET_LDFLAGS to the linker of the fw_printenv tool.
In addition also use the more standard make invocation script.
With this change the fw_printenv tool is built with PIE and Full RELRO
support when activated globally in OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
4 years agoxfsprogs: Fix compilation with newer musl
Rosen Penev [Thu, 7 Nov 2019 22:55:10 +0000 (14:55 -0800)]
xfsprogs: Fix compilation with newer musl

Backported upstream patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agobusybox: update to 1.31.1
Hannu Nyman [Sat, 2 Nov 2019 17:59:44 +0000 (19:59 +0200)]
busybox: update to 1.31.1

Update busybox to 1.31.1

Small bug fix release. Fixes for dc, ash (PS1 expansion fix),
hush, dpkg-deb, telnet and wget.

No need to refresh patches or config.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agobrcm63xx: add linux 4.19 support
Álvaro Fernández Rojas [Sat, 14 Sep 2019 07:39:52 +0000 (09:39 +0200)]
brcm63xx: add linux 4.19 support

Boot tested on Comtrend AR-5387un:
https://gist.github.com/Noltari/57e5030455da8dc38e61f8c3a5922254

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jonas.gorski: make 4.19 an optional testing version; add gcc 8.3 fix]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years agomxs: start a console on USB gadget serial ports
Michael Heimpold [Mon, 4 Nov 2019 23:39:42 +0000 (00:39 +0100)]
mxs: start a console on USB gadget serial ports

The I2SE Duckbill devices are pen-drive like and thus the usage
of the USB gadget subsystem is highly indicated.

Spawning a console if a serial gadget is configured saves
us from connecting a physical debug uart.

On Olimex OLinuXino Maxi/Mini boards, this does not hurt.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
4 years agomxs: switch to askconsole
Michael Heimpold [Mon, 4 Nov 2019 23:39:41 +0000 (00:39 +0100)]
mxs: switch to askconsole

Remove the dedicated tty name and use askconsole to spawn the console
on serial debug uart.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
4 years agoprocd: start additional consoles during hotplugging
Michael Heimpold [Mon, 4 Nov 2019 23:39:40 +0000 (00:39 +0100)]
procd: start additional consoles during hotplugging

Now that 'start-console' procd command has reached the main repo,
we can add a rule to start consoles on serial devices which are
created when USB gadget driver reports creation with hotplugging.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
4 years agomxs: add support and switch to kernel 4.19
Michael Heimpold [Mon, 4 Nov 2019 23:15:14 +0000 (00:15 +0100)]
mxs: add support and switch to kernel 4.19

Also remove kernel 4.14 support and the meanwhile obsolete patch.

This was run-tested on I2SE Duckbill device and
Olimex OLinuXino Maxi board.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agouboot-mxs: bump to v2019.10
Michael Heimpold [Mon, 4 Nov 2019 23:14:55 +0000 (00:14 +0100)]
uboot-mxs: bump to v2019.10

Also update the U-Boot BSP patch for I2SE Duckbill devices.

Run tested on I2SE Duckbill and Olimex OLinuXino Maxi boards.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
4 years agousign: Activate LTO compile option
Hauke Mehrtens [Sun, 27 Oct 2019 21:38:53 +0000 (22:38 +0100)]
usign: Activate LTO compile option

This decreases the size of the usign application by 16% on MIPS BE.

old:
24,597 /usr/bin/usign

new:
20,501 /usr/bin/usign

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoswconfig: Activate LTO compile option
Hauke Mehrtens [Sun, 27 Oct 2019 21:35:30 +0000 (22:35 +0100)]
swconfig: Activate LTO compile option

This decreases the size of the swconfig application by 25% on MIPS BE.

old:
16,916 /sbin/swconfig

new:
12,565 /sbin/swconfig

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomtd: Activate LTO compile option
Hauke Mehrtens [Sun, 27 Oct 2019 21:32:59 +0000 (22:32 +0100)]
mtd: Activate LTO compile option

This decreases the size of the mtd application by 25% on MIPS BE.

old:
20,597 /sbin/mtd

new:
16,421 /sbin/mtd

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agodnsmasq: Activate LTO
Hauke Mehrtens [Sun, 27 Oct 2019 20:17:39 +0000 (21:17 +0100)]
dnsmasq: Activate LTO

This decreases the binary size when PIE ASLR is activated by 8% on MIPS BE.

old:
202,020 /usr/sbin/dnsmasq

new:
185,676 /usr/sbin/dnsmasq

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agouci: update to latest to version 2019-11-08
Hauke Mehrtens [Fri, 8 Nov 2019 22:56:43 +0000 (23:56 +0100)]
uci: update to latest to version 2019-11-08

fc417e8 build: Add -Wclobbered to detect problems with longjmp
2c8e4a3 util: Fix error path

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoramips: create shared DTSI for Netgear EX2700 and WN3000RP v3
Adrian Schmutzler [Fri, 8 Nov 2019 16:51:44 +0000 (17:51 +0100)]
ramips: create shared DTSI for Netgear EX2700 and WN3000RP v3

This moves shared code of the named devices into a common DTSI.

Remove setting status="okay" for &gpio0 as it's not disabled in
mt7620a.dtsi.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: increase max SPI frequency to 50 MHz for EX3700/EX6130
Frederik Noe-Sdun [Fri, 9 Aug 2019 04:42:25 +0000 (06:42 +0200)]
ramips: increase max SPI frequency to 50 MHz for EX3700/EX6130

Based on Macronix MX25L3205DM2I datasheet this is maximum
supported speed.

Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com>
[rebased, improved commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: add support for Netgear EX6130
Frederik Noe-Sdun [Mon, 29 Jul 2019 18:23:28 +0000 (20:23 +0200)]
ramips: add support for Netgear EX6130

Specifications:
* SoC: MT7620A
* RAM: 64 MB DDR
* Flash: 8MB NOR SPI flash
* WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz)
* LAN: 1x100M

The -factory images can be flashed from the
device's web interface or via nmrpflash.

The device seems to use base PCB as EX3700/EX3800,
but supporting AC1200 using MT7612E.

MAC adresses:
5.0 GHz  0x8004  *:9a
2.4 GHz  0x4     *:9b
lan      0x28    *:9b
wan      0x2e    *:9c

Since this is a one-port device, although wan MAC address is
set in flash, it is not used in OpenWrt setup.

Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com>
[rebased, extended commit message, tiny DTS style fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoar71xx: fix tl-wdr3320-v2 upgrade
南浦月 [Thu, 19 Sep 2019 09:41:01 +0000 (17:41 +0800)]
ar71xx: fix tl-wdr3320-v2 upgrade

Fix the error that tl-wdr3320-v2 can't upgrade firmware via web
interface by using magic_ver="0200" for this device.

Signed-off-by: 南浦月 <nanpuyue@gmail.com>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoar71xx: update uboot-envtools for Netgear WNR routers
Michal Cieslakiewicz [Wed, 6 Nov 2019 09:43:14 +0000 (10:43 +0100)]
ar71xx: update uboot-envtools for Netgear WNR routers

Boards added: WNR1000v2, WNR2000v3, WNR2200, WNR612v2, WNDR4300.
Boards changed: WNDR3700 (u-boot env size is 2 sectors not 1).

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years agoath79: update uboot-envtools for Netgear WNR routers
Michal Cieslakiewicz [Wed, 6 Nov 2019 09:44:10 +0000 (10:44 +0100)]
ath79: update uboot-envtools for Netgear WNR routers

Boards added: WNR1000v2, WNR2000v3, WNR612v2, WNDR3700.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years agobuild: image: fix build breakage of some images
Petr Štetiar [Tue, 5 Nov 2019 22:57:37 +0000 (23:57 +0100)]
build: image: fix build breakage of some images

Commit 881ed09ee6e2 ("build: create JSON files containing image info")
has removed the crucial empty new line from the image copy step
resulting in the following errors during make function expansion:

 GZ_SUFFIX :=
 bash: GZ_SUFFIX: command not found
 Makefile:86: recipe for target 'openwrt-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin' failed

Fixes: 881ed09ee6e2 ("build: create JSON files containing image info")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq40xx: u4019: use reset-gpios instead of phy-reset-gpio
Kristian Evensen [Thu, 7 Nov 2019 16:34:18 +0000 (17:34 +0100)]
ipq40xx: u4019: use reset-gpios instead of phy-reset-gpio

Use reset-gpio instead of the custom phy-reset-gpio property to do phy
reset on the U4019. phy-reset-gpio was incorrectly introduced when we
added support for the U4019, and will be deprecated.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
4 years agoipq40xx: wpj419: use reset-gpios property for phy reset
Daniel Danzberger [Wed, 6 Nov 2019 13:06:39 +0000 (14:06 +0100)]
ipq40xx: wpj419: use reset-gpios property for phy reset

The old GPIO based phy reset (phy-reset-gpio) will be removed form
the ipq40xx mdio driver in the future.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
4 years agoipq40xx: mdio: remove support for phy-reset-gpio
DENG Qingfang [Thu, 31 Oct 2019 15:33:41 +0000 (23:33 +0800)]
ipq40xx: mdio: remove support for phy-reset-gpio

Commit 6f6c00cfc95f ("ipq40xx: Add support for Unielec U4019") has
introduced support for `phy-reset-gpio` DT property, which isn't needed
as the MDIO already supports `reset-gpios`[1] which could be used instead.

1. https://elixir.bootlin.com/linux/v4.19.81/source/Documentation/devicetree/bindings/net/mdio.txt

Ref: PR#2511
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[commit title and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobusybox: disable default config option FEATURE_SUID=y
Henrique de Moraes Holschuh [Fri, 1 Nov 2019 11:56:50 +0000 (08:56 -0300)]
busybox: disable default config option FEATURE_SUID=y

Commit ad7c6102f209 ("busybox: fix missing install with suid bit set if
FEATURE_SUID=y") actually fixes BUSYBOX_CONFIG_FEATURE_SUID option and
thus would install busybox setuid root by default which would result in
possibly unwanted change of current behaviour, so let's disable this
option by default in order to preserve the current status-quo.

For the record: disabling FEATURE_SUID to preserve the status-quo does
*not* imply the current status-quo is "safer", or for that matter, in
any way desireable.  That is a discussion to be had on the mailing
lists.

Switching the FEATURE_SUID default to "n" is simply a compromise to
facilitate the merge of the changes that unbreak FEATURE_SUID.

Ref: PR#2502
Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
[commit title/description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobusybox: fix missing install with suid bit set if FEATURE_SUID=y
Henrique de Moraes Holschuh [Fri, 18 Oct 2019 11:31:30 +0000 (08:31 -0300)]
busybox: fix missing install with suid bit set if FEATURE_SUID=y

With FEATURE_SUID=y one can install busybox binary belonging to root
with the suid bit set, enabling some applets to perform root-level
operations even when run by ordinary users. Busybox then drops
privileges for applets that don't need root access, before entering
their main() function.

Currently we don't install busybox binary with suid bit set, rendering
this feature unusable.

Note that we can't just "chmod u+s /bin/busybox" at runtime as a
"cheaper" solution: it would waste approximately 200KiB of FLASH (the
whole /bin/busybox binary gets copied into the overlay).

Ref: PR#2502
Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
[commit title/description facelift, use INSTALL_SUID variable]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoRevert "base-files: rename hostname with EUI of mac address"
Adrian Schmutzler [Thu, 7 Nov 2019 17:16:46 +0000 (18:16 +0100)]
Revert "base-files: rename hostname with EUI of mac address"

This reverts commit 6170c46b477d4953f91b99e805a276de444913cf.

There has been demand for further evaluation of the impact of a
changed hostname, so this is reverted for now. The default hostname
will be "OpenWrt" again after this commit.

The macaddr_geteui() function is not removed by this revert.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobase-files: rename hostname with EUI of mac address
Rosy Song [Mon, 4 Nov 2019 19:44:41 +0000 (20:44 +0100)]
base-files: rename hostname with EUI of mac address

If a label MAC address is provided for device, system
will rename the hostname with OpenWrt_{eui mac address}.
This helps to distinguish between different devices.

Since it's no good idea to nest json_* functions, this code does
not use get_mac_label directly, but only get_mac_label_dt as
external resource.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
[merged with commit introducing macaddr_geteui, rebased on updated
label MAC address storage, extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobase-files: don't store label MAC address in uci system config
Adrian Schmutzler [Mon, 4 Nov 2019 19:44:41 +0000 (20:44 +0100)]
base-files: don't store label MAC address in uci system config

If set, label MAC address is available from one of two sources,
device tree or board.json. So far, the function get_mac_label
was meant for retrieving the address, while an option in uci
system config was specified only for case 2 (board.json).

The uci config option has several drawbacks:
- it is only used for a fraction of devices (those not in DT)
- label MAC address is a device property, while config implies
  user interaction
- label_macaddr option will only be set if /etc/config/system
  does not exist (i.e. only for new installations)

Thus, this patch changes the behavior of get_mac_label:
Instead of writing the value in board.json to uci system config
and reading from this location afterwards, get_mac_label now
extracts data from board.json directly. The uci config option
won't be used anymore.
In addition, two utility functions for extraction only from DT
or from board.json are introduced.

Since this is only changing the access to the label MAC address, it
won't interfere with the addresses stored in the code base so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: rename keys node formerly named button
Adrian Schmutzler [Thu, 7 Nov 2019 16:07:01 +0000 (17:07 +0100)]
ramips: rename keys node formerly named button

For some devices, the keys node is named "button". Change name to
match the rest of the target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: replace generic button node names
Adrian Schmutzler [Thu, 7 Nov 2019 16:03:50 +0000 (17:03 +0100)]
ath79: replace generic button node names

In several DTS files, button nodes are just named buttonX or
xxx_button. This replaces the names with more specific names matching
the majority of key definitions.

While at it, fix name of keys node in one case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: fix LED netdev trigger on interface rename
Martin Schiller [Fri, 25 Oct 2019 07:22:29 +0000 (09:22 +0200)]
kernel: fix LED netdev trigger on interface rename

This fixes the netdev LED trigger for interfaces, which are renamed
during initialization (e.g. ppp interfaces).

Fixes: FS#2193
Fixes: FS#2239
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 years agokernel: add crypto_user mod to crypto-user pkg
Eneas U de Queiroz [Wed, 6 Nov 2019 21:22:51 +0000 (18:22 -0300)]
kernel: add crypto_user mod to crypto-user pkg

This is needed to export crypto information to netfilter, allowing
the alt. afalg openssl engine to obtain information about the drivers
being used.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agowolfssl: update to v4.2.0-stable
Eneas U de Queiroz [Wed, 6 Nov 2019 21:22:52 +0000 (18:22 -0300)]
wolfssl: update to v4.2.0-stable

Many bugs were fixed--2 patches removed here.

This release of wolfSSL includes fixes for 5 security vulnerabilities,
including two CVEs with high/critical base scores:

- potential invalid read with TLS 1.3 PSK, including session tickets
- potential hang with ocspstaping2 (always enabled in openwrt)
- CVE-2019-15651: 1-byte overread when decoding certificate extensions
- CVE-2019-16748: 1-byte overread when checking certificate signatures
- DSA attack to recover DSA private keys

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agoramips, mt7620: reproducible elecom-header uid/gid
Paul Spooren [Wed, 6 Nov 2019 21:15:21 +0000 (11:15 -1000)]
ramips, mt7620: reproducible elecom-header uid/gid

The elecom-header renames the firmware image to v_0.0.0.bin, stores its
MD5 sum as v_0.0.0.md5 and tars both files again.

Both v_0.0.0 files are created as the build user making it harder to
reproduce.

This commit sets the owner/group of both files to root by adding extra
options to the final tar command.

Before:
0 buildbot   (101) buildbot   (102)  3932164 2019-11-05 14:43:22.000000 v_0.0.0.bin
0 buildbot   (101) buildbot   (102)       33 2019-11-05 14:43:22.000000 v_0.0.0.md5

After:
0 root         (0) root         (0)  3932164 2019-11-05 23:43:08.000000 v_0.0.0.bin
0 root         (0) root         (0)       33 2019-11-05 23:43:08.000000 v_0.0.0.md5

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years agolibnl-tiny: update to latest Git head
Petr Štetiar [Mon, 7 Oct 2019 14:34:17 +0000 (16:34 +0200)]
libnl-tiny: update to latest Git head

Includes following changes:

 0230d0698e59 add initial GitLab CI support
 5e13b797a988 iron out all extra compiler warnings
 802fbd4d6f39 cmake: enable extra compiler checks
 050bb5c4431b convert into CMake project
 5b350e42d1fd refactor into separate Git project

and converts the package build to utilize CMake.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoath79: specify N and ND subversions of TL-WR941 with ALT0_MODEL
Adrian Schmutzler [Wed, 24 Jul 2019 18:38:36 +0000 (20:38 +0200)]
ath79: specify N and ND subversions of TL-WR941 with ALT0_MODEL

TP-Link's TL-WR941 is sold with detachable antennas
internationally (ND version), but with fixed antennas in China
(N version). While hardware and images are similar for both
variants of v2 and v4, they are different for v6.

Having both explicitly will make it easier for user to identify
the correct image, and most importantly will raise awareness
that N and ND are not necessarily always the same as for
TL-WR841 series.

With an image selection webpage, using ALT0_MODEL as in this
patch will provide the option to list versions for N and ND
separately.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: reorganize DTSI files for Netgear R devices
Adrian Schmutzler [Thu, 24 Oct 2019 11:36:47 +0000 (13:36 +0200)]
ramips: reorganize DTSI files for Netgear R devices

This reorganizes DTSI files for the Netgear R devices in mt7621
(and the WNDR3700 v5). It creates a common DTSI for all R (sercomm)
devices and distributes the remaining code in r6220.dtsi to R6220
and WNDR3700 v5.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: improve support for WeVO 11AC NAS and W2914NS v2
Sungbo Eo [Mon, 7 Oct 2019 12:36:05 +0000 (21:36 +0900)]
ramips: improve support for WeVO 11AC NAS and W2914NS v2

- remove WAN port index
- load WAN MAC address directly from the flash
- provide label MAC address
- increase flash's SPI frequency to 80MHz
- add mt76 led nodes to make WiFi LEDs work
- drop unnecessary pinmux groups

The factory partition scheme for MAC addresses (verified on both devices):
0x4   : WiFi 2.4GHz (label_mac-9)
0x28  : unused
0x2e  : WAN (label_mac)
0x8004: WiFi 5GHz (label_mac-5)
0xe000: LAN (label_mac-1)
0xe006: unused

By improving flash speed,
`time dd if=/dev/mtdblock3 of=/dev/null bs=64k`
has been reduced from 14.51s to 3.11s.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebased]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: move eth0 to parent DTSI for ar9344 TP-Link CPE devices
Adrian Schmutzler [Wed, 6 Nov 2019 12:51:20 +0000 (13:51 +0100)]
ath79: move eth0 to parent DTSI for ar9344 TP-Link CPE devices

The &eth0 node is the same for all TP-Link CPE devices in ar9344,
so move it to parent DTSI. While at it, do some minor DTS
harmonizations.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for the TP-LINK CPE220 V3
Andrew Cameron [Sat, 26 Oct 2019 01:29:36 +0000 (20:29 -0500)]
ath79: add support for the TP-LINK CPE220 V3

This adds support for a popular low-cost 2.4GHz N based AP

Specifications:
SoC: Qualcomm Atheros QCA9533 (650MHz)
RAM: 64MB
Storage: 8 MB SPI NOR
Wireless: 2.4GHz N based built into SoC 2x2
Ethernet: 2x 100/10 Mbps, integrated into SoC

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254

This also applies some minor changes to the common DTSI:
- use &wmac for label-mac-device, as this one is actually set up in
  common DTSI
- move &eth0 to parent DTSI
- fix several leading spaces, added/removed newlines

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[DTS style fixes/improvements, updated commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: remove default case for MAC address assignment
Adrian Schmutzler [Tue, 22 Oct 2019 17:04:27 +0000 (19:04 +0200)]
ramips: remove default case for MAC address assignment

So far, MAC address assignment in ramips has contained a default
case, which defined wan_mac = eth0 + 1 for _every_ device not
having an explicit case there.

This is not desirable, as many device supporters will just not
care or know about this definition, so another MAC address will be
introduced by accident. In some cases the wan_mac is assigned
although it is not needed, in other cases even addresses not
dedicated to the device will be used (e.g. wan_mac actually is
eth0 - 1, but during support nobody cared, so eth0 + 1 is used now,
which might actually belong to another device ...).

Thus, in this PR the former default case is converted to an
explicit case. This one comprises all devices not being accounted
for by other cases, reduced by those not having wan at all.
The big number of entries for this node might be another indication
that many of them wouldn't actually be there if there hadn't been
default wan_mac setup.

In exchange, the current "do nothing" case can be removed, as it
will be the new default case.

The devices being put in the newly created explicit case were
determined as follows:

1. Create a list of all devices based on the DTS files.

2. Remove all devices already having an explicit entry setting
   their address.

3. Remove all devices that only have lan set up in the first part
   of 02_network:

mt7620:
   - alfa-network,tube-e4g
   - asus,rp-n53
   - buffalo,wmr-300
   - comfast,cf-wr800n
   - edimax,ew-7476rpc
   - edimax,ew-7478ac
   - elecom,wrh-300cr
   - hnet,c108
   - kimax,u25awf-h1
   - kimax,u35wf
   - kingston,mlw221
   - kingston,mlwg2
   - microduino,microwrt
   - netgear,ex2700
   - netgear,ex3700
   - netgear,wn3000rp-v3
   - planex,cs-qr10
   - planex,mzk-ex300np
   - planex,mzk-ex750np
   - ravpower,wd03
   - sercomm,na930
   - yukai,bocco
   - zbtlink,zbt-cpe102
   - zte,q7

mt7621:
   - gnubee,gb-pc1
   - gnubee,gb-pc2
   - linksys,re6500
   - mikrotik,rbm11g
   - netgear,ex6150
   - thunder,timecloud
   - tplink,re350-v1
   - tplink,re650-v1

mt76x8:
   - alfa-network,awusfree1
   - d-team,pbr-d1
   - glinet,vixmini
   - vocore,vocore2-lite
   - tama,w06
   - tplink,tl-mr3020-v3
   - tplink,tl-wa801nd-v5
   - tplink,tl-wr802n-v4
   - tplink,tl-wr902ac-v3
   - vocore,vocore2
   - widora,neo-16m
   - widora,neo-32m

rt288x:
   - buffalo,wli-tx4-ag300n
   - dlink,dap-1522-a1

rt305x:
   - allnet,all0256n-4m
   - allnet,all0256n-8m
   - allnet,all5002
   - allnet,all5003
   - alphanetworks,asl26555-16m
   - alphanetworks,asl26555-8m
   - asus,wl-330n
   - aximcom,mr-102n
   - dlink,dcs-930
   - easyacc,wizard-8800
   - hame,mpr-a2
   - hootoo,ht-tm02
   - huawei,d105
   - intenso,memory2move
   - planex,mzk-dp150n
   - rt305x dlink,dcs-930l-b1
   - sparklan,wcr-150gn
   - tenda,3g150b
   - tenda,3g300m
   - tenda,w150m
   - trendnet,tew-638apb-v2
   - unbranded,a5-v11
   - vocore,vocore-16m
   - vocore,vocore-8m
   - wansview,ncs601w
   - zorlik,zl5900v2

rt3883:
   - loewe,wmdr-143n
   - omnima,hpm

4. Put the remaining devices in the new case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: DTS file style update and harmonization
Adrian Schmutzler [Tue, 5 Nov 2019 18:23:33 +0000 (19:23 +0100)]
ath79: DTS file style update and harmonization

This applies several style adjustments that have been requested in
recent reviews to older DTS files. Despite making the code base more
consistent, this will also help to reduce review time when DTSes
are copy/pasted.

Applied changes:
- Rename gpio-keys/gpio-leds to keys/leds
- Remove node labels that are not used
- Use label property for partitions
- Prefix led node labels with "led_"
- Remove redundant includes
- Harmonize new lines after status property
- Several smaller style fixes

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: improve netis WF-2881 support
Sungbo Eo [Wed, 2 Oct 2019 13:01:11 +0000 (22:01 +0900)]
ramips: improve netis WF-2881 support

This patch does the following:

1. remove u-boot-env partition
   Stock bootloader saves env variables at 0x80000 in flash,
   and there is nothing stored at 0x30000.
   By merging the partition "u-boot-env" with "u-boot",
   the partition table becomes the same as used in stock firmware:
   00000000-00080000: "Bootloader"
   00080000-00100000: "Config"
   00100000-00140000: "Factory"
   00140000-07f80000: "Kernel"

2. fix LAN/WAN MAC addresses and provide label MAC address
   Ethernet MAC addresses are stored in factory partition at:
   0xe000: LAN (label_mac)
   0xe006: WAN (label_mac+1)

3. fix LAN port order
   WF-2881 LAN ports are in reverse order of switch ports.

4. fix WiFi LEDs
   mt76 led nodes are added to make WiFi LEDs work.
   On top of this, mt76 node names are changed to more generic ones,
   and compatible strings are also added.

5. fix pinmux groups
   uart3 and uart2 pins are used as button and led, but jtag pins are not.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agogitignore: ignore patches in OpenWrt root directory
Adrian Schmutzler [Tue, 5 Nov 2019 12:05:29 +0000 (13:05 +0100)]
gitignore: ignore patches in OpenWrt root directory

This will have GIT ignore patches in root directory, as created
when using "git format-patch".

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agotools/automake: Revert "Do not use $(V) - force AM_V=1"
Fredrik Olofsson [Mon, 14 Oct 2019 07:01:57 +0000 (09:01 +0200)]
tools/automake: Revert "Do not use $(V) - force AM_V=1"

This reverts commit 43365ca66253 ("Do not use $(V) - force AM_V=1") as
it breaks verbose output in automake packages, deviating from the
upstream and expected behaviour.

As you can see, neither make command outputs the expected verbose
compile command lines:

```
$ make package/mtd-utils/{clean,compile} V=sc
...
  CCLD     lsmtd
  CC       nand-utils/nanddump.o
  CCLD     nanddump
...
```
```
$ make -C build_dir/target*/mtd-utils-2.1.1 clean
...
$ make -C build_dir/target*/mtd-utils-2.1.1 V=1
...
  CC       lib/libmtd.o
  CC       lib/libfec.o
  CC       lib/common.o
  CC       lib/libcrc32.o
```

The original reason for this commit was some packages failing to build
if V is set to something other than 0 or 1. See the discussion in PR
https://github.com/openwrt/openwrt/pull/2481 for how to fix this in the
package Makefile.

Ref: PR#2481
Acked-by: Mirko Vogt <mirko-openwrt@nanl.de>
Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
[commit title/description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoRevert "ipq806x: fix EA8500 switch control"
Petr Štetiar [Tue, 5 Nov 2019 20:51:23 +0000 (21:51 +0100)]
Revert "ipq806x: fix EA8500 switch control"

There is a problem with the EA8500, the switch will not work after soft
reboot, the only way to get it working again is to power cycle it
manually.

There are probably several issues in the play, it's quite hard to fix it
without having access to the actual device, so I don't see any other
option now, then revert the offending commit.

Ref: PR#2047
Fixes: FS#2168 ("Switch no longer work after restart on Linksys EA8500")
Reported-by: Adam <424778940z@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomac80211 ath9k: force QCA953x clock to 25MHz
David Bauer [Tue, 5 Nov 2019 21:28:39 +0000 (22:28 +0100)]
mac80211 ath9k: force QCA953x clock to 25MHz

The QCA953x only supports 25 MHz refclk, however some OEMs set an
invalid bootstrap value for the REF_CLK option, which would break the
clock detection in ath9k.

Force the QCA953x refclk to 25MHz in ath9k, as this is (according to the
datasheet) the only valid frequency.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoath10k-firmware: update Candela Tech firmware images
Koen Vandeputte [Tue, 5 Nov 2019 11:16:58 +0000 (12:16 +0100)]
ath10k-firmware: update Candela Tech firmware images

The release notes since last time for wave-1:

  *  October 5,  2019:  Fix too-short msg caused by invalid use of PayloadLen in receive path.
                        This appears to resolve the issue of getting (and ignoring) too-short commands
                        when we detect loss of CE interrupts and go into polling mode.

  *  October 12, 2019:  Fix regression in IBSS mode that caused SWBA overrun issues.  Related to
                        regression added during the ct-station logic, specifically TSF allocation.
                        Thanks for Ahmed Zaki @ Mage-Networks for helping to diagnose and test.

  *  October 15, 2019:  Only send beacon tx completion events if we can detect CT driver is being
                        used (based on CT_STATS_OK flag being set).  This should help CT firmware work
                        better on stock driver.

The release notes since last time for wave-2:

  *  October 15, 2019:  Only send beacon tx completion events if we can detect CT driver is being
                        used (based on ATH10k_USE_TXCOMPL_TXRATE2 | ATH10k_USE_TXCOMPL_TXRATE1 flags being set).
                        This should help CT firmware work better on stock driver.

  *  October 31, 2019:  Compile out peer-ratecode-list-event.  ath10k driver ignores the event.

  *  November 1, 2019:  Fix rate-ctrl related crash when nss and other things were changed while
                        station stays associated.  See bug: https://github.com/greearb/ath10k-ct/issues/96

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoustream-ssl: update to latest Git HEAD
Jo-Philipp Wich [Tue, 5 Nov 2019 13:38:40 +0000 (14:38 +0100)]
ustream-ssl: update to latest Git HEAD

c9b6668 ustream-ssl: skip writing pending data if .eof is true after connect

Fixes: CVE-2019-5101, CVE-2019-5102
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agomac80211: fix build without CONFIG_PCI
Felix Fietkau [Tue, 5 Nov 2019 13:21:31 +0000 (14:21 +0100)]
mac80211: fix build without CONFIG_PCI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoath79: fix sorting and harmonize indent in tiny board.d files
Adrian Schmutzler [Tue, 5 Nov 2019 12:11:56 +0000 (13:11 +0100)]
ath79: fix sorting and harmonize indent in tiny board.d files

This seems to have been overlooked when splitting base files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomac80211: add support for multiple wiphys behind a single device
Felix Fietkau [Thu, 31 Oct 2019 11:36:55 +0000 (12:36 +0100)]
mac80211: add support for multiple wiphys behind a single device

The device path will be the same for the first phy. For all subsequent
phys, the path gets an extra +1, +2, ...
Move the code for converting path to phy and vice versa to a separate
library script shared by config detection code and the netifd wireless
handler script

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agomac80211: add pcie apsm backport changes
Felix Fietkau [Mon, 28 Oct 2019 15:02:32 +0000 (16:02 +0100)]
mac80211: add pcie apsm backport changes

Required for newer versions of mt76

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoipq806x: use switch trigger for WAN LED on NETGEAR boards
David Bauer [Mon, 4 Nov 2019 17:48:20 +0000 (18:48 +0100)]
ipq806x: use switch trigger for WAN LED on NETGEAR boards

With this commit, the WAN LED is triggered by the switch port state
instead of the eth0 netdev.
Otherwise, the LED is always illuminated, regardless of the WAN port
link state.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agohostapd: enable PMKSA and OK caching for WPA3-Personal
David Bauer [Mon, 28 Oct 2019 18:10:14 +0000 (19:10 +0100)]
hostapd: enable PMKSA and OK caching for WPA3-Personal

This enables PMKSA and opportunistic key caching by default for
WPA2/WPA3-Personal, WPA3-Personal and OWE auth types.
Otherwise, Apple devices won't connect to the WPA3 network.

This should not degrade security, as there's no external authentication
provider.

Tested with OCEDO Koala and iPhone 7 (iOS 13.1).

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoramips: fix MTK_SOC for RT3662 devices
Sungbo Eo [Tue, 29 Oct 2019 15:18:35 +0000 (00:18 +0900)]
ramips: fix MTK_SOC for RT3662 devices

rt3883.mk contains both RT3662 and RT3883 device profiles, but commit
6a104ac77206 set MTK_SOC to rt3883 for all devices. This patch fixes it,
and renames dts files accordingly. And SoC compatible strings are also
appended in the dts.

Fixes: 6a104ac77206 ("ramips/rt288x,rt3883: Name DTS files based on scheme")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agomediatek: add mt7629 subtarget with rfb image
Chuanhong Guo [Fri, 1 Nov 2019 03:17:28 +0000 (11:17 +0800)]
mediatek: add mt7629 subtarget with rfb image

base-files are added into subtarget directory like what's done
recently in ath79. For this subtarget, metadata checks are enforced
and a SUPPORTED_DEVICE is added to generate proper metadata.
Since we only have mt7629 support in 4.19, override KERNEL_PATCHVER
in target.mk for now.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agomediatek: cosmetic fixes for mt7629-lynx-rfb
Chuanhong Guo [Fri, 1 Nov 2019 03:12:26 +0000 (11:12 +0800)]
mediatek: cosmetic fixes for mt7629-lynx-rfb

This patch did the following things:
1. rename device compatible string
2. add earlycon into cmdline
3. add mac address location according to mt7629 eeprom layout
4. rename mtd partitions
5. replace spaces for indentation with tabs

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agomediatek: backport upstream patches related to mt7629 support
Chuanhong Guo [Fri, 1 Nov 2019 03:11:32 +0000 (11:11 +0800)]
mediatek: backport upstream patches related to mt7629 support

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agomediatek: fix Unielec U7623 dts in 4.19
Chuanhong Guo [Fri, 1 Nov 2019 03:10:32 +0000 (11:10 +0800)]
mediatek: fix Unielec U7623 dts in 4.19

remove duplicated pinctrl nodes.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoscripts/dl_github_archive.py: fix python3 str, bytes confusion
Yousong Zhou [Mon, 4 Nov 2019 11:09:38 +0000 (11:09 +0000)]
scripts/dl_github_archive.py: fix python3 str, bytes confusion

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agox86: delete empty Makefile introduced by accident
Adrian Schmutzler [Mon, 4 Nov 2019 11:08:50 +0000 (12:08 +0100)]
x86: delete empty Makefile introduced by accident

When changing profile titles for this target, an empty Makefile
has been added by accident.

Fixes: 14d17306bc73 ("x86: make profile titles more verbose")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoprocd: Update to version 2019-11-02
Hauke Mehrtens [Sun, 3 Nov 2019 19:25:07 +0000 (20:25 +0100)]
procd: Update to version 2019-11-02

f47622e instance: Warn about unexpected number of parameters
564ecdf instance: ujail: Fix allocated size for no_new_privs parameter
7fb2e1d procd: simplify code in procd_inittab_run
4a127c3 procd: replace exit(-1) with exit(EXIT_FAILURE)
bc0a73e procd: add upgraded binary to .gitignore
ba4c4db procd: add start-console support
3e39fe5 procd: shift arguments for askfirst only once
5d62829 procd: skip respawn in case device disappeared
d27949f procd: guard fork_worker calls

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: rt2x00: remove errornous duplicate condition
Daniel Golle [Sun, 3 Nov 2019 17:31:02 +0000 (18:31 +0100)]
mac80211: rt2x00: remove errornous duplicate condition

https://patchwork.kernel.org/patch/11224189/
--
On 2019-10-28 06:07, wbob wrote:
> Hello Roman,
>
> while reading around drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> I stumbled on what I think is an edit of yours made in error in march
> 2017:
>
> https://github.com/torvalds/linux/commit/41977e86#diff-dae5dc10da180f3b055809a48118e18aR5281
>
> RT6352 in line 5281 should not have been introduced as the "else if"
> below line 5291 can then not take effect for a RT6352 device. Another
> possibility is for line 5291 to be not for RT6352, but this seems
> very unlikely. Are you able to clarify still after this substantial time?
>
> 5277: static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
> ...
> 5279:  } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> 5280:         rt2x00_rt(rt2x00dev, RT5392) ||
> 5281:         rt2x00_rt(rt2x00dev, RT6352)) {
> ...
> 5291:  } else if (rt2x00_rt(rt2x00dev, RT6352)) {
> ...

Hence remove errornous line 5281 to make the driver actually
execute the correct initialization routine for MT7620 chips.

As it was requested by Stanislaw Gruszka remove setting values of
MIMO_PS_CFG and TX_PIN_CFG. MIMO_PS_CFG is responsible for MIMO
power-safe mode (which is disabled), hence we can drop setting it.
TX_PIN_CFG is set correctly in other functions, and as setting this
value breaks some devices, rather don't set it here during init, but
only modify it later on.

Fixes: 41977e86c984 ("rt2x00: add support for MT7620")
Reported-by: wbob <wbob@jify.de>
Reported-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
--

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoramips: add support for ZBT WE1026-H
Kristian Evensen [Sat, 2 Nov 2019 14:18:55 +0000 (15:18 +0100)]
ramips: add support for ZBT WE1026-H

This commit adds support for the ZBT WE1026-H, an outdoor AP with
support for adding an internal LTE modem. The detailed specs are:

* CPU: MT7620A
* 2x 10/100Mbps Ethernet (LAN port has passive PoE support).
* 16/32 MB Flash.
* 128/256 MB RAM.
* 1x USB 2.0 port.
* 1x mini-PCIe slot (only USB2.0 bus).
* 1x SIM slot (standard size).
* 1x 2.4Ghz WIFI (rt2800).
* 1x button.
* 6x LEDS (4 GPIO-controlled).
* 1x micro-SD reader.

The following have been tested and working:
- Ethernet switch
- Wifi
- Mini-PCIe slot + SIM slot
- USB port
- microSD slot
- sysupgrade
- reset button

Installation and recovery:

In order to install OpenWRT the first time or ito recover the router,
you can use the web-based recovery system. Keep the reset button pressed
during boot and access 192.168.1.1 in your browser when your machine
obtains an IP address. Upload the firmware to start the recovery
process.

Notes:

* When binding the USB LED to a usbport, the LED is switched on all the
time due to the presence of an internal hub. Thus, it does not really
signal any USB-information.

* I only have the 32MB version and have only added support for this
device. However, the files are structured so that adding support for the
16MB version should be easy.

* Only the LAN port is accessible from the outside of the casing and LEDs
are not visible.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
[rebased onto base-files split, minor style fixes, removed use of
USB led as power LED]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: update ZBT WE1026 DTS-files
Kristian Evensen [Sat, 2 Nov 2019 14:18:54 +0000 (15:18 +0100)]
ramips: update ZBT WE1026 DTS-files

This commit makes the following changes to the WE1026 DTS-files:

* The parts that are unique to the -5G-version (LED and 5GHz wifi)
are moved to a separate file, so that WE1026.dtsi can be referenced also
by the DTS for the -H version.
* Use the generic "flash"-name for the spi-nor node.
* Add label MAC.

All changes have been tested on the WE1026-5G-16M and work fine. I.e.,
the device works as before the DTS-changes.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Acked-by: Mathias Kresin <dev@kresin.me>
Acked-by: Alex Maclean <monkeh@monkeh.net>
Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
[minor style fixes, rebased onto base-files split, remove obsolete
gpio-keys comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: improve common definition for Netgear R6xxx in mt7621.mk
Adrian Schmutzler [Mon, 21 Oct 2019 12:43:21 +0000 (14:43 +0200)]
ramips: improve common definition for Netgear R6xxx in mt7621.mk

This patch renames and reassembles the common definition for
Netgear R6xxx devices in mt7621.mk. The following goals should be
achieved:
- Give the node a more generic name instead of adding devices to it
- Use the common definition in the (less) similar R6220 node
- Include/exclude settings into the common definition so the common
  node contains the common definitions
- Prepare for support of R6700 v2

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for TP-Link WBS210 v2
Bernhard Geier [Sun, 3 Nov 2019 12:58:12 +0000 (13:58 +0100)]
ath79: add support for TP-Link WBS210 v2

TP-Link WBS210 v2 is an outdoor wireless CPE for 2.4 GHz with
two Ethernet ports based on Atheros AR9344

The device is the same as TP-Link CPE220 v2, but with higher TX power (27 dBm
instead of 12 dBm) and two antenna connectors instead of built-in antennas.

Specifications:
 - SoC: Atheros AR9344
 - RAM: 64MB
 - Storage: 8 MB SPI NOR
 - Wireless: 2.4GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power
 - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP: 192.168.0.100
Stock device TFTP adress: 192.168.0.254

The TP-Link WBS devices use the same GPIOs as the CPE devices,
except for the link4 LED. For this one, WBS devices use "2", while
CPE devices use "16". (Tested on WBS210 v2)

Signed-off-by: Bernhard Geier <freifunk@geierb.de>
[added comment about GPIO]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobuild: label kernel and rootfs ext4 volumes
Yousong Zhou [Sun, 3 Nov 2019 04:10:12 +0000 (04:10 +0000)]
build: label kernel and rootfs ext4 volumes

UUID of ext4 volumes generated by make_ext4fs are determined by volume
label and it will all be 57f8f4bc-abf4-655f-bf67-946fc0f9f25b when label
is empty

Labeling them does not make them unique but tools like block command
from fstools have a better chance differentiating them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agofstools: bump to version 2019-11-03
Yousong Zhou [Sun, 3 Nov 2019 02:18:33 +0000 (02:18 +0000)]
fstools: bump to version 2019-11-03

2f2a09a block: mount_device: err log only when mp deviates from spec
da4edc1 block: mount_device: skip extroot earlier
32c3126 block: mount_action: handle mount/umount deps
fb0700f block: support hierarchical mount/umount
1212b5b block: umount: skip / unless -a is given
eda8b3f block: use fsck.fat instead of dosfsck
d05276d libblkid-tiny: ntfs: fix use-after-free

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agolibubox: bump to version 2019-10-29
Yousong Zhou [Sun, 3 Nov 2019 02:16:56 +0000 (02:16 +0000)]
libubox: bump to version 2019-10-29

It contains a single change to vlist.h header file: "vlist: add more
macros for loop iteration".  This is needed for newer version of fstools

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agoubinize-image: set image sequence from SOURCE_DATE_EPOCH
Alexander Couzens [Sun, 3 Nov 2019 02:18:35 +0000 (03:18 +0100)]
ubinize-image: set image sequence from SOURCE_DATE_EPOCH

Set the image sequence number to SOURCE_DATE_EPOCH.
If not set, ubinize will use rand() as image sequence.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
4 years agoath79: revert erroneous second addition of files for WNDR4300
Adrian Schmutzler [Sat, 2 Nov 2019 23:43:23 +0000 (00:43 +0100)]
ath79: revert erroneous second addition of files for WNDR4300

There are two recent commits stating to add support for Netgear
WNDR4300, where the second one seems to be just leftover from
an earlier patch having been rebased.

Since the first patch already provides support in the most recent
state, just revert the second one.

This reverts commit cd87272eb241b1ea7955c1631ad2bb8d38e9fae9.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: fix Xiaomi MiWiFi Mini switch definition
Chih-Wei Chen [Wed, 16 Oct 2019 06:34:14 +0000 (14:34 +0800)]
ramips: fix Xiaomi MiWiFi Mini switch definition

Based on OpenWRT Table of Hardware > Xiaomi > Xiaomi Mi WiFi Mini

Switch Ports Defaults:
0, 1: LAN
4: WAN
6: CPU

Port in Web GUI (word printed on bottom of case)
WAN(Internet) map to switch port 4
LAN1(.) map to switch port 1
LAN2(..) map to switch port 0
CPU map to switch port 6

current setting is 1 WAN/ 4 LAN port, fix it.

Signed-off-by: Chih-Wei Chen <changeway@gmail.com>
[rebased after base-files split, fixed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agox86: make profile titles more verbose
Paul Spooren [Wed, 31 Jul 2019 14:34:38 +0000 (16:34 +0200)]
x86: make profile titles more verbose

So far (nearly) all x86 profiles are called "Generic" which makes
it hard to distinguish them in special cases, like searching for a
specific profile (without pre-selecting target/subtarget).

To make this change locally working, remove the tmp/ folder to
force reload of menuconfig.

As these files are infrequently touched, the Copyright was updated
as well.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[changed commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for TP-Link TL-WR1045ND v2
Rasim Kalimullin [Tue, 15 Oct 2019 14:05:17 +0000 (19:05 +0500)]
ath79: add support for TP-Link TL-WR1045ND v2

Specifications:
 - QCA9558 Soc
 - 720/800 (CPU/DDR)
 - 1x 10/100/1000 Mbps WAN Ethernet
 - 4x 10/100/1000 Mbps LAN Ethernet
 - 64 MB RAM (DDR2)
 - 8 MB FLASH
 - QCA9558 2.4 GHz 802.11bgn
 - 1x USB 2.0

Flash instruction
WebUI:
Download *-factory.bin image, rename to tp_firmware.bin and upload
it via the firmwary upgrade function of the stock firmware WebUI.

Tftp:
Rename OpenWRT or original firmware to wr1045v2_tp_recovery.bin and
Change your computer ip in 192.168.0.66 and subnet mask in 255.255.255.0.
Router will obtain IP 192.168.0.86 for a few seconds while loading,
when reset button pressed at power On.

Signed-off-by: Rasim Kalimullin <neutrino.vm@gmail.com>
[rebased onto base-files split]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: remove wmac mtd-mac-address for UniFi AC family
Roger Pueyo Centelles [Thu, 24 Oct 2019 13:29:14 +0000 (15:29 +0200)]
ath79: remove wmac mtd-mac-address for UniFi AC family

The MAC address for the wmac 2.4 GHz radio of the Ubiquiti UniFi AC
family of devices is actually embedded in the mtd-cal-data, so there
is no need for mtd-mac-address (which was incorrectly forcing wmac
to have the same MAC as eth0). This makes it coherent with the stock
firmware and the ar71xx target:

 · XX:XX:XX:X0:XX:XX eth0
 · XX:XX:XX:X1:XX:XX ath0/wlan1 (2.4 GHz)
 · XX:XX:XX:X2:XX:XX ath1/wlan0 (5 GHz)

Checked on a UniFi AC Mesh, a UniFi AC LR and a UniFi Lite.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>