aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* musl: fix locking synchronization bugMatthias Schiffer2020-05-261-0/+69
| | | | | | | | | | | | | | Import proposed upstream fix [2] for the critical locking synchronization bug recently found in musl [1]. This affects all programs that are temporarily multithreaded, but then return to single-threaded operation. [1] https://www.openwall.com/lists/musl/2020/05/22/3 [2] https://www.openwall.com/lists/musl/2020/05/22/10 Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 10c211031ccd4703230493025a5a3b9d6fcad2f2)
* rpcd: update to latest openwrt-19.07 Git HEADJo-Philipp Wich2020-05-261-4/+4
| | | | | | | 67c8a3f uci: reset uci_ptr flags when merging options during section add 970ce1a session: deny access if password login is disabled Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Revert "rpcd: update to latest Git HEAD"Jo-Philipp Wich2020-05-261-4/+4
| | | | | | | | This reverts commit adf5d753eff2385063555da8bd4323e69311752a. Reverting this commit because it relies on a changed libiwinfo API. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* rpcd: update to latest Git HEADJo-Philipp Wich2020-05-261-4/+4
| | | | | | | | 078bb57 uci: reset uci_ptr flags when merging options during section add 3df62bc session: deny access if password login is disabled efe51f4 iwinfo: add current hw and ht mode to info call Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* libubox: update to the latest versionFelix Fietkau2020-05-261-3/+3
| | | | | | | | | | | 86818eaa976b blob: make blob_parse_untrusted more permissive cf2e8eb485ab tests: add fuzzer seed file for crash in blob_len c2fc622b771f blobmsg: fix length in blobmsg_check_array 639c29d19717 blobmsg: simplify and fix name length checks in blobmsg_check_name 66195aee5042 blobmsg: fix missing length checks Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit b371182d2450b3c4f15cbe790351d92a2a7b5a67)
* libubox: update to the latest masterRafał Miłecki2020-05-261-3/+3
| | | | | | | | | | | 5e75160 blobmsg: fix attrs iteration in the blobmsg_check_array_len() eeddf22 tests: runqueue: try to fix race on GitLab CI 89fb613 libubox: runqueue: fix use-after-free bug 1db3e7d libubox: runqueue fix comment in header 7c4ef0d tests: list: add test case for list_empty iterator Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a765b063ee3e1dd6519f6a4a9e4d4f72214b33b8)
* ramips: gsw_mt7621: disable PORT 5 MAC RX/TX flow control by defaultPetr Štetiar2020-05-261-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Looking at the current upstream driver implementation, it seems like the TX/RX flow control is enabled only if the flow control pause option is resolved from the device/link partner advertisements (or otherwise set). On the other hand, our current in-tree driver force enables TX/RX flow control by default, thus possibly leading to TX timeouts if the other end sends pause frames (which are not properly handled?): WARNING: CPU: 3 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x1ac/0x324 NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out Disabling the flow control on PORT 5 MAC seems to fix this issues as the pause frames are then filtered out. While at it, I'm removing the if condition completely as suggested, since this code is run only on mt7621 SoC, so there is no need to check for the silicon revisions. Ref: https://lists.openwrt.org/pipermail/openwrt-devel/2017-November/009882.html Ref: https://forum.openwrt.org/t/mtk-soc-eth-watchdog-timeout-after-r11573/50000/12 Suggested-by: Felix Fietkau <nbd@nbd.name> Reported-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit c8f8e59816eca49d776562d2d302bf990a87faf0)
* hostapd: backport wolfssl bignum fixesDaniel Golle2020-05-254-1/+107
| | | | | | | | | crypto_bignum_rand() use needless time-consuming filtering which resulted in SAE no longer connecting within time limits. Import fixes from hostap upstream to fix that. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 631c437a91c20df678b25dcc34fe23636116a35a)
* ucert: update to latest git HEADMatthias Schiffer2020-05-241-3/+3
| | | | | | | | | | | | | | | | | | | | 00b921d80ac0 Do not print line number in debug messages 96c42c5ed320 Fix length checks in cert_load() fe06b4b836b3 usign-exec: improve usign -F output handling 19f9e1917e1b usign-exec: return code fixes 077feb5b5824 usign-exec: close writing end of pipe early in parent process 7ec4bb764e1e usign-exec: remove redundant return statements 5a738e549d31 usign-exec: change usign_f_* fingerprint argument to char[17] 112488bbbccc usign-exec: do not close stdin and stderr before exec 38dcb1a6f121 usign-exec: fix exec error handling a9be4fb17df2 usign-exec: simplify usign execv calls 854d93e2326a Introduce read_file() helper, improve error reporting afc86f352bf7 Fix return code of write_file() fdff10852326 stdout/stderr improvements dddb2aa8124d ci: fix unit test failures by enabling full ucert build 5f206bcfe5c2 ci: enable unit testing Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* brcm47xx: disable Netgear WNR2000 v2 by defaultJo-Philipp Wich2020-05-241-0/+1
| | | | | | | | | | Disable the Netgear WNR2000 v2 image by default as the device has insufficient flash space for release build images. Ref: https://forum.openwrt.org/t/devices-too-big-to-save-overlay/18161/72 Signed-off-by: Jo-Philipp Wich <jo@mein.io> [drop change on netgear-wnr3500l-v1-na] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* squashfs: Fix compile with GCC 10Hauke Mehrtens2020-05-241-0/+25
| | | | | | | | | | Fixes the following build error with GCC 10: /usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here And a compile warning. Fixes: FS#3104, FS#3119 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 1bbc1aa884902fd05cc579b53d68b2ba0b18683f)
* usign: update to latest git HEADMatthias Schiffer2020-05-231-3/+3
| | | | | | | f1f65026a941 Always pad fingerprints to 16 characters Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit e35e40ad824eab9d51cdd690fb747e576e01412f)
* usign: update to latest Git HEADHauke Mehrtens2020-05-231-3/+3
| | | | | | | f34a383 main: fix some resource leaks Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 81e93fff7d867851f2fedd966a931336d4092686)
* ath79: add support for TP-Link TL-WA901ND v4 and v5Adrian Schmutzler2020-05-208-69/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA901ND v4 and v5 from ar71xx to ath79. They are similar to the TP9343-based TL-WR940N v3/v4 and TL-WR941ND v6. Specifications: SoC: TP9343 Flash/RAM: 4/32 MiB CPU: 750 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. * The image name for TFTP recovery is wa901ndv4_tp_recovery.bin for both variants. In ar71xx, a MAC address with offset 1 was used for ethernet port. That's probably wrong, but this commit sticks to it until we know the correct value. Like in ar71xx, this builds the default factory.bin with EU country code. Thanks to Leonardo Weiss for testing on the v5. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 4a61a88f9006f70444e00699f76551c75f73c14e)
* ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1Adrian Schmutzler2020-05-208-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the various clones of the TL-WA830RE recently supported in fb99ac6807f2 ("ath79: add support for TP-Link TL-WA830RE v1"): - tplink,tl-wa701nd-v1 - tplink,tl-wa730re-v1 - tplink,tl-wa801nd-v1 - tplink,tl-wa830re-v1 (already supported) - tplink,tl-wa901nd-v1 Since these devices are 100%-clones in ar71xx, this patch adds all of them without run-testing (as this has been done for TL-WA830RE v1). Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-waxxxxx-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 2f1cc5c3d5e35d6aa76e794e3d5b4f5856cd38bc)
* ath79: add support for TP-Link TL-WR940N v6Adrian Schmutzler2020-05-204-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TL-WR940N v6 is similar to v3/v4, it just has different LEDs and MAC address assignment. Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet The use of LEDs is based on ar71xx, so blue LED is used for WAN and orange LED for diag (boot/failsafe/etc.). Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to wr940nv6_tp_recovery.bin 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. Thanks to Manuel Kock for reviewing and testing this patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Manuel Kock <github.web@manu.li> (backported from commit fbd00bb8d406a0ace7ea9c49a79cbad2418689a5)
* ath79: add support for TP-Link TL-WA830RE v1Christian Buschau2020-05-206-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA830RE v1 range extender from ar71xx to ath79. Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-wa830re-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image The device seems to be a clone of the following devices not yet added to ath79: - tl-wa701nd-v1 - tl-wa730re-v1 - tl-wa801nd-v1 - tl-wa901nd-v1 Signed-off-by: Christian Buschau <christian.buschau@mailbox.org> [make use of ar7240_tplink.dtsi, add note about clones] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit fb99ac6807f29eb5fe50271eff711e7415038731)
* ath79: reorganize DTSI for ar7240 TP-Link devicesAdrian Schmutzler2020-05-208-46/+57
| | | | | | | | | | | | | | | | | The current set of TP-Link devices with ar7240 SoC all share the same DTSI file. As the latter is very similar to the definition required for the to-be-supported TP-Link TL-WA devices with ar7240, this patch splits the definitions into a shared part for all TP-Link devices (ar7240_tplink.dtsi) and a file containing the specific setup for the present TL-WR devices (ar7240_tplink_tl-wr.dtsi), equivalent to the former ar7240_tplink_tl-wr74xn-v1.dtsi. While at it, remove unused firmware partition label and rename pinmux_switch_led_pins. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 273e00c4a506c076dddfc51c3c00d4523496f5f4)
* ath79: migrate TP-Link TL-MR3420v2 to ath79Lim Guo Wei2020-05-204-20/+226
| | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: ar9341 - RAM: 32M - Flash: 4M - Ethernet: 5x FE ports - WiFi: ar9341-wmac Flash instruction: Upload generated factory firmware on vendor's web interface. This changes the key assignment compared to ar71xx support of this device, since of the two keys on the device one is used as combined Reset/WPS and the second one as WiFi on/off button. Despite, the reset button required GPIO_ACTIVE_HIGH to work correctly. Signed-off-by: Lim Guo Wei <limguowei@gmail.com> [redo commit message] Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (backported from commit e7ab1b517397fdf6613f4682b7a752649841f7cd) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP9343-based TP-Link TL-WR94x devicesAdrian Schmutzler2020-05-208-0/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for several TP-Link devices based on TP9343 ("a QCA9561 without PCIe and USB"): - TL-WR940N v3 - TL-WR940N v4 - TL-WR941ND v6 The devices are only different concerning LEDs and MAC address assignment. All TL-WR940 are with non-detachable antennas (N), all TL-WR941 devices are with detachable antennas (ND). Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. * TFTP image names: 940 v3: wr941ndv6_tp_recovery.bin 940 v4: wr940nv4_tp_recovery.bin 941 v6: wr941ndv6_tp_recovery.bin Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported picked from commit c02b9818a51ab189be11218e626e9cad2c21ec94)
* generic: platform/mikrotik: disambiguate SPDX-License-IdentifierThibaut VARÈNE2020-05-203-3/+3
| | | | | | | I meant it to be GPL-2.0-only, as evidenced by the boilerplate. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 6934b20912d308854b7adf63a7098d38bf67d153)
* ramips: drop non-existant ralink,port-map for Ravpower WD03Adrian Schmutzler2020-05-191-1/+0
| | | | | | | | | | | The property "ralink,port-map" has been obsolete long before this device was added, and the device is a one-port anyway. Just remove it. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit c00b2df6c8e421ea7aa96f53178dc85db99f2305)
* bcm63xx: mask interrupts on initÁlvaro Fernández Rojas2020-05-181-0/+12
| | | | | | | | Fixes BCM6348/BCM6358 hangs while booting: https://bugs.openwrt.org/index.php?do=details&task_id=2202 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 13c33f3f121ca6fe2ab1f80e04cf2d4f2cd6abec)
* bcm63xx: periph_intc: report effective affinityDaniel Gonzalez Cabanelas2020-05-181-0/+20
| | | | | | | | | | | | | The bcm6345-periph-intc driver only targets a single CPU at a time, even if the notional affinity is wider. Let's inform the core code about this. This patch gets rid of the kernel message: "genirq: irq_chip bcm6345-periph-intc did not update eff. affinity mask of irq 52" Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit e04ff3c7cc52c23f5b40730ee426710e22940d68)
* bcm63xx: ext_intc: fix warningÁlvaro Fernández Rojas2020-05-181-0/+28
| | | | | | | | | | | | | | | | | | In file included from ./arch/mips/include/asm/io.h:34, from ./arch/mips/include/asm/mmiowb.h:5, from ./include/linux/spinlock.h:60, from ./include/linux/irq.h:14, from drivers/irqchip/irq-bcm6345-ext.c:10: drivers/irqchip/irq-bcm6345-ext.c: In function 'bcm6345_ext_intc_of_init': ./arch/mips/include/asm/mach-bcm63xx/ioremap.h:48:9: warning: 'base' may be used uninitialized in this function [-Wmaybe-uninitialized] return is_bcm63xx_internal_registers((unsigned long)addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/irqchip/irq-bcm6345-ext.c:255:16: note: 'base' was declared here void __iomem *base; ^~~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 29c3bb5f413f0962971c66e6516b8409a78e0135)
* bcm63xx: periph_intc: fix warningÁlvaro Fernández Rojas2020-05-181-0/+20
| | | | | | | | | | drivers/irqchip/irq-bcm6345-periph.c: In function 'bcm6345_periph_irq_handle': drivers/irqchip/irq-bcm6345-periph.c:55:21: warning: 'block' may be used uninitialized in this function [-Wmaybe-uninitialized] struct intc_block *block; ^~~~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit f2f2cf07a61e9c170ab8d65e1e054f0131a84e2a)
* bcm63xx: redboot: fix warningÁlvaro Fernández Rojas2020-05-181-1/+1
| | | | | | | | | | drivers/mtd/parsers/redboot.c: In function 'parse_redboot_partitions': drivers/mtd/parsers/redboot.c:194:59: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses] fis_origin = (buf[i].flash_base & (master->size << 1) - 1); ~~~~~~~~~~~~~~~~~~~~^~~ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit f314cbe54be4d90e748e18ae5e9fb00d5fd31c91)
* bcm63xx: bcm6362: fix pinctrl bugÁlvaro Fernández Rojas2020-05-181-0/+11
| | | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit ee6bf7e865510ff1e0645b08bec65f8212ed70d4)
* bcm63xx: refresh kernel configÁlvaro Fernández Rojas2020-05-181-1/+3
| | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* OpenWrt v19.07.3: revert to branch defaultsHauke Mehrtens2020-05-165-11/+9
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* OpenWrt v19.07.3: adjust config defaultsv19.07.3Hauke Mehrtens2020-05-165-9/+11
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* generic: platform/mikrotik: fix LZOR supportThibaut VARÈNE2020-05-161-21/+36
| | | | | | | | | | | | | 31e99fe3da which introduced this code was unfortunately untested. This commit fixes a number of issues and works around the fact that in this particular scheme, the LZO payload may be padded at the end which will trigger a harmless lzo decompression error. This commit also disambiguates the debug printks. Tested-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Fixes: 31e99fe3da ("generic: platform/mikrotik: support LZOR encoding") (cherry picked from commit 2ea481193c1654c9cb42aa0331cdbc4570783e26)
* libjson-c: backport security fixesRobert Marko2020-05-134-2/+117
| | | | | | | | | | | | | This backports upstream fixes for the out of bounds write vulnerability in json-c. It was reported and patches in this upstream PR: https://github.com/json-c/json-c/pull/592 Addresses CVE-2020-12762 Signed-off-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> [bump PKG_RELEASE, rebase patches on top of json-c 0.12] Signed-off-by: Jo-Philipp Wich <jo@mein.io> (backported from commit bc0288b76816578f5aeccb2abd679f82bfc5738e)
* ar71xx: remove hard-coded folder name from Mikrotik RB upgradeAdrian Schmutzler2020-05-121-1/+6
| | | | | | | | | | | | | | | So far, specifying "BOARD_NAME := routerboard" is required by the upgrade code of Mikrotik NAND devices, as "sysupgrade-routerboard" is hardcoded in platform_do_upgrade_mikrotik_rb(). This patch replaces the latter with a grep for the name like it is already done in nand_upgrade_tar() in /lib/upgrade/nand.sh. This should enable upgrades from ar71xx to ath79 without setting BOARD_NAME for the latter. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 281785d74fcc70153c0741be36ee1f9d05e74f6f)
* fstools: blockd: fix segfault triggered by non-autofs mountsDaniel Golle2020-05-121-3/+3
| | | | | | | | | | | Program received signal SIGSEGV, Segmentation fault. main_autofs (argv=<optimized out>, argc=<optimized out>) at fstools-2020-05-06-eec16e2f/block.c:1193 1193: if (!m->autofs && (mp = find_mount_point(pr->dev))) { Fixes: 3b9e4d6d4c4f ("fstools: update to the latest version") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit b181294b02499e41b6b6fa24163f59c9ee4988ed)
* ar71xx: mikrotik: mach-rbspi.c remove wlan idThibaut VARÈNE2020-05-121-7/+7
| | | | | | | Following on the previous commit, this patch removes useless id argument from rbspi_wlan_init(). Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: mikrotik: bypass id check in __rb_get_wlan_data()Thibaut VARÈNE2020-05-121-7/+3
| | | | | | | | | | | | | | | | | | | The id parameter in __rb_get_wlan_data() was incorrectly used on the assumption that id "0" would always be tied to ath9k with RLE encoding and positive id (in fact, only id "1" was valid) would always be tied to ("external") ath10k with LZO encoding. Newer hardware revisions of supported devices prove this assumption to be invalid, with ath9k caldata being now wrapped in MAGIC_ERD and LZO compressed, so disable this check to allow newer hardware to correctly decode caldata for ath9k. Since ath10k caldata is no longer pulled from this implementation, this commit also disables the publication in sysfs to avoid wasting memory. Note: this patch assumes that ath9k caldata is never stored with the new "LZOR" encoding scheme found on some ath10k devices. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: mikrotik: ath10k: use new sysfs driverThibaut VARÈNE2020-05-121-2/+2
| | | | | | | Fetch ath10k calibration data from backported mikrotik sysfs driver which supports the newer "LZOR" encoding. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* generic: platform/mikrotik: support LZOR encodingThibaut VARÈNE2020-05-121-1/+261
| | | | | | | | Some newer MikroTik RouterBOARD devices use a new encoding scheme for their WLAN calibration data. This patch provides support for decoding this new scheme. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ar71xx: enable mikrotik platform driverThibaut VARÈNE2020-05-121-0/+2
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* generic: mikrotik platform build bitsThibaut VARÈNE2020-05-122-0/+39
| | | | Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* generic: routerboot sysfs platform driverThibaut VARÈNE2020-05-125-0/+717
| | | | | | | | | | | | | | | | | | | | | | | | | This driver exposes the data encoded in the "hard_config" flash segment of MikroTik RouterBOARDs devices. It presents the data in a sysfs folder named "hard_config". The WLAN calibration data is available on demand via the 'wlan_data' sysfs file in that folder. This driver permanently allocates a chunk of RAM as large as the "hard_config" MTD partition (typically 4KB), although it is technically possible to operate entirely from the MTD device without using a local buffer (except when requesting WLAN calibration data), at the cost of a performance penalty. This driver does not reuse any of the existing code previously found in routerboot.c. This driver has been successfully tested on BE (ath79) and LE (ipq40xx and ramips) hardware. Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Tested-by: Baptiste Jonglez <git@bitsofnetworks.org> Tested-by: Tobias Schramm <t.schramm@manjaro.org> Tested-by: Christopher Hill <ch6574@gmail.com> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: bump 4.14 to 4.14.180Koen Vandeputte2020-05-121-2/+2
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx, cns3xxx, imx6 Runtime-tested on: ar71xx, cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: dts: add missing 'serial0' alias for TP-Link TL-MR3040v2Lech Perczak2020-05-111-0/+1
| | | | | | | | | Out of all devices currently supported based on AR9331 chipset, this one had the 'serial0' alias missing. Add it to fix setting of /dev/console and login shell on the onboard UART. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> (cherry picked from commit 94f344997769a9a18e2d73574d9d17785828955d)
* opkg: Fix PKG_MIRROR_HASHHauke Mehrtens2020-05-081-1/+1
| | | | | Fixes: c61fbdd0879b ("odhcpd: fix PKG_SOURCE_DATE") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath10k-firmware: fix mirror hashDENG Qingfang2020-05-081-1/+1
| | | | | | | | | | Fix PKG_MIRROR_HASH hash mismatch. Fixes: 641a93f0f226 ("ath10k-firmware: update wave 1 firmware to 10.2.4-1.0-00047") Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn> [added missing commit description] Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 2d758129ca000620ab07f78e774464a96e8f212d)
* opkg: update to latest Git HEADJo-Philipp Wich2020-05-071-3/+3
| | | | | | | | | | | | f2166a8 libopkg: implement lightweight package listing logic cf4554d libopkg: support passing callbacks to feed parsing functions 2a0210f opkg-cl: don't read feeds on opkg update b6f1967 libopkg: use xsystem() to spawn opkg-key 60b9af2 file_util.c: refactor and fix checksum_hex2bin() 206ebae file_util.c: fix possible bad memory access in file_read_line_alloc() Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 79da9d78b98e1cd4574a37e2c4c5f8315b91563d)
* wireguard: bump to 1.0.20200506Jason A. Donenfeld2020-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compat: timeconst.h is a generated artifact Before we were trying to check for timeconst.h by looking in the kernel source directory. This isn't quite correct on configurations in which the object directory is separate from the kernel source directory, for example when using O="elsewhere" as a make option when building the kernel. The correct fix is to use $(CURDIR), which should point to where we want. * compat: use bash instead of bc for HZ-->USEC calculation This should make packaging somewhat easier, as bash is generally already available (at least for dkms), whereas bc isn't provided by distros by default in their build meta packages. * socket: remove errant restriction on looping to self It's already possible to create two different interfaces and loop packets between them. This has always been possible with tunnels in the kernel, and isn't specific to wireguard. Therefore, the networking stack already needs to deal with that. At the very least, the packet winds up exceeding the MTU and is discarded at that point. So, since this is already something that happens, there's no need to forbid the not very exceptional case of routing a packet back to the same interface; this loop is no different than others, and we shouldn't special case it, but rather rely on generic handling of loops in general. This also makes it easier to do interesting things with wireguard such as onion routing. At the same time, we add a selftest for this, ensuring that both onion routing works and infinite routing loops do not crash the kernel. We also add a test case for wireguard interfaces nesting packets and sending traffic between each other, as well as the loop in this case too. We make sure to send some throughput-heavy traffic for this use case, to stress out any possible recursion issues with the locks around workqueues. * send: cond_resched() when processing tx ringbuffers Users with pathological hardware reported CPU stalls on CONFIG_ PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning these workers would never terminate. That turned out not to be okay on systems without forced preemption. This commit adds a cond_resched() to the bottom of each loop iteration, so that these workers don't hog the core. We don't do this on encryption/decryption because the compat module here uses simd_relax, which already includes a call to schedule in preempt_enable. * selftests: initalize ipv6 members to NULL to squelch clang warning This fixes a worthless warning from clang. * send/receive: use explicit unlikely branch instead of implicit coalescing Some code readibility cleanups. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> (cherry picked from commit 4f6343ffe7fe8f7018f904b153dea9fc6038daf4)
* wireguard: bump to 20191226Jason A. Donenfeld2020-05-074-34/+61
| | | | | | | | | | | | | | | | | As announced on the mailing list, WireGuard will be in Linux 5.6. As a result, the wg(8) tool, used by OpenWRT in the same manner as ip(8), is moving to its own wireguard-tools repo. Meanwhile, the out-of-tree kernel module for kernels 3.10 - 5.5 moved to its own wireguard-linux- compat repo. Yesterday, releases were cut out of these repos, so this commit bumps packages to match. Since wg(8) and the compat kernel module are versioned and released separately, we create a wireguard-tools Makefile to contain the source for the new tools repo. Later, when OpenWRT moves permanently to Linux 5.6, we'll drop the original module package, leaving only the tools. So this commit shuffles the build definition around a bit but is basically the same idea as before. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> (cherry picked from commit ea980fb9c6de24350976dcc6c20da2bed5fc8cb8)
* odhcpd: fix PKG_SOURCE_DATEHans Dedecker2020-05-071-1/+1
| | | | | | Fixes: 5e8b50da15 (odhcpd : fix lan host reachibility due to identical RIO and PIO prefixes (FS#3056)) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>