openwrt/staging/jow.git
6 years agobrcm2708: Add wifi driver, firmware and NVRAM for RPi1
Daniel Golle [Wed, 20 Jun 2018 09:16:54 +0000 (11:16 +0200)]
brcm2708: Add wifi driver, firmware and NVRAM for RPi1

Apparently there are RPi1 devices with BRCM43430 wifi, such as the
Pi Zero W. Add the necessary packages for that to the image generated
for those boards as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoath79: ar934x: use irq-ath79-intc driver and enable wmac
Johann Neuhauser [Tue, 19 Jun 2018 06:16:01 +0000 (08:16 +0200)]
ath79: ar934x: use irq-ath79-intc driver and enable wmac

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agoath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557
Johann Neuhauser [Tue, 19 Jun 2018 06:16:28 +0000 (08:16 +0200)]
ath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agoath79: fix irq-ath79-intc driver and add support for other ath79 SoCs
Johann Neuhauser [Mon, 18 Jun 2018 17:15:21 +0000 (19:15 +0200)]
ath79: fix irq-ath79-intc driver and add support for other ath79 SoCs

Add the missing enable and disable function.
Remove dummy mask and unmask function and use the one provided by
irq_dummy_chip.
Allow interrupt status register being defined from dts.
Add ddr_wb_flush for ar934x/qca953x.
Rename controller name to qca,ar9340-intc because this design was
first introduced in AR934x.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agoramips: add support for ELECOM WRC-1167GHBK2-S
INAGAKI Hiroshi [Fri, 15 Jun 2018 15:27:51 +0000 (00:27 +0900)]
ramips: add support for ELECOM WRC-1167GHBK2-S

ELECOM WRC-1167GHBK2-S is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Cores, 4-Threads)
- 128 MB of RAM (DDR3)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
  - MediaTek MT7615D
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 2x keys
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 57600 bps

Flash instruction using factory image:

1. Rename the factory image to "wrc-1167ghbk2-s_v0.00.bin"
2. Connect the computer to the LAN port of WRC-1167GHBK2-S
3. Connect power cable to WRC-1167GHBK2-S and turn on it
4. Access to "http://192.168.2.1/details.html" and open firmware
update page ("手動更新(アップデート)")
5. Select the factory image and click apply ("適用") button
6. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years agoipq806x: add support for NEC Aterm WG2600HP
INAGAKI Hiroshi [Thu, 17 May 2018 07:06:02 +0000 (16:06 +0900)]
ipq806x: add support for NEC Aterm WG2600HP

NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.

Specification:

- IPQ8064 (384 - 1,400 MHz)
- 512 MB of RAM
- 32 MB of Flash (SPI)
- 4T4R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 12x LEDs, 4x keys
- 1x USB 3.0 Type-A
- UART header on PCB
  - RX, TX, NC, GND, Vcc from power connector side
  - baudrate: 115200 bps

Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Connect power cable and turn on the router
3. When the "Press the [f] key and hit [enter] to enter failsafe mode"
message is displayed on the console, press the "f" key and Enter key
sequentially to enter the failsafe mode
4. create fw_env.config file with following contents on failsafe mode:
  /dev/mtd9 0x0 0x10000 0x10000
5. Execute following commands to add and change the environment
variables of U-Boot
  fw_setenv ipaddr "192.168.0.1"
  fw_setenv serverip "192.168.0.2"
  fw_setenv autostart "yes"
  fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin;
  bootipq"
6. Set the IP address of the computer to 192.168.0.2, connect to the LAN
port of WG2600HP, and start the TFTP server on the computer
7. Rename OpenWrt initramfs image for WG2600HP to
"wg2600hp-initramfs.bin" and place it in the TFTP directory
8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP
9. WG2600HP downloads initramfs image from TFTP server on the computer,
loads it and boot with initramfs image
10. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with the sysupgrade image
11. Wait ~180 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years agoramips: mt7621: fix wireless package selection
Mathias Kresin [Tue, 19 Jun 2018 18:44:36 +0000 (20:44 +0200)]
ramips: mt7621: fix wireless package selection

Add wpad-mini if wireless drivers are included. Drop the mt76 package if
both of the provided drivers are included with their own packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoltq-vdsl-fw: add nonshared flag
Daniel Golle [Tue, 19 Jun 2018 15:55:22 +0000 (17:55 +0200)]
ltq-vdsl-fw: add nonshared flag

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoarc770: bump kernel to 4.14
Evgeniy Didin [Tue, 19 Jun 2018 10:40:54 +0000 (13:40 +0300)]
arc770: bump kernel to 4.14

Currently arc770 is no more "source-only".
Lets update Linux kernel version from 4.9 to 4.14 for arc770.
config-4.14 was simply regenerated with "make kernel_menuconfig".

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
6 years agomwlwifi: update to version 10.3.8.0-20180615
Kabuli Chana [Thu, 14 Jun 2018 18:39:22 +0000 (12:39 -0600)]
mwlwifi: update to version 10.3.8.0-20180615

fix mcs rate for HT
support 88W8997
protect rxringdone

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
6 years agoar71x: add support for Mikrotik Routerboard wAP R
David Ehrmann [Sun, 10 Jun 2018 01:33:24 +0000 (18:33 -0700)]
ar71x: add support for Mikrotik Routerboard wAP R

This commit adds support for the Mikrotik wAP R (RBwAPR-2nD). The change
is based on 3b15eb0 which added support for the wAP 2nD. This change lacks
LED support.

Specifications:

- SoC: Qualcomm QCA9531 (650 MHz)
- RAM: 64 MB
- Storage: 16 MB NOR SPI flash
- Wireless: built-in QCA9531, 802.11b/g/n 2x2:2
- Ethernet: 1x100Mbps
- Power: 9-30V Passive PoE, 9-30V DC jack, 9-30V automotive jack
- SIM card slot
- Mini-PCIe slot

Installation:

1. Login to the Mikrotik WebUI to backup your licence key
2. Change the following settings in System->Routerboard->Settings:
  - Boot device: try ethernet once then NAND
  - Boot protocol: DHCP
  - Force Backup Booter: checked
3. Setup a DHCP/BOOTP server with:
  - DHCP-Option 66 (TFTP server name) pointing to a local TFTP
    server within the same subnet of the DHCP range
  - DHCP-Option 67 (Bootfile-Name) matching the initramfs filename
    of the to be booted image, e.g.
    openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
4. Power off the device
5. If this is the second attempt to boot OpenWRT or the boot device isn't
   "try ethernet once then NAND," press and hold the reset button while
   powered off. If this is the first attempt, this step isn't necessary.
6. Power on the device, holding the reset button for 15-20s if already
   pressed from the previous step.

The board should load and start the initramfs image from the TFTP
server. Login as root/without password to the started OpenWRT via SSH
listing on IPv4 address 192.168.1.1. Use sysupgrade to install OpenWRT.

Revert to RouterOS

Use the "rbcfg" package on in OpenWRT:
- rbcfg set boot_protocol bootp
- rbcfg set boot_device ethnand
- rbcfg apply

Open Netinstall and reboot routerboard. Now Netinstall sees RouterBOARD
and you can install RouterOS. If NetInstall gets stuck on Sending offer
just wait for it to timeout and then close and open Netinstall again.

Click on install again.

In order for RouterOS to function properly, you need to restore license
for the device. You can do that by including license in NetInstall.

Signed-off-by: David Ehrmann <ehrmann@gmail.com>
6 years agoramips: improve ethernet driver performance with GRO/TSO
Felix Fietkau [Wed, 6 Jun 2018 07:56:13 +0000 (09:56 +0200)]
ramips: improve ethernet driver performance with GRO/TSO

GRO stores packets as fraglist. If they are routed back to the ethernet
device, they need to be re-segmented if the driver does not support
sending fraglists.
Add the missing support for that, along with a missing feature flag that
allows full routed GRO->TSO offload.
Considerably reduces CPU utilization for routing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoath79: fix qm5p-ac-v2 dts file
John Crispin [Mon, 18 Jun 2018 21:23:08 +0000 (23:23 +0200)]
ath79: fix qm5p-ac-v2 dts file

Signed-off-by: John Crispin <john@phrozen.org>
6 years agoar71xx: add support for Fritz!WLAN Repeater 450E
David Bauer [Sat, 26 May 2018 16:19:53 +0000 (18:19 +0200)]
ar71xx: add support for Fritz!WLAN Repeater 450E

This commit adds support for the AVM Fritz!WLAN Repeater 450E

SOC:    Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc
RAM:    64MB Zentel A3R12E40CBF DDR2
FLASH:  16MiB Winbond W25Q128 SPI NOR
WLAN1:  QCA9556 2.4 GHz 802.11b/g/n 3x3
INPUT:  WPS button
LED:    Power, WiFi, LAN, RSSI indicator
Serial: Header Next to Black metal shield
        Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet
 - 2.4GHz WiFi (correct MAC)
 - Installation via EVA bootloader
 - OpenWRT sysupgrade
 - Buttons
 - Most LEDs

Not working:
 - 2 RSSI LEDs
   AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they
   control over MDIO. Our driver doesn't expose these LEDs as GPIOs.
   While it is possible to implement this feature, it would require an
   additional kernel patch for a minor functionality.

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 192.168.178.1. Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes.
You need to powercycle the Device afterwards to boot OpenWRT.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agoar71xx: fix incorrect speed setting on QCA9556
David Bauer [Tue, 8 May 2018 18:59:05 +0000 (20:59 +0200)]
ar71xx: fix incorrect speed setting on QCA9556

The QCA9556 only has a SGMII interface. However the speed on the
ethernet link is set for the non-existant xMII interface.

This commit fixes this behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agokernel/modules: kmod-chaoskey: Add missing dependency
Hauke Mehrtens [Mon, 18 Jun 2018 20:49:21 +0000 (22:49 +0200)]
kernel/modules: kmod-chaoskey: Add missing dependency

This new package was missing the dependency to kmod-random-core which
caused some build errors.

Fixes: 163ab9135a9 ("kernel/modules: add chaoskey module, hardware TRNG")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agobusybox: update to 1.28.4
Magnus Kroken [Sun, 17 Jun 2018 14:16:39 +0000 (16:16 +0200)]
busybox: update to 1.28.4

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years agoltq_atm: burn ifx_atm_alloc_tx with fire
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 18:01:07 +0000 (18:01 +0000)]
ltq_atm: burn ifx_atm_alloc_tx with fire

Drop code that was never used.

Tested on: BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agobuild: add busybox support to `time` prereq-check
Andy Boyett [Thu, 17 May 2018 05:09:57 +0000 (22:09 -0700)]
build: add busybox support to `time` prereq-check

Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in ff6e62b288c, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.

As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.

Signed-off-by: Andy Boyett <agb@agb.io>
6 years agoath79: add support for tl-wr1043nd v2/v3
Lucian Cristian [Mon, 18 Jun 2018 17:22:13 +0000 (19:22 +0200)]
ath79: add support for tl-wr1043nd v2/v3

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoath79: add initial nand support for gl-ar300m
Marty E. Plummer [Tue, 29 May 2018 08:02:59 +0000 (03:02 -0500)]
ath79: add initial nand support for gl-ar300m

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
6 years agoath79: initial gl-ar300m support
Marty E. Plummer [Sun, 27 May 2018 05:37:22 +0000 (00:37 -0500)]
ath79: initial gl-ar300m support

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
6 years agob43-tools: update to latest git HEAD
Krystian Kozak [Sun, 27 May 2018 19:58:07 +0000 (21:58 +0200)]
b43-tools: update to latest git HEAD

122ca37 Rename bits in hostflags to match new identifiers for the hostflags
32c2a3c Change order of identifiers to be ascending with the spr numbers
f7016b5 Remove definitions which are not Broadcom specific
b77c0a3 debug: Fix ordering of HF bits
3f46e61 fwcutter: Add firmware 9.10.178.27
27892ef fwcutter/make: Avoid _DEFAULT_SOURCE warning

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
6 years agomvebu: enable CONFIG_HW_RANDOM
Hannu Nyman [Sun, 17 Jun 2018 18:11:44 +0000 (21:11 +0300)]
mvebu: enable CONFIG_HW_RANDOM

Enable the Hardware Random Number Generator Core infrastructure
in kernel.

Needed for hardware random number generator drivers like chaoskey

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years agokernel/modules: add chaoskey module, hardware TRNG
Hannu Nyman [Sun, 17 Jun 2018 17:54:41 +0000 (20:54 +0300)]
kernel/modules: add chaoskey module, hardware TRNG

Package the driver for Chaoskey, a USB dongle that provides a
True Random Number Generator (TRNG) and feeds entropy to kernel.

Chaoskey driver is included the upstream Linux sources, so
only packaging it is needed.

Run-tested with ipq806x/R7800 and mvebu/WRT3200ACM.

(Requires CONFIG_HW_RANDOM kernel option.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years agoinclude/image-commands.mk: shorter version in Netgear factory header
Hannu Nyman [Sun, 17 Jun 2018 19:59:03 +0000 (22:59 +0300)]
include/image-commands.mk: shorter version in Netgear factory header

Shorten the version string in Netgear factory image header in order
to enable u-boot TFTP recovery flash mode to work again.

Strip 'r7210-14cb05909a' into 'r7210' in the Netgear image header
by removing the hash (anything after "-").

background:
Some Netgear routers have recently been unable to flash Openwrt
factory image with the TFTP recovery flash mode provided by Netgear
u-boot. That is due to over-long Openwrt version string overflowing
into the router type string in u-boot code. Modern git versions
produce 10-digit short hashes for the Openwrt main repo, and that
causes the version string to be too long in the image header,
breaking the image ID verification by the TFTP flash routine.

(Other option could be to force a shorter hash in scripts/getver.sh,
but as the problem only concerns Netgear routers, let's patch just
them.)

More detailed explanations in FS#1583

Tested with WNDR3800

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years agoipq806x: D7800 only has a single sata port
John Crispin [Mon, 18 Jun 2018 16:52:28 +0000 (18:52 +0200)]
ipq806x: D7800 only has a single sata port

Signed-off-by: John Crispin <john@phrozen.org>
6 years agomips: fix dynamic ftrace
Vincent Wiemann [Sat, 9 Jun 2018 20:56:47 +0000 (22:56 +0200)]
mips: fix dynamic ftrace

The kernel patch *-mips_module_reloc.patch breaks dynamic ftrace as
dynamic ftrace depends on -mlong-calls.
See http://patchwork.linux-mips.org/patch/675/
Thus we always set -mlong-calls if the kernel is being
compiled with dynamic ftrace support.

Signed-off-by: Vincent Wiemann <webmaster@codefetch.de>
6 years agombedtls: Cosmetic cleanups
Daniel Engberg [Sun, 10 Jun 2018 22:22:36 +0000 (00:22 +0200)]
mbedtls: Cosmetic cleanups

This is more of a cosmetic change and a reminder that the CMake script hardcodes -O2.
Source:
https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.7/CMakeLists.txt#L73
https://github.com/ARMmbed/mbedtls/blob/master/CMakeLists.txt#L97

Remove the release type option as it's already provided by the toolchain.
Source:
https://github.com/openwrt/openwrt/blob/master/include/cmake.mk#L50

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agomvebu: backport ahci_mvebu errata patchset
Jeremiah McConnell [Sat, 16 Jun 2018 04:26:44 +0000 (22:26 -0600)]
mvebu: backport ahci_mvebu errata patchset

Marvell ahci hardware requires a workaround to prevent eSATA failures
on hotplug/reset when used with multi-bay external enclosures.

Errata Ref#226 - SATA Disk HOT swap issue when connected through Port
Multiplier in FIS-based Switching mode.

These patches backport the workaround from 4.17.

Signed-off-by: Jeremiah McConnell <miah@miah.com>
6 years agouboot-oxnas: fix typo accidentally committed during oxnas reboot
Daniel Golle [Mon, 18 Jun 2018 16:54:26 +0000 (18:54 +0200)]
uboot-oxnas: fix typo accidentally committed during oxnas reboot

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoath79: fix rx ring buffer stall qca956x
Lucian Cristian [Mon, 18 Jun 2018 15:55:13 +0000 (18:55 +0300)]
ath79: fix rx ring buffer stall qca956x

when ported from ar71xx to ath79 the qca9560-eth was omitted

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agocron: add procd listeners for crontabs
Paul Spooren [Thu, 14 Jun 2018 01:21:11 +0000 (10:21 +0900)]
cron: add procd listeners for crontabs

Add procd file listeners to check files in `/etc/crontabs/`.

Also unified a bit the function style.

Signed-off-by: Paul Spooren <mail@aparcar.org>
6 years agoar71xx: add kmod-usb-ehci to fix USB on RB hAP AC
Thomas Nixon [Tue, 20 Mar 2018 00:00:50 +0000 (00:00 +0000)]
ar71xx: add kmod-usb-ehci to fix USB on RB hAP AC

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
6 years agonftables: bump to version 0.9.0
Rosy Song [Tue, 12 Jun 2018 07:49:50 +0000 (15:49 +0800)]
nftables: bump to version 0.9.0

Signed-off-by: Rosy Song <rosysong@rosinson.com>
6 years agolibnftnl: bump to version 1.1.1
Rosy Song [Tue, 12 Jun 2018 07:49:32 +0000 (15:49 +0800)]
libnftnl: bump to version 1.1.1

Signed-off-by: Rosy Song <rosysong@rosinson.com>
6 years agoipq40xx: add support for ZyXEL WRE6606
Magnus Frühling [Mon, 11 Jun 2018 21:10:43 +0000 (23:10 +0200)]
ipq40xx: add support for ZyXEL WRE6606

Specifications:
SOC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM: 128 MB Nanya NT5CC64M16GP-DI
FLASH: 16 MiB Macronix MX25L12845EMI-12G
ETH: Qualcomm QCA8072
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac W2 2x2
INPUT:  WPS, Mode-toggle-switch
LED: Power, WLAN 2.4GHz, WLAN 5GHz, LAN, WPS
        (LAN not controllable by software)
        (WLAN each green / red)
SERIAL: Header next to eth-phy.
        VCC, TX, GND, RX (Square hole is VCC)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet (Correct MAC-address)
 - 2.4 GHz WiFi (Correct MAC-address)
 - 5 GHz WiFi (Correct MAC-address)
 - Factory installation from tftp
 - OpenWRT sysupgrade
 - LEDs
 - WPS Button

Not Working:
 - Mode-toggle-switch

Install via TFTP:

Connect to the devices serial. Hit Enter-Key in bootloader to stop
autobooting. Command `tftpboot` will pull an initramfs image named
`C0A86302.img` from a tftp server at `192.168.99.08/24`.
After successfull transfer, boot the image with `bootm`.

To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`.

append-cmdline patch taken from chunkeeys work on the NBG6617.

Signed-off-by: Magnus Frühling <skorpy@frankfurt.ccc.de>
Co-authored-by: David Bauer <mail@david-bauer.net>
Co-authored-by: Christian Lamparter <chunkeey@googlemail.com>
6 years agoath79: add tl-wr1043nd-v4 support everything is working
Lucian Cristian [Sat, 16 Jun 2018 10:37:55 +0000 (13:37 +0300)]
ath79: add tl-wr1043nd-v4 support everything is working

tplink-safeloader: resize kernel partition
kernel 4.14 is much bigger, resize the partition

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoath79: add ubiquiti unifi ap ac lite/lr
Lucian Cristian [Tue, 5 Jun 2018 12:38:02 +0000 (15:38 +0300)]
ath79: add ubiquiti unifi ap ac lite/lr

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoath79: ag71xx: fix pll-data setting for ar7242/ar934x/qca955x/qca956x
Weijie Gao [Wed, 13 Jun 2018 13:41:59 +0000 (21:41 +0800)]
ath79: ag71xx: fix pll-data setting for ar7242/ar934x/qca955x/qca956x

ar71xx/ar913x series use the old pll registers and settings.

However started from ar7242, a new pll register is introduced and the
pll setting is much simpler.

This can be observed from dev-eth.c from the ar71xx target.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years agoath79: add support for Phicomm K2T
Weijie Gao [Wed, 13 Jun 2018 13:14:49 +0000 (21:14 +0800)]
ath79: add support for Phicomm K2T

This patch adds dts for qca956x and also support for Phicomm K2T

The qca965x.dtsi adds nearly all the necessary components.
Both ath9k AHB and PCIe worked well.

The Phicomm K2T uses MTD partition 'config' to store the mac addresses in
JSON format. To extract these fields correctly, a script is introduced:
    /lib/functions/k2t.sh
This script provides a helper function to extract mac addresses, and is used
in three places.

Hardware spec of Phicomm K2T:
CPU: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337
WiFi 5.8GHz: QCA9886

Flash instruction:
Apply sysupgrade.bin via serial console:

tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years agoipq40xx: essedma: fixup ip align
Chen Minqiang [Sat, 16 Jun 2018 20:31:43 +0000 (04:31 +0800)]
ipq40xx: essedma: fixup ip align

This fixup ip align in essedma driver rx path
see cat /proc/cpu/alignment
which reports alignment-fixups without this fix.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
6 years agoiptables: increment PKG_RELEASE to force update
Mirko Parthey [Wed, 13 Jun 2018 14:29:50 +0000 (16:29 +0200)]
iptables: increment PKG_RELEASE to force update

While support for the FLOWOFFLOAD target is available in the firmware
images, it is still missing in some of the binary packages on
downloads.openwrt.org, e.g. for the mipsel_mips32 architecture.

Increment PKG_RELEASE to force an update of these packages.
Also adjust the package description to include the FLOWOFFLOAD target.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
6 years agokernel: atm: pppoatm fix vc-mux connection failures
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 09:08:05 +0000 (09:08 +0000)]
kernel: atm: pppoatm fix vc-mux connection failures

Backport a hot off the press upstream kernel ATM fix:

Preserve value of skb->truesize when accounting to vcc

"There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
for certain skbs. Ideally it would cover ATM too. It doesn't. Just
stashing the accounted value and using it in atm_raw_pop() is probably
the easiest way to cope."

The issue was exposed by upstream with:

commit 14afee4b6092fde451ee17604e5f5c89da33e71e
Author: Reshetova, Elena <elena.reshetova@intel.com>
Date:   Fri Jun 30 13:08:00 2017 +0300

    net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

But an earlier commit left the ticking timebomb:

158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()

Sincerest thanks to Mathias Kresin <dev@kresin.me> for debugging
assistance and to David Woodhouse <dwmw2@infradead.org> for further
guidance, cajoling & patience in interpreting the debug I was giving him
and producing a fix!

Fixes FS#1567

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agolantiq: atm: fix ifx_atm driver integration
Kevin Darbyshire-Bryant [Mon, 18 Jun 2018 09:09:09 +0000 (09:09 +0000)]
lantiq: atm: fix ifx_atm driver integration

When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
        write_unlock_irq(&vcc_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
        struct sock *sk = sk_atm(vcc);

+       if (ifx_atm_alloc_tx != NULL)
+               return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to David Woodhouse <dwmw2@infradead.org> &
Mathias Kresin <dev@kresin.me>.

Tested-on: lantiq, BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agokernel: bump 4.14 to 4.14.50
Koen Vandeputte [Mon, 18 Jun 2018 12:33:59 +0000 (14:33 +0200)]
kernel: bump 4.14 to 4.14.50

Refreshed all patches

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agokernel: bump 4.9 to 4.9.109
Koen Vandeputte [Mon, 18 Jun 2018 12:33:58 +0000 (14:33 +0200)]
kernel: bump 4.9 to 4.9.109

Refreshed all patches

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agobcm53xx: exit if writing kernel during sysupgrade fails
Rafał Miłecki [Mon, 18 Jun 2018 11:46:04 +0000 (13:46 +0200)]
bcm53xx: exit if writing kernel during sysupgrade fails

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agomt76: update to the latest version
Felix Fietkau [Mon, 18 Jun 2018 10:35:49 +0000 (12:35 +0200)]
mt76: update to the latest version

072fdac mt76x2: mac: consider multicast/broadcast frames in ewma rssi estimation
f450659 mt76x2: improve gain adjustment in noisy environments

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agobcm53xx: drop not ready support for Luxul devices
Rafał Miłecki [Mon, 18 Jun 2018 06:42:56 +0000 (08:42 +0200)]
bcm53xx: drop not ready support for Luxul devices

Support for these devices isn't ready yet and it was only accidentally
pushed in the commit 0da9303e5b44 ("mac80211: backport "brcmfmac:
cleanup and some rework" from 4.17").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agomac80211: backport brcmfmac changes from kernel 4.18
Rafał Miłecki [Mon, 18 Jun 2018 05:32:34 +0000 (07:32 +0200)]
mac80211: backport brcmfmac changes from kernel 4.18

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agomac80211: backport brcmfmac firmware & clm_blob loading rework
Rafał Miłecki [Mon, 18 Jun 2018 05:09:14 +0000 (07:09 +0200)]
mac80211: backport brcmfmac firmware & clm_blob loading rework

It backports remaining brcmfmac changes from 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agomvebu: replace espressobin spi patch with upstream one
Tomasz Maciej Nowak [Sat, 9 Jun 2018 14:13:42 +0000 (16:13 +0200)]
mvebu: replace espressobin spi patch with upstream one

For easier future kernel bumps replace spi patch with upstream version
slightly modified. The modification removes partition definitions which
has been diffrent for some U-Boot versions.
Also this removes unnecessary i2c definition which was in the old patch.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years agomvebu: reduce speed to gen1 for espressobin pcie
Tomasz Maciej Nowak [Thu, 14 Jun 2018 19:15:59 +0000 (21:15 +0200)]
mvebu: reduce speed to gen1 for espressobin pcie

Since the beginning there's been an issue with initializing the Atheros
based MiniPCIe wireless cards. Here's an example of kerenel log:

 OF: PCI: host bridge /soc/pcie@d0070000 ranges:
 OF: PCI:   MEM 0xe8000000..0xe8ffffff -> 0xe8000000
 OF: PCI:    IO 0xe9000000..0xe900ffff -> 0xe9000000
 advk-pcie d0070000.pcie: link up
 advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
 pci_bus 0000:00: root bus resource [bus 00-ff]
 pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
 pci_bus 0000:00: root bus resource [io  0x0000-0xffff](bus address[0xe9000000-0xe900ffff])
 pci 0000:00:00.0: BAR 0: assigned [mem0xe8000000-0xe801ffff 64bit]
 pci 0000:00:00.0: BAR 6: assigned [mem0xe8020000-0xe802ffff pref]
 [...]
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x44
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
 ath9k 0000:00:00.0: enabling device (0000 -> 0002)
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0xc
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x40
 ath9k 0000:00:00.0: request_irq failed
 advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
 ath9k: probe of 0000:00:00.0 failed with error -22

The same happens for ath5k cards, while ath10k card didn't appear at
all (not detected):

 OF: PCI: host bridge /soc/pcie@d0070000 ranges:
 OF: PCI:   MEM 0xe8000000..0xe8ffffff -> 0xe8000000
 OF: PCI:    IO 0xe9000000..0xe900ffff -> 0xe9000000
 advk-pcie d0070000.pcie: link never came up
 advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
 pci_bus 0000:00: root bus resource [bus 00-ff]
 pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
 pci_bus 0000:00: root bus resource [io  0x0000-0xffff](bus address[0xe9000000-0xe900ffff])
 advk-pcie d0070000.pcie: config read/write timed out

Following the issue on esppressobin.net forum [1] the workaround seems
to be limiting the speed of PCIe bridge to 1st generation. This fixed
the initialisation of all tested Atheros wireless cards.

The change shouldn't affect the performance for wireless cards,
it could reduce the performance of storage controller cards but since
OpenWrt focuses on wireless connectivity, fixing compatibility with
wireless cards should be a priority.

For the record, the iwlwifi and mt76 cards were not affected by this
issue.

1. http://espressobin.net/forums/topic/which-pcie-wlan-cards-are-supported

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years agomvebu: add fix for armada 37xx cpufreq driver
Tomasz Maciej Nowak [Sat, 9 Jun 2018 14:13:40 +0000 (16:13 +0200)]
mvebu: add fix for armada 37xx cpufreq driver

Backport from stable kernel tree fixing clock leak.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years agouboot-sunxi: update Orange Pi R1 and Zero Plus
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:17 +0000 (18:40 +0200)]
uboot-sunxi: update Orange Pi R1 and Zero Plus

The device tree files are now matching the kernel 4.17 and this will be
send also for integration into mainline U-Boot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agouboot-sunxi: update to version 2018.05
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:16 +0000 (18:40 +0200)]
uboot-sunxi: update to version 2018.05

This patch 220-add-sunxi50i-nanopi-neo-plus2.patch was merged upstream.
The u-boot-sunxi-with-spl.bin is now also created for the ARM64 sunxi
boards by U-Boot itself, no need to do it manually any more.

This was tested on a H2+ Orange Pi R1 and a H5 Orange Pi Zero Plus.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agoarm-trusted-firmware-sunxi: update to version from 2018-02-10
Hauke Mehrtens [Sat, 9 Jun 2018 16:40:15 +0000 (18:40 +0200)]
arm-trusted-firmware-sunxi: update to version from 2018-02-10

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agomediatek: mt7622: Do not deactivate CONFIG_BLK_DEV
Hauke Mehrtens [Sat, 9 Jun 2018 16:37:12 +0000 (18:37 +0200)]
mediatek: mt7622: Do not deactivate CONFIG_BLK_DEV

zram.ko needs CONFIG_BLK_DEV activated and it is by default for all
other targets in OpenWrt.

This makes zram.ko compile again.
Compile tested only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agomediatek: mt7622: Do not set CPU_SUBTYPE for Cortex A53
Hauke Mehrtens [Sat, 9 Jun 2018 16:37:11 +0000 (18:37 +0200)]
mediatek: mt7622: Do not set CPU_SUBTYPE for Cortex A53

Neon and vfpv4 are mandatory extensions in the ARM64 instruction set
now, do not activate them explicitly. GCC will make use of these
extension now by default.

This makes it possible to share the toolchain with other Cortex A53
SoCs.
Compile tested only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agoath79: move Netgear build code into a common makefile
Zoltan HERPAI [Wed, 13 Jun 2018 08:51:51 +0000 (10:51 +0200)]
ath79: move Netgear build code into a common makefile

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years agokernel: bump 4.14 to 4.14.49
Koen Vandeputte [Thu, 14 Jun 2018 14:33:48 +0000 (16:33 +0200)]
kernel: bump 4.14 to 4.14.49

Refreshed all patches

Compile-tested on: cns3xxx, imx6, x86-64
Runtime-tested on: cns3xxx, imx6, x86-64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agokernel: bump 4.9 to 4.9.108
Koen Vandeputte [Thu, 14 Jun 2018 14:33:47 +0000 (16:33 +0200)]
kernel: bump 4.9 to 4.9.108

Refreshed all patches

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agoipq40xx: add get_status_led to diag.sh
David Bauer [Tue, 12 Jun 2018 23:37:55 +0000 (01:37 +0200)]
ipq40xx: add get_status_led to diag.sh

This commit adds the get_status_led method to diag.sh, which sets the
boot-led as status-led for scripts using this method to get a
status-led.

This method is used platform-independent in downstream project gluon to
set the LED used to indicate the config-mode.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agobase-files: fix links in banner.failsafe
Sven Roederer [Tue, 12 Jun 2018 20:48:39 +0000 (22:48 +0200)]
base-files: fix links in banner.failsafe

Update the link to the current section in the documentaion wiki.
This fixes https://github.com/openwrt/packages/issues/6282

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
6 years agobase-files: exit if mtd write command fails during sysupgrade
Rafał Miłecki [Mon, 11 Jun 2018 10:52:42 +0000 (12:52 +0200)]
base-files: exit if mtd write command fails during sysupgrade

It avoids confusing situations like:
> Could not get image magic
> Image check failed.
> Upgrade completed
> Rebooting system...

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agogemini: Cook SQ201 images
Linus Walleij [Fri, 15 Jun 2018 21:34:57 +0000 (23:34 +0200)]
gemini: Cook SQ201 images

This generates the "rd.gz" and "hddapp.tgz" that doesn't contain
anything of the sort but rather the OpenWRT rootfs. It works the
same way as how we generate the same layout for the NAS4220b.
For some reason the ImageInfo file is different for the SQ201.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agogemini: Add appropriate Wireless kernel modules
Linus Walleij [Wed, 13 Jun 2018 15:47:58 +0000 (17:47 +0200)]
gemini: Add appropriate Wireless kernel modules

The D-Link DIR-685 has a RealTek RT2880 mini-PCI card in a
slot. Activate the appropriate kernel module.

The Square One SQ201 has a Ralink RT61-based mini-PCI card.
Activate the appropriate kernel modules. This fixes the
previous error just activating the firmware: the kernel
module will bring in the firmware it needs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agogemini: Cook a WRGG firmware image
Linus Walleij [Wed, 13 Jun 2018 15:45:04 +0000 (17:45 +0200)]
gemini: Cook a WRGG firmware image

This makes the Gemini build a WRGG-type firmware update
image for the DIR-685. This should hopefully install the
kernel from the web firmware upgrade API on the product
switching it permanently to use OpenWRT.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agomac80211: backport brcmfmac data structure rework
Rafał Miłecki [Sun, 17 Jun 2018 20:46:35 +0000 (22:46 +0200)]
mac80211: backport brcmfmac data structure rework

It backports brcmfmac commits from kernel 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agomac80211: backport "brcmfmac: cleanup and some rework" from 4.17
Rafał Miłecki [Sun, 17 Jun 2018 20:46:29 +0000 (22:46 +0200)]
mac80211: backport "brcmfmac: cleanup and some rework" from 4.17

It was described by Arend as:

> This series is intended for 4.17 and includes following:
>
>  * rework bus layer attach code.
>  * remove duplicate variable declaration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agobcm53xx: fix NAND partitions on D-Link DIR-885L
Rafał Miłecki [Sun, 17 Jun 2018 20:39:20 +0000 (22:39 +0200)]
bcm53xx: fix NAND partitions on D-Link DIR-885L

This fixes missing rootfs on above device:
[    2.652292] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
(...)
[    2.687909] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Fixes: 05cb6aa69f66 ("bcm53xx: replace linux,part-probe with a proper partitions subnode")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agoath79: clean up led config script files for all devices
Johann Neuhauser [Sat, 16 Jun 2018 06:13:09 +0000 (08:13 +0200)]
ath79: clean up led config script files for all devices

1. Move all status led definitions out of diag.sh into device dt
   as we use here a generic script hook.

2. Encode "phy0ptp" led trigger in dt of device for all ath79 devices.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years agoath79: fix WNDR3800 support
Hannu Nyman [Fri, 15 Jun 2018 16:49:42 +0000 (19:49 +0300)]
ath79: fix WNDR3800 support

Fixes for WNDR3800 DTS:
* fix bootcmd
* name art partition to reference it for MACs
* format firmware partition's address similarly as others
* make u-boot-env read-only like in ar71xx
* read wan and lan MACs from art
* fix LED and button gpio values to match ar71xx
  (orange/green powerLED, reset button)
* enable power LED in dts by alias led-status
* define USB LED triggers and connect to USB port
* change wifi button to KEY_RFKILL like in ar71xx

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years agoath79: led-resets: add default-trigger property
Johann Neuhauser [Mon, 11 Jun 2018 19:15:40 +0000 (21:15 +0200)]
ath79: led-resets: add default-trigger property

Add support for the common led property "linux,default-trigger". It
allows to set a default led trigger via devicetree.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
[add commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoath79: fix usb led on wr-1043nd-v1
Lucian Cristian [Thu, 7 Jun 2018 08:16:56 +0000 (11:16 +0300)]
ath79: fix usb led on wr-1043nd-v1

usb port was not triggered correctly
also remove uneded wifi led trigger from the script

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoath79: fixup TL-WR703N/TL-MR10U split
Alex Maclean [Tue, 12 Jun 2018 20:54:52 +0000 (21:54 +0100)]
ath79: fixup TL-WR703N/TL-MR10U split

Readd SoC compatible strings and correct model names mangled in
a51078f7354fac9e31f6956cbddc77aaef02c67b, cleanup dts to remove
duplication, rename dtsi for clarity, use correct GPIO for TL-MR10U
USB power.

Tested only on TL-WR703N due to lack of a TL-MR10U.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years agotools: build squashfs (v3) for ath79
Zoltan HERPAI [Wed, 13 Jun 2018 08:51:50 +0000 (10:51 +0200)]
tools: build squashfs (v3) for ath79

Certain Netgear and AVM devices use BE squashfs for the kernel image. As
squashfs4 only supports creating LE images, add squashfs (v3) into
the tools to be built for ath79.

Trying to use an LE squashfs (thus trying to use squashfs4 only for
building the image) for the kernel image results in the bootloader
barfing and stopping.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years agoramips: add support for TP-Link TL-WR842N v5
Maxim Anisimov [Wed, 30 May 2018 15:41:53 +0000 (18:41 +0300)]
ramips: add support for TP-Link TL-WR842N v5

TP-Link TL-WR842N v5 are simple N300 router with 5-port FE switch and
non-detachable antennas. Its very similar to TP-Link TL-MR3420 V5.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- USB 2.0 Port
- UART (J1) header on PCB (115200 8n1)
- 7x LED, 2x button, power input switch

Flash instruction:

The only way to flash OpenWrt image in wr842nv5 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.225/24 and tftp server.
2. Rename "lede-ramips-mt7628-tplink_tl-wr842n-v5-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
6 years agoramips: use phytpt trigger for mt76 wireless
David Bauer [Sun, 10 Jun 2018 22:37:38 +0000 (00:37 +0200)]
ramips: use phytpt trigger for mt76 wireless

With this change, the LED trigger is independent from the (wireless)
netdev name. The (wireless) netdev name can be easiliy changed in
OpenWrt and would require an update of the netdev trigger settings each
time it is done.

This change is (for now) applied only to MT7628 devices from TP-Link, as
we only had the possibility to test this change against two of those
devices, namely a TL-WR841 v13 and a Archer C50 v3.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agoramips: fix mt7688 watchdog register base addr
lbzhung [Fri, 8 Jun 2018 09:15:17 +0000 (17:15 +0800)]
ramips: fix mt7688 watchdog register base addr

I found mt7688 watchdog not working. The watchdog registers are identical
for mt7621 and mt7628/mt7688. The first watchdog related register is at
0x10000100, the last one - a 16bit sized - at 0x10000128.

Set the correct register address and size in the dtsi file to get the
watchdog working.

Signed-off-by: lbzhung <gewalalb@gmail.com>
[add commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoramips: mt7621: fix mtu setting with kernel 4.14
Mathias Kresin [Sun, 18 Feb 2018 21:48:44 +0000 (22:48 +0100)]
ramips: mt7621: fix mtu setting with kernel 4.14

Since kernel 4.10 commit 61e84623ace3 ("net: centralize net_device
min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which
is [68, 1500] by default.

It's necessary to set a max_mtu if a mtu > 1500 is supported.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agomt76: update to the latest version
Felix Fietkau [Fri, 15 Jun 2018 18:56:01 +0000 (20:56 +0200)]
mt76: update to the latest version

9090f9c mt76x2: fix threshold for gain adjustment
2cbaa57 mt76x2: fix swapped values for RXO-18 in gain control
a39ab70 mt76x2: adjust AGC control register 26 based on gain for VHT80
4936c0c mt76x2: clear false CCA counters after changing gain settings
1528fe7 mt76x2: fix variable gain adjustment range
f3522e1 mt76x2: add a debugfs file to dump agc calibration information
65e161b mt76x2: fix tracking rssi for dynamic gain adjustment

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoltq-vdsl-fw: strip legacy dsl_fw logic
Daniel Golle [Fri, 15 Jun 2018 11:30:47 +0000 (13:30 +0200)]
ltq-vdsl-fw: strip legacy dsl_fw logic

We unfortunately dropped support for persistent in-flash DSL firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoltq-vdsl-app: use downloaded vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 11:28:38 +0000 (13:28 +0200)]
ltq-vdsl-app: use downloaded vectoring firmware

Use vectoring firmware downloaded via vdsl_fw_install.sh from
ltq-vdsl-fw package for annex B and annex J.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolantiq-vdsl-fw: update to provide recent vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 10:21:03 +0000 (12:21 +0200)]
lantiq-vdsl-fw: update to provide recent vectoring firmware

Recent Speedport firmware downloads only work over HTTPS, so the user
either needs to provide the already downloaded file or install
ustream-ssl-* as well as ca-certificates or ca-bundle.

So to get VDSL2 with vectoring on xRX200, simply run
vdsl_fw_install.sh
on the target and either provide the downloaded file as instructed or
make sure the device is connected to the Internet and can download that
HTTPS url itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoRevert "lantiq: get rid of ltq-vdsl-fw"
Daniel Golle [Fri, 15 Jun 2018 09:56:05 +0000 (11:56 +0200)]
Revert "lantiq: get rid of ltq-vdsl-fw"

This reverts commit 0938233fcdef67d969f9429a10761cc640c6d56d.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoucert: fix build
Daniel Golle [Fri, 15 Jun 2018 06:57:44 +0000 (08:57 +0200)]
ucert: fix build

set PKG_BUILD_DIR before including package.mk to avoid problems as
seen on buildbot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolibjson-c: fix host-build
Daniel Golle [Thu, 14 Jun 2018 20:53:58 +0000 (22:53 +0200)]
libjson-c: fix host-build

Add -Wno-implicit-fallthrough to HOST_CFLAGS.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agopackage/libs/libnfnetlink: Remove dead mirror
Daniel Engberg [Mon, 11 Jun 2018 11:34:23 +0000 (13:34 +0200)]
package/libs/libnfnetlink: Remove dead mirror

Remove mirrors.evolva.ro as it's no longer available

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agolibubox: make sure blobmsg-json is included in host-build
Daniel Golle [Thu, 14 Jun 2018 18:10:04 +0000 (20:10 +0200)]
libubox: make sure blobmsg-json is included in host-build

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolibjson-c: add host build (for libblobmsg-json)
Daniel Golle [Thu, 14 Jun 2018 18:09:29 +0000 (20:09 +0200)]
libjson-c: add host build (for libblobmsg-json)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoucert: add package
Daniel Golle [Thu, 14 Jun 2018 17:39:25 +0000 (19:39 +0200)]
ucert: add package

ucert is a wrapper around usign to allow delegation and revocation of
public keys for future use in sysupgrade.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This work was sponsored by WIO (wiowireless.com)

6 years agobrcm2708: move wifi calibration EEPROMs out of base-files
Daniel Golle [Thu, 14 Jun 2018 15:21:19 +0000 (17:21 +0200)]
brcm2708: move wifi calibration EEPROMs out of base-files

Ship EEPROM blobs for specific supported board only and don't have them
lurking around in our source tree but rather download them from
@github/RPi-Distro/firmware-nonfree upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agobrcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES
Daniel Golle [Wed, 13 Jun 2018 22:42:09 +0000 (00:42 +0200)]
brcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agobrcm2708: add RPi3+ wifi calibration data
Daniel Golle [Wed, 13 Jun 2018 22:37:27 +0000 (00:37 +0200)]
brcm2708: add RPi3+ wifi calibration data

Add files from
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.txt
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolinux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+
Daniel Golle [Wed, 13 Jun 2018 22:36:01 +0000 (00:36 +0200)]
linux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agokernel: fix conntrack fixup of offloaded flows on timeout
Felix Fietkau [Thu, 14 Jun 2018 09:25:23 +0000 (11:25 +0200)]
kernel: fix conntrack fixup of offloaded flows on timeout

Fixes excessively long conntrack timeout of short lived connections

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: fix conntrack leak for flow_offload connections
Felix Fietkau [Wed, 13 Jun 2018 10:46:54 +0000 (12:46 +0200)]
kernel: fix conntrack leak for flow_offload connections

This was caused by a race condition between offload teardown and
conntrack gc bumping the timeout of offloaded connections

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: allow hardware NAT offload drivers to keep a priv pointer
Felix Fietkau [Mon, 30 Apr 2018 07:26:00 +0000 (09:26 +0200)]
kernel: allow hardware NAT offload drivers to keep a priv pointer

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