openwrt/openwrt.git
7 years agomt76: update to the latest version, fixes dfs issues
Felix Fietkau [Mon, 12 Dec 2016 09:54:47 +0000 (10:54 +0100)]
mt76: update to the latest version, fixes dfs issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotcpdump: reduce size of -mini by removing more infrequently used protocols
Felix Fietkau [Sat, 10 Dec 2016 13:02:15 +0000 (14:02 +0100)]
tcpdump: reduce size of -mini by removing more infrequently used protocols

This removes:
- BGP
- CDP
- SCTP

MIPS binary .ipk size is reduced from ~150k to ~130k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agonet/utils/tcpdump: update to 4.8.1
p-wassi [Sat, 10 Dec 2016 10:10:03 +0000 (11:10 +0100)]
net/utils/tcpdump: update to 4.8.1

Update tcpdump to upstream release 4.8.1

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
7 years agombedtls: tune config to reduce size and improve performance
Felix Fietkau [Sat, 10 Dec 2016 11:27:23 +0000 (12:27 +0100)]
mbedtls: tune config to reduce size and improve performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agombedtls: sync with polarssl config
Felix Fietkau [Sat, 10 Dec 2016 10:22:58 +0000 (11:22 +0100)]
mbedtls: sync with polarssl config

One of those changes is re-enabling blowfish support to make
openvpn-mbedtls compatible with common configurations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoopenvpn: quote parameters to --push in openvpn config file
Magnus Kroken [Sat, 10 Dec 2016 11:02:03 +0000 (12:02 +0100)]
openvpn: quote parameters to --push in openvpn config file

OpenVPN requires arguments to --push to be enclosed in double quotes.
One set of quotes is stripped when the UCI config is parsed.
Change append_params() of openvpn.init to enclose push parameters in
double quotes.

Unquoted push parameters do not cause errors in OpenVPN 2.3,
but OpenVPN 2.4 fails to start with unquoted push parameters.

Fixes: FS#290.
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
7 years agombedtls: enable MBEDTLS_DHM_C
Magnus Kroken [Fri, 9 Dec 2016 20:07:37 +0000 (21:07 +0100)]
mbedtls: enable MBEDTLS_DHM_C

This option is required by OpenVPN, and OpenVPN 2.4 uses mbedTLS 2.x.
DHM_C is also already enabled in the PolarSSL 1.3.x config.h.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
7 years agoar71xx: remove obsolete flash chip locking code
Felix Fietkau [Fri, 9 Dec 2016 20:07:33 +0000 (21:07 +0100)]
ar71xx: remove obsolete flash chip locking code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: remove PB92 reference design board support
Felix Fietkau [Fri, 9 Dec 2016 13:29:21 +0000 (14:29 +0100)]
ar71xx: remove PB92 reference design board support

Due to flash size limitations, support for this board has not been
functional for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: remove AP113 reference design board support
Felix Fietkau [Fri, 9 Dec 2016 13:26:12 +0000 (14:26 +0100)]
ar71xx: remove AP113 reference design board support

Due to flash size limitations, support for this board has not been
functional for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: remove AP81 reference design board support
Felix Fietkau [Fri, 9 Dec 2016 13:23:39 +0000 (14:23 +0100)]
ar71xx: remove AP81 reference design board support

This board is very old and unlikely to still be relevant today.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: remove obsolete duplicate driver source file
Felix Fietkau [Fri, 9 Dec 2016 09:07:14 +0000 (10:07 +0100)]
ar71xx: remove obsolete duplicate driver source file

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: remove AP83 reference design board support
Felix Fietkau [Thu, 8 Dec 2016 20:46:15 +0000 (21:46 +0100)]
ar71xx: remove AP83 reference design board support

This board is very old and unlikely to still be relevant today. Support
for it contains a significant amount of device specific baggage which is
worth getting rid of.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: clean up spi controller related patches
Felix Fietkau [Thu, 8 Dec 2016 20:10:50 +0000 (21:10 +0100)]
ar71xx: clean up spi controller related patches

Remove various hacks for fast read, un-break device tree support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobcm53xx: disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK
Rafał Miłecki [Sun, 11 Dec 2016 12:05:08 +0000 (13:05 +0100)]
bcm53xx: disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK

There are many targets using user space scripts to generate firmware but
bcm53xx doesn't need this, so let's disable that kernel option.

This lets us avoid some scary-looking kernel warnings like:
brcmfmac 0001:04:00.0: Falling back to user helper
firmware brcm!brcmfmac43602-pcie.txt: firmware_loading_store: map pages failed

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agolantiq: remove "init" kernel command line parameter from bootargs
Martin Blumenstingl [Sun, 11 Dec 2016 20:55:01 +0000 (21:55 +0100)]
lantiq: remove "init" kernel command line parameter from bootargs

/etc/preinit has been the default init-script for a very long time (at
least since Linux 2.6.30 in OpenWrt). Remove the kernel command line
"init" parameter to get rid of duplicate and inconsistent definitions
of this parameter (some boards, like FRITZ3370 for example did not use
it at all, while it's just copy and paste on others).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years agolantiq: specify console using stdout-path instead of cmdline argument
Martin Blumenstingl [Sun, 11 Dec 2016 20:55:00 +0000 (21:55 +0100)]
lantiq: specify console using stdout-path instead of cmdline argument

Use devicetree's /chosen/stdout-path instead of the kernel command line
(embedded in the .dts-files) to specify the serial console. Using the
chosen node is recommended on devicetree based platforms.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years agouboot-envtools: add support for YunCore SR3200 and XD3200
Piotr Dymacz [Fri, 2 Dec 2016 22:01:44 +0000 (23:01 +0100)]
uboot-envtools: add support for YunCore SR3200 and XD3200

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: add support for YunCore SR3200 and XD3200
Piotr Dymacz [Fri, 2 Dec 2016 21:42:41 +0000 (22:42 +0100)]
ar71xx: add support for YunCore SR3200 and XD3200

YunCore SR3200 is a dual-band AC1200 router, based on Qualcomm/Atheros
QCA9563+QCA9882+QCA8337N.

YunCore XD3200 (FCC ID: 2ADUG-XD3200) is a dual-band AC1200 ceiling mount
AP with PoE support, based on Qualcomm/Atheros QCA9563+QCA9882+QCA8334.

Common specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB or RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 2T2R 2.4 GHz, with ext. PA (SKY65174-21), up to 30 dBm
- 2T2R 5 GHz, with ext. PA (SKY85405-11) and LNA (SKY85601-11), up to 30 dBm

SR3200 specification:

- 5x 10/100/1000 Mbps Ethernet
- 6x ext. RP-SMA antennas (actually, only 4 are connected with radio chips)
- 3x LED (+ 5x LED in RJ45 sockets), 1x button
- UART header on PCB

XD3200 specification:

- 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port)
- 4x internal antennas
- 3 sets of LEDs on external PCB (+ 2x LED near RJ45 sockets), 1x button
- UART and JTAG (custom 6-pin, 2 mm pitch) headers on PCB

LED for 5 GHz WLAN is currently not supported on both devices as it is
connected directly to the QCA9882 radio chip.

Flash instruction under vendor firmware, using telnet/SSH:

1. If your firmware does not have root password, go to point 5
2. Connect PC with 192.168.1.x address to LAN or WAN port
3. Power up device, enter failsafe mode with button (no LED indicator!)
4. Change root password and reboot (mount_root, passwd ..., reboot -f)
5. Upload lede-ar71xx-...-sysupgrade.bin to /tmp using SCP
6. Connect PC with 192.168.188.x address to LAN port, SSH to 192.168.188.253
7. Invoke:
- cd /tmp
- fw_setenv bootcmd "bootm 0x9fe80000 || bootm 0x9f050000"
- mtd -e firmware -r write lede-ar71xx-...-sysupgrade.bin firmware

Flash instruction under U-Boot, using UART:

1. tftp 0x80060000 lede-ar71xx-...-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9fe80000 || bootm 0x9f050000"
5. saveenv && reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoca-certificates: update to version 20161130
Christian Schoenebeck [Mon, 5 Dec 2016 20:21:36 +0000 (21:21 +0100)]
ca-certificates: update to version 20161130

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
7 years agolayerscape: add 64b/32b target for ls1046ardb device
Yutang Jiang [Wed, 7 Dec 2016 16:07:42 +0000 (00:07 +0800)]
layerscape: add 64b/32b target for ls1046ardb device

Add support for NXP layerscape ls1046ardb 64b/32b Dev board.

LS1046ARDB Specification:
-------------------------
Memory subsystem:
* 8GByte DDR4 SDRAM (64bit bus)
* 512 Mbyte NAND flash
* Two 64 Mbyte high-speed SPI flash
* SD connector to interface with the SD memory card
* On-board 4G eMMC
Ethernet:
* Two XFI 10G ports
* Two SGMII ports
* Two RGMII ports
PCIe:
* PCIe1 (SerDes2 Lane0) to miniPCIe slot
* PCIe2 (SerDes2 Lane1) to x2 PCIe slot
* PCIe3 (SerDes2 Lane2) to x4 PCIe slot

* USB 3.0: one super speed USB 3.0 type A port, one Micro-AB port
* UART: supports two UARTs up to 115200 bps for console

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
7 years agolayerscape: fman-ucode: prefer github over git.freescale.com
Yutang Jiang [Fri, 2 Dec 2016 16:09:47 +0000 (00:09 +0800)]
layerscape: fman-ucode: prefer github over git.freescale.com

In order to prevent the impact of the merger of the company and the potential
rebase of the SDK repositories, migrate the u-boot source to github.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
7 years agolayerscape: uboot-layerscape: prefer github over git.freescale.com
Yutang Jiang [Thu, 1 Dec 2016 15:01:27 +0000 (23:01 +0800)]
layerscape: uboot-layerscape: prefer github over git.freescale.com

In order to prevent the impact of the merger of the company and the potential
rebase of the SDK repositories, migrate the u-boot source to github.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
7 years agobase-files: Changed UCI variable name for GPIO value from 'default' to 'value'
Julian Labus [Thu, 8 Dec 2016 16:13:09 +0000 (17:13 +0100)]
base-files: Changed UCI variable name for GPIO value from 'default' to 'value'

This changes the UCI variable for the GPIO value from system.$cfg.default back
to system.$cfg.value as it was before the change from uci-defaults [1] to board.d.
/etc/init.d/gpio_switch [2] still expects the value to be in system.$cfg.value.

[1] https://github.com/lede-project/source/blob/d65916047b44d6d157d88d15e8e3d92555c5e6f8/package/base-files/files/lib/functions/uci-defaults.sh#L197
[2] https://github.com/lede-project/source/blob/master/package/base-files/files/etc/init.d/gpio_switch#L17

Signed-off-by: Julian Labus <julian@labus-online.de>
7 years agolantiq: falcon: remove bootargs-append
Hauke Mehrtens [Sun, 4 Dec 2016 18:03:48 +0000 (19:03 +0100)]
lantiq: falcon: remove bootargs-append

This attribute is not evaluated any more and the boot loader on these
reference boards does not provide a broken root= or console= parameter.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agokernel: add TI tmp102 and tmp103 temperature sensors
Hauke Mehrtens [Sun, 4 Dec 2016 13:19:07 +0000 (14:19 +0100)]
kernel: add TI tmp102 and tmp103 temperature sensors

This just adds the kmods for these kernel modules.
This is found on some Lantiq / Intel reference boards.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agokernel: add KERNEL_DEBUG_PINCTRL and KERNEL_DEBUG_GPIO
Hauke Mehrtens [Sun, 4 Dec 2016 13:33:30 +0000 (14:33 +0100)]
kernel: add KERNEL_DEBUG_PINCTRL and KERNEL_DEBUG_GPIO

This makes it possible to activate the gpio and the pinctl debugging
from LEDE menuconfig.

Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agobuild: support adding version code to file names (FS#323)
Jo-Philipp Wich [Mon, 5 Dec 2016 15:44:13 +0000 (16:44 +0100)]
build: support adding version code to file names (FS#323)

Now that the VERSION_NUMBER variable holds the human friendly name and not
the commit ID anymore, we need to support adding the revision ID as well.

Introduce a new config variable CONFIG_VERSION_CODE_FILENAMES which, if set,
causes the resulting file names to contain a commit ID designation as printed
by scripts/getver.sh.

Also sanitize the input variables to ensure that the resulting strings are
lowercased and no not contain spaces.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agolantiq: simplify ath9k eeprom extraction script
Mathias Kresin [Mon, 5 Dec 2016 08:21:29 +0000 (09:21 +0100)]
lantiq: simplify ath9k eeprom extraction script

Add an extra function to patch the mac and fixup the checksum
afterwards. Calculate the checksum position automatically. The offset
to the mac address is the same for all checksum protected EEPROMs.

No EEPROM requires a byte swapped mac address. The mac byte swap code
was required due to an bug in the script that is now fixed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: fix ath9k EEPROM data swapping for some devices
Martin Blumenstingl [Sun, 4 Dec 2016 07:26:55 +0000 (08:26 +0100)]
lantiq: fix ath9k EEPROM data swapping for some devices

The EEPROM data in the flash of the ARV7518PW, ARV8539PW22,
BTHOMEHUBV2B and BTHOMEHUBV3A is stored byte-swapped (swab16), meaning
that for example the ath9k base_eep_header fields "version" (high and
low byte), "opCapFlags" and "eepMisc" are swapped (the latter ones are
just 1 byte wide, thus their position is swapped).

The old "ath,eep-endian" property enabled the corresponding swapping
logic in the ath9k driver (swab16 in ath9k_hw_nvram_swap_data, which is
based on the magic bytes in the EEPROM data which have nothing to do
with the calibration data - thus this logic should not be used
anymore).
Since we have switched to the upstream ath9k devicetree bindings there
is no binding anymore which enables swab16 in ath9k (as this logic is
not recommended anymore as explained above), leading to ath9k
initialization errors:
ath: phy0: Bad EEPROM VER 0x0001 or REV 0x00e0
(this shows that the version field is swapped, expected values are VER
0x000E and REV 0x0001)

Swapping the ath9k calibration data when extracting it from the flash
fixes the devices listed above (all other devices do not require
additional swapping, since the position of the fields is already as
expected by ath9k). This allows ath9k to read the version correctly
again, as well as the more important "eepmisc" field (which is used for
determining whether the data inside the EEPROM is Big or Little Endian
which is required to parse the EEPROM contents correctly).

Fixes: a20616863d3 ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years agobcm53xx: update patch adding fake USB doorbell
Rafał Miłecki [Wed, 7 Dec 2016 08:21:11 +0000 (09:21 +0100)]
bcm53xx: update patch adding fake USB doorbell

Rob suggested I should use of_machine_is_compatible insteak of a new
property and updated patch has been sent.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agodnsmasq: Fix splitting hostid for DHCPv6 static leases
Arjen de Korte [Mon, 5 Dec 2016 11:53:16 +0000 (12:53 +0100)]
dnsmasq: Fix splitting hostid for DHCPv6 static leases

Correct splitting the 32-bit 'hostid' value to two 16-bit hexadecimal
values. Previously, the lower 16-bit value was truncated to an 8-bit
value, which would result in hostid values 100 and 200 both to be set
to [::0:0] instead of [::0:100] and [::0:200] respectively.

Signed-off-by: Arjen de Korte <build+lede@de-korte.org>
7 years agokernel: backport LED patch which will allow better DT integration
Rafał Miłecki [Tue, 6 Dec 2016 18:48:20 +0000 (19:48 +0100)]
kernel: backport LED patch which will allow better DT integration

It's not used by any driver yet, it may just simplify development and
testing new features.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: fix potential crash in usbport LED trigger driver
Rafał Miłecki [Tue, 6 Dec 2016 18:19:53 +0000 (19:19 +0100)]
kernel: fix potential crash in usbport LED trigger driver

This backports upstream accepted fix.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoar71xx: fix LEDs and sysupgrade support for TL-WA801ND v3
Matthias Schiffer [Tue, 6 Dec 2016 15:18:49 +0000 (16:18 +0100)]
ar71xx: fix LEDs and sysupgrade support for TL-WA801ND v3

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agotools/upslug2: add SHA256 hash to use mirror tarball
Felix Fietkau [Mon, 5 Dec 2016 10:37:42 +0000 (11:37 +0100)]
tools/upslug2: add SHA256 hash to use mirror tarball

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agodnsmasq: reload config if host name is modified
Florian Eckert [Wed, 30 Nov 2016 08:08:21 +0000 (09:08 +0100)]
dnsmasq: reload config if host name is modified

If the hostname in /etc/config/system is modified the dnsmasq will not
reread the update host file under /tmp/hosts/dhcp.$cfg.

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
7 years agoramips: Fix led init script for Lenovo Y1/Y1s
BangLang Huang [Fri, 2 Dec 2016 01:33:23 +0000 (09:33 +0800)]
ramips: Fix led init script for Lenovo Y1/Y1s

This commit fix the led init script for Lenovo Y1 and
Y1S due to the manual and dts file.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
7 years agobrcm2708: update linux 4.4 patches to latest version
Álvaro Fernández Rojas [Fri, 2 Dec 2016 10:50:26 +0000 (11:50 +0100)]
brcm2708: update linux 4.4 patches to latest version

As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agobrcm2708-gpu-fw: update to latest version
Álvaro Fernández Rojas [Thu, 24 Nov 2016 12:27:28 +0000 (13:27 +0100)]
brcm2708-gpu-fw: update to latest version

Also switches hases to SHA256

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agokernel: bump to 4.4.36
Álvaro Fernández Rojas [Fri, 2 Dec 2016 10:43:17 +0000 (11:43 +0100)]
kernel: bump to 4.4.36

Refresh patches on all 4.4 supported platforms.
Compile & run tested: brcm2708/bcm2710 - Raspberry Pi 3

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agolibs: libnetfilter-queue: update to a newer version in git repo
Alexandru Ardelean [Tue, 22 Nov 2016 12:11:12 +0000 (14:11 +0200)]
libs: libnetfilter-queue: update to a newer version in git repo

Last release of libnetfilter-queue was in 2012.
There don't seem to be any release tarballs since then.

This updates it to a more recent version, pointing to the git repo.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years agoppp: Split the ppp-up for the IPv6 part
Pierre Lebleu [Thu, 27 Oct 2016 11:38:29 +0000 (13:38 +0200)]
ppp: Split the ppp-up for the IPv6 part

Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
7 years agoorion: make image size errors non-fatal
Felix Fietkau [Thu, 1 Dec 2016 13:42:03 +0000 (14:42 +0100)]
orion: make image size errors non-fatal

Fixes build errors on the generic subtarget

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoorion: Enable CONFIG_MV_XOR
Florian Fainelli [Wed, 30 Nov 2016 01:10:05 +0000 (17:10 -0800)]
orion: Enable CONFIG_MV_XOR

This is helpful for Orion-based NAS boxes that have the XOR engine enabled
since it provides faster software RAID.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Add uboot-envtools in the default package list
Florian Fainelli [Wed, 30 Nov 2016 01:10:04 +0000 (17:10 -0800)]
orion: Add uboot-envtools in the default package list

Makes sense since most, if not all orion platforms use this bootloader.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agokernel: Add missing kernel config symbol
Florian Fainelli [Wed, 30 Nov 2016 01:10:03 +0000 (17:10 -0800)]
kernel: Add missing kernel config symbol

Add CONFIG_DW_DMAC_PCI

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Set appropriate DEVICE_TYPE for harddisk target
Florian Fainelli [Wed, 30 Nov 2016 01:10:02 +0000 (17:10 -0800)]
orion: Set appropriate DEVICE_TYPE for harddisk target

The harddisk target is for NAS boxes, so set the DEVICE_TYPE accordingly so we
get a sensible default package selection.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Switch to kernel 4.4
Florian Fainelli [Wed, 30 Nov 2016 01:10:01 +0000 (17:10 -0800)]
orion: Switch to kernel 4.4

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Advertise support for RTC
Florian Fainelli [Wed, 30 Nov 2016 01:10:00 +0000 (17:10 -0800)]
orion: Advertise support for RTC

Otherwise, we can't select RTC_SUPPORT and the corresponding kmod-rtc-*
packages.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Make sub-targets augment FEATURES, not re-define it
Florian Fainelli [Wed, 30 Nov 2016 01:09:59 +0000 (17:09 -0800)]
orion: Make sub-targets augment FEATURES, not re-define it

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agokernel: add kernel package for the rs5c372a rtc module
Florian Fainelli [Wed, 30 Nov 2016 01:09:58 +0000 (17:09 -0800)]
kernel: add kernel package for the rs5c372a rtc module

This RTC is used on the Buffalo Terastation Pro II/Live devices.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Build images for Buffalo Terastation Pro II/Live
Florian Fainelli [Wed, 30 Nov 2016 01:09:57 +0000 (17:09 -0800)]
orion: Build images for Buffalo Terastation Pro II/Live

Enable support for this machine in the kernel and also produce valid image
files with the correct machine id.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Add support for 4.4 kernel
Florian Fainelli [Wed, 30 Nov 2016 01:09:56 +0000 (17:09 -0800)]
orion: Add support for 4.4 kernel

Patches and configuration apply just fine on the Marvell Orion target.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoorion: Fold DT2 setup files into patch
Florian Fainelli [Wed, 30 Nov 2016 01:09:55 +0000 (17:09 -0800)]
orion: Fold DT2 setup files into patch

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoinclude/kernel: Switch to git download method
Florian Fainelli [Wed, 9 Nov 2016 17:34:18 +0000 (09:34 -0800)]
include/kernel: Switch to git download method

Utilize the existing git download logic from include/download.mk and migrate
the kernel download over to it. This avoids repeatedly cloning kernel sources
after a make target/linux/clean for instance.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [fix build error]
7 years agoinclude/download.mk: Allow specify DownloadMethod specific options
Florian Fainelli [Wed, 9 Nov 2016 17:34:17 +0000 (09:34 -0800)]
include/download.mk: Allow specify DownloadMethod specific options

This is going to be used to migrate the hand rolled git clone for the kernel
into using the git download method. The kernel uses custom options that we may
have to pass down.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agokernel: Add check to of_scan_flat_dt() before accessing initial_boot_params
Felix Fietkau [Wed, 30 Nov 2016 16:00:14 +0000 (17:00 +0100)]
kernel: Add check to of_scan_flat_dt() before accessing initial_boot_params

Fixes a bug that affects rt288x

Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: Fix alloc_node_mem_map with ARCH_PFN_OFFSET
Felix Fietkau [Wed, 30 Nov 2016 15:58:41 +0000 (16:58 +0100)]
kernel: Fix alloc_node_mem_map with ARCH_PFN_OFFSET

Fixes a bug that affects rt288x

Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: set GPIO reset line for Ubiquiti NanoStation Loco XW
Felix Fietkau [Wed, 30 Nov 2016 10:56:48 +0000 (11:56 +0100)]
ar71xx: set GPIO reset line for Ubiquiti NanoStation Loco XW

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: add support for configuring at803x PHY GPIO reset via platform data
Felix Fietkau [Wed, 30 Nov 2016 10:55:39 +0000 (11:55 +0100)]
ar71xx: add support for configuring at803x PHY GPIO reset via platform data

Needed to work around ethernet hang issues on Ubiquiti NanoStation Loco XW,
because ar71xx is not converted to device tree yet.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: add support for the AT8032 PHY
Felix Fietkau [Wed, 30 Nov 2016 10:34:32 +0000 (11:34 +0100)]
kernel: add support for the AT8032 PHY

This PHY is used on the Ubiquiti Networks NanoStation Loco XW

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: backport some upstream at803x fixes
Felix Fietkau [Tue, 29 Nov 2016 16:55:41 +0000 (17:55 +0100)]
kernel: backport some upstream at803x fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoramips: prevent packet forwarding on mt7620 between switch ports during init (FS...
Felix Fietkau [Tue, 29 Nov 2016 10:59:48 +0000 (11:59 +0100)]
ramips: prevent packet forwarding on mt7620 between switch ports during init (FS#103)

By default, forwarding between all ports is allowed on init. This is
problematic in cases where some ports are supposed to be isolated from
each other, most commonly LAN/WAN separation.

REG_ESW_PORT_PCR(port) has a destination mask for a particular port,
controlling what other ports it is allowed to send packets to.
Instead of initializing all to 0xff (all ports), allow each physical
port to send to the CPU port, and the CPU port to send to all other
ports.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobase-files: add a hint in sysupgrade that shows what to do when the image metadata...
Felix Fietkau [Sat, 26 Nov 2016 17:43:59 +0000 (18:43 +0100)]
base-files: add a hint in sysupgrade that shows what to do when the image metadata check fails

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoramips: fix LAN port order of WeVO W2914NS v2
Yong-hyu, Ban [Sat, 3 Dec 2016 11:44:18 +0000 (20:44 +0900)]
ramips: fix LAN port order of WeVO W2914NS v2

Signed-off-by: Yong-hyu, Ban <perillamint@gentoo.moe>
7 years agoramips: fix PBR-D1 button definition
BangLang Huang [Fri, 2 Dec 2016 01:13:46 +0000 (09:13 +0800)]
ramips: fix PBR-D1 button definition

Due to the product specification, the button on PBR-D1 should be
reset, not wps.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
7 years agoramips: add support for PCI based OHCI/EHCI support for F5D8235 V1
Tobias Wolf [Fri, 18 Nov 2016 14:52:38 +0000 (15:52 +0100)]
ramips: add support for PCI based OHCI/EHCI support for F5D8235 V1

This router uses an PCI attached NEC EHCI controller to support the single USB port.

Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
7 years agoramips: introduce CONFIG_PCI and CONFIG_OF_*PCI for rt288x
Tobias Wolf [Tue, 15 Nov 2016 21:31:16 +0000 (22:31 +0100)]
ramips: introduce CONFIG_PCI and CONFIG_OF_*PCI for rt288x

This is a prerequisite for F5D8235 V1 to use PCI based OHCI/EHCI.

Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
7 years agoramips: improve F5D8235 V1 support
Tobias Wolf [Thu, 1 Dec 2016 14:08:22 +0000 (15:08 +0100)]
ramips: improve F5D8235 V1 support

This fixes the partition name for the firmware splitter, the cfi
address and adds the mtd-eeprom address for wmac. It adds additional
LEDs and make use of them in diag.sh and 01_leds.

Please note that the ":blue:wired" LED is used because the
":blue:router" behaviour is unpredictable for failsafe indication. The
issue with the router LED is that you have two states only.
"off" is steady on and "on" blinks. Therefore the wired LED is more
suitable.

Furthermore it reuses the correct switch configuration definition to
reflect the device ports and numbering. Additionally fixes the issue
that the default configuration is not applied as no port 6 exists on
this device.

Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
7 years agomvebu: fix sysupgrade for Linksys WRT3200ACM
Vignesh Balasubramaniam [Tue, 29 Nov 2016 17:53:13 +0000 (12:53 -0500)]
mvebu: fix sysupgrade for Linksys WRT3200ACM

sysupgrade command fails due to missing U-Boot environment-processing
binaries on sysupgrade ramdisk. The missing binaries result in the
following output:

Switching to ramdisk...
Performing system upgrade...
ash: /usr/sbin/fw_printenv: not found
ash: fw_setenv: not found
ash: touch: not found
cannot find target partition

Signed-off-by: Vignesh Balasubramaniam <vigneshb.hp@gmail.com>
7 years agomvebu: fix image validation error
Mathias Kresin [Thu, 1 Dec 2016 07:57:25 +0000 (08:57 +0100)]
mvebu: fix image validation error

The name from the Device define will be used in the metadata. Due to
typo/different spelling, this name might not match the one exported in
/lib/mvebu.sh.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: fix image validation errors
Mathias Kresin [Thu, 1 Dec 2016 06:29:49 +0000 (07:29 +0100)]
lantiq: fix image validation errors

The boards did not have the name set that is expected during metadata
validation on sysupgrade.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agocyassl: update to wolfssl version 3.9.10
Hauke Mehrtens [Sat, 3 Dec 2016 20:33:48 +0000 (21:33 +0100)]
cyassl: update to wolfssl version 3.9.10

This fixes the following security problems:
CVE-2016-7440: Software AES table lookups do not properly consider cache-bank access times
CVE-2016-7439: Software RSA does not properly consider cache-bank monitoring
CVE-2016-7438: Software ECC does not properly consider cache-bank monitoring
SWEET32 Attack

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agovalgrind: update to 3.12.0
Hauke Mehrtens [Sat, 1 Oct 2016 17:54:22 +0000 (19:54 +0200)]
valgrind: update to 3.12.0

Support for MIPS toolchains without FPU support was added upstream,
so remove our patch.

patches/310-mips-link-tool.patch was a backport form this version of valgrind
src/abort.c is not referenced anywhere

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agocurl: update to version 7.51.0
Hauke Mehrtens [Sat, 3 Dec 2016 15:07:47 +0000 (16:07 +0100)]
curl: update to version 7.51.0

This fixes the following security problems:
CVE-2016-8615: cookie injection for other servers
CVE-2016-8616: case insensitive password comparison
CVE-2016-8617: OOB write via unchecked multiplication
CVE-2016-8618: double-free in curl_maprintf
CVE-2016-8619: double-free in krb5 code
CVE-2016-8620: glob parser write/read out of bounds
CVE-2016-8621: curl_getdate read out of bounds
CVE-2016-8622: URL unescape heap overflow via integer truncation
CVE-2016-8623: Use-after-free via shared cookies
CVE-2016-8624: invalid URL parsing with '#'
CVE-2016-8625: IDNA 2003 makes curl use wrong host

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agombedtls: update to version 2.4.0
Hauke Mehrtens [Sat, 3 Dec 2016 15:07:31 +0000 (16:07 +0100)]
mbedtls: update to version 2.4.0

This fixes two minor security problems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agopolarssl: update to version 1.3.18
Hauke Mehrtens [Sat, 3 Dec 2016 15:07:14 +0000 (16:07 +0100)]
polarssl: update to version 1.3.18

This fixes two minor security problems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agoscripts: getver.sh: append Git short hash to revision
Jo-Philipp Wich [Fri, 2 Dec 2016 11:07:19 +0000 (12:07 +0100)]
scripts: getver.sh: append Git short hash to revision

Change getver.sh to append a short Git commit hash to the end of the artifical
revision number. This way we still have order- and comparable commit numbers
but also a direct relation to the Git commit.

The new output format will look like "r2400+2-882472e" for dirty trees or like
"r2402-882472e" for clean ones.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobuild: adjust version number handling
Jo-Philipp Wich [Thu, 1 Dec 2016 16:40:43 +0000 (17:40 +0100)]
build: adjust version number handling

Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER
to CURRENT for master branch builds.

Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users
to override the revision value put into VERSION_CODE and adjust the template
files used by the base-files package to accomodate for the changed semantics.

While we're at it, also adjust the various URLs to match the current web site.

After this commit, the relevent files will look like the examples given below:

    # cat /etc/openwrt_version
    r2398+1

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='CURRENT'
    DISTRIB_REVISION='r2398+1'
    DISTRIB_CODENAME='reboot'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="CURRENT, Reboot"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Reboot CURRENT"
    VERSION_ID="current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2398+1"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Reboot CURRENT r2398+1"

On a release branch, those files would look like:

    # cat /etc/openwrt_version
    r2399

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='16.12-CURRENT'
    DISTRIB_REVISION='r2399'
    DISTRIB_CODENAME='test_release'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="16.12-CURRENT, Test Release"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Test Release 16.12-CURRENT"
    VERSION_ID="16.12-current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2399"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399"

On a release tag, those files would look like:

    # cat /etc/openwrt_version
    r2500

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='17.02.1'
    DISTRIB_REVISION='r2500'
    DISTRIB_CODENAME='mighty_unicorn'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="17.02.1, Mighty Unicorn"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Mighty Unicorn 17.02.1"
    VERSION_ID="17.02.1"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2500"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500"

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Felix Fietkau <nbd@nbd.name>
7 years agoprocd: update to the latest version, fixes killing jailed processes
Felix Fietkau [Fri, 2 Dec 2016 12:55:12 +0000 (13:55 +0100)]
procd: update to the latest version, fixes killing jailed processes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolibubox: update to the latest version
Felix Fietkau [Thu, 1 Dec 2016 19:13:48 +0000 (20:13 +0100)]
libubox: update to the latest version

- Improves C++ compatibility
- Adds static initializers for the kvlist API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoramips: fix sdhci support on mt7621
John Crispin [Thu, 1 Dec 2016 17:29:50 +0000 (18:29 +0100)]
ramips: fix sdhci support on mt7621

the IRQ level was wrong. refresh the patch while at it.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agotools: cmake: fix compatibility with LibreSSL as well
Jo-Philipp Wich [Thu, 1 Dec 2016 15:32:39 +0000 (16:32 +0100)]
tools: cmake: fix compatibility with LibreSSL as well

Sadly, LibreSSL claims to be OpenSSL v2.0.0 while not providing the new
interfaces introduced with OpenSSL v1.1.x, so extend the pre-OpenSSL 1.1.x
compat checks to consider LibreSSL as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoramips: RB750Gr3: Add pwr LED and buzzer to DTS
Andrew Yong [Sat, 26 Nov 2016 14:15:21 +0000 (22:15 +0800)]
ramips: RB750Gr3: Add pwr LED and buzzer to DTS

use pwr LED in diag.sh
Expose unused pinmux pins as GPIOs
export power LED and buzzer pins
Use rb750gr3:blue:pwr LED in diag.sh for boot status instead of rb750gr3:green:usr

Signed-off-by: Andrew Yong <me@ndoo.sg>
7 years agoipq806x: add thermal sensor driver
dissent1 [Sat, 5 Nov 2016 13:15:33 +0000 (16:15 +0300)]
ipq806x: add thermal sensor driver

Allows to check cpu temperature.

Huge thanks to @hnyman for valuable assistance!

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agoipq806x: increase coherent dma pool size
Pavel Kubelun [Tue, 15 Nov 2016 18:28:36 +0000 (21:28 +0300)]
ipq806x: increase coherent dma pool size

Cherry-picked and rebased from
https://source.codeaurora.org/quic/qsdk/system/openwrt/tree/?h=korg/linux-3.4.y/release/arugula_bb_cs

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agoipq806x: add enable reg and masks for PRNG
Pavel Kubelun [Tue, 15 Nov 2016 16:27:55 +0000 (19:27 +0300)]
ipq806x: add enable reg and masks for PRNG

Cherry-picked from https://source.codeaurora.org/quic/qsdk/system/openwrt/tree/?h=korg/linux-3.4.y/release/arugula_bb_cs

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agonet: ar8327: modify some configuration of switch
Pavel Kubelun [Thu, 12 Feb 2015 01:49:08 +0000 (09:49 +0800)]
net: ar8327: modify some configuration of switch

Imported from https://source.codeaurora.org/quic/qsdk/system/openwrt/commit/?h=korg/linux-3.4.y/release/arugula_bb_cs&id=2be4f8a8b205ae1a37db44839864451ebe893e6e
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Enable flow control of LAN and WAN ports to
get better performance.
Setup pvid as 0 for all ports during initialisation
to avoid confusion during system or switch INIT.
Disable PORT MAC before config MAC to avoid it work abnormal.
This change is for IR-054144, IR-057315.

Change-Id: I345f3dffa59ad3f97150e09692723da12a7b1067
Signed-off-by: Zou Shunxiang <shunxian@codeaurora.org>
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
7 years agonet: ar8216: address security vulnerabilities in swconfig & ar8216
Pavel Kubelun [Mon, 28 Nov 2016 15:10:05 +0000 (18:10 +0300)]
net: ar8216: address security vulnerabilities in swconfig & ar8216

Imported from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e1aaf7ec008a97311867f0a7d0418e4693fecfd4%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: net: ar8216: address security vulnerabilities in swconfig & ar8216

This patch does the following changes:
*address the security vulnerabilities in both swconfig framework and in
 ar8216 driver (many bound check additions, and turned swconfig structure
 signed element into unsigned when applicable)
*address a couple of whitespaces and indendation issues

BUG=chrome-os-partner:33096
TEST=none

Change-Id: I94ea78fcce8c1932cc584d1508c6e3b5dfb93ce9
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/236490
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Commit-Queue: Toshi Kikuchi <toshik@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
7 years agonet: ar8216: prevent device duplication in ar8xxx_dev_list
Pavel Kubelun [Mon, 28 Nov 2016 12:31:38 +0000 (15:31 +0300)]
net: ar8216: prevent device duplication in ar8xxx_dev_list

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd7b89dd464a4afffa04ff2e17c771dfe95668cf%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: drivers: ar8216: prevent device duplication in ar8xxx_dev_list

If probe is called twice, once for PHY0 and a second time for PHY4,
the same switch device will be added twice to ar8xxx_dev_list, while
supposedly this list should have one element per hardware switch present
in the system.

While no negative impact have been observed, it does happen if a
platform instanciates these two PHYs from device-tree, as an example.

Change-Id: Iddcbdf7d4adacb0af01975b73f8e56b4582e894e
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/234790
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
7 years agonet: ar8216: hold ar8xxx_dev_list_lock during use_count--
Pavel Kubelun [Mon, 28 Nov 2016 12:21:42 +0000 (15:21 +0300)]
net: ar8216: hold ar8xxx_dev_list_lock during use_count--

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c3fd96a7b87da23979d8569ce45447f8419ca303%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: drivers: ar8216: hold ar8xxx_dev_list_lock during use_count--

It is possible for the remove() callback to run twice in parallel, which
could result into --use_count returning only 1 in both cases and the
rest of the unregistration path to never be reached.

This case has never been observed in practice, but we will fix
preventively to make the code more robust.

BUG=chrome-os-partner:33096
TEST=none

Change-Id: If09abe27fdb2037f514f8674418bafaab3cbdef6
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/232870
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
7 years agonet: ar8327: replace sprintf() by scnprintf()
Pavel Kubelun [Mon, 28 Nov 2016 12:14:50 +0000 (15:14 +0300)]
net: ar8327: replace sprintf() by scnprintf()

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd0c41c7b9327ce003f44df38ce42556fb177b17%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: drivers: ar8216: replace sprintf() by scnprintf()

BUG=chrome-os-partner:33096
TEST=none

Change-Id: Ib82035c9f2769a86d3e90f9573a09e5700ff5676
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/232829
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
7 years agonet: ar8327: remove unnecessary spinlocks
Pavel Kubelun [Mon, 28 Nov 2016 12:11:14 +0000 (15:11 +0300)]
net: ar8327: remove unnecessary spinlocks

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/541c15f8dd02ddce07e0a462a0c2572d8398bccc%5E%21/#F0
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: drivers: ar8216: remove unnecessary spinlocks

BUG=chrome-os-partner:33096
TEST=none

Change-Id: Ia1b51258504501863fd3298717cc923a1baf34ca
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/232828
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
7 years agonet: ar8216: sync mib_work cancellation
Pavel Kubelun [Mon, 28 Nov 2016 11:58:39 +0000 (14:58 +0300)]
net: ar8216: sync mib_work cancellation

Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c05af20272059e149e2da2e1fa1fbd90c03ec979
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
CHROMIUM: drivers: ar8216: sync mib_work cancellation

ar8xxx_mib_stop() is called from ar8xxx_phy_remove(), so we want to make
sure the work doesn't run after priv is freed / the device ceases to
exist.

BUG=chrome-os-partner:33096
TEST=none

Change-Id: Iafb44ce93a87433adc4576e5fea5fda58d1f43a9
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/232827
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Toshi Kikuchi <toshik@chromium.org>
7 years agoipq806x: refactor rpm clock controller patches
Pavel Kubelun [Wed, 23 Nov 2016 15:53:52 +0000 (18:53 +0300)]
ipq806x: refactor rpm clock controller patches

RPM clock controller driver had made its way upstream and previous
approach of directly redoing a driver to support ipq806x is a no go anymore.

Thus reverting mentioned patches to upstream state and renaming
in correct patch numbering accordance.

To make the driver work on ipq806x boards we introduce a custom patch.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agotools: cmake: import another upstream commit for OpenSSL backwards compatibility
Jo-Philipp Wich [Thu, 1 Dec 2016 14:27:07 +0000 (15:27 +0100)]
tools: cmake: import another upstream commit for OpenSSL backwards compatibility

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agokernel: add missing config symbols
Felix Fietkau [Thu, 1 Dec 2016 13:52:39 +0000 (14:52 +0100)]
kernel: add missing config symbols

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotools: cmake: import upstream patch for OpenSSL 1.1.x compatibility
Jo-Philipp Wich [Thu, 1 Dec 2016 13:47:30 +0000 (14:47 +0100)]
tools: cmake: import upstream patch for OpenSSL 1.1.x compatibility

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoxtables-addons: add CONFIG_NF_CONNTRACK_MARK=y to all kmod-* packages
Felix Fietkau [Thu, 1 Dec 2016 13:23:05 +0000 (14:23 +0100)]
xtables-addons: add CONFIG_NF_CONNTRACK_MARK=y to all kmod-* packages

Not all kmod packages depends on kmod-ipt-compat-xtables, but this
kernel config option is required for building the whole package

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