openwrt/openwrt.git
6 years agofirmware-utils: honor env SOURCE_DATE_EPOCH
Alexander Couzens [Sun, 18 Jun 2017 00:21:21 +0000 (02:21 +0200)]
firmware-utils: honor env SOURCE_DATE_EPOCH

Use the timestamp from the enviroment SOURCE_DATE_EPOCH
if set instead of the build time.
Fixes reproducible builds for certain firmware images.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agolibunwind: update to version 1.2.1
Yousong Zhou [Mon, 19 Jun 2017 06:41:47 +0000 (14:41 +0800)]
libunwind: update to version 1.2.1

Changes since 1.2

    a77b0cd Bump version to v1.2.1
    5f354cb mips/tilegx: Add missing unwind_i.h header file
    620d1c3 Add aarch64 getcontext functionality.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
6 years agonetifd: update to the latest version
Hans Dedecker [Sun, 18 Jun 2017 20:11:54 +0000 (22:11 +0200)]
netifd: update to the latest version

ef5f7a0 ubus: remove superfluous error check in netifd_add_dynamic
5a68693 iprule: coding style line up
90e2e2c iprule: Add option to suppress unspecific routing lookups

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoscripts/package-metadata.pl: parse and validate field Require-User
Yousong Zhou [Tue, 13 Jun 2017 09:03:38 +0000 (17:03 +0800)]
scripts/package-metadata.pl: parse and validate field Require-User

The script will now detect uid/gid collision and can generate a table of
current allocation

    ./scripts/package-metadata.pl usergroup tmp/.packageinfo \
| sort -k 1,1r -k 3,3n \
| column -t

This should ensure that no collision will happen for each single build

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
6 years agobase-files: allocate uid/gid starting from 65536
Yousong Zhou [Thu, 15 Jun 2017 10:07:32 +0000 (18:07 +0800)]
base-files: allocate uid/gid starting from 65536

There already exist static assignment of uid/gid 65533 in packages feed
and we have nobody/nogroup taking 65534 as their ids.  Let's change the
pid of dynamic assignment to start from 65536 so that the two assignment
scheme will not collide with each other

While at it, fix the scan command checking existence of uid/gid

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
6 years agoramips: remove optional ucidef_set_led_rssi parameters
Mathias Kresin [Fri, 16 Jun 2017 22:39:25 +0000 (00:39 +0200)]
ramips: remove optional ucidef_set_led_rssi parameters

The same values are set if the parameters are not specified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agobase-files: make ucidef_set_led_rssi offset and factor optional
Mathias Kresin [Fri, 16 Jun 2017 22:17:18 +0000 (00:17 +0200)]
base-files: make ucidef_set_led_rssi offset and factor optional

The offset and factor are only related for LEDs which can have
different brightness values. But binary LEDs are more common and don't
require any further configuation than setting the factor to 1.

Use offset = 0 and factor = 1 in case nothing else is specified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoramips: add support for TRENDnet TEW-638APB V2
Pavlo Samko [Fri, 9 Jun 2017 11:02:56 +0000 (14:02 +0300)]
ramips: add support for TRENDnet TEW-638APB V2

This patch add support for the TRENDnet TEW-638APB V2.

Specification:
- SoC: Ralink SoC RT3052F
- Flash: 4MB
- RAM: 32MB
- Ethernet: 1x LAN (100 Mbps)
- Wireless: 2.4GHz b/g/n, 2x external antenna
- Buttons: 1x Reset, 1x WPS
- LEDs: Power (green), Ethernet (green), WPS (green and orange),
  Wireless (green)
- UART: 1x UART on PCB (3.3V, GND, RX, TX) - 57600 8N1

Installation

via vendor firmware:
- upload sysupgrade.bin image

via TFTP:
- stop uboot into tftp-load into option "2"
- upload sysupgrade.bin image

Signed-off-by: Pavlo Samko <bulldozerbsg@gmail.com>
6 years agolantiq: show xdsl line init status on shared dsl/internet led
Mathias Kresin [Wed, 14 Jun 2017 18:17:16 +0000 (20:17 +0200)]
lantiq: show xdsl line init status on shared dsl/internet led

On boards which don't have a distinct internet and dsl led, use the
shared LED to indicate the xdsl line state and any traffic that is
send/received via the netdev. This traffic doesn't necessarily need to
be internet traffic.

Rename the shared LED of existing configs to "dsl", to match the new
defaults. The configuration of the to be renamed LED is identical with
the new defaults.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agolantiq: restore netdev trigger of dsl led on line up
Martin Schiller [Wed, 7 Jun 2017 07:03:54 +0000 (09:03 +0200)]
lantiq: restore netdev trigger of dsl led on line up

Allows to use a single LED for line init status indication and to show
any rx/tx activity on a synchronized dsl line.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agobuild: move definition of KBUILD_BUILD_TIMESTAMP to include/kernel.mk
Alexander Couzens [Tue, 13 Jun 2017 11:04:35 +0000 (13:04 +0200)]
build: move definition of KBUILD_BUILD_TIMESTAMP to include/kernel.mk

Fixes: 0aed054bec (build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS
variables and move to kernel.mk)

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agomt76: update to the latest version, fixes rate control issues
Felix Fietkau [Sat, 17 Jun 2017 10:17:27 +0000 (12:17 +0200)]
mt76: update to the latest version, fixes rate control issues

Should improve performance considerably in many cases

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agolibubox: update to the latest version, fixes a runqueue use-after-free bug
Felix Fietkau [Wed, 14 Jun 2017 10:14:50 +0000 (12:14 +0200)]
libubox: update to the latest version, fixes a runqueue use-after-free bug

7237302 md5: add "const" qualifier to the "file" argument
fa9937c json_script: enable custom expr handler callback
368fd26 uloop: allow specifying a timeout for uloop_run()
6a7fb7d runqueue: fix use-after-free bug
4bc3dec uloop: fix a regression in timeout handling
fd57eea uloop: allow passing 0 as timeout to uloop_run

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agomac80211: refresh patches
Felix Fietkau [Sat, 10 Jun 2017 13:30:31 +0000 (15:30 +0200)]
mac80211: refresh patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoipq806x: qca99xx: fix wifi calibration
Pavel Kubelun [Thu, 8 Jun 2017 06:06:27 +0000 (09:06 +0300)]
ipq806x: qca99xx: fix wifi calibration

As of now OTP is being correctly parsed and the driver requires to parse pre-caldata to follow corresponding routine.

Rename cal file into pre-calfile so the board initialized correctly with API 2 board data (board-2.bin).

Also remove the now unneeded for qca9984 board.bin symlink to 5GHz calfile.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
6 years agoath10k: increase bmi timeout to fix OTP on qca99xx boards and add bmi identification...
Pavel Kubelun [Thu, 1 Jun 2017 14:13:04 +0000 (17:13 +0300)]
ath10k: increase bmi timeout to fix OTP on qca99xx boards and add bmi identification through pre-cal file

Backporting upstream patches.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [refresh, rename patches]
6 years agoimagebuilder: don't rewrite package list output
Daniel Golle [Fri, 16 Jun 2017 23:24:43 +0000 (01:24 +0200)]
imagebuilder: don't rewrite package list output

No longer rewrite opkg list output in package_list function, remove
the awk call in the pipe (which was intended for a single specific
use-case).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoimagebuilder: clean package_list
Daniel Golle [Fri, 16 Jun 2017 22:54:46 +0000 (00:54 +0200)]
imagebuilder: clean package_list

commit 19ac879954 (imagebuilder: add package_list function) introduced
a new function 'package_list' to the imagebuilder Makefile.
Unfortunately the package list was poluted by stdout noise of the
Makefile itself as well as opkg. Redirect those outputs to stderr to
make sure that the package_list returned doesn't contain progress
info output but really only packages.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agobuild: remove old kernel-headers build directories
Felix Fietkau [Fri, 16 Jun 2017 13:15:37 +0000 (15:15 +0200)]
build: remove old kernel-headers build directories

Saves space after updating kernel versions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agodropbear: fix service trigger syntax error
Kevin Darbyshire-Bryant [Thu, 15 Jun 2017 11:58:25 +0000 (12:58 +0100)]
dropbear: fix service trigger syntax error

The classic single '&' when double '&&' conditional was meant.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
6 years agoimagebuilder: add package_list function
Paul Spooren [Tue, 13 Jun 2017 19:59:14 +0000 (21:59 +0200)]
imagebuilder: add package_list function

The imagebuilder can now list all available packages by using make
package_list. This is usefull for scripts to retrieve a list of all
packages with versions (and size)

Signed-off-by: Paul Spooren <paul@spooren.de>
[daniel@makrotopia.org: fixed commit message]

6 years agoRevert "dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53"
Hans Dedecker [Wed, 14 Jun 2017 20:50:48 +0000 (22:50 +0200)]
Revert "dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53"

This reverts commit a53f8ba6771de64c9c82a2e6867791226f3003cb.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoramips: fix Phicomm K1S(PSG1208) pinmux
小桥 [Sun, 5 Mar 2017 07:53:40 +0000 (15:53 +0800)]
ramips: fix Phicomm K1S(PSG1208) pinmux

Use gpio function for pins with LEDs.

Signed-off-by: 小桥 <29551030@qq.com>
6 years agokirkwood: add support for Cisco ON100
Makoto Takeuchi [Wed, 24 May 2017 15:37:24 +0000 (16:37 +0100)]
kirkwood: add support for Cisco ON100

The Cisco ON100 device is a Kirkwood based router:

    SoC: Marvell 88F6282 1600Mhz
    SDRAM memory: 512MB DDR3 1333Mhz
    Gigabit ethernet: 2x Marvell 88E1310 (over RGMII)
    Flash memory: 512MB
    2 bi-colour status LEDs (green/red)
    1 Reset button
    1 USB 2.0 port (on back)
    1 SDIO slot (on back)

This commit adds a target profile of "Cisco Systems ON100" under the target
system "Marvell Kirkwood".

Flashing can be performed over tftp, once "dhcp" has been issued:
 tftpboot ${loadaddr} lede-kirkwood-on100-squashfs-factory.bin
 nand erase 0x0c0000 ${filesize}
 nand write ${loadaddr} 0x0c0000 ${filesize}

Once flashed, set environment variables to boot:
 setenv bootcmd nand read \${loadaddr} 0x0c0000 0x540000\; setenv bootargs
  \; bootm
 saveenv

Signed-off-by: Makoto Takeuchi <mak0@lxsys.co.uk>
6 years agoat91: convert boards to generic build target
Ben Whitten [Wed, 3 May 2017 21:15:20 +0000 (22:15 +0100)]
at91: convert boards to generic build target

Evaluation boards are left in component form to ease flashing
using vendor tooling and instructions. These boards also do
not include the EOF marker in the UBIFS as the bootloaders
are recent and easily upgradeable.

The end product boards use factory.bin images based on the
dts layout and include EOF markers as bootloader UBI support
is not determined.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agodnsmasq: manage resolv.conf if when listening on 127.0.0.1#53
Paul Oranje [Fri, 9 Jun 2017 09:30:23 +0000 (11:30 +0200)]
dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53

With this patch the dnsmasq init script manages resolv.conf if and only if
when dnsmasq will listen on 127.0.0.1#53 (is main resolver instance).
Also, resolvfile is now set irrespective of the value of noresolv.

Fixes (partially) FS#785

Signed-off-by: Paul Oranje <por@xs4all.nl>
6 years agoar71xx: image: simplify TP-Link devices definitions
Piotr Dymacz [Sat, 10 Jun 2017 17:31:54 +0000 (19:31 +0200)]
ar71xx: image: simplify TP-Link devices definitions

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: fix TP-Link TL-WR710N v2/v2.1 BOARDNAME
Piotr Dymacz [Sun, 11 Jun 2017 17:41:23 +0000 (19:41 +0200)]
ar71xx: image: fix TP-Link TL-WR710N v2/v2.1 BOARDNAME

All TP-Link TL-WR710N versions share the same machine code.

This has been working since the beginning as we don't use double-quotes
to protect spaces inside command line values. Thus, kernel interprets
'board=TL-WR710N v2' as 'board=TL-WR710N' and separate parameter 'v2'.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: tp-link.mk: keep devices in alphabetical order
Piotr Dymacz [Sun, 11 Jun 2017 13:30:27 +0000 (15:30 +0200)]
ar71xx: image: tp-link.mk: keep devices in alphabetical order

Keep TP-Link devices definitions in alphabetical order whenever it's
possible. Also group together similar devices or devices from the same
series.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: base-files: cleanups in 10-ar922x-led-fix
Piotr Dymacz [Wed, 7 Jun 2017 20:23:54 +0000 (22:23 +0200)]
ar71xx: base-files: cleanups in 10-ar922x-led-fix

Fix code style, indentation and leading/trailing whitespaces in:
/etc/hotplug.d/net/10-ar922x-led-fix

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: base-files: cleanups in 11-ath10k-caldata
Piotr Dymacz [Wed, 7 Jun 2017 19:19:48 +0000 (21:19 +0200)]
ar71xx: base-files: cleanups in 11-ath10k-caldata

Fix code style and boards alphabetical order in:
/etc/hotplug.d/firmware/11-ath10k-caldata

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agofirmware-utils: tplink-safeloader: add TP-Link Archer C25 v1
Ludwig Thomeczek [Sat, 13 May 2017 09:40:48 +0000 (11:40 +0200)]
firmware-utils: tplink-safeloader: add TP-Link Archer C25 v1

This adds the necessary firmware layout definitions for the Archer C25.
It has an addtional partition containing some static data ("extra-para")
without which no factory flash is possible, therefore put_data() has been
added.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
6 years agoar71xx: add support for TP-Link Archer C25 v1
Ludwig Thomeczek [Sat, 22 Apr 2017 16:21:47 +0000 (18:21 +0200)]
ar71xx: add support for TP-Link Archer C25 v1

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

Specification:

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

Some LEDs are controlled by an additional 74HC595 chip.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[minor code style fixes, boards alphabetical order fixes,
reworked commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: add support for TP-Link TL-WR942N v1
Serg Studzinskii [Wed, 8 Mar 2017 20:10:05 +0000 (22:10 +0200)]
ar71xx: add support for TP-Link TL-WR942N v1

TP-Link TL-WR942N v1 is a 2.4 GHz single-band N450 router, based on
Qualcomm/Atheros QCA9561.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x USB 2.0
- 11x LED (most are controlled by 74HC595)
- 2x button
- UART header on PCB*

* Serial console is disabled in OEM non-beta firmwares and corresponding
  GPIO pins 14 and 15 are assigned to control USB1 and USB2 LEDs by
  production (non-beta) U-Boot and firmware.

Currently not working:

1. USB1 and USB2 LEDs if UART RX and TX pins are assigned to their GPIOs
   by some U-Boot versions.

Flash instruction under vendor GUI:

1. Download "lede-ar71xx-generic-tl-wr942n-v1-squashfs-factory.bin".
2. Go to WEB interface and perform usual firmware upgrade.

FLash instruction under U-Boot recovery mode (doesn't work in beta
firmware):

1. Setup PC with static IP "192.168.0.66/24" and tftp server.
2. Change "*-factory" image filename to "WR942v1_recovery.bin" and make
   it available to download from your tftp server.
3. Press "reset" button and power up the router, wait till "WPS" LED
   turns on.

Flash instruction under U-Boot, using UART (can be done only with
preinstalled UART-enabled U-Boot version!):

1. Use "tpl" to stop autobooting and obtain U-Boot CLI access.
2. Setup ip addresses for U-Boot and your tftp server.
3. Issue below commands:
   tftp 0x81000000 lede-ar71xx-generic-tl-wr942n-v1-sysupgrade.bin
   erase 0x9f020000 +$filesize
   cp.b 0x81000000 0x9f020000 $filesize
   reset

Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
[minor code style fixes, extended commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: move WRTnode2Q to generic build target
Piotr Dymacz [Fri, 9 Jun 2017 17:56:09 +0000 (19:56 +0200)]
ar71xx: move WRTnode2Q to generic build target

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: simplify Ubiquiti devices definitions
Piotr Dymacz [Sat, 10 Jun 2017 16:57:56 +0000 (18:57 +0200)]
ar71xx: image: simplify Ubiquiti devices definitions

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: mikrotik: shorten DEVICE_TITLE
Piotr Dymacz [Sat, 10 Jun 2017 11:48:34 +0000 (13:48 +0200)]
ar71xx: image: mikrotik: shorten DEVICE_TITLE

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: use simply expanded variables
Piotr Dymacz [Thu, 8 Jun 2017 13:18:34 +0000 (15:18 +0200)]
ar71xx: image: use simply expanded variables

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: update GL.iNet boards DEVICE_TITLE
Piotr Dymacz [Wed, 31 May 2017 20:12:51 +0000 (22:12 +0200)]
ar71xx: image: update GL.iNet boards DEVICE_TITLE

Use "GL.iNet" as vendor name (based on information from the vendor, this
is registered name of the company) and align model names with official
website.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: fix 8devices boards DEVICE_TITLE
Piotr Dymacz [Wed, 31 May 2017 19:56:10 +0000 (21:56 +0200)]
ar71xx: image: fix 8devices boards DEVICE_TITLE

Be consistent with DEVICE_TITLE syntax and use vendor + board names.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: drop unused mtdlayouts from legacy.mk
Piotr Dymacz [Wed, 7 Jun 2017 20:37:30 +0000 (22:37 +0200)]
ar71xx: image: drop unused mtdlayouts from legacy.mk

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: cosmetic: drop redundant empty lines
Piotr Dymacz [Wed, 31 May 2017 19:23:53 +0000 (21:23 +0200)]
ar71xx: image: cosmetic: drop redundant empty lines

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: add ROOTFS_SIZE to DEVICE_VARS
Piotr Dymacz [Wed, 31 May 2017 18:02:36 +0000 (20:02 +0200)]
ar71xx: image: add ROOTFS_SIZE to DEVICE_VARS

Also use ROOTFS_SIZE variable in place of static values.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: keep custom Build/* functions in separate files
Piotr Dymacz [Wed, 31 May 2017 14:31:44 +0000 (16:31 +0200)]
ar71xx: image: keep custom Build/* functions in separate files

Most of the custom Build/* functions in ar71xx target are rarely used by
image building code for devices from more than one subtarget. As they
don't need to be always included, move them to corresponding *.mk files.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: keep DEVICE_VARS and Build/* at the beginning
Piotr Dymacz [Wed, 31 May 2017 09:16:22 +0000 (11:16 +0200)]
ar71xx: image: keep DEVICE_VARS and Build/* at the beginning

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: simplify Compex devices definitions
Piotr Dymacz [Tue, 30 May 2017 21:20:16 +0000 (23:20 +0200)]
ar71xx: image: simplify Compex devices definitions

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: drop redundant kmod-usb-ohci from DEVICE_PACKAGES
Piotr Dymacz [Tue, 30 May 2017 20:55:29 +0000 (22:55 +0200)]
ar71xx: image: drop redundant kmod-usb-ohci from DEVICE_PACKAGES

kmod-usb-ohci is needed only on devices with AR71xx and AR7240 SoCs.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agoar71xx: image: drop redundant uboot-envtools from DEVICE_PACKAGES
Piotr Dymacz [Tue, 30 May 2017 20:25:02 +0000 (22:25 +0200)]
ar71xx: image: drop redundant uboot-envtools from DEVICE_PACKAGES

uboot-envtools is already included in DEFAULT_PACKAGES for ar71xx.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years agofirmware-utils: tplink-safeloader: support strings as soft_version
Jan Niehusmann [Fri, 19 May 2017 07:42:24 +0000 (09:42 +0200)]
firmware-utils: tplink-safeloader: support strings as soft_version

Some TP-Link routers (C25, C59, C60) contain a version string instead
of a binary structure in the soft_version partition.

Flashing LEDE from the original firmware's GUI, this version string
taken from the soft_ver partition of the firmware image is written to
the router's config partition.

When using tftp recovery to go back to the original Archer C25 firmware,
a version check compares that version to the version of the firmware to
be flashed.

Without proper contents in the config partition, reverting to the
original firmware fails.

Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver
partition.

Signed-off-by: Jan Niehusmann <jan@gondor.com>
6 years agoar71xx: fixup ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Kevin Darbyshire-Bryant [Sun, 11 Jun 2017 13:36:17 +0000 (14:36 +0100)]
ar71xx: fixup ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset

Fix malformed patch introduced by 296312fca13a4cab1d157e0474e1f0bcca6adf5c

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
6 years agodnsmasq: make bind-dynamic 'non-wildcard' interfaces default
Kevin Darbyshire-Bryant [Fri, 24 Feb 2017 10:08:30 +0000 (10:08 +0000)]
dnsmasq: make bind-dynamic 'non-wildcard' interfaces default

'non-wildcard' interfaces enables dnsmasq's '--bind-dynamic' mode.  This
binds to interfaces rather than wildcard addresses *and* keeps track of
interface comings/goings via a unique Linux api.

Quoting dnsmasq's author "bind-dynamic (bind individual addresses, keep
up with changes in interface config) ... On linux, there's actually no
sane reason not to use --bind-dynamic, and it's only not the default for
historical reasons."

Let's change history, well on LEDE at least, and change the default!

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
6 years agoar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Alexander Couzens [Sun, 11 Jun 2017 11:43:55 +0000 (13:43 +0200)]
ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)

Found-by: Coverity Scan #1330474
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agolinux/swconfig_get_attr: fix leak of msg in case of error
Alexander Couzens [Sun, 11 Jun 2017 11:33:18 +0000 (13:33 +0200)]
linux/swconfig_get_attr: fix leak of msg in case of error

Found-by: Coverity Scan #1330102
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agolinux/ledtrig-netdev: remove `unsigned < 0` check
Alexander Couzens [Sun, 11 Jun 2017 11:30:21 +0000 (13:30 +0200)]
linux/ledtrig-netdev: remove `unsigned < 0` check

Found-by: Coverity Scan
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agoar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Alexander Couzens [Sun, 11 Jun 2017 11:27:20 +0000 (13:27 +0200)]
ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset

Found-by: Coverity Scan #1329327
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agoar71xx/ag71xx_ethtool: don't return uninitialized return value on success
Alexander Couzens [Sun, 11 Jun 2017 10:51:58 +0000 (12:51 +0200)]
ar71xx/ag71xx_ethtool: don't return uninitialized return value on success

ag71xx_ethtool_set_ringparam() will return an uninitialized value on
success.

Found-by: Coverity Scan #1330877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agoar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails
Alexander Couzens [Sun, 11 Jun 2017 10:49:19 +0000 (12:49 +0200)]
ar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails

Found-by: Coverity Scan #1330233
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agoar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument `port`
Alexander Couzens [Sun, 11 Jun 2017 10:43:24 +0000 (12:43 +0200)]
ar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument `port`

Found-by: Coverity Scan #1329901
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agobase-files: board.json's switch reset means existence, not argument
Jonas Gorski [Sun, 11 Jun 2017 10:50:14 +0000 (12:50 +0200)]
base-files: board.json's switch reset means existence, not argument

Don't pass the value unconditionally to swconfig as a parameter but
instead only call reset if it is 1.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: probe SPI connected switches through DT
Jonas Gorski [Thu, 9 Feb 2017 20:58:36 +0000 (21:58 +0100)]
brcm63xx: probe SPI connected switches through DT

Now that we can configure the switches through DT, do so.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agob53: allow configuration through device tree
Jonas Gorski [Thu, 9 Feb 2017 20:20:41 +0000 (21:20 +0100)]
b53: allow configuration through device tree

Add support for the same binding as upstream b53 to allow an
easy switch.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: switch to hardware led controllers
Jonas Gorski [Thu, 11 May 2017 11:50:18 +0000 (13:50 +0200)]
brcm63xx: switch to hardware led controllers

Instead of bit banging SPI to talk to the GPIO chip, use the hardware
led controllers intended for controlling the LEDs.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: leds-bcm6328: fix signal assignments for leds 4~7
Jonas Gorski [Sun, 14 May 2017 21:45:31 +0000 (23:45 +0200)]
brcm63xx: leds-bcm6328: fix signal assignments for leds 4~7

Properly use modulus for bit calculation for LEDs 4 to 7.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: dsl-275xb-d: configure switch leds
Jonas Gorski [Sun, 14 May 2017 20:21:08 +0000 (22:21 +0200)]
brcm63xx: dsl-275xb-d: configure switch leds

Add pinctrl configuration to configure the switch leds on DSL-275XB.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: add pinctrl support
Jonas Gorski [Fri, 1 Jul 2016 09:23:06 +0000 (11:23 +0200)]
brcm63xx: add pinctrl support

Add and enable pincontrol drivers, and update dts(i) files with
appropriate hogs.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agokernel: make regmap LZO cache optional
Jonas Gorski [Thu, 8 Jun 2017 08:40:50 +0000 (10:40 +0200)]
kernel: make regmap LZO cache optional

There are no users, so hide it and let future users select it. Saves
about ~17 kB on MIPS.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agobrcm63xx: backport upstream generic gpio changes
Jonas Gorski [Fri, 1 Jul 2016 09:22:08 +0000 (11:22 +0200)]
brcm63xx: backport upstream generic gpio changes

Backport patches that add a data pointer to gpio_chip.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years agokexec-tools: bump version and add support for crashdump kernel
Daniel Golle [Tue, 21 Mar 2017 21:58:13 +0000 (15:58 -0600)]
kexec-tools: bump version and add support for crashdump kernel

split kexec-tools into two packages, kexec and kdump.
* kexec to simply execute a new kernel
* kdump is for loading and collecting debris of a crashed kernel with
  support for kdump forensics.

In order to properly support booting into a crashkernel, an init script
as well as UCI configuration has been added.
As modifying the kernel cmdline is required for this to work in x86
platforms use an uci-defaults script to modify /boot/grub/grub.cfg.

To test collecting crash information, use the 'c' sysrq-trigger, ie.
echo c > /proc/sysrq-trigger

This should result in the crash kernel being executed and (depending
on the configution) dmesg and/or vmcore getting saved.

To check if the crash kernel was loaded properly, use the 'status'
command of the kdump init script.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agodnsmasq: add dhcp-script hook conditionally
Hans Dedecker [Fri, 9 Jun 2017 14:24:12 +0000 (16:24 +0200)]
dnsmasq: add dhcp-script hook conditionally

Commit b32689afd6a661339861086c669e15c936293cf8 added support for dhcp-script hook.
Adding dhcp-script config option results into two instances of dnsmasq being run
which triggered oom issues on platforms having low memory.

The dnsmasq dhcp-script config option will now only be added if at least one of the
dhcp, tftp, neigh hotplug dirs has a regular hotplug file or if the dhcpscript uci
config option is specified.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agobcm53xx: include wpad-mini only on devices with (supported) wireless
Rafał Miłecki [Mon, 22 May 2017 10:50:53 +0000 (12:50 +0200)]
bcm53xx: include wpad-mini only on devices with (supported) wireless

Don't include wpad-mini when it's useless just like we don't include
useless wireless drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years agobase-files: network.sh: fix a number of IPv6 logic flaws
Jo-Philipp Wich [Thu, 8 Jun 2017 17:27:46 +0000 (19:27 +0200)]
base-files: network.sh: fix a number of IPv6 logic flaws

* Change network_get_subnet6() to sensibly guess a suitable prefix

  Attempt to return the first non-linklocal, non-ula range, then attempt
  to return the first non-linklocal range and finally fall back to the
  previous behaviour of simply returning the first found item.

* Fix network_get_ipaddrs_all()

  Instead of replicating the flawed logic appending a fixed ":1" suffix
  to IPv6 addresses, rely on network_get_ipaddrs() and network_get_ipaddrs6()
  to build a single list of all interface addresses.

* Fix network_get_subnets6()

  Instead of replicating the flawed logic appending a fixed ":1" suffix
  to IPv6 addresses, rely on the ipv6-prefix-assignment.local-address
  field to figure out the proper network address.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agomwlwifi: update to version 10.3.4.0 / 2017-06-06
Jo-Philipp Wich [Thu, 8 Jun 2017 17:54:53 +0000 (19:54 +0200)]
mwlwifi: update to version 10.3.4.0 / 2017-06-06

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoinclude/toplevel: set env GIT_ASKPASS=/bin/true
Alexander Couzens [Wed, 7 Jun 2017 21:56:19 +0000 (23:56 +0200)]
include/toplevel: set env GIT_ASKPASS=/bin/true

When git-https request a service (e.g. github) which ask for credentials
git will pass this request to the user resulting download.pl to wait for
user input. Set GIT_ASKPASS to stop asking.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
6 years agobase-files: network.sh: properly report local IPv6 addresses
Jo-Philipp Wich [Thu, 8 Jun 2017 10:02:36 +0000 (12:02 +0200)]
base-files: network.sh: properly report local IPv6 addresses

Rework the network_get_ipaddr6() and network_get_ipaddrs6() functions to
fetch the effective local IPv6 address of delegated prefix from the
"local-address" field instead of naively hardcoding ":1" as static suffix.

Fixes FS#829.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agobuild: ensure that flock is available for make download
Felix Fietkau [Thu, 8 Jun 2017 09:05:05 +0000 (11:05 +0200)]
build: ensure that flock is available for make download

It ensures that make download can parallelize downloads, even when some
packages download the same files (e.g. gcc/initial, gcc/final)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: update kernel 4.9 to 4.9.31
Jo-Philipp Wich [Wed, 7 Jun 2017 22:24:27 +0000 (00:24 +0200)]
kernel: update kernel 4.9 to 4.9.31

Fixes the following security vulnerabilities:

CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.

CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.

CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.

CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.

Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.31

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agokernel: really select kernel 4.4.71
Hauke Mehrtens [Wed, 7 Jun 2017 20:57:41 +0000 (22:57 +0200)]
kernel: really select kernel 4.4.71

The previous commit f4a4f324cb76ad ("kernel: update kernel 4.4 to
4.4.71") missed the line which changes the kernel version, add it now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agokernel: update kernel 4.4 to 4.4.71
Jo-Philipp Wich [Wed, 7 Jun 2017 16:15:24 +0000 (18:15 +0200)]
kernel: update kernel 4.4 to 4.4.71

Fixes the following security vulnerabilities:

CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.

CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.

CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.

CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.

Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.71

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years agoautomake: import upstream fix for perl 5.26
Daniel Golle [Wed, 7 Jun 2017 17:39:33 +0000 (19:39 +0200)]
automake: import upstream fix for perl 5.26

Build broke as distributions now include Perl 5.26 and automake
triggered an "Unescaped left brace in regex" error.
Import upstream commit 13f00eb449 to fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agogdb: disable simulator ; it's broken on ppc
Alexandru Ardelean [Fri, 12 May 2017 08:50:55 +0000 (11:50 +0300)]
gdb: disable simulator ; it's broken on ppc

Error is:
```
ompile-loc2c.o compile-c-support.o inflow.o    init.o \
  ../sim/ppc/libsim.a -lreadline ../opcodes/libopcodes.a ../bfd/libbfd.a -L./../zlib -lz  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a    -lncurses -lm     ../libiberty/libiberty.a  build-gnulib/import/libgnu.a  -ldl -Wl,--dynamic-list=./proc-service.list
../sim/ppc/libsim.a(idecode.o): In function `update_time_from_event':
idecode.c:(.text+0x170): undefined reference to `error'
../sim/ppc/libsim.a(idecode.o): In function `event_queue_tick':
idecode.c:(.text+0x1cc): undefined reference to `error'
idecode.c:(.text+0x28c): undefined reference to `error'
idecode.c:(.text+0x318): undefined reference to `error'
../sim/ppc/libsim.a(idecode.o): In function `cpu_halt.constprop.6':
idecode.c:(.text+0x398): undefined reference to `error'
../sim/ppc/libsim.a(idecode.o):idecode.c:(.text+0x4e4): more undefined references to `error' follow
collect2: error: ld returned 1 exit status
Makefile:1420: recipe for target 'gdb' failed
make[5]: *** [gdb] Error 1
```

Seems others are running into this as well.
The problem seems to be that some code may be built
as C++ and not C, which may explain the linker error.

On this thread reply:
   https://sourceware.org/ml/gdb/2016-11/msg00045.html
it mentions that the simulator should not call GDB's
"error" function directly, but rather use the "host_callback"
struct.

I have no idea about the use of the GDB simulator within
the OpenWrt/LEDE community.

So, I took the easier route, which is to disable the simulator.
(Also suggested here: https://sourceware.org/ml/gdb/2016-11/msg00047.html )

If needed, I can make an effort to fix the simulator for PPC.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
6 years agogdb: remove Build/Compile rule ; default one works
Alexandru Ardelean [Fri, 12 May 2017 08:50:05 +0000 (11:50 +0300)]
gdb: remove Build/Compile rule ; default one works

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
6 years agokernel: remove CONFIG_ZONE_DMA_FLAG from 4.9
Sergey Ryazanov [Tue, 30 May 2017 21:46:41 +0000 (00:46 +0300)]
kernel: remove CONFIG_ZONE_DMA_FLAG from 4.9

There are no CONFIG_ZONE_DMA_FLAG config symbol since 4.7.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agokernel: disable CONFIG_SG_POOL by default
Sergey Ryazanov [Tue, 30 May 2017 21:46:40 +0000 (00:46 +0300)]
kernel: disable CONFIG_SG_POOL by default

CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last
one is disabled by default then disable CONFIG_SG_POOL by default too.
And explicitly enable it only for platforms that use CONFIG_SCSI.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agoath25: add missed HAVE_IRQ_EXIT_ON_IRQ_STACK
Sergey Ryazanov [Tue, 30 May 2017 21:46:39 +0000 (00:46 +0300)]
ath25: add missed HAVE_IRQ_EXIT_ON_IRQ_STACK

Add HAVE_IRQ_EXIT_ON_IRQ_STACK kernel configuration symbol that was
missed during backporting separate IRQ stack for MIPS from upstream.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agorb532: enable high-res timers, refresh kernel config
Felix Fietkau [Thu, 1 Jun 2017 09:17:13 +0000 (11:17 +0200)]
rb532: enable high-res timers, refresh kernel config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoxburst: enable high-res timers, refresh kernel config
Felix Fietkau [Thu, 1 Jun 2017 09:15:39 +0000 (11:15 +0200)]
xburst: enable high-res timers, refresh kernel config

Helps with system performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoocteon: enable high-res timers
Felix Fietkau [Thu, 1 Jun 2017 09:11:11 +0000 (11:11 +0200)]
octeon: enable high-res timers

Helps with network stack performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: add CONFIG_SCHED_HRTICK=y to the generic config
Felix Fietkau [Thu, 1 Jun 2017 09:10:21 +0000 (11:10 +0200)]
kernel: add CONFIG_SCHED_HRTICK=y to the generic config

It is used by pretty much every target

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agopackage/grub2: update to 2.02
Alif M. Ahmad [Sat, 20 May 2017 07:11:16 +0000 (14:11 +0700)]
package/grub2: update to 2.02

Update to version 2.02

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
6 years agox86: include USB HID by default
Lucian Cristian [Thu, 25 May 2017 16:15:44 +0000 (19:15 +0300)]
x86: include USB HID by default

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agokernel: fix segmentation fault in mconf on linux
Felix Fietkau [Wed, 7 Jun 2017 16:14:27 +0000 (18:14 +0200)]
kernel: fix segmentation fault in mconf on linux

Commit 86c966a8ae9c4e74b912a16a760aaed17c68eb32 caused HOST_LOADLIBES to
include -lncurses. This was added for fixing build issues on macOS.
This introduces issues on Linux when wide-character ncurses is being
used for compiling, but the non-wide-character version is linked in.

Fix this by adding the extra override for HOST_LOADLIBES only on macOS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agomac80211: use KERNEL_MAKEOPTS
Felix Fietkau [Thu, 16 Mar 2017 09:13:14 +0000 (10:13 +0100)]
mac80211: use KERNEL_MAKEOPTS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agobuild: add KERNEL_MAKE and KERNEL_MAKE_FLAGS variables and move to kernel.mk
Felix Fietkau [Thu, 16 Mar 2017 08:53:30 +0000 (09:53 +0100)]
build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS variables and move to kernel.mk

This allows packages to use kernel make options without the forced
-C $(LINUX_DIR). It also makes it more clear that it to be called from
kernel module packages directly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: update myloader for linux 4.9
Sergey Ryazanov [Tue, 30 May 2017 21:46:42 +0000 (00:46 +0300)]
kernel: update myloader for linux 4.9

add backport patches for older kernels.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agoip17xx: correct aneg_done return value
Sergey Ryazanov [Tue, 6 Jun 2017 22:25:32 +0000 (01:25 +0300)]
ip17xx: correct aneg_done return value

PHY core treats any positive return value as the auto-negotiation done
indication. Since we do not actually check any device register in this
callback then update it to return positive value with a neutral meaning
instead of the register flag to avoid  confusing for future readers.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agomvswitch: fix autonegotiation issue
Sergey Ryazanov [Tue, 6 Jun 2017 22:25:31 +0000 (01:25 +0300)]
mvswitch: fix autonegotiation issue

The Marvel 88E6060 switch has an MDIO interface, but does not emulate
regular PHY behavior for the host. The network core can not detect using
the generic code, whether the connection via the attached PHY can be
used or not. The PHY's state machine is stuck in a state of
auto-negotiation and does not go any further so the Ethernet interface
of the router stay forever in the not-runing state.

Fix this issue by implementing the aneg_done callback to be able to
inform the network core that the Ethernet interface link to which the
switch is connected can be marked as RUNNING.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agolinux/ath25: fixing some tabs and whitespace
Sven Roederer [Tue, 6 Jun 2017 13:52:06 +0000 (15:52 +0200)]
linux/ath25: fixing some tabs and whitespace

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
6 years agoath25: drop 4.4 kernel support
Sergey Ryazanov [Wed, 7 Jun 2017 04:49:46 +0000 (06:49 +0200)]
ath25: drop 4.4 kernel support

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agoath25: switch to 4.9 kernel
Sergey Ryazanov [Tue, 6 Jun 2017 22:49:39 +0000 (01:49 +0300)]
ath25: switch to 4.9 kernel

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years agoath25: 4.9: fix Ethernet link autonegotiation
Sergey Ryazanov [Tue, 6 Jun 2017 22:49:38 +0000 (01:49 +0300)]
ath25: 4.9: fix Ethernet link autonegotiation

Drop the own PHY polling function and switch to using the kernel PHY
state machine. This change allows driver to work correctly with devices
that do not support PHY behaviour but whose driver could emulate
autonegotiation completion (e.g. MV88E6060 and IP17xx switches).

NB: earlier this driver rely on flaws in PHY core code and could use PHY
device without really starting it. But now (at least in kernel 4.9)
this trick no more work and network interface could stuck in not-running
state.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>