aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* realtek: build factory images for all DGS-1210 modelsMarkus Stockhausen2022-07-081-7/+7
| | | | | | | | | | Currently we build factory images only for DGS-1210-28 model. Relax that constraint and take care about all models. Tested on DGS-1210-20 and should work on other models too because of common flash layout. Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> (cherry picked from commit 2b49ec3a28ad09446f48f1f830a42bdfe3bce9be)
* realtek: rename u-boot-env2 to board-nameLuiz Angelo Daros de Luca2022-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Some realtek boards have two u-boot-env partitions. However, in the DGS-1210 series, the mtdblock2 partition is not a valid u-boot env and simply contains the board/device name, followed by nulls. 00000000 44 47 53 2d 31 32 31 30 2d 32 38 2d 46 31 00 00 |DGS-1210-28-F1..| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00040000 00000000 44 47 53 2d 31 32 31 30 2d 35 32 2d 46 31 00 00 |DGS-1210-52-F1..| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00040000 The misleading u-boot-env2 name also confuses uboot-envtools. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> (cherry picked from commit 8b798dbb39856463878efb07ddef87ce2e522ceb)
* scripts: fix CAMEO tag generatorSander Vanheule2022-07-081-1/+1
| | | | | | | | | | | | What should have been only cosmetic changes, ended up in breaking the script. Rename UIMAGE_CRC_SLICE back to (the original) UIMAGE_CRC_OFF. Fixes issue #10204 "cameo-tag.py broken" Reported-by: Markus Stockhausen <markus.stockhausen@gmx.de> Fixes: f9e840b65700 ("scripts: add CAMEO tag generator") Signed-off-by: Sander Vanheule <sander@svanheule.net> (cherry picked from commit ebfe66e494e57f4b421f1190d6bff1d361db1b3d)
* realtek: build DGS-1210 images with CAMEO tagMarkus Stockhausen2022-07-082-0/+5
| | | | | | | | | From now on we will insert CAMEO tags into sysupgrade images for DGS-1210 devices. This will make the "OS:...FAILED" and "FS:...FAILED" messages go away. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> (cherry picked from commit e763c4c89fc5569d7264ff60837eb4aff69a0bfb)
* scripts: add CAMEO tag generatorMarkus Stockhausen2022-07-081-0/+117
| | | | | | | | | | | | | This script inserts CAMEO tags into an uImage to make U-Boot of DGS-1210 switches happy. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Suggested-by: Sander Vanheule <sander@svanheule.net> # Mutual checksum algorithm [commit title prefix, trailing whitespace, OpenWrt capitalisation, move CRC calculation comment, use UIMAGE_NAME_*, remove parentheses for return, use f-string instead of str()] Signed-off-by: Sander Vanheule <sander@svanheule.net> (cherry picked from commit f9e840b65700e1cdff6d066d39c163bac936d046)
* realtek: add DGS-1210-28 factory imageLuiz Angelo Daros de Luca2022-07-082-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DGS-1210 switches support dual image, with each image composed of a kernel and a rootfs partition. For image1, kernel and rootfs are in sequence. The current OpenWrt image (written using a serial console), uses those partitions together as the firmware partition, ignoring the partition division. The current OEM u-boot fails to validate image1 but it will only trigger firmware recovery if both image1 and image2 fail, and it does not switch the boot image in case one of them fails the check. The OEM factory image is composed of concatenated blocks of data, each one prefixed with a 0x40-byte cameo header. A normal OEM firmware will have two of these blocks (kernel, rootfs). The OEM firmware only checks the header before writing unconditionally the data (except the header) to the correspoding partition. The OpenWrt factory image mimics the OEM image by cutting the kernel+rootfs firmware at the exact size of the OEM kernel partition and packing it as "the kernel partition" and the rest of the kernel and the rootfs as "the rootfs partition". It will only work if written to image1 because image2 has a sysinfo partition between kernel2 and rootfs2, cutting the kernel code in the middle. Steps to install: 1) switch to image2 (containing an OEM image), using web or these CLI commands: - config firmware image_id 2 boot_up - reboot 2) flash the factory_image1.bin to image1. OEM web (v6.30.016) is crashing for any upload (ssh keys, firmware), even applying OEM firmwares. These CLI commands can upload a new firmware to the other image location (not used to boot): - download firmware_fromTFTP <tftpserver> factory_image1.bin - config firmware image_id 1 boot_up - reboot To debrick the device, you'll need serial access. If you want to recover to an OpenWrt, you can replay the serial installation instructions. For returning to the original firmware, press ESC during the boot to trigger the emergency firmware recovery procedure. After that, use D-Link Network Assistant v2.0.2.4 to flash a new firmware. The device documentation does describe that holding RESET for 12s trigger the firmware recovery. However, the latest shipped U-Boot "2011.12.(2.1.5.67086)-Candidate1" from "Aug 24 2021 - 17:33:09" cannot trigger that from a cold boot. In fact, any U-Boot procedure that relies on the RESET button, like reset settings, will only work if started from a running original firmware. That, in practice, cancels the benefit of having two images and a firmware recovery procedure (if you are not consider dual-booting OpenWrt). Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> (cherry picked from commit 1005dc0a64587e954364ff3a64bbb38b2ca371cd)
* scripts: add cameo image header generatorLuiz Angelo Daros de Luca2022-07-081-0/+86
| | | | | | | | | | | The cameo header is a 0x40-byte header used by D-Link DGS 1210 switches and Apresia ApresiaLightGS series. cameo-imghdr.py is a clean-room reimplementation of imghdr present in the DGS-1210-28-GPL package. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> [fix board_version argument's help text] Signed-off-by: Sander Vanheule <sander@svanheule.net> (cherry picked from commit 2fd66e058b0804b9c561d8d6858363fdf5bd7aea)
* bcm53xx: use -falign-functions=32 for kernel compilationRafał Miłecki2022-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Northstar SoCs have pretty small CPU caches and their performance is heavily affected by cache hits & misses. It means that all kind of random code changes can affect performance as they often reorganize (change alignment & possibly reorder) kernel symbols. It was discussed in ARM / net mailinglists: 1. ARM router NAT performance affected by random/unrelated commits [1] [2] 2. Optimizing kernel compilation / alignments for network performance [3] [4] It seems that -falign-functions can be used as a partial workaround. It doesn't solve all cases (e.g. documented watchdog one [5]) but it surely helps with many of them. A complete long term solution may be PGO (profile-guided optimization) but it isn't available at this point. [1] https://lkml.org/lkml/2019/5/21/349 [2] https://www.spinics.net/lists/linux-block/msg40624.html [3] https://lore.kernel.org/linux-arm-kernel/066fc320-dc04-11a4-476e-b0d11f3b17e6@gmail.com/T/ [4] https://www.spinics.net/lists/netdev/msg816103.html [5] http://lists.openwrt.org/pipermail/openwrt-devel/2022-July/038989.html Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit abc5b28db164dc2d807750cb2baae91e288c84a9)
* bcm53xx: enable & setup packet steeringRafał Miłecki2022-07-082-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packet steering can improve NAT masquarade performance on Northstar by 40-50%. It makes reaching 940-942 Mb/s possible on BCM4708 (and obviously BCM47094 too). Add scripts setting up the most optimal Northstar setup. Below are testing results for running iperf TCP traffic from LAN to WAN. They were used to pick up golden values. ┌──────────┬──────────┬────────────────────┬────────────────────┐ │ eth0 │ br-lan │ flow_offloading=0 │ flow_offloading=1 │ │ │ ├─────────┬──────────┼─────────┬──────────┤ │ rps_cpus │ rps_cpus │ BCM4708 │ BCM47094 │ BCM4708 │ BCM47094 │ ├──────────┼──────────┼─────────┼──────────┼─────────┼──────────┤ │ 0 │ 0 │ 387 │ 671 │ 707 │ 941 │ │ 0 │ 1 │ 343 │ 576 │ 705 │ 941 │ │ 0 │ 2 │ ✓ 574 │ ✓ 941 │ 704 │ 940 │ │ 1 │ 0 │ 320 │ 549 │ 561 │ 941 │ │ 1 │ 1 │ 327 │ 551 │ 553 │ 941 │ │ 1 │ 2 │ 523 │ ✓ 940 │ 559 │ 940 │ │ 2 │ 0 │ 383 │ 652 │ ✓ 940 │ 941 │ │ 2 │ 1 │ 448 │ 754 │ ✓ 942 │ 941 │ │ 2 │ 2 │ 404 │ 655 │ ✓ 941 │ 941 │ └──────────┴──────────┴─────────┴──────────┴─────────┴──────────┘ Above tests were performed with all eth0 interrupts handled by CPU0. Setting "echo 2 > /proc/irq/38/smp_affinity" was tested on BCM4708 but it didn't increased speeds (just required different steering): ┌──────────┬──────────┬───────────┐ │ eth0 │ br-lan │ flow_offl │ │ rx-0 │ rx-0 │ oading=0 │ │ rps_cpus │ rps_cpus │ BCM4708 │ ├──────────┼──────────┼───────────┤ │ 0 │ 0 │ 384 │ │ 0 │ 1 │ ✓ 574 │ │ 0 │ 2 │ 348 │ │ 1 │ 0 │ 383 │ │ 1 │ 1 │ 412 │ │ 1 │ 2 │ 448 │ │ 2 │ 0 │ 321 │ │ 2 │ 1 │ 520 │ │ 2 │ 2 │ 327 │ └──────────┴──────────┴───────────┘ Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit fcbd39689ebfef20c62fe3882d51f3af765e8028)
* bcm53xx: disable GRO by default at kernel levelRafał Miłecki2022-07-081-0/+36
| | | | | | | | | | | This improves NAT masquarade network performance. An alternative to kernel change would be runtime setup but that requires ethtool and identifying relevant network interface and all related switch ports interfaces. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 82d0dd8f8aa11249944fe39cd0d75a1524ec22ec)
* bcm53xx: revert bgmac back to the old limited max frame sizeRafał Miłecki2022-07-081-0/+33
| | | | | | | | | | | | Bumping max frame size has significantly affected network performance. It was done by upstream commit that first appeared in the 5.7 release. This change bumps NAT masquarade speed from 196 Mb/s to 383 Mb/s for the BCM4708 SoC. Ref: f55f1dbaad33 ("bcm53xx: switch to the kernel 5.10") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 230c9da963aad9e1a2f8f128c30067ccad2efef8)
* kernel: drop patch adding hardcoded kernel compilation flagsRafał Miłecki2022-07-081-25/+0
| | | | | | | | | | | | | | | | | | | | 1. KCFLAGS should be used for custom flags 2. Optimization flags are arch / SoC specific 3. -fno-reorder-blocks may *worsen* network performace on some SoCs 4. Usage of flags was *reversed* since 5.4 and noone reported that If we really need custom flags then CONFIG_KERNEL_CFLAGS should get default value adjusted properly (per target). Ref: 4e0c54bc5bc8 ("kernel: add support for kernel 5.4") Link: http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038853.html Link: https://patchwork.ozlabs.org/project/openwrt/patch/20190409093046.13401-1-zajec5@gmail.com/ Cc: Felix Fietkau <nbd@nbd.name> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 22168ae68101b95d03741b0e9e8ad20b8a5ae5b7)
* kernel: support setting extra CFLAGS for kernel compilationRafał Miłecki2022-07-082-1/+5
| | | | | | | They may be used e.g. to optimize kernel size or performance. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 907d7d747243044f86588f0d82993e8c106cb02c)
* kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flagsRafał Miłecki2022-07-083-11/+4
| | | | | | | | | | This uses kernel's generic variable and doesn't require patching it with a custom Makefile change. It's expected *not* to change any behaviour. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3) Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> (cherry picked from commit 24e27bec9a6df1511a504cf04cd9578a23e74657)
* OpenWrt v22.03.0-rc5: revert to branch defaultsHauke Mehrtens2022-07-065-11/+9
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* OpenWrt v22.03.0-rc5: adjust config defaultsv22.03.0-rc5Hauke Mehrtens2022-07-065-9/+11
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Add missing mediatek configuration optionsHauke Mehrtens2022-07-062-2/+3
| | | | | | | | | | | | When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add this option to the generic kernel configuration and also add two other configuration options which are removed when we refresh the mt7629 kernel configuration. Fixes: 2bea35cb55d7 ("mediatek: remove crypto-hw-mtk package") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit dcc0fe24ea216d32300c0f01c8879e586d89cc1e)
* openssl: bump to 1.1.1pAndre Heider2022-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes between 1.1.1o and 1.1.1p [21 Jun 2022] *) In addition to the c_rehash shell command injection identified in CVE-2022-1292, further bugs where the c_rehash script does not properly sanitise shell metacharacters to prevent command injection have been fixed. When the CVE-2022-1292 was fixed it was not discovered that there are other places in the script where the file names of certificates being hashed were possibly passed to a command executed through the shell. This script is distributed by some operating systems in a manner where it is automatically executed. On such operating systems, an attacker could execute arbitrary commands with the privileges of the script. Use of the c_rehash script is considered obsolete and should be replaced by the OpenSSL rehash command line tool. (CVE-2022-2068) [Daniel Fiala, Tomáš Mráz] *) When OpenSSL TLS client is connecting without any supported elliptic curves and TLS-1.3 protocol is disabled the connection will no longer fail if a ciphersuite that does not use a key exchange based on elliptic curves can be negotiated. [Tomáš Mráz] Signed-off-by: Andre Heider <a.heider@gmail.com> (cherry picked from commit eb7d2abbf06f0a3fe700df5dc6b57ee90016f1f1)
* mediatek: mt7622: fix white dome LED of UniFi 6 LRDaniel Golle2022-07-041-3/+1
| | | | | | | | | | | The recent differentiation between v1 and v2 of the UniFi 6 LR added support for the v2 version which has GPIO-controlled LEDs instead of using an additional microcontroller to drive an RGB led. The polarity of the white LED, however, was inverted and the default states didn't make a lot of sense after all. Fix that. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit f58e562b07803192d029a6be8c8c372e1ed11c68)
* mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devicesDaniel Golle2022-07-041-2/+0
| | | | | | | | | | The line trying to generate the standard sdcard.img.gz fails due to boot.scr not being generated. Remove the line in order to use the default sdcard.img.gz which is exactly the same but includes generating the boot.scr file. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 1d3b57dbeeae70ab3a8f71d3bdb6fd41a00e1d22)
* uboot-mediatek: update UniFi 6 LR board nameDaniel Golle2022-07-041-1/+1
| | | | | | | | Select matching U-Boot for both v1 and v2 variants. Fixes: 15a02471bb ("mediatek: new target mt7622-ubnt-unifi-6-lr-v1") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 2caa03ec8607fb38e11ac1ce3c7b698f80191b49)
* mediatek: add Ubiquiti UniFi 6 LR v2 targetsHenrik Riomar2022-07-044-0/+239
| | | | | | | | | | | | | | | | Add targets: * Ubiquiti UniFi 6 LR v2 * Ubiquiti UniFi 6 LR v2 (U-Boot mod) This target does not have a RGB led bar like v1 did Used target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi as inspiration The white dome LED is default-on, blue will turn on when the system is in running state Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 31d86a1a119265393db02aa66e6bc6518ee7b905)
* mediatek: new target ubnt_unifi-6-lr-v1-ubootmodHenrik Riomar2022-07-042-5/+6
| | | | | | | | | based on current ubnt_unifi-6-lr-ubootmod Signed-off-by: Daniel Golle <daniel@makrotopia.org> [added SUPPORTED_DEVICES for compatibility with existing setups] Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 5c8d3893a78fd81454930de30d90efaef99f8734)
* mediatek: new target mt7622-ubnt-unifi-6-lr-v1Henrik Riomar2022-07-045-31/+35
| | | | | | | | | | | | | Based on current mt7622-ubnt-unifi-6-lr, this is a preparation for adding a v2 version of this target * v1 - with led-bar * v2 - two simple GPIO connected LEDs (in later commits) Signed-off-by: Daniel Golle <daniel@makrotopia.org> [added SUPPORTED_DEVICES for compatibility with existing setups] Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com> (cherry picked from commit 15a02471bb854245f8f94398c1e1d9ce29c2c341)
* mediatek: build ubnt-ledbar as a moduleChuanhong Guo2022-07-044-4/+18
| | | | | | | | | The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because of its I2C dependency. Build it as a module and let buildroot handle this config option instead. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (cherry picked from commit d9ea9c06e98b597174e0e94e0a13934637c0c03e)
* mediatek: remove crypto-hw-mtk packageEneas U de Queiroz2022-07-041-23/+0
| | | | | | | | The MediaTek's Crypto Engine module is only available for mt7623, in which case it is built into the kernel. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> (cherry picked from commit 3f2d0703b60357e3ff1865783335be9f51528eb8)
* mediatek: mt7622: fix banana pi r64 wps buttonNick Hainke2022-07-041-0/+40
| | | | | | | | | | | | | | | | Fix the wps button to prevent wrongly detected recovery procedures. In the official banana pi r64 git the wps button is set to GPIO_ACTIVE_LOW and not GPIO_ACTIVE_HIGH. Import patch to fix on boot unwanted recovery entering: Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level - failsafe button wps was pressed - - failsafe - Signed-off-by: Nick Hainke <vincent@systemli.org> (cherry-picked from commit 668619425526cb0d43f8536a2f6f15a6314e6553)
* mediatek/mt7629: Activate CONFIG_ARM_ARCH_TIMER_EVTSTREAMHauke Mehrtens2022-07-031-0/+2
| | | | | | | | | | The kernel configuration option CONFIG_MACH_MT7629 selects CONFIG_HAVE_ARM_ARCH_TIMER now. Handle this change in the config-5.10. This fixes some build problems. Fixes: 81530d69ef58 ("kernel: bump 5.10 to 5.10.121") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mt76: update to the latest versionFelix Fietkau2022-07-031-3/+3
| | | | | | | 93e3fce916c6 mt76: pass original queue id from __mt76_tx_queue_skb to the driver Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 06d0cc2fb365485dd1ddd32937afd5091fa4b8a8)
* kernel: Refresh patches for all targetsHauke Mehrtens2022-07-0336-155/+79
| | | | | | | | | | | | | | | | This refreshes the patches on top of kernel 5.4.127. Deleted (upstreamed): bcm27xx/patches-5.10/950-0005-Revert-mailbox-avoid-timer-start-from-callback.patch [0] bcm27xx/patches-5.10/950-0678-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch [1] Needed manual modifications: bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch [0]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=bb2220e0672b7433a9a42618599cd261b2629240 [1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=83603802954068ccd1b8a3f2ccbbaf5e0862acb0 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mt76: update to the latest versionFelix Fietkau2022-07-021-3/+3
| | | | | | | | c07f45927839 firmware: update mt7622 firmware to version 20220630 af406a2d1c36 mt76: do not use skb_set_queue_mapping for internal purposes Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 8e90abb39615e25a03f255f2c16c9203ab976ae7)
* mac80211: fix mesh queue selection issueFelix Fietkau2022-07-021-0/+28
| | | | | Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 51e9d496ba7958fb9f2d3eb4bc7f257837145dd0)
* ramips: improve YunCore AX820 LEDsThibaut VARÈNE2022-07-011-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least two AX820 hardware variants are known to exist, but they cannot be distinguished (same hardware revision, no specific markings). They appear to have the same LED hardware, but wired differently: - One has a red system LED at GPIO 15, a green wlan2g LED at GPIO 14 and a blue wlan5g LED at GPIO 16; - The other only offers a green system LED at GPIO 15, with GPIO 14 and 16 being apparently not connected Finally, a Yuncore datasheet says the canonical wiring should be: - Blue wlan2g GPIO 14, green system GPIO 15, red wlan5g GPIO 16 All GPIOs are tied to a single RGB LED which is exposed via lightpipe on the device front casing. Considering the above, this patch exposes all three LEDs, preserves the common system LED (GPIO 15) as the openwrt status LED, and removes the color information from the LEDs names since it is not consistent across hardware. The LED naming is made consistent with other YunCore devices. A note is added in DTS to ensure this information is always available and prevent unwanted changes in the future. Fixes: #10131 "YunCore AX820: GPIO LED not correct" Reviewed-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: bump 5.10 to 5.10.127John Audia2022-07-019-20/+20
| | | | | | | All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit 433dc5892a60003753655aac6e6a4b59fb13b2e4)
* kernel: bump 5.10 to 5.10.126John Audia2022-07-011-2/+2
| | | | | | | | | | No patches rebased, just checksum update for this refresh. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit c5882c33a78153e84acca22af3429ff6eb6c99e0)
* qoriq: enable Book-E Watchdog TimerStijn Tintel2022-07-011-0/+2
| | | | | | | | | | | | | | | | Enable PowerPC Book-E Watchdog Timer support. Having this enabled in-kernel will result in procd starting it during boot. This effectively solves the problem of the WDT in the Winbond W83793 chip potentially resetting the system during sysupgrade, which could result in an unbootable device. While the driver is modular, resulting in procd not starting the WDT during boot (because that happens before kmod load), the WDT handover during sysupgrade results in the WDT being started. This normally shouldn't be a problem, but the W83793 WDT does not like procd's defaults, nor the handover happening during sysupgrade. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 04071cb111f290417074de130d34ae5895fd3a7b)
* ipq40xx: cut ath10k board file for mikrotik subtargetJohn Thomson2022-07-013-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid shipping ath10k board file in Mikrotik initram images Most will only ever need to use these initram images once—to initially load OpenWrt, but fix these images for more consistent Wi-Fi performance between the initram and installed squashfs images. OpenWrt BUILDBOT config ignores -cut packages in the initram images build. This results in BUILDBOT initram images including the linux-firmware qca4019 board-2.bin, and (initram image booted) Mikrotik devices loading a generic BDF, rather than the intended BDF data loaded from NOR as an api 1 board_file. buildbot snapshot booted as initram image: cat /etc/openwrt_version r19679-810eac8c7f dmesg | grep ath10k | grep -E board\|BDF [ 9.794556] ath10k_ahb a000000.wifi: Loading BDF type 0 [ 9.807192] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:16 crc32 11892f9b [ 12.457105] ath10k_ahb a800000.wifi: Loading BDF type 0 [ 12.464945] ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 11892f9b CC: Robert Marko <robimarko@gmail.com> Fixes: 5eee67a72fed ("ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default") Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Reviewed-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 602b5f6c60a2827bd918dfae0ffb271f8b88f4df) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq40xx: mikrotik: dont include ath10k-board-qca4019 by defaultRobert Marko2022-07-011-0/+1
| | | | | | | | | | | | | Since MikroTik subtarget now uses dynamic BDF loading its crucial that it doesnt include the board-2.bin at all which is provided by the ath10k-board-qca4019 package. So to resolve this dont include the ath10k-board-qca4019 package on the MikroTik subtarget. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 5eee67a72fed52ac686dd467d93eea95d44c8dff) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq-wifi: remove packaged BDF-s for MikroTik devicesRobert Marko2022-07-016-14/+4
| | | | | | | | | | | | | Since we now provide the BDF-s for MikroTik IPQ40xx devices on the fly, there is noneed to include package and ship them like we do now. This also resolves the performance issues that happen as MikroTik changes the boards and ships them under the same revision but they actually ship with and require a different BDF. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit ab141a6e2cb645ff64adb107af2e8973a720c1c7) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq40xx: mikrotik: provide BDF-s on demandRobert Marko2022-07-011-0/+23
| | | | | | | | | | | | | Since we now can pass the API 1 BDF-s aka board.bin to the ath10k driver per radio lets use that to provide the BDF-s for MikroTik devices. This also resolves the performance issues that happen as MikroTik changes the boards and ships them under the same revision but they actually ship with and require a different BDF. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 4d4462cc2ace4b044e99e9b22a24cb4d89c7db95) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* mac80211: ath10k: backport bus and device specific API 1 BDF selectionRobert Marko2022-07-011-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ath10k IPQ40xx devices like the MikroTik hAP ac2 and ac3 require the BDF-s to be extracted from the device storage instead of shipping packaged API 2 BDF-s. This is required as MikroTik has started shipping boards that require BDF-s to be updated, as otherwise their WLAN performance really suffers. This is however impossible as the devices that require this are release under the same revision and its not possible to differentiate them from devices using the older BDF-s. In OpenWrt we are extracting the calibration data during runtime and we are able to extract the BDF-s in the same manner, however we cannot package the BDF-s to API 2 format on the fly and can only use API 1 to provide BDF-s on the fly. This is an issue as the ath10k driver explicitly looks only for the board.bin file and not for something like board-bus-device.bin like it does for pre-cal data. Due to this we have no way of providing correct BDF-s on the fly, so lets extend the ath10k driver to first look for BDF-s in the board-bus-device.bin format, for example: board-ahb-a800000.wifi.bin If that fails, look for the default board file name as defined previously. So, backport the upstream ath10k patch. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit 3daf2d477ee728b5b066fe7f31808a5f19bb98a1) [prune unrelated patch refreshes] Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ath10k-ct: update to 2022-05-13Robert Marko2022-07-014-22/+22
| | | | | | | | | Update ath10k-ct to the latest version which includes the backported ath10k commit for requesting API 1 BDF-s with a unique name like caldata. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit ab97b2a25d69215dcc0d9621e491aa7b17f315cb) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* firewall4: bump to git HEADStijn Tintel2022-07-011-3/+3
| | | | | | | | | | | | | | | | | | | 11f5c7b fw4.uc: fix zone helper assignment b9d35ff fw4.uc: don't skip zone for unavailable helper e35e26b tests: add test for zone helpers a063317 ruleset: fix conntrack helpers e1cb763 ruleset: reuse zone-jump.uc template for notrack and helper chain jumps 11410b8 ruleset: reorder declarations & output tweaks 880dd31 fw4: fix skipping invalid IPv6 ipset entries 5994466 fw4: simplify `is_loopback_dev()` 53886e5 fw4: fix crash in parse_cthelper() if no helpers are present 11256ff fw4: add support for configurable includes 3b5a033 tests: add test coverage for firewall includes d79911c fw4: support sets with timeout capability but without default expiry 15c3831 fw4: add support for `option log` in rule and redirect sections Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit e8433fb4336b72e44a40cb667ee2eb06e0a31109)
* qoriq: enable HARDENED_USERCOPYStijn Tintel2022-07-011-1/+0
| | | | | | | | The random crashes observed with HARDENED_USERCOPY enabled no longer seem to occur. Enable HARDENED_USERCOPY to improve security. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 61587c92425ecdcabb82a6c81cff698a23ffb049)
* qoriq: disable CONFIG_COMPATStijn Tintel2022-07-011-8/+0
| | | | | | | | We do not need support for 32 bit applications, as we're building everything for 64 bit. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 3e1848ee0ff3b01461a9d2f772bde27a4101f3d9)
* qoriq: 02_network fix sweth globbing logicThibaut VARÈNE2022-07-011-1/+1
| | | | | | | This prevents invalid configuration of non-existent sweth devices. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 5fdbae463c57fa48709d876abaadbbbd5938f84f)
* qoriq: define reset button for Firebox M300Thibaut VARÈNE2022-07-012-1/+13
| | | | | | | This patch provides support for the Firebox M300 reset button. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 19231cf83835db563ee7431b502fe1695ef1f559)
* qoriq: define leds for Firebox M300Thibaut VARÈNE2022-07-012-1/+22
| | | | | | | | | This patch provides support for the Firebox M300 only user-controllable bi-color LED, and makes the green "shield" LED act as the typical OpenWrt status led. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 4ab421b81d383c127135716f56a1e18337575516)
* ath79: add support for RouterBOARD mAPThibaut VARÈNE2022-06-305-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik mAP-2nd (sold as mAP) is an indoor 2.4Ghz AP with 802.3af/at PoE input and passive PoE passthrough. See https://mikrotik.com/product/RBmAP2nD for more details. Specifications: - SoC: QCA9533 - RAM: 64MB - Storage: 16MB NOR - Wireless: QCA9533 802.11b/g/n 2x2 - Ethernet: 2x 10/100 ports, 802.3af/at PoE in port 1, 500 mA passive PoE out on port 2 - 7 user-controllable LEDs Note: the device is a tiny AP and does not distinguish between both ethernet ports roles, so they are both assigned to lan. With the current setup, ETH1 is connected to eth1 and ETH2 is connected to eth0 via the embedded switch port 2. Flashing: TFTP boot initramfs image and then perform sysupgrade. The "ETH1" port must be used to upload the TFTP image. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Tested-By: Andrew Powers-Holmes <aholmes@omnom.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit e1223dbee332b89caf71850eb909104529595c31)
* ipq40xx: mikrotik: make RouterBoot partition writeableThibaut VARÈNE2022-06-305-5/+0
| | | | | | | | | | Linux MTD requires the parent partition be writable for a child partition to be allowed write permission. In order for soft_config to be writeable (and modifiable via sysfs), the parent RouterBoot partition must be writeable Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit bb929a0f9cbabef59eaced57d5162d112640c3cd)