Commit graph

17767 commits

Author SHA1 Message Date
Piotr Dymacz
b73cb365d5 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>
2017-06-11 21:32:18 +02:00
Ludwig Thomeczek
b4711dbad3 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>
2017-06-11 21:32:18 +02:00
Serg Studzinskii
b7cc661615 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>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
641af0c39d ar71xx: move WRTnode2Q to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
636ae9e9a0 ar71xx: image: simplify Ubiquiti devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
01aa23acf7 ar71xx: image: mikrotik: shorten DEVICE_TITLE
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
7bc5571d14 ar71xx: image: use simply expanded variables
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:32:17 +02:00
Piotr Dymacz
80136e57a4 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>
2017-06-11 21:31:25 +02:00
Piotr Dymacz
93198b8335 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>
2017-06-11 21:30:05 +02:00
Piotr Dymacz
bd92a6cf57 ar71xx: image: drop unused mtdlayouts from legacy.mk
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
708cc2bd3c ar71xx: image: cosmetic: drop redundant empty lines
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
e83cac1a8f 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>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
c00fb14329 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>
2017-06-11 21:22:46 +02:00
Piotr Dymacz
3a3cd0ac43 ar71xx: image: keep DEVICE_VARS and Build/* at the beginning
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 21:21:45 +02:00
Piotr Dymacz
af27dd1a51 ar71xx: image: simplify Compex devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-06-11 19:06:49 +02:00
Piotr Dymacz
43c0ef1010 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>
2017-06-11 19:06:49 +02:00
Piotr Dymacz
05e276c071 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>
2017-06-11 19:06:49 +02:00
Kevin Darbyshire-Bryant
8960f2b80c
ar71xx: fixup ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Fix malformed patch introduced by 296312fca1

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-06-11 17:12:45 +02:00
Alexander Couzens
ab11618001 ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Found-by: Coverity Scan #1330474
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
878cd77026 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>
2017-06-11 14:22:44 +02:00
Alexander Couzens
814e1695aa linux/ledtrig-netdev: remove unsigned < 0 check
Found-by: Coverity Scan
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
296312fca1 ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Found-by: Coverity Scan #1329327
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
1025941662 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>
2017-06-11 14:22:44 +02:00
Alexander Couzens
64cd4b48e8 ar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails
Found-by: Coverity Scan #1330233
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-11 14:22:44 +02:00
Alexander Couzens
d18cb142d5 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>
2017-06-11 14:22:44 +02:00
Jonas Gorski
b43c190079 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>
2017-06-10 12:40:38 +02:00
Jonas Gorski
5df15c06cc 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>
2017-06-10 12:40:38 +02:00
Jonas Gorski
9ceeaf4c6c 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>
2017-06-10 12:40:38 +02:00
Jonas Gorski
0aa366c6e0 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>
2017-06-10 12:40:38 +02:00
Jonas Gorski
c5d394e9ba 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>
2017-06-10 12:40:38 +02:00
Jonas Gorski
0755c2d117 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>
2017-06-10 12:40:37 +02:00
Jonas Gorski
fd1096e351 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>
2017-06-10 12:40:37 +02:00
Jonas Gorski
f9b7bfa088 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>
2017-06-10 12:40:37 +02:00
Rafał Miłecki
c00fbaf670 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>
2017-06-08 22:25:00 +02:00
Jo-Philipp Wich
55623a9c83 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>
2017-06-08 01:03:39 +02:00
Jo-Philipp Wich
f4a4f324cb 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>
2017-06-07 21:40:42 +02:00
Sergey Ryazanov
67a322a79c 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>
2017-06-07 18:31:10 +02:00
Sergey Ryazanov
68e7a2a0b7 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>
2017-06-07 18:31:10 +02:00
Sergey Ryazanov
6a3d82a3fa 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>
2017-06-07 18:31:10 +02:00
Felix Fietkau
2dc23a7576 rb532: enable high-res timers, refresh kernel config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-07 18:31:10 +02:00
Felix Fietkau
f859a7b696 xburst: enable high-res timers, refresh kernel config
Helps with system performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-07 18:31:10 +02:00
Felix Fietkau
1d44593c49 octeon: enable high-res timers
Helps with network stack performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-07 18:31:10 +02:00
Felix Fietkau
b47fd76563 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>
2017-06-07 18:31:10 +02:00
Lucian Cristian
cdedb24ef8 x86: include USB HID by default
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2017-06-07 18:31:10 +02:00
Sergey Ryazanov
00639586fd kernel: update myloader for linux 4.9
add backport patches for older kernels.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2017-06-07 17:19:48 +02:00
Sergey Ryazanov
2cc61e6e8e 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>
2017-06-07 11:06:29 +02:00
Sergey Ryazanov
913b2290ca 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>
2017-06-07 11:06:12 +02:00
Sven Roederer
cc722bec97 linux/ath25: fixing some tabs and whitespace
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2017-06-07 06:50:16 +02:00
Sergey Ryazanov
8a3a71084c ath25: drop 4.4 kernel support
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2017-06-07 06:49:46 +02:00
Sergey Ryazanov
0f4943211c ath25: switch to 4.9 kernel
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2017-06-07 06:47:10 +02:00