Compare commits

...

52 Commits

Author SHA1 Message Date
Hauke Mehrtens
677e3c18fe OpenWrt v22.03.0-rc4: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-06-10 21:36:53 +02:00
Arınç ÜNAL
2b1941e47d bcm53xx: remove BROKEN flag from Asus RT-AC88U
The image builds and works fine on Asus RT-AC88U. Therefore, remove the
BROKEN flag from the makefile.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit 5c1b1918ab)
2022-06-10 09:20:21 +02:00
Christian Lamparter
a83dc6b06d kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx
Hannu Nyman wrote in openwrt's github issue #9962:
|Based on forum discussion, the commit 0bc794a
|"kernel: add support for Toshiba TC58NVG0S3HTA00 NAND flash"
|causes flash memory chip misdetection for some other
|Fritzbox devices, as the commit only defines a 4-byte flash
|memory chip ID that matches several chips used in the devices.
|
|See discussion from this onward
|<https://forum.openwrt.org/t/openwrt-22-03-0-rc1-first-release-candidate/126045/182>
|
|OpenWrt 22.03.0-rc2 and rc3 are causing on a Fritzbox 7412
|bootloops due to a misdetected flash chip.
|
|Yup, that patch is missing the 5th ID byte entirely - both chips
|share the same first 4;
|
| TC58NVG0S3HTA00 = 0x98 0xf1 0x80 0x15 0x72 (digikey datasheet, page 35)
| TC58BVG0S3HTA00 = 0x98 0xf1 0x80 0x15 0xf2 (digikey datasheet, page 28)
|
|The commit has also been backported to openwrt-22.03 after rc1,
|so both rc2 and rc3 suffer from this bug."

Andreas' TC58NVG0S3H seems not to follow Toshibas/Kioxa's own datasheet.
It only reports the first four bytes: "98 f1 80 15 00 00 00 00".

This patch changes the id_len in the entry to 8. This makes it so that
Andreas' NAND is still detected. At the same time, this prevents other
Toshiba NAND flash chips - that share the same four bytes - from being
misdetected.

Upstream (Miquel Raynal) decided to drop this patch for now. But he
advised to keep it in OpenWrt. As other devices could be affected.
<https://lore.kernel.org/linux-mtd/20220606155919.23001410@xps-13/>

Reported-by: Peter-vdL
Tested-by: Peter-vdL
Tested-by: Andreas B<C3><B6>hler <dev@aboehler.at>
Fixes: 0bc794a668 ("kernel: add support for Toshiba TC58NVG0S3HTA00 NAND flash")
Link: <https://github.com/openwrt/openwrt/issues/9962>
(actually move the patch, added comment about possible counterfeits)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2022-06-09 20:37:24 +02:00
Eneas U de Queiroz
3b90edaff9 wolfssl: make WOLFSSL_HAS_OPENVPN default to y
Openvpn forces CONFIG_WOLFSSL_HAS_OPENVPN=y.  When the phase1 bots build
the now non-shared package, openvpn will not be selected, and WolfSSL
will be built without it.  Then phase2 bots have CONFIG_ALL=y, which
will select openvpn and force CONFIG_WOLFSSL_HAS_OPENVPN=y.  This
changes the version hash, causing dependency failures, as shared
packages expect the phase2 hash.

Fixes: #9738

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-06-09 02:53:00 +02:00
Eneas U de Queiroz
fe9c4593b5 wolfssl: enable CPU crypto instructions
This enables AES & SHA CPU instructions for compatible armv8, and x86_64
architectures.  Add this to the hardware acceleration choice, since they
can't be enabled at the same time.

The package was marked non-shared, since the arm CPUs may or may not
have crypto extensions enabled based on licensing; bcm27xx does not
enable them.  There is no run-time detection of this for arm.

NOTE:
Should this be backported to a release branch, it must be done shortly
before a new minor release, because the change to nonshared will remove
libwolfssl from the shared packages, but the nonshared are only built in
a subsequent release!

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 0a2edc2714)
2022-06-09 00:06:55 +02:00
Eneas U de Queiroz
50b6f5604b wolfssl: add benchmark utility
This packages the wolfssl benchmark utility.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 18fd12edb8)
2022-06-09 00:06:55 +02:00
Eneas U de Queiroz
f4b7541b22 wolfssl: don't change ABI because of hw crypto
Enabling different hardware crypto acceleration should not change the
library ABI.  Add them to PKG_CONFIG_DEPENDS after the ABI version hash
has been computed.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 677774d445)
2022-06-09 00:06:55 +02:00
John Audia
ff889898d2 kernel: bump 5.10 to 5.10.120
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit f800f8d6fc)
2022-06-07 22:28:59 +02:00
John Audia
0ca9367069 kernel: bump 5.10 to 5.10.119
Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in.
Patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit cd634afe6c)
2022-06-07 22:28:59 +02:00
John Audia
49f8a75031 kernel: bump 5.10 to 5.10.118
Removed upstreamed:
    generic-backport/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch
    generic-backport/774-v5.15-2-igc-remove-phy-type-checking.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit b789a588b1)
2022-06-07 22:28:59 +02:00
John Audia
3ce3de934c kernel: bump 5.10 to 5.10.117
Removed upstreamed:
    backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 01a6a5c731)
2022-06-07 22:28:59 +02:00
Rosen Penev
b24c301709 ksmbd: update to 3.4.5
Major changes are:

Add support for smbd-direct multi-desctriptor.
Add support for dkms.
Add support for key exchange.
Fix seveal bugs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 95adbc24e7)
2022-06-07 22:28:59 +02:00
Ptilopsis Leucotis
e8fedf26ab ath79: allow use GPIO17 as regular gpio on GL-AR300M devices
Small update to my previous path 'fix I2C on GL-AR300M devices'.
This update allow using GPIO17 as regular GPIO in case it not used
as I2C SDA line.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
(cherry picked from commit 493080815d)
2022-06-07 22:28:59 +02:00
Lech Perczak
c29641f718 ath79: ZTE MF286[,A,R]: use GPIO19 as ath9k LED
With the pinctrl configuration set properly by the previous commit, the
LED stays lit regardless of status of 2.4GHz radio, even if 5GHz radio
is disabled. Map GPIO19 as LED for ath9k, this way the LED will show
activity for both bands, as it is bound by logical AND with output of
ath10k-phy0 LED. This works well because during management traffic,
phy*tpt triggers typically cause LEDs to blink in unison.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 5ca45e0a21)
2022-06-07 22:28:59 +02:00
Lech Perczak
9325aefaf3 ath79: ZTE MF286[,A,R]: fix WLAN LED mapping
The default configuration of pinctrl for GPIO19 set by U-boot was not a
GPIO, but an alternate function, which prevented the GPIO hog from
working. Set GPIO19 into GPIO mode to allow the hog to work, then the
ath10k LED output can control the state of actual LED properly.

Link: <https://github.com/openwrt/openwrt/pull/9941>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
(cherry picked from commit 82b5984636)
2022-06-07 22:28:59 +02:00
Leo Chung
720a7db7ea build: fix find warning with SCAN_EXTRA
If you change SCAN_EXTRA variable with "-path target/linux/xxxx" in
include/toplevel.mk for speed up scan, find will warn with:

find: warning: you have specified the global option -maxdepth after
the argument -path, but global options are not positional, i.e.,
-maxdepth affects tests specified before it as well as those specified
after it.  Please specify global options before other arguments.

The find option -mindepth -maxdepth are global options and must be
before any path option. Change order of $(SCAN_EXTRA) after -mindepth
and -maxdepth to fix this.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
[capitalize Description, Author and Sob and minor description tweak]
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
(cherry picked from commit eb787b5b9d)
2022-06-07 22:28:59 +02:00
Felix Fietkau
8e9eaef70a kernel: fix crashes in bridge offload code
- fix an issues when accessing the port pointer of an expired/invalid fdb entry

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 38a5b593ef)
2022-06-07 22:28:59 +02:00
Felix Fietkau
33df033b73 mac80211: add a bug fix for a rare crash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 9a93b62f31)
2022-06-07 22:28:59 +02:00
Petr Štetiar
d04a947b6b uboot-imx: fix wrong make flags overriding
Buidbots are currently choking on the following compile error:

 In file included from tools/aisimage.c:9:
 include/image.h:1133:12: fatal error: openssl/evp.h: No such file or directory
  #  include <openssl/evp.h>
             ^~~~~~~~~~~~~~~
 compilation terminated.

This is caused by a complete overriding of make flags which are provided
correctly in `UBOOT_MAKE_FLAGS` variable, but currently overriden
instead of extended. This then leads to the usage of build host include
dirs, which are not available.

Fix it by extending `UBOOT_MAKE_FLAGS` variable in all device recipes.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 481339a042)
2022-06-07 22:28:59 +02:00
Ritaro Takenaka
972160a0f7 kernel: backport flow offload fixes
Some dst in IPv6 flow offload table become invalid after the table is created.
So check_dst is needed in packet path.

Signed-off-by: Ritaro Takenaka <ritarot634@gmail.com>
[Add patch for kernel 5.15 too and rename file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit efff48529b)
2022-06-07 22:28:59 +02:00
Álvaro Fernández Rojas
26958e9724 bmips: dgnd3700v2: fix network config
ucidef_set_bridge_device is needed for DGND3700v2 network config since VLAN 1
must be used for the switch to be correctly configured.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 90e4c8c6e6)
2022-06-07 21:36:58 +02:00
Felix Fietkau
fe04b41d70 libubox: update to the latest version
f2d6752901f2 blob: clear buf->head when freeing a buffer
45210ce14136 list.h: add container_of_safe macro
cfa372ff8aed blobmsg: implicitly reserve space for 0-terminator in string buf alloc
d2223ef9da71 blobmsg: work around false positive gcc -Warray-bounds warnings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3e300e724b)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
9c0f94e955 ltq-vdsl-app: disconnect when service is stopped
Stop the connection when the control daemon is terminated. The code is
a modified version of the termination routine in version 4.23.1 of the
daemon (which doesn't support VR9 modems anymore).

This could also be implemented by calling the acos and acs commands via
dsl_cpe_pipe.sh in the init script. However, doing it in the daemon
itself has the advantage of also working if it is terminated in another
way (for example during sysupgrade).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(cherry picked from commit 1daaef31b3)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
8f4b5fdd5f ltq-vdsl/ltq-adsl: fix elapsed time calculation
The driver maintains elapsed times by repeatedly accumulating the time
since the previous update in a loop. For the elapsed showtime time, the
time difference is truncated to seconds before adding it, leading to a
sizable error over time.

Move the truncation to before calculation of the time difference in
order to remove this error. Also maintain the total elapsed time in the
same way in full seconds, to prevent the unsigned 32-bit counter from
wrapping around after about 50 days.

Testing on a VR9 device shows that the reported line uptime now matches
the actual elapsed wall time. The ADSL variant is only compile-tested,
but it should also work as the relevant code is identical.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(cherry picked from commit db4bf4b968)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
ea0744fbc6 ltq-atm/ltq-ptm: avoid unnecessary build dependencies
Right now, both ltq-adsl-mei and ltq-vdsl-mei are always built, even
when they aren't necessary for the selected variant. This can cause the
build to fail, for example ltq-vdsl-mei doesn't build successfully here
on xway target due to the vectoring callback.

Make these dependencies conditional on the specific package variants,
so they are only built when actually needed.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(cherry picked from commit 2f484aeff5)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
290c13b7d7 ltq-vdsl-mei: add locking to interrupt handler
Some users noticed repeated resyncs at random intervals, which go away
when the MEI driver is configured to use polling instead of interrupts.
Debugging shows that this seems to be caused by concurrent calls to
MEI_ReadMailbox (in the interrupt handler) and MEI_WriteMailbox. This
appears to be mostly triggered when there is an interrupt for vectoring
error reports.

In polling mode, calls to MEI_ReadMailbox are protected by the same
semaphore as is used in MEI_WriteMailbox. When interrupts are used,
MEI_WriteMailbox appears to rely on MEI_DisableDeviceInt and
MEI_EnableDeviceInt to provide mutual exclusion with the interrupt
handler. These functions mask/unmask interrupts, and there is an
additional check of the mask in the interrupt handler itself. However,
this is not sufficient on systems with SMP, as the interrupt handler
may be running in parallel, and could already be past the interrupt
mask check at this point.

This adds a lock to the interrupt handler, and also acquires this lock
in MEI_DisableDeviceInt. This should make sure that after a call to
MEI_DisableDeviceInt the interrupt is masked, and the interrupt handler
is either not running, has alread finished its work, or is still before
the interrupt mask check, and is thus going to detect the change.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit 1700424553)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
d0397abd9d ltq-vdsl-app: set MAC address for vectoring error reports
This tells the modem about the WAN MAC address, which is used as source
address for vectoring error reports that are generated by the firmware.

It needs to be set early, as the MEI driver only actually writes the
value to the modem when is in reset state (i.e. the firmware has been
loaded, but connection has not started yet).

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit b35d33c8b8)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
642d6c0c6d ltq-vdsl-mei: enable vectoring error sample callback
This re-enables the vectoring error sample callback and adds a
dependency to the corresponding driver.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit 93f0e1f922)
2022-06-07 21:36:58 +02:00
Jan Hoffmann
e56836dfc1 ltq-vectoring: add driver
In order to calculate the required pre-distortion for downstream
vectoring, the vectoring control entity (VCE) at the carrier office
needs error samples from the modem. On Lantiq VR9 modems, error reports
are generated by the firmware, but need to be multiplexed into the data
stream by the driver on the main processor when L2 encapsulation is
selected by the VCE.

This driver provides the necessary callback function, which is called by
the MEI driver after receiving an error report from the firmware.

Originally, it is part of the Lantiq PPA driver, but after a few changes
it also works with the PTM driver used in OpenWrt. The direct call to
ndo_start_xmit needs to be replaced, as the PTM driver relies on locks
from the kernel. Instead dev_queue_xmit is used, which is called from a
work queue, as it is not safe to call from an interrupt handler.

Additional changes include fixes to support recent kernel versions and
a change of the used interface from ptm0 to dsl0.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit f872b96609)
2022-06-07 21:36:58 +02:00
Luiz Angelo Daros de Luca
de0a9b0eab realtek: add gpio-restart for D-Link DGS-1210-28
A GPIO assert is required to reset the system. Otherwise, the system
will hang on reboot.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit a2817ce96f17db3a5af77837ae5733b47182ae0d)
2022-06-07 17:07:58 +02:00
Luiz Angelo Daros de Luca
e2ca166479 realtek: add reset button for D-Link DGS-1210-28
Tested in a DGS-1210-28 F3, both triggering failsafe and reboot.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b85f59b726442621efb95153ff60b8767723feca)
2022-06-07 17:07:58 +02:00
Arınç ÜNAL
638220bfee packages: nvram: add NVRAM quirks for bcm53xx target
Add NVRAM quirks script for the bcm53xx target. Split NVRAM quirks for the
bcm47xx and bcm53xx targets. Move clear partialboot NVRAM quirk for Linksys
EA9500 here. Add set wireless LED behaviour quirk for Asus RT-AC88U.

Use boot() instead of start() as nvram commands are meant to be executed
only once, at boot.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit f4e219fd5e)
2022-06-07 16:18:20 +02:00
Arınç ÜNAL
bee8612d4f bcm53xx: add support for Asus RT-AC88U
Asus RT-AC88U is an AC3100 router featuring 9 Ethernet ports over the
integrated Broadcom and the external Realtek switch.

Hardware info:
* Processor: Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
* Switch: BCM53012 in BCM4709C0KFEBG & external RTL8365MB
* DDR3 RAM: 512 MB
* Flash: 128 MB (ESMT F59L1G81LA-25T)
* 2.4GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC
* 5GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC
* Ports: 8 Ports, 1 WAN Ports

Flashing instructions:
* Boot to CFE Recovery Mode by holding the reset button while power-on.
* Connect to the router with an ethernet cable.
* Set IPv4 address of the computer to 192.168.1.2 subnet 255.255.255.0.
* Head to http://192.168.1.1.
* Reset NVRAM.
* Upload the OpenWrt image.

CFE bootloader may reject flashing the image due to image integrity check.
In that case, follow the instructions below.

* Rename the OpenWrt image as firmware.trx.
* Run a TFTP server and make it serve the firmware.trx file.
* Run the URL below on a browser or curl.
  http://192.168.1.1/do.htm?cmd=flash+-noheader+192.168.1.2:firmware.trx+flash0.trx

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
[rmilecki: mark BROKEN until we sort out nvram & CFE recovery]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 72b9b721d7)
2022-06-07 16:18:20 +02:00
Raylynn Knight
ee4a765090 realtek: add support for ZyXEL GS1900-24E
The ZyXEL GS1900-24E is a 24 port gigabit switch similar to other GS1900
switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24E
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB Macronix MX25L12835F
* RAM:       128 MiB DDR2 SDRAM Nanya NT5TU128M8GE
* Ethernet:  24x 10/100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             24 ethernet port link/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESET" button on front panel
* Switch:    1 Power switch on rear of device
* Power      120-240V AC C13
* UART:      1 serial header (JP2) with populated standard pin connector on
             the left side of the PCB.
             Pinout (front to back):
             + Pin 1 - VCC marked with white dot
             + Pin 2 - RX
             + Pin 3 - TX
             + PIn 4 - GND

Serial connection parameters:  115200 8N1.

Installation
------------

OEM upgrade method:

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware
* Select the HTTP radio button
* Select the Active radio button
* Use the browse button to locate the
realtek-rtl838x-zyxel_gs1900-24e-initramfs-kernel.bin
file and select open so File Path is updated with filename.
* Select the Apply button. Screen will display "Prepare
for firmware upgrade ...".
*Wait until screen shows "Do you really want to reboot?"
then select the OK button
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/realtek-rtl838x-zyxel_gs1900-24e-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
   > rtk network on
* Since the GS1900-24E is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from the first partition anyway (hardcoded in the DTS). To make sure we are
  manipulating the first partition, issue the following commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
   > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-rtl838x-zyxel_gs1900-24e-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-rtl838x-zyxel_gs1900-24e-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Raylynn Knight <rayknight@me.com>
(cherry picked from commit b515ad10a6)
2022-06-06 11:05:29 +02:00
Stijn Tintel
045fe28d4e ramips: use hotplug script for EAP615-Wall MACs
Using nvmem-cells to set the MAC address for a DBDC device results in
both PHY devices using the same MAC address. This in turn will result in
multiple BSSes using the same BSSID, which can cause various problems.

Use the hotplug script for the EAP615-Wall instead to avoid this.

Fixes: a1b8a4d7b3 ("ramips: support TP-Link EAP615-Wall")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-By: Andrew Powers-Holmes <aholmes@omnom.net>
(cherry picked from commit ce90ba1f31)
2022-06-06 11:13:26 +03:00
Daniel Golle
f77d77e726 tools/mkimage: increase tmpfile name length limit
mkimage limits the length of the file paths in can deal with to 256
characters. Turns out that in automated builds by asu we break this
limit, so increase it to 1024 characters.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 3fbf9689b6)
2022-06-05 11:38:28 +01:00
Daniel Golle
4afa65af8e fstools: update to git HEAD
93369be Revert "fstools: remove SELinux restorecon hack"

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit b641dadc13)
2022-06-05 11:38:20 +01:00
Daniel Golle
0a47d52287 ubus: update to git HEAD
2f793a4 lua: add optional path filter to objects() method
 2bebf93 ubusd: handle invoke on event object without data

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 1521d5f453)
2022-06-05 11:38:12 +01:00
Daniel Golle
76b4b50bbe netifd: update to git HEAD
2e1fcf4 netifd: fix hwmode for 60g band
 39ef9fe interface-ip: fix memory corruption bug when using jail network namespaces

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 7eb83b2015)
2022-06-05 11:37:57 +01:00
Daniel Golle
19f287a7ca procd: update to git HEAD
557c98e init: selinux: don't relabel virtual filesystems
 7a00968 init: only relabel rootfs if started from initramfs

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 4cbc26b212)
2022-06-05 11:37:52 +01:00
Felix Fietkau
2ca8bccb00 netifd: update to the latest version
4b4849cf5e5a interface-ip: unify host and proto route handling
507c0513d176 interface-ip: add support for excluding interfaces in host route lookup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 24cc341fdc)
2022-06-05 11:37:47 +01:00
Daniel Golle
002e05bf9f uqmi: update to git HEAD
56cb2d4 nas: add decoding of cell_id
 9a9019a uqmi: wms - added storage to read text messages

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 51c442c265)
2022-06-05 11:35:37 +01:00
David Bauer
f765f2f114 ipq40xx: add Aruba AP-365 specific BDF
Aruba deploys a BDF in the root filesystem, however this matches the one
used for the DK04 reference board.

The board-specific BDFs are built into the kernel. The AP-365 shows
sinificant degraded performance with increased range when used with the
reference BDF.

Replace the BDF with the one extracted from Arubas kernel.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit b21b98627d)
2022-06-02 17:01:22 +02:00
Hauke Mehrtens
59e1b59bb3 malta: use default OpenWrt network configuration
Currently malta configures the first Ethernet device as WAN interface.
If it finds a second one it will configure it as LAN.

This commit reverses it to match armvirt and x86. If there is only one
network device it will be configured as LAN device now. If we find two
network devices the 2. one will be WAN.

If no board.d network configuration is given it will be configured in
package/base-files/files/etc/board.d/99-default_network

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[minor typos]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fb1ba92202)
2022-06-02 12:18:56 +02:00
Jo-Philipp Wich
dbd4c345fb firewall4: update to latest Git HEAD
210991d fw4: prefer /dev/stdin if available
4e5e322 fw4: make `fw4 restart` behavior more robust
221040e ruleset: emit time ranges when both start and stop times are specified
30a7d47 fw4: fix datetime parsing
fb9a6b2 ruleset: correct mangle_output chain type
6dd2617 fw4: fix logic flaw in testing hw flow offloading support
c7c9c84 fw4: ensure that negative bitcounts are properly translated
c4a78ed fw4: fix typo in emitted set types

Fixes: #9764, #9923, #9927, #9935, #9955
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a7ddef6ef1)
2022-06-01 13:51:19 +02:00
Jo-Philipp Wich
dad1533030 ucode: update to latest Git HEAD
d996047 syntax: adjust number literal parsing and string to number conversion
9efbe18 lib: refactor `uc_int()`
da3f089 lib: rework uc_index() implementation
559029e ci: make jobs faster during pull request testing

Fixes: #9923
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commits 251e70c887 and
 7f998088f0)
2022-06-01 13:49:53 +02:00
Sebastian Schaper
b42511c007 ath79: fix label MAC address for D-Link DIR-825B1
The label MAC address for DIR-825 Rev. B1 is the WAN address located
at 0xffb4 in `caldata`, which equals LAN MAC at 0xffa0 incremented by 1.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
(cherry picked from commit 4bed263af7)
2022-05-29 00:01:52 +02:00
Hauke Mehrtens
0ed3446bfc OpenWrt v22.03.0-rc3: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-05-27 12:09:52 +02:00
Hauke Mehrtens
f0e0bcba5e OpenWrt v22.03.0-rc3: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-05-27 12:09:29 +02:00
Jan-Niklas Burfeind
9f415792e1 ath79: NanoBeam M5 fix target_devices
Update the name of for the Ubiquiti NanoBeam M5 to match the
auto-generated one at runtime. Otherwise sysupgrade complains about
mismatching device names.

This also required renaming the DTS.

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit 21a3ce97d5)
2022-05-21 20:52:39 +02:00
Jan-Niklas Burfeind
d9cb31f944 ath79: add support for Ubiquiti NanoBeam M5
Ubiquiti NanoBeam M5 devices are CPE equipment for customer locations
with one Ethernet port and a 5 GHz 300Mbps wireless interface.

Specificatons:

- Atheros AR9342
- 535 MHz CPU
- 64 MB RAM
- 8 MB Flash
- 1x 10/100 Mbps Ethernet with passive PoE input (24 V)
- 6 LEDs of which four are rssi
- 1 reset button
- UART (4-pin) header on PCB

Notes:

The device was supported by OpenWrt in ar71xx.

Flash instructions (web/ssh/tftp):

Loading the image via ssh vias a stock firmware prior "AirOS 5.6".
Downgrading stock is possible.

* Flashing is possible via AirOS software update page:
The "factory" ROM image is recognized as non-native and then installed correctly.
AirOS warns to better be familiar with the recovery procedure.

* Flashing can be done via ssh, which is becoming difficult due to legacy
keyexchange methods.

This is an exempary ssh-config:
KexAlgorithms +diffie-hellman-group1-sha1
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
User ubnt

The password is ubnt.

Connecting via IPv6 link local worked best for me.

1. scp the factory image to /tmp
2. fwupdate.real -m /tmp/firmware_image_file.bin -d

* Alternatively tftp is possible:

1. Configure PC with static IP 192.168.1.2/24.
2. Enter the rescue mode. Power off the device, push the reset button on
   the device (or the PoE) and keep it pressed.
   Power on the device, while still pushing the reset button.
3. When all the leds blink at the same time, release the reset button.
4. Upload the firmware image file via TFTP:

tftp 192.168.1.20
tftp> bin
tftp> trace
Packet tracing on.
tftp> put firmware_image.bin

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
(cherry picked from commit 4cd3ff8a79)
2022-05-21 20:52:30 +02:00
Paul Spooren
fca0069247 OpenWrt v22.03.0-rc2: revert to branch defaults
Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-05-21 18:36:24 +02:00
99 changed files with 1294 additions and 342 deletions

View File

@@ -1,4 +1,4 @@
src-git-full packages https://git.openwrt.org/feed/packages.git^b708cf5a17a1498b02c3ca4fd66f99aba3773c9c
src-git-full luci https://git.openwrt.org/project/luci.git^d8ecf48f20da632af86def0f18093861c522914b
src-git-full routing https://git.openwrt.org/feed/routing.git^f6d2b09643dfdc3b3916cb116ebc3f45a058fae6
src-git-full telephony https://git.openwrt.org/feed/telephony.git^4c148548df2aae3c036a5e309ff0474dbb1f48ac
src-git-full packages https://git.openwrt.org/feed/packages.git^afea2bcafca132022ac4470e2d495962720348fb
src-git-full luci https://git.openwrt.org/project/luci.git^28e92e3f8c3bd06ecbade1873f2c255c354672c2
src-git-full routing https://git.openwrt.org/feed/routing.git^4b2b6b3d2b0178d254943409cfb4bdce0edbbda4
src-git-full telephony https://git.openwrt.org/feed/telephony.git^1d2031a5c82816483c51bca15649e2957fbe2bc2

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .116
LINUX_KERNEL_HASH-5.10.116 = 806692ba7436f9cfbc32709fe20097dbde4ae5e2f4ae582f39b1d91ce5d20b49
LINUX_VERSION-5.10 = .120
LINUX_KERNEL_HASH-5.10.120 = 5b7a756004158ece2f5e41795ba523ec201743a736e34ce41cbe09177f7d0e8b

View File

@@ -72,7 +72,7 @@ endif
$(FILELIST): $(OVERRIDELIST)
rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
find -L $(SCAN_DIR) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@
find -L $(SCAN_DIR) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) $(SCAN_EXTRA) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@
$(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
( \

View File

@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),22.03.0-rc2)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),22.03.0-rc4)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19374-34b6abf5a8)
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r19426-2b1941e47d)
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/22.03.0-rc2)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/22.03.0-rc4)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

View File

@@ -183,7 +183,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "https://downloads.openwrt.org/releases/22.03-SNAPSHOT"
default "https://downloads.openwrt.org/releases/22.03.0-rc4"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -259,7 +259,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES
bool
prompt "Revision code in filenames"
default y
default n
help
Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive

View File

@@ -17,6 +17,7 @@ zyxel,gs1900-8hp-v2|\
zyxel,gs1900-10hp|\
zyxel,gs1900-16|\
zyxel,gs1900-24-v1|\
zyxel,gs1900-24e|\
zyxel,gs1900-24hp-v1|\
zyxel,gs1900-24hp-v2)
idx="$(find_mtd_index u-boot-env)"

View File

@@ -23,7 +23,7 @@ endef
define U-Boot/apalis_imx6
NAME:=Toradex Apalis
UBOOT_IMAGE:=SPL u-boot.img u-boot-with-spl.imx
UBOOT_MAKE_FLAGS:=SPL u-boot.img u-boot-with-spl.imx
UBOOT_MAKE_FLAGS+=SPL u-boot.img u-boot-with-spl.imx
BUILD_SUBTARGET:=cortexa9
BUILD_DEVICES:=toradex_apalis
endef
@@ -31,7 +31,7 @@ endef
define U-Boot/mx6cuboxi
NAME:=SolidRun Cubox-i boards
UBOOT_IMAGE:=SPL u-boot.img
UBOOT_MAKE_FLAGS:=SPL u-boot.img
UBOOT_MAKE_FLAGS+=SPL u-boot.img
BUILD_SUBTARGET:=cortexa9
BUILD_DEVICES:=solidrun_cubox-i
endef

View File

@@ -27,6 +27,7 @@ endef
ALLWIFIBOARDS:= \
8dev_habanero-dvk \
aruba_ap-303 \
aruba_ap-365 \
asus_rt-ac42u \
avm_fritzrepeater-1200 \
buffalo_wtr-m2133hp \
@@ -120,6 +121,7 @@ endef
$(eval $(call generate-ipq-wifi-package,8dev_habanero-dvk,8devices Habanero DVK))
$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
$(eval $(call generate-ipq-wifi-package,aruba_ap-365,Aruba AP-365))
$(eval $(call generate-ipq-wifi-package,asus_rt-ac42u,ASUS RT-AC42U))
$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
$(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP))

Binary file not shown.

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ksmbd
PKG_VERSION:=3.4.3
PKG_VERSION:=3.4.5
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=a910c55d9e6924775e00504eddd00b49788603af29d0772cb9fb6722c189f628
PKG_HASH:=2873c8ba1027fc5b04c5f5344804ef1469ad7019a033456c16ca4aa3f2c161f0
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING

View File

@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ltq-adsl
PKG_VERSION:=3.24.4.4
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION)
PKG_SOURCE_URL:=@OPENWRT

View File

@@ -0,0 +1,122 @@
--- a/src/include/drv_dsl_cpe_pm_core.h
+++ b/src/include/drv_dsl_cpe_pm_core.h
@@ -1525,9 +1525,9 @@ typedef struct
DSL_boolean_t bShowtimeProcessingStart;
/** Showtime reached flag*/
DSL_boolean_t bShowtimeInvTrigger;
- /** Current Showtime synchronization time to be used, (msec) */
+ /** Current Showtime synchronization time to be used, (sec) */
DSL_uint32_t nCurrShowtimeTime;
- /** Showtime synchronization time to be used, (msec) */
+ /** Showtime synchronization time to be used, (sec) */
DSL_uint32_t nElapsedShowtimeTime;
/** Actual Line state*/
DSL_LineStateValue_t nLineState;
--- a/src/pm/drv_dsl_cpe_api_pm.c
+++ b/src/pm/drv_dsl_cpe_api_pm.c
@@ -1445,7 +1445,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersTo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -1501,7 +1501,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersEx
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL_EXT(pCounters->nChannel);
@@ -2418,7 +2418,7 @@ DSL_Error_t DSL_DRV_PM_DataPathCountersT
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -3190,7 +3190,7 @@ DSL_Error_t DSL_DRV_PM_DataPathFailureCo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_FAILURE_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -3950,7 +3950,7 @@ DSL_Error_t DSL_DRV_PM_LineSecCountersTo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLineCounters = DSL_DRV_PM_PTR_LINE_SEC_COUNTERS_TOTAL(pCounters->nDirection);
@@ -4602,7 +4602,7 @@ DSL_Error_t DSL_DRV_PM_LineInitCountersT
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLinitCounters = DSL_DRV_PM_PTR_LINE_INIT_COUNTERS_TOTAL();
@@ -5131,7 +5131,7 @@ DSL_Error_t DSL_DRV_PM_LineEventShowtime
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLfCounters = DSL_DRV_PM_PTR_LINE_EVENT_SHOWTIME_COUNTERS_TOTAL(pCounters->nDirection);
@@ -5670,7 +5670,7 @@ DSL_Error_t DSL_DRV_PM_ReTxCountersTotal
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pReTxCounters = DSL_DRV_PM_PTR_RETX_COUNTERS_TOTAL(pCounters->nDirection);
--- a/src/pm/drv_dsl_cpe_pm_core.c
+++ b/src/pm/drv_dsl_cpe_pm_core.c
@@ -61,6 +61,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
{
DSL_Error_t nErrCode = DSL_SUCCESS;
DSL_uint32_t msecTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE,
+ secTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE/DSL_PM_MSEC,
nCurrMsTime = 0;
#ifdef INCLUDE_DSL_CPE_PM_HISTORY
DSL_uint32_t nCurrSysTime = 0, nPrevElapsedTime = 0;
@@ -100,10 +101,13 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
{
/* Get elapsed time [msec] since the last entry*/
msecTimeFrame = nCurrMsTime - DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck;
+
+ /* Get elapsed time [sec] since the last entry*/
+ secTimeFrame = (nCurrMsTime/DSL_PM_MSEC) - (DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck/DSL_PM_MSEC);
}
/* Get Total Elapsed Time Since the PM module startup*/
- DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += msecTimeFrame;
+ DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += secTimeFrame;
/* Set last time check to the current time*/
DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck = nCurrMsTime;
@@ -141,7 +145,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
else
{
/* Update current showtime elapsed time*/
- DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += (msecTimeFrame/DSL_PM_MSEC);
+ DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += secTimeFrame;
DSL_DRV_PM_CONTEXT(pContext)->nElapsedShowtimeTime =
DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime;
}

View File

@@ -22,13 +22,18 @@ define KernelPackage/ltq-atm-template
URL:=http://www.lantiq.com/
VARIANT:=$(1)
DEPENDS:=@$(2) +kmod-atm +br2684ctl
ifeq ($(1),vr9)
DEPENDS+= +PACKAGE_kmod-ltq-atm-$(1):kmod-ltq-vdsl-vr9-mei
else
DEPENDS+= +PACKAGE_kmod-ltq-atm-$(1):kmod-ltq-adsl-$(1)-mei
endif
FILES:=$(PKG_BUILD_DIR)/ltq_atm_$(1).ko
endef
KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy) +kmod-ltq-adsl-danube-mei)
KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway +kmod-ltq-adsl-ar9-mei)
KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase +kmod-ltq-adsl-ase-mei)
KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei)
KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway)
KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase)
KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200)
define Build/Configure
endef

View File

@@ -24,9 +24,9 @@ define KernelPackage/ltq-ptm-template
VARIANT:=$(1)
DEPENDS:=@TARGET_lantiq_$(2)
ifeq ($(1),vr9)
DEPENDS+= +kmod-ltq-vdsl-vr9-mei
DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-vdsl-vr9-mei
else
DEPENDS+= +kmod-ltq-adsl-$(1)-mei
DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-adsl-$(1)-mei
endif
ifeq ($(1),ase)
DEPENDS+=@BROKEN

View File

@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ltq-vdsl-vr9-mei
PKG_VERSION:=1.5.17.6
PKG_RELEASE:=4
PKG_RELEASE:=6
PKG_BASE_NAME:=drv_mei_cpe
PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
@@ -29,7 +29,7 @@ define KernelPackage/ltq-vdsl-vr9-mei
TITLE:=mei driver for vdsl
SECTION:=sys
SUBMENU:=Network Devices
DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos +kmod-ltq-vectoring
FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
endef

View File

@@ -376,17 +376,6 @@
}
IFX_int32_t MEI_PLL_ConfigInit(MEI_DEV_T *pMeiDev)
--- a/src/drv_mei_cpe_dsm.c
+++ b/src/drv_mei_cpe_dsm.c
@@ -144,7 +144,7 @@ IFX_void_t MEI_VRX_DSM_DataInit(MEI_DEV_
memset((IFX_uint8_t *)&pMeiDev->firmwareFeatures, 0x00, sizeof(IOCTL_MEI_firmwareFeatures_t));
pMeiDev->meiFwDlCount = 0;
- pMeiDev->meiERBbuf.pCallBackFunc = mei_dsm_cb_func_hook;
+ pMeiDev->meiERBbuf.pCallBackFunc = NULL;
PRN_DBG_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_NORMAL,
("MEI_DRV: PP callback function addr = 0x%08X" MEI_DRV_CRLF,
--- a/src/drv_mei_cpe_download_vrx.c
+++ b/src/drv_mei_cpe_download_vrx.c
@@ -3281,12 +3281,14 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownloa

View File

@@ -0,0 +1,45 @@
--- a/src/drv_mei_cpe_common.c
+++ b/src/drv_mei_cpe_common.c
@@ -104,6 +104,8 @@ IFX_uint32_t MEI_FsmStateSetMsgPreAction
MEI_DEVCFG_DATA_T MEI_DevCfgData;
#endif
+static DEFINE_SPINLOCK(MEI_InterruptLock);
+
/* ============================================================================
Proc-FS and debug variable definitions
========================================================================= */
@@ -2134,6 +2136,9 @@ IFX_int32_t MEI_ProcessIntPerIrq(MEIX_CN
#if (MEI_SUPPORT_DEBUG_STREAMS == 1)
IFX_int_t extraDbgStreamLoop = 0;
#endif
+ unsigned long flags;
+
+ spin_lock_irqsave(&MEI_InterruptLock, flags);
/* get the actual chip device from the list and step through the VRX devices */
while(pNextXCntrl)
@@ -2167,6 +2172,8 @@ IFX_int32_t MEI_ProcessIntPerIrq(MEIX_CN
}
#endif
+ spin_unlock_irqrestore(&MEI_InterruptLock, flags);
+
return meiIntCnt;
}
@@ -2639,9 +2646,14 @@ IFX_int32_t MEI_MsgSendPreAction(
*/
IFX_void_t MEI_DisableDeviceInt(MEI_DEV_T *pMeiDev)
{
+ unsigned long flags;
+ spin_lock_irqsave(&MEI_InterruptLock, flags);
+
MEI_MaskInterrupts( &pMeiDev->meiDrvCntrl,
ME_ARC2ME_INTERRUPT_MASK_ALL);
+ spin_unlock_irqrestore(&MEI_InterruptLock, flags);
+
return;
}

View File

@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ltq-vdsl-vr9
PKG_VERSION:=4.17.18.6
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_BASE_NAME:=drv_dsl_cpe_api
PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz

View File

@@ -0,0 +1,122 @@
--- a/src/include/drv_dsl_cpe_pm_core.h
+++ b/src/include/drv_dsl_cpe_pm_core.h
@@ -1552,9 +1552,9 @@ typedef struct
DSL_boolean_t bShowtimeProcessingStart;
/** Showtime reached flag*/
DSL_boolean_t bShowtimeInvTrigger;
- /** Current Showtime synchronization time to be used, (msec) */
+ /** Current Showtime synchronization time to be used, (sec) */
DSL_uint32_t nCurrShowtimeTime;
- /** Showtime synchronization time to be used, (msec) */
+ /** Showtime synchronization time to be used, (sec) */
DSL_uint32_t nElapsedShowtimeTime;
/** Actual Line state*/
DSL_LineStateValue_t nLineState;
--- a/src/pm/drv_dsl_cpe_api_pm.c
+++ b/src/pm/drv_dsl_cpe_api_pm.c
@@ -1475,7 +1475,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersTo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -1535,7 +1535,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersEx
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL_EXT(pCounters->nChannel);
@@ -2518,7 +2518,7 @@ DSL_Error_t DSL_DRV_PM_DataPathCountersT
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -3352,7 +3352,7 @@ DSL_Error_t DSL_DRV_PM_DataPathFailureCo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_FAILURE_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
@@ -4130,7 +4130,7 @@ DSL_Error_t DSL_DRV_PM_LineSecCountersTo
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLineCounters = DSL_DRV_PM_PTR_LINE_SEC_COUNTERS_TOTAL(pCounters->nDirection);
@@ -4787,7 +4787,7 @@ DSL_Error_t DSL_DRV_PM_LineInitCountersT
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLinitCounters = DSL_DRV_PM_PTR_LINE_INIT_COUNTERS_TOTAL();
@@ -5240,7 +5240,7 @@ DSL_Error_t DSL_DRV_PM_LineEventShowtime
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pLfCounters = DSL_DRV_PM_PTR_LINE_EVENT_SHOWTIME_COUNTERS_TOTAL(pCounters->nDirection);
@@ -5720,7 +5720,7 @@ DSL_Error_t DSL_DRV_PM_ReTxCountersTotal
}
/* Fill Total Counters elapsed time*/
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
pReTxCounters = DSL_DRV_PM_PTR_RETX_COUNTERS_TOTAL(pCounters->nDirection);
--- a/src/pm/drv_dsl_cpe_pm_core.c
+++ b/src/pm/drv_dsl_cpe_pm_core.c
@@ -60,6 +60,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
{
DSL_Error_t nErrCode = DSL_SUCCESS;
DSL_uint32_t msecTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE,
+ secTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE/DSL_PM_MSEC,
nCurrMsTime = 0;
#ifdef INCLUDE_DSL_CPE_PM_HISTORY
DSL_uint32_t nCurrSysTime = 0, nPrevElapsedTime = 0;
@@ -99,10 +100,13 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
{
/* Get elapsed time [msec] since the last entry*/
msecTimeFrame = nCurrMsTime - DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck;
+
+ /* Get elapsed time [sec] since the last entry*/
+ secTimeFrame = (nCurrMsTime/DSL_PM_MSEC) - (DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck/DSL_PM_MSEC);
}
/* Get Total Elapsed Time Since the PM module startup*/
- DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += msecTimeFrame;
+ DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += secTimeFrame;
/* Set last time check to the current time*/
DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck = nCurrMsTime;
@@ -140,7 +144,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
else
{
/* Update current showtime elapsed time*/
- DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += (msecTimeFrame/DSL_PM_MSEC);
+ DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += secTimeFrame;
DSL_DRV_PM_CONTEXT(pContext)->nElapsedShowtimeTime =
DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime;
}

View File

@@ -0,0 +1,61 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ltq-vectoring
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/ppa_drv.git
PKG_SOURCE_DATE:=2019-05-20
PKG_SOURCE_VERSION:=4fa7ac30fcc8ec4eddae9debba5f4230981f469f
PKG_MIRROR_HASH:=444eb823dd9ddd25453976bf7a3230955e4148b8bf92f35f165ecffee32c4555
PKG_LICENSE:=GPL-2.0 BSD-2-Clause
MAKE_PATH:=src/vectoring
PKG_EXTMOD_SUBDIRS:=$(MAKE_PATH)
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define KernelPackage/ltq-vectoring
SECTION:=sys
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=driver for sending vectoring error samples
DEPENDS:=@TARGET_lantiq_xrx200
FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring.ko
AUTOLOAD:=$(call AutoLoad,49,ltq_vectoring)
endef
define Package/ltq-vectoring/description
This driver is responsible for sending error reports to the vectoring
control entity, which is required for downstream vectoring to work.
The error reports are generated by the DSL firmware, and passed to this
driver by the MEI driver.
endef
define KernelPackage/ltq-vectoring-test
SECTION:=sys
CATEGORY:=Kernel modules
SUBMENU:=Network Devices
TITLE:=driver for testing the vectoring driver
DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vectoring
FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring_test.ko
endef
define Package/ltq-vectoring-test/description
This allows to send dummy data to the vectoring error block callback.
This is only needed for test and development purposes.
endef
define Build/Configure
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)/$(MAKE_PATH)" \
modules
endef
$(eval $(call KernelPackage,ltq-vectoring))
$(eval $(call KernelPackage,ltq-vectoring-test))

View File

@@ -0,0 +1,95 @@
--- a/src/vectoring/Makefile
+++ b/src/vectoring/Makefile
@@ -1,5 +1,5 @@
-obj-$(CONFIG_PTM_VECTORING) += ifxmips_vectoring.o
-obj-y += ifxmips_vectoring_stub.o
-ifeq ($(CONFIG_DSL_MEI_CPE_DRV),)
-obj-$(CONFIG_PTM_VECTORING) += ifxmips_vectoring_test.o
-endif
+obj-m += ltq_vectoring.o
+ltq_vectoring-objs = ifxmips_vectoring.o ifxmips_vectoring_stub.o
+
+obj-m += ltq_vectoring_test.o
+ltq_vectoring_test-objs = ifxmips_vectoring_test.o
--- a/src/vectoring/ifxmips_vectoring.c
+++ b/src/vectoring/ifxmips_vectoring.c
@@ -30,9 +30,11 @@
/*
* Common Head File
*/
+#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/etherdevice.h>
+#include <linux/proc_fs.h>
/*
* Chip Specific Head File
@@ -239,7 +241,7 @@ static int netdev_event_handler(struct n
&& event != NETDEV_UNREGISTER )
return NOTIFY_DONE;
- netif = (struct net_device *)netdev;
+ netif = netdev_notifier_info_to_dev(netdev);
if ( strcmp(netif->name, "ptm0") != 0 )
return NOTIFY_DONE;
@@ -356,6 +358,7 @@ static int proc_write_dbg(struct file *f
return count;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static struct file_operations g_proc_file_vectoring_dbg_seq_fops = {
.owner = THIS_MODULE,
.open = proc_read_dbg_seq_open,
@@ -364,6 +367,15 @@ static struct file_operations g_proc_fil
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static struct proc_ops g_proc_file_vectoring_dbg_seq_fops = {
+ .proc_open = proc_read_dbg_seq_open,
+ .proc_read = seq_read,
+ .proc_write = proc_write_dbg,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
static int proc_read_dbg_seq_open(struct inode *inode, struct file *file)
{
--- a/src/vectoring/ifxmips_vectoring_test.c
+++ b/src/vectoring/ifxmips_vectoring_test.c
@@ -1,6 +1,8 @@
+#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
#include "ifxmips_vectoring_stub.h"
@@ -82,6 +84,7 @@ static int proc_write_vectoring(struct f
return count;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static struct file_operations g_proc_file_vectoring_seq_fops = {
.owner = THIS_MODULE,
.open = proc_read_vectoring_seq_open,
@@ -90,6 +93,15 @@ static struct file_operations g_proc_fil
.llseek = seq_lseek,
.release = single_release,
};
+#else
+static struct proc_ops g_proc_file_vectoring_seq_fops = {
+ .proc_open = proc_read_vectoring_seq_open,
+ .proc_read = seq_read,
+ .proc_write = proc_write_vectoring,
+ .proc_lseek = seq_lseek,
+ .proc_release = single_release,
+};
+#endif
static int proc_read_vectoring_seq_open(struct inode *inode, struct file *file)
{

View File

@@ -0,0 +1,73 @@
--- a/src/vectoring/ifxmips_vectoring.c
+++ b/src/vectoring/ifxmips_vectoring.c
@@ -325,7 +325,7 @@ static int proc_write_dbg(struct file *f
else
printk(dbg_enable_mask_str[i] + 1);
}
- printk("] > /proc/vectoring\n");
+ printk("] > /proc/driver/vectoring\n");
}
if ( f_enable )
@@ -433,11 +433,10 @@ static int __init vectoring_init(void)
{
struct proc_dir_entry *res;
- res = proc_create("vectoring",
+ res = proc_create("driver/vectoring",
S_IRUGO|S_IWUSR,
0,
&g_proc_file_vectoring_dbg_seq_fops);
- printk("res = %p\n", res);
register_netdev_event_handler();
g_ptm_net_dev = dev_get_by_name(&init_net, "ptm0");
@@ -460,7 +459,7 @@ static void __exit vectoring_exit(void)
unregister_netdev_event_handler();
- remove_proc_entry("vectoring", NULL);
+ remove_proc_entry("driver/vectoring", NULL);
}
module_init(vectoring_init);
--- a/src/vectoring/ifxmips_vectoring_test.c
+++ b/src/vectoring/ifxmips_vectoring_test.c
@@ -79,7 +79,7 @@ static int proc_write_vectoring(struct f
}
}
else
- printk("echo send <size> > /proc/eth/vectoring\n");
+ printk("echo send <size> > /proc/driver/vectoring_test\n");
return count;
}
@@ -112,9 +112,7 @@ static __init void proc_file_create(void
{
struct proc_dir_entry *res;
-// g_proc_dir = proc_mkdir("eth", NULL);
-
- res = proc_create("eth/vectoring",
+ res = proc_create("driver/vectoring_test",
S_IRUGO|S_IWUSR,
g_proc_dir,
&g_proc_file_vectoring_seq_fops);
@@ -122,10 +120,7 @@ static __init void proc_file_create(void
static __exit void proc_file_delete(void)
{
- remove_proc_entry("vectoring",
- g_proc_dir);
-
- remove_proc_entry("eth", NULL);
+ remove_proc_entry("driver/vectoring_test", NULL);
}
@@ -151,3 +146,5 @@ static void __exit vectoring_test_exit(v
module_init(vectoring_test_init);
module_exit(vectoring_test_exit);
+
+MODULE_LICENSE("GPL");

View File

@@ -0,0 +1,120 @@
--- a/src/vectoring/ifxmips_vectoring.c
+++ b/src/vectoring/ifxmips_vectoring.c
@@ -35,6 +35,8 @@
#include <linux/module.h>
#include <linux/etherdevice.h>
#include <linux/proc_fs.h>
+#include <linux/pkt_sched.h>
+#include <linux/workqueue.h>
/*
* Chip Specific Head File
@@ -88,6 +90,7 @@ static void dump_skb(struct sk_buff *skb
static void ltq_vectoring_priority(uint32_t priority);
+static void xmit_work_handler(struct work_struct *);
/*
* ####################################
@@ -118,9 +121,11 @@ struct erb_head {
static struct notifier_block g_netdev_event_handler_nb = {0};
static struct net_device *g_ptm_net_dev = NULL;
-static uint32_t vector_prio = 0;
+static uint32_t vector_prio = TC_PRIO_CONTROL;
static int g_dbg_enable = 0;
+DECLARE_WORK(xmit_work, xmit_work_handler);
+struct sk_buff_head xmit_queue;
/*
@@ -129,9 +134,16 @@ static int g_dbg_enable = 0;
* ####################################
*/
+static void xmit_work_handler(__attribute__((unused)) struct work_struct *work) {
+ struct sk_buff *skb;
+
+ while ((skb = skb_dequeue(&xmit_queue)) != NULL) {
+ dev_queue_xmit(skb);
+ }
+}
+
static int mei_dsm_cb_func(unsigned int *p_error_vector)
{
- int rc, ret;
struct sk_buff *skb_list = NULL;
struct sk_buff *skb;
struct erb_head *erb;
@@ -179,7 +191,6 @@ static int mei_dsm_cb_func(unsigned int
}
}
- rc = 0;
sent_size = 0;
segment_code = 0;
while ( (skb = skb_list) != NULL ) {
@@ -197,24 +208,23 @@ static int mei_dsm_cb_func(unsigned int
segment_code |= 0xC0;
((struct erb_head *)skb->data)->segment_code = segment_code;
- skb->cb[13] = 0x5A; /* magic number indicating forcing QId */
- skb->cb[15] = 0x00; /* highest priority queue */
- skb->priority = vector_prio;
+ skb_reset_mac_header(skb);
+ skb_set_network_header(skb, offsetof(struct erb_head, llc_header));
+ skb->protocol = htons(ETH_P_802_2);
+ skb->priority = vector_prio;
skb->dev = g_ptm_net_dev;
dump_skb(skb, ~0, "vectoring TX", 0, 0, 1, 0);
- ret = g_ptm_net_dev->netdev_ops->ndo_start_xmit(skb, g_ptm_net_dev);
- if ( rc == 0 )
- rc = ret;
+ skb_queue_tail(&xmit_queue, skb);
+ schedule_work(&xmit_work);
segment_code++;
}
*p_error_vector = 0; /* notify DSL firmware that ERB is sent */
- ASSERT(rc == 0, "dev_queue_xmit fail - %d", rc);
- return rc;
+ return 0;
}
static void ltq_vectoring_priority(uint32_t priority)
{
@@ -242,7 +252,7 @@ static int netdev_event_handler(struct n
return NOTIFY_DONE;
netif = netdev_notifier_info_to_dev(netdev);
- if ( strcmp(netif->name, "ptm0") != 0 )
+ if ( strcmp(netif->name, "dsl0") != 0 )
return NOTIFY_DONE;
g_ptm_net_dev = event == NETDEV_REGISTER ? netif : NULL;
@@ -438,8 +448,10 @@ static int __init vectoring_init(void)
0,
&g_proc_file_vectoring_dbg_seq_fops);
+ skb_queue_head_init(&xmit_queue);
+
register_netdev_event_handler();
- g_ptm_net_dev = dev_get_by_name(&init_net, "ptm0");
+ g_ptm_net_dev = dev_get_by_name(&init_net, "dsl0");
if ( g_ptm_net_dev != NULL )
dev_put(g_ptm_net_dev);
@@ -459,6 +471,8 @@ static void __exit vectoring_exit(void)
unregister_netdev_event_handler();
+ flush_scheduled_work();
+
remove_proc_entry("driver/vectoring", NULL);
}

View File

@@ -446,29 +446,6 @@ endef
$(eval $(call KernelPackage,crypto-kpp))
define KernelPackage/crypto-lib-blake2s
TITLE:=BLAKE2s hash function library
KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S
HIDDEN:=1
FILES:= \
$(LINUX_DIR)/lib/crypto/libblake2s.ko \
$(LINUX_DIR)/lib/crypto/libblake2s-generic.ko
$(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash)
endef
define KernelPackage/crypto-lib-blake2s/config
imply PACKAGE_kmod-crypto-hash
endef
define KernelPackage/crypto-lib-blake2s/x86/64
KCONFIG+=CONFIG_CRYPTO_BLAKE2S_X86
FILES+=$(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko
endef
$(eval $(call KernelPackage,crypto-lib-blake2s))
define KernelPackage/crypto-lib-chacha20
TITLE:=ChaCha library interface
KCONFIG:=CONFIG_CRYPTO_LIB_CHACHA

View File

@@ -1324,7 +1324,6 @@ define KernelPackage/wireguard
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=WireGuard secure network tunnel
DEPENDS:= \
+kmod-crypto-lib-blake2s \
+kmod-crypto-lib-chacha20poly1305 \
+kmod-crypto-lib-curve25519 \
+kmod-udptunnel4 \

View File

@@ -0,0 +1,38 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 26 Mar 2022 23:58:35 +0100
Subject: [PATCH] mac80211: do not wake queues on a vif that is being stopped
When a vif is being removed and sdata->bss is cleared, __ieee80211_wake_txqs
can still be called on it, which crashes as soon as sdata->bss is being
dereferenced.
To fix this properly, check for SDATA_STATE_RUNNING before waking queues,
and take the fq lock when setting it (to ensure that __ieee80211_wake_txqs
observes the change when running on a different CPU
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -377,7 +377,9 @@ static void ieee80211_do_stop(struct iee
bool cancel_scan;
struct cfg80211_nan_func *func;
+ spin_lock_bh(&local->fq.lock);
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
+ spin_unlock_bh(&local->fq.lock);
cancel_scan = rcu_access_pointer(local->scan_sdata) == sdata;
if (cancel_scan)
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -301,6 +301,9 @@ static void __ieee80211_wake_txqs(struct
local_bh_disable();
spin_lock(&fq->lock);
+ if (!test_bit(SDATA_STATE_RUNNING, &sdata->state))
+ goto out;
+
if (sdata->vif.type == NL80211_IFTYPE_AP)
ps = &sdata->bss->ps;

View File

@@ -5,9 +5,9 @@ PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
PKG_MIRROR_HASH:=ae02e1539ea6af072e39ce0d7179806c98eb29188c233be44226118f4c4271ee
PKG_SOURCE_DATE:=2021-11-20
PKG_SOURCE_VERSION:=cce5e351278b307af7f69931971e3d4e060117d7
PKG_MIRROR_HASH:=cf48d00ed0ea74d53f2043eb9f9dc52834c0b214f258201cf22dfff7dd6c6e40
PKG_SOURCE_DATE:=2022-05-15
PKG_SOURCE_VERSION:=d2223ef9da7172a84d1508733dc58840e1381e3c
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1

View File

@@ -53,7 +53,7 @@ config WOLFSSL_HAS_ECC25519
config WOLFSSL_HAS_OPENVPN
bool "Include OpenVPN support"
default n
default y
config WOLFSSL_ALT_NAMES
bool "Include SAN (Subject Alternative Name) support"
@@ -62,13 +62,25 @@ config WOLFSSL_ALT_NAMES
config WOLFSSL_HAS_DEVCRYPTO
bool
config WOLFSSL_ASM_CAPABLE
bool
default x86_64 || (aarch64 && !TARGET_bcm27xx)
choice
prompt "Hardware Acceleration"
default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE
default WOLFSSL_HAS_NO_HW
config WOLFSSL_HAS_NO_HW
bool "None"
config WOLFSSL_HAS_CPU_CRYPTO
bool "Use CPU crypto instructions"
depends on WOLFSSL_ASM_CAPABLE
help
This will use Intel AESNI insturctions or armv8 Crypto Extensions.
Either of them should easily outperform hardware crypto in WolfSSL.
config WOLFSSL_HAS_AFALG
bool "AF_ALG"

View File

@@ -25,25 +25,42 @@ PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
PKG_CONFIG_DEPENDS:=\
CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AFALG \
CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA_POLY \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL \
CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \
CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \
CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \
CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN \
CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES
CONFIG_WOLFSSL_HAS_AES_CCM \
CONFIG_WOLFSSL_HAS_ARC4 \
CONFIG_WOLFSSL_HAS_CERTGEN \
CONFIG_WOLFSSL_HAS_CHACHA_POLY \
CONFIG_WOLFSSL_HAS_DH \
CONFIG_WOLFSSL_HAS_DTLS \
CONFIG_WOLFSSL_HAS_ECC25519 \
CONFIG_WOLFSSL_HAS_OCSP \
CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES \
CONFIG_WOLFSSL_HAS_SESSION_TICKET \
CONFIG_WOLFSSL_HAS_TLSV10 \
CONFIG_WOLFSSL_HAS_TLSV13 \
CONFIG_WOLFSSL_HAS_WPAS
PKG_ABI_VERSION=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
PKG_CONFIG_DEPENDS+=\
CONFIG_WOLFSSL_HAS_AFALG \
CONFIG_WOLFSSL_HAS_CPU_CRYPTO \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL
include $(INCLUDE_DIR)/package.mk
define Package/libwolfssl
define Package/libwolfssl/Default
SECTION:=libs
SUBMENU:=SSL
CATEGORY:=Libraries
TITLE:=wolfSSL library
URL:=http://www.wolfssl.com/
endef
define Package/libwolfssl
$(call Package/libwolfssl/Default)
TITLE:=wolfSSL library
PKGFLAGS:=nonshared
MENU:=1
PROVIDES:=libcyassl
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
@@ -59,6 +76,16 @@ define Package/libwolfssl/config
source "$(SOURCE)/Config.in"
endef
define Package/libwolfssl-benchmark
$(call Package/libwolfssl/Default)
TITLE:=wolfSSL Benchmark Utility
DEPENDS:=libwolfssl
endef
define Package/libwolfssl-benchmark/description
This is the wolfssl benchmark utility.
endef
TARGET_CFLAGS += \
$(FPIC) \
-fomit-frame-pointer \
@@ -77,7 +104,7 @@ CONFIGURE_ARGS += \
--enable-sni \
--enable-stunnel \
--enable-altcertchains \
--disable-crypttests \
--$(if $(CONFIG_PACKAGE_libwolfssl-benchmark),enable,disable)-crypttests \
--disable-examples \
--disable-jobserver \
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
@@ -108,6 +135,15 @@ CONFIGURE_ARGS += \
--enable-wpas --enable-fortress --enable-fastmath
endif
ifdef CONFIG_WOLFSSL_HAS_CPU_CRYPTO
ifdef CONFIG_aarch64
CONFIGURE_ARGS += --enable-armasm
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
else ifdef CONFIG_TARGET_x86_64
CONFIGURE_ARGS += --enable-intelasm
endif
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
@@ -125,4 +161,10 @@ define Package/libwolfssl/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
endef
define Package/libwolfssl-benchmark/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/wolfcrypt/benchmark/.libs/benchmark $(1)/usr/bin/wolfssl-benchmark
endef
$(eval $(call BuildPackage,libwolfssl))
$(eval $(call BuildPackage,libwolfssl-benchmark))

View File

@@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
PKG_SOURCE_DATE:=2022-05-20
PKG_SOURCE_VERSION:=c22eeeff1ef0884fd3c76f4ff2c72caa9de82fd5
PKG_MIRROR_HASH:=ccaf776e3b762a2c684aac3adeb2e3a6a651b58253ea03643cc4964172030178
PKG_SOURCE_DATE:=2022-05-31
PKG_SOURCE_VERSION:=210991df51587bdb736b4fc74b1200ec6cf6ecc7
PKG_MIRROR_HASH:=486c3fdf7201db8ae51dee7ffac1e80e7b652b27eca9a8174e0fc6f286a457fa
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC

View File

@@ -95,10 +95,11 @@ tone_vdsl_b="0x1" # B43
tone_adsl_bv="0x81" # B43 + B43c
tone_vdsl_bv="0x5" # B43 + V43
# create ADSL autoboot script. Used for SNR margin tweak
# create DSL autoboot script. Used for SNR margin tweak and to set MAC address for vectoring error reports
autoboot_script() {
echo "[WaitForConfiguration]={
locs 0 $1
dsmmcs $2
}
[WaitForLinkActivate]={
@@ -166,6 +167,12 @@ lowlevel_cfg() {
0" > /tmp/lowlevel.cfg
}
get_macaddr() {
local name
config_get name $1 name
[ "$name" = "dsl0" ] && config_get $2 $1 macaddr
}
service_triggers() {
procd_add_reload_trigger network
}
@@ -183,6 +190,7 @@ start_service() {
local mode
local lowlevel
local snr
local macaddr
config_load network
config_get tone dsl tone
@@ -191,6 +199,7 @@ start_service() {
config_get xfer_mode dsl xfer_mode
config_get line_mode dsl line_mode
config_get snr dsl ds_snr_offset
config_foreach get_macaddr device macaddr
eval "xtse=\"\${xtse_xdsl_$annex}\""
@@ -289,11 +298,10 @@ start_service() {
lowlevel="-l /tmp/lowlevel.cfg"
}
[ -z "${snr}" ] || {
# for SNR offset setting
autoboot_script "$snr"
autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr"
}
[ -z "${snr}" ] && snr=0
[ -z "${macaddr}" ] && macaddr="00:00:00:00:00:00"
autoboot_script "$snr" "$macaddr"
autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr"
procd_open_instance
procd_set_param command /sbin/vdsl_cpe_control \

View File

@@ -1,3 +1,10 @@
This enables automatic connection after the control daemon is started,
and also stops the connection on termination.
Using the autoboot restart command is necessary because the stop command
doesn't actually stop the connection, and would also leave the driver in
a state where an explicit start command is necessary to connect again.
--- a/src/dsl_cpe_init_cfg.c
+++ b/src/dsl_cpe_init_cfg.c
@@ -27,7 +27,7 @@ DSL_InitData_t gInitCfgData =
@@ -9,3 +16,71 @@
DSL_CPE_AUTOBOOT_CFG_SET(DSL_FALSE, DSL_FALSE, DSL_FALSE),
DSL_CPE_TEST_MODE_CTRL_SET(DSL_TESTMODE_DISABLE),
DSL_CPE_LINE_ACTIVATE_CTRL_SET(DSL_G997_INHIBIT_LDSF, DSL_G997_INHIBIT_ACSF, DSL_G997_NORMAL_STARTUP),
--- a/src/dsl_cpe_control.c
+++ b/src/dsl_cpe_control.c
@@ -6515,10 +6515,13 @@ DSL_CPE_STATIC void DSL_CPE_Termination
DSL_CPE_STATIC DSL_void_t DSL_CPE_Termination (void)
{
#ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
- DSL_int_t nDevice = 0;
DSL_char_t buf[32] = "quit";
#endif
+ DSL_Error_t nRet = DSL_SUCCESS;
+ DSL_int_t nDevice = 0;
+ DSL_AutobootConfig_t sAutobootCfg;
+ DSL_AutobootControl_t sAutobootCtl;
DSL_CPE_Control_Context_t *pCtrlCtx;
pCtrlCtx = DSL_CPE_GetGlobalContext();
@@ -6527,6 +6530,50 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi
pCtrlCtx->bRun = DSL_FALSE;
}
+ for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; ++nDevice)
+ {
+ g_bWaitBeforeConfigWrite[nDevice] = DSL_TRUE;
+ g_bWaitBeforeLinkActivation[nDevice] = DSL_TRUE;
+ g_bWaitBeforeRestart[nDevice] = DSL_TRUE;
+
+ g_bAutoContinueWaitBeforeConfigWrite[nDevice] = DSL_FALSE;
+ g_bAutoContinueWaitBeforeLinkActivation[nDevice] = DSL_FALSE;
+ g_bAutoContinueWaitBeforeRestart[nDevice] = DSL_FALSE;
+
+ memset(&sAutobootCfg, 0x0, sizeof(DSL_AutobootConfig_t));
+ sAutobootCfg.data.nStateMachineOptions.bWaitBeforeConfigWrite = DSL_TRUE;
+ sAutobootCfg.data.nStateMachineOptions.bWaitBeforeLinkActivation = DSL_TRUE;
+ sAutobootCfg.data.nStateMachineOptions.bWaitBeforeRestart = DSL_TRUE;
+
+ nRet = (DSL_Error_t)DSL_CPE_Ioctl(
+ DSL_CPE_GetGlobalContext()->fd[nDevice],
+ DSL_FIO_AUTOBOOT_CONFIG_SET, (DSL_int_t)&sAutobootCfg);
+
+ if (nRet < DSL_SUCCESS)
+ {
+ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+ "Autoboot configuration for device (%d) failed!, nRet = %d!"
+ DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn));
+ }
+
+ memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t));
+ sAutobootCtl.data.nCommand = DSL_AUTOBOOT_CTRL_RESTART;
+
+ nRet = (DSL_Error_t)DSL_CPE_Ioctl(
+ DSL_CPE_GetGlobalContext()->fd[nDevice],
+ DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t)&sAutobootCtl);
+
+ if (nRet < DSL_SUCCESS)
+ {
+ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+ "Autoboot restart for device (%d) failed!, nRet = %d!"
+ DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn));
+ }
+ }
+
+ DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
+ "Autoboot restart executed" DSL_CPE_CRLF));
+
#ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++)
{

View File

@@ -9,7 +9,7 @@
{
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "terminated" DSL_CPE_CRLF));
DSL_CPE_Termination ();
@@ -6756,6 +6756,7 @@ DSL_int_t dsl_cpe_daemon (
@@ -6803,6 +6803,7 @@ DSL_int_t dsl_cpe_daemon (
#ifndef RTEMS
signal (SIGINT, DSL_CPE_TerminationHandler);

View File

@@ -10,7 +10,7 @@
DSL_char_t *g_sFirmwareName1 = DSL_NULL;
DSL_FirmwareFeatures_t g_nFwFeatures1 = {DSL_FW_XDSLMODE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED,
DSL_FW_XDSLFEATURE_CLEANED};
@@ -6759,6 +6762,8 @@ DSL_int_t dsl_cpe_daemon (
@@ -6806,6 +6809,8 @@ DSL_int_t dsl_cpe_daemon (
signal (SIGTERM, DSL_CPE_TerminationHandler);
#endif /* RTEMS*/
@@ -19,7 +19,7 @@
/* Open DSL_CPE_MAX_DSL_ENTITIES devices*/
for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++)
{
@@ -7213,6 +7218,7 @@ DSL_int_t dsl_cpe_daemon (
@@ -7260,6 +7265,7 @@ DSL_int_t dsl_cpe_daemon (
#endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */
DSL_CPE_CONTROL_EXIT:

View File

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2022-02-20
PKG_SOURCE_VERSION:=136006b88826feff4f0a36ffab511d1366483cf2
PKG_MIRROR_HASH:=6358738d20e6df27b82c3bdb575fba0fdad8bef45a3c7479b93a5587c465dba4
PKG_SOURCE_DATE:=2022-06-01
PKG_SOURCE_VERSION:=39ef9fe1388029c476db62889ef2ef5661613321
PKG_MIRROR_HASH:=a17353a33ae4ee0aec790169715e91e634660e15eb33900ec4a23c698425de8a
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0

View File

@@ -5,9 +5,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
PKG_SOURCE_DATE:=2022-03-12
PKG_SOURCE_VERSION:=44dd095794a5327611d0ee1a58b0a6333d397b64
PKG_MIRROR_HASH:=1f7890c659981e1da5c6d73911c30e24722818ff52d58f41d80cc96b62d53311
PKG_SOURCE_DATE:=2022-05-04
PKG_SOURCE_VERSION:=56cb2d4056fef132ccf78dfb6f3074ae5d109992
PKG_MIRROR_HASH:=cc832b5318805df8c8387a3650f250dee72d5f1dbda4e4866b5503e186b2210c
PKG_MAINTAINER:=Matti Laakso <malaakso@elisanet.fi>
PKG_LICENSE:=GPL-2.0

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
PKG_MIRROR_HASH:=c6239a75f6a3b5b010a48d195006550b0e2154f5b22611484c4979f552c0da7d
PKG_SOURCE_DATE:=2022-05-03
PKG_SOURCE_VERSION:=9e11b3723ce30b9b8c94ad7d15072a10cf13c0b4
PKG_MIRROR_HASH:=1b16e5ef533c7b30b3ccc4b7001c18b23c44890021aa4ae54850dbec56e7dc7c
PKG_SOURCE_DATE:=2022-06-02
PKG_SOURCE_VERSION:=93369be040612c906bcbb1631f44a92fa4122d24
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
PKG_MIRROR_HASH:=26c4dd6cfb27ef8f5ef55f7c8d4622ff91e3490917e4fb03f54b138737113251
PKG_SOURCE_DATE:=2022-05-03
PKG_SOURCE_VERSION:=652e6df06f8413f19a4786a275862cfe76628093
PKG_MIRROR_HASH:=0d9b82919492e1ec0df4011b932a210b6256774d0cb1f1e3de24b6dbf36c6a77
PKG_SOURCE_DATE:=2022-06-01
PKG_SOURCE_VERSION:=7a0096853594874d4c60266ec338ac23728017df
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubus
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
PKG_SOURCE_DATE:=2022-02-28
PKG_SOURCE_VERSION:=584f56a2331471459604ad054b3a7bcc366e0f07
PKG_MIRROR_HASH:=9bb7025fa5513530e6f407e0514014a8116babe9287d4217d0b8f9315b1f2181
PKG_SOURCE_DATE:=2022-06-01
PKG_SOURCE_VERSION:=2bebf93cd3343fe49f22a05ef935e460d2d44f67
PKG_MIRROR_HASH:=4efd873928089c086bbac02f3ca5bae55904500b6e6f1c4c377181a00b67147f
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nvram
PKG_RELEASE:=10
PKG_RELEASE:=11
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -44,7 +44,11 @@ define Package/nvram/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
ifneq ($(CONFIG_TARGET_bcm47xx),)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
$(INSTALL_BIN) ./files/nvram-bcm47xx.init $(1)/etc/init.d/nvram
endif
ifneq ($(CONFIG_TARGET_bcm53xx),)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nvram-bcm53xx.init $(1)/etc/init.d/nvram
endif
endef

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
# NVRAM setup
#
# This file handles the NVRAM quirks of various hardware.
# This file handles the NVRAM quirks of various hardware of the bcm47xx target.
START=02
alias debug=${DEBUG:-:}
@@ -71,7 +71,7 @@ fixup_linksys() {
esac
}
start() {
boot() {
# Don't do any fixups on the WGT634U
[ "$(cat /proc/diag/model)" = "Netgear WGT634U" ] && return

View File

@@ -0,0 +1,40 @@
#!/bin/sh /etc/rc.common
# NVRAM setup
#
# This file handles the NVRAM quirks of various hardware of the bcm53xx target.
START=02
clear_partialboots() {
# clear partialboots
case $(board_name) in
linksys,panamera)
COMMIT=1
nvram set partialboots=0
;;
esac
}
set_wireless_led_behaviour() {
# set Broadcom wireless LED behaviour for both radios
# 0:ledbh9 -> Behaviour of 2.4GHz LED
# 1:ledbh9 -> Behaviour of 5GHz LED
# 0x7 makes the wireless LEDs on, when radios are enabled, and blink when there's activity
case $(board_name) in
asus,rt-ac88u)
COMMIT=1
nvram set 0:ledbh9=0x7 set 1:ledbh9=0x7
;;
esac
}
boot() {
. /lib/functions.sh
clear_partialboots
set_wireless_led_behaviour
[ "$COMMIT" = "1" ] && nvram commit
}

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
PKG_SOURCE_DATE:=2022-05-20
PKG_SOURCE_VERSION:=081871e18db544e2c834a516950e1c16c9bc4d2c
PKG_MIRROR_HASH:=5ff1ee6d5549e83ac7bc5f5877d303c82cdb8e640305de5d95cbd3ce66ced133
PKG_SOURCE_DATE:=2022-06-01
PKG_SOURCE_VERSION:=b211ca0e420d8086d3fa0358413a6f8b44df1115
PKG_MIRROR_HASH:=9d0a8583d9ed10a634866b54a30162f47f6a1700e10287aba94bffbc60e9cbf2
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC

View File

@@ -93,7 +93,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
return 0;
}
@@ -245,6 +256,23 @@ static int clk_generated_set_rate(struct
@@ -249,6 +260,23 @@ static int clk_generated_set_rate(struct
return 0;
}
@@ -117,7 +117,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
static const struct clk_ops generated_ops = {
.enable = clk_generated_enable,
.disable = clk_generated_disable,
@@ -254,6 +282,8 @@ static const struct clk_ops generated_op
@@ -258,6 +286,8 @@ static const struct clk_ops generated_op
.get_parent = clk_generated_get_parent,
.set_parent = clk_generated_set_parent,
.set_rate = clk_generated_set_rate,
@@ -126,7 +126,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
};
/**
@@ -320,8 +350,6 @@ at91_clk_register_generated(struct regma
@@ -324,8 +354,6 @@ at91_clk_register_generated(struct regma
if (ret) {
kfree(gck);
hw = ERR_PTR(ret);

View File

@@ -13,8 +13,8 @@
select SWCONFIG
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -29,6 +29,7 @@ obj-$(CONFIG_ADM6996_PHY) += adm6996.o
obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
@@ -31,6 +31,7 @@ ar8xxx-y += ar8216.o
ar8xxx-y += ar8327.o
obj-$(CONFIG_SWCONFIG_B53) += b53/
obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
+obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o

View File

@@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9342_ubnt_xw.dtsi"
/ {
compatible = "ubnt,nanobeam-m5-xw", "ubnt,xw", "qca,ar9342";
model = "Ubiquiti NanoBeam M5 (XW)";
};
&mdio0 {
status = "okay";
phy-mask = <0x1>;
phy1: ethernet-phy@1 {
reg = <1>;
phy-mode = "mii";
reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
};
&eth0 {
status = "okay";
phy-handle = <&phy1>;
};

View File

@@ -72,9 +72,6 @@
i2c: i2c {
compatible = "i2c-gpio";
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio17>;
sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
};
@@ -186,6 +183,9 @@
};
&pinmux {
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio17>;
enable_gpio17: pinmux_enable_gpio17 {
pinctrl-single,bits = <0x10 0x0000 0xff00>;
};

View File

@@ -18,6 +18,8 @@
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&enable_wlan_led_gpio>;
/* Hidden SMD LED below signal strength LEDs.
* Visible through slits underside of the case,
@@ -28,6 +30,13 @@
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led-1 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
keys {
@@ -64,20 +73,6 @@
};
};
&gpio {
/* GPIO19 is used as a mask to enable WLAN LED
* in stock firmware, which is controlled directly
* by 5GHz Wi-Fi chip, which currently is inactive
* in OpenWrt
*/
led-wlan {
gpio-hog;
gpios = <19 GPIO_ACTIVE_LOW>;
output-high;
line-name = "led:wlan";
};
};
&spi {
status = "okay";
@@ -137,6 +132,12 @@
};
};
&pinmux {
enable_wlan_led_gpio: pinmux_wlan_led_gpio {
pinctrl-single,bits = <0x10 0x0 0xff000000>;
};
};
&wmac {
status = "okay";
};

View File

@@ -596,6 +596,7 @@ ath79_setup_macs()
dlink,dir-825-b1)
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
label_mac=$wan_mac
;;
dlink,dir-505)
lan_mac=$(mtd_get_mac_text "mac" 0x4)

View File

@@ -255,6 +255,14 @@ define Device/ubnt_nanobeam-ac-xc
endef
TARGET_DEVICES += ubnt_nanobeam-ac-xc
define Device/ubnt_nanobeam-m5-xw
$(Device/ubnt-xw)
DEVICE_MODEL := NanoBeam M5
DEVICE_PACKAGES += rssileds
SUPPORTED_DEVICES += loco-m-xw
endef
TARGET_DEVICES += ubnt_nanobeam-m5-xw
define Device/ubnt_nanobridge-m
$(Device/ubnt-xm)
SOC := ar7241

View File

@@ -656,8 +656,8 @@
#include <linux/types.h>
+#include <linux/in6.h>
u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -88,7 +88,7 @@ enum {

View File

@@ -68,8 +68,8 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
offset = CORE_STS_OVERRIDE_IMP;
else
offset = CORE_STS_OVERRIDE_IMP2;
@@ -711,7 +712,8 @@ static void bcm_sf2_sw_mac_link_down(str
u32 reg, offset;
@@ -714,7 +715,8 @@ static void bcm_sf2_sw_mac_link_down(str
return;
if (port != core_readl(priv, CORE_IMP0_PRT_ID)) {
- if (priv->type == BCM7445_DEVICE_ID)
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
offset = CORE_STS_OVERRIDE_GMIIP_PORT(port);
else
offset = CORE_STS_OVERRIDE_GMIIP2_PORT(port);
@@ -738,7 +740,8 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -741,7 +743,8 @@ static void bcm_sf2_sw_mac_link_up(struc
bcm_sf2_sw_mac_link_set(ds, port, interface, true);
if (port != core_readl(priv, CORE_IMP0_PRT_ID)) {
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
offset = CORE_STS_OVERRIDE_GMIIP_PORT(port);
else
offset = CORE_STS_OVERRIDE_GMIIP2_PORT(port);
@@ -1131,6 +1134,30 @@ struct bcm_sf2_of_data {
@@ -1134,6 +1137,30 @@ struct bcm_sf2_of_data {
unsigned int num_cfp_rules;
};
@@ -119,7 +119,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Register offsets for the SWITCH_REG_* block */
static const u16 bcm_sf2_7445_reg_offsets[] = {
[REG_SWITCH_CNTRL] = 0x00,
@@ -1179,6 +1206,9 @@ static const struct bcm_sf2_of_data bcm_
@@ -1182,6 +1209,9 @@ static const struct bcm_sf2_of_data bcm_
};
static const struct of_device_id bcm_sf2_of_match[] = {

View File

@@ -82,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void bcm_sf2_intr_disable(struct bcm_sf2_priv *priv)
{
intrl2_0_mask_set(priv, 0xffffffff);
@@ -872,6 +910,8 @@ static int bcm_sf2_sw_resume(struct dsa_
@@ -875,6 +913,8 @@ static int bcm_sf2_sw_resume(struct dsa_
return ret;
}
@@ -91,7 +91,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = bcm_sf2_cfp_resume(ds);
if (ret)
return ret;
@@ -1143,6 +1183,7 @@ struct bcm_sf2_of_data {
@@ -1146,6 +1186,7 @@ struct bcm_sf2_of_data {
const u16 *reg_offsets;
unsigned int core_reg_align;
unsigned int num_cfp_rules;
@@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const u16 bcm_sf2_4908_reg_offsets[] = {
@@ -1167,6 +1208,7 @@ static const struct bcm_sf2_of_data bcm_
@@ -1170,6 +1211,7 @@ static const struct bcm_sf2_of_data bcm_
.core_reg_align = 0,
.reg_offsets = bcm_sf2_4908_reg_offsets,
.num_cfp_rules = 0, /* FIXME */
@@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
/* Register offsets for the SWITCH_REG_* block */
@@ -1277,6 +1319,7 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1280,6 +1322,7 @@ static int bcm_sf2_sw_probe(struct platf
priv->reg_offsets = data->reg_offsets;
priv->core_reg_align = data->core_reg_align;
priv->num_cfp_rules = data->num_cfp_rules;
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
priv->rcdev = devm_reset_control_get_optional_exclusive(&pdev->dev,
"switch");
@@ -1350,6 +1393,8 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1353,6 +1396,8 @@ static int bcm_sf2_sw_probe(struct platf
goto out_clk_mdiv;
}

View File

@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1207,7 +1207,7 @@ static const struct bcm_sf2_of_data bcm_
@@ -1210,7 +1210,7 @@ static const struct bcm_sf2_of_data bcm_
.type = BCM4908_DEVICE_ID,
.core_reg_align = 0,
.reg_offsets = bcm_sf2_4908_reg_offsets,

View File

@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void bcm_sf2_sw_mac_link_down(struct dsa_switch *ds, int port,
@@ -784,11 +815,15 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -787,11 +818,15 @@ static void bcm_sf2_sw_mac_link_up(struc
{
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
struct ethtool_eee *p = &priv->dev->ports[port].eee;
@@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (priv->type == BCM4908_DEVICE_ID ||
priv->type == BCM7445_DEVICE_ID)
offset = CORE_STS_OVERRIDE_GMIIP_PORT(port);
@@ -799,7 +834,7 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -802,7 +837,7 @@ static void bcm_sf2_sw_mac_link_up(struc
interface == PHY_INTERFACE_MODE_RGMII_TXID ||
interface == PHY_INTERFACE_MODE_MII ||
interface == PHY_INTERFACE_MODE_REVMII) {
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
reg &= ~(RX_PAUSE_EN | TX_PAUSE_EN);
if (tx_pause)
@@ -807,7 +842,7 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -810,7 +845,7 @@ static void bcm_sf2_sw_mac_link_up(struc
if (rx_pause)
reg |= RX_PAUSE_EN;

View File

@@ -33,7 +33,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break;
default:
switch (port) {
@@ -1230,9 +1235,7 @@ static const u16 bcm_sf2_4908_reg_offset
@@ -1233,9 +1238,7 @@ static const u16 bcm_sf2_4908_reg_offset
[REG_PHY_REVISION] = 0x14,
[REG_SPHY_CNTRL] = 0x24,
[REG_CROSSBAR] = 0xc8,

View File

@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -824,11 +824,9 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -827,11 +827,9 @@ static void bcm_sf2_sw_mac_link_up(struc
bcm_sf2_sw_mac_link_set(ds, port, interface, true);
if (port != core_readl(priv, CORE_IMP0_PRT_ID)) {
@@ -36,7 +36,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (priv->type == BCM4908_DEVICE_ID ||
priv->type == BCM7445_DEVICE_ID)
offset = CORE_STS_OVERRIDE_GMIIP_PORT(port);
@@ -839,6 +837,7 @@ static void bcm_sf2_sw_mac_link_up(struc
@@ -842,6 +840,7 @@ static void bcm_sf2_sw_mac_link_up(struc
interface == PHY_INTERFACE_MODE_RGMII_TXID ||
interface == PHY_INTERFACE_MODE_MII ||
interface == PHY_INTERFACE_MODE_REVMII) {

View File

@@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
@@ -1235,9 +1272,14 @@ static const u16 bcm_sf2_4908_reg_offset
@@ -1238,9 +1275,14 @@ static const u16 bcm_sf2_4908_reg_offset
[REG_SPHY_CNTRL] = 0x24,
[REG_CROSSBAR] = 0xc8,
[REG_RGMII_11_CNTRL] = 0x014c,

View File

@@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1532,10 +1532,14 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1535,10 +1535,14 @@ static int bcm_sf2_sw_probe(struct platf
rev = reg_readl(priv, REG_PHY_REVISION);
priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK;

View File

@@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1546,6 +1546,12 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1549,6 +1549,12 @@ static int bcm_sf2_sw_probe(struct platf
priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
priv->irq0, priv->irq1);

View File

@@ -13,6 +13,9 @@ bcm53xx_setup_interfaces()
asus,rt-ac87u)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
asus,rt-ac88u)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
;;
linksys,panamera)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
;;

View File

@@ -1,13 +0,0 @@
#!/bin/sh /etc/rc.common
START=97
boot() {
. /lib/functions.sh
case $(board_name) in
linksys,panamera)
# clear partialboots
nvram set partialboots=0 && nvram commit
;;
esac
}

View File

@@ -167,6 +167,14 @@ define Device/asus_rt-ac87u
endef
TARGET_DEVICES += asus_rt-ac87u
define Device/asus_rt-ac88u
$(call Device/asus)
DEVICE_MODEL := RT-AC88U
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
ASUS_PRODUCTID := RT-AC88U
endef
TARGET_DEVICES += asus_rt-ac88u
define Device/asus_rt-n18u
$(call Device/asus)
DEVICE_MODEL := RT-N18U

View File

@@ -9,6 +9,7 @@ comtrend,vr-3032u)
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
;;
netgear,dgnd3700-v2)
ucidef_set_bridge_device switch
ucidef_set_interface_lan "extsw"
;;
esac

View File

@@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
nft_trans_table_update(trans) = true;
list_add_tail(&trans->list, &ctx->net->nft.commit_list);
return 0;
@@ -7908,11 +7912,10 @@ static int nf_tables_commit(struct net *
@@ -7918,11 +7922,10 @@ static int nf_tables_commit(struct net *
switch (trans->msg_type) {
case NFT_MSG_NEWTABLE:
if (nft_trans_table_update(trans)) {
@@ -86,7 +86,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
} else {
nft_clear(net, trans->ctx.table);
}
@@ -8125,11 +8128,9 @@ static int __nf_tables_abort(struct net
@@ -8135,11 +8138,9 @@ static int __nf_tables_abort(struct net
switch (trans->msg_type) {
case NFT_MSG_NEWTABLE:
if (nft_trans_table_update(trans)) {

View File

@@ -0,0 +1,99 @@
From 2738d9d963bd1f06d5114c2b4fa5771a95703991 Mon Sep 17 00:00:00 2001
From: Ritaro Takenaka <ritarot634@gmail.com>
Date: Tue, 17 May 2022 12:55:30 +0200
Subject: [PATCH] netfilter: flowtable: move dst_check to packet path
Fixes sporadic IPv6 packet loss when flow offloading is enabled.
IPv6 route GC and flowtable GC are not synchronized.
When dst_cache becomes stale and a packet passes through the flow before
the flowtable GC teardowns it, the packet can be dropped.
So, it is necessary to check dst every time in packet path.
Fixes: 227e1e4d0d6c ("netfilter: nf_flowtable: skip device lookup from interface index")
Signed-off-by: Ritaro Takenaka <ritarot634@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_flow_table_core.c | 23 +----------------------
net/netfilter/nf_flow_table_ip.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 22 deletions(-)
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
@@ -433,33 +433,12 @@ nf_flow_table_iterate(struct nf_flowtabl
return err;
}
-static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
-{
- struct dst_entry *dst;
-
- if (tuple->xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
- tuple->xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
- dst = tuple->dst_cache;
- if (!dst_check(dst, tuple->dst_cookie))
- return true;
- }
-
- return false;
-}
-
-static bool nf_flow_has_stale_dst(struct flow_offload *flow)
-{
- return flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple) ||
- flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple);
-}
-
static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
{
struct nf_flowtable *flow_table = data;
if (nf_flow_has_expired(flow) ||
- nf_ct_is_dying(flow->ct) ||
- nf_flow_has_stale_dst(flow))
+ nf_ct_is_dying(flow->ct))
set_bit(NF_FLOW_TEARDOWN, &flow->flags);
if (test_bit(NF_FLOW_TEARDOWN, &flow->flags)) {
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -229,6 +229,15 @@ static bool nf_flow_exceeds_mtu(const st
return true;
}
+static inline bool nf_flow_dst_check(struct flow_offload_tuple *tuple)
+{
+ if (tuple->xmit_type != FLOW_OFFLOAD_XMIT_NEIGH &&
+ tuple->xmit_type != FLOW_OFFLOAD_XMIT_XFRM)
+ return true;
+
+ return dst_check(tuple->dst_cache, tuple->dst_cookie);
+}
+
static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
const struct nf_hook_state *state,
struct dst_entry *dst)
@@ -364,6 +373,11 @@ nf_flow_offload_ip_hook(void *priv, stru
if (nf_flow_state_check(flow, iph->protocol, skb, thoff))
return NF_ACCEPT;
+ if (!nf_flow_dst_check(&tuplehash->tuple)) {
+ flow_offload_teardown(flow);
+ return NF_ACCEPT;
+ }
+
if (skb_try_make_writable(skb, thoff + hdrsize))
return NF_DROP;
@@ -600,6 +614,11 @@ nf_flow_offload_ipv6_hook(void *priv, st
if (nf_flow_state_check(flow, ip6h->nexthdr, skb, thoff))
return NF_ACCEPT;
+ if (!nf_flow_dst_check(&tuplehash->tuple)) {
+ flow_offload_teardown(flow);
+ return NF_ACCEPT;
+ }
+
if (skb_try_make_writable(skb, thoff + hdrsize))
return NF_DROP;

View File

@@ -1641,7 +1641,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD;
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1122,7 +1122,6 @@ static int xemaclite_of_probe(struct pla
@@ -1107,7 +1107,6 @@ static int xemaclite_of_probe(struct pla
struct net_device *ndev = NULL;
struct net_local *lp = NULL;
struct device *dev = &ofdev->dev;
@@ -1649,7 +1649,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int rc = 0;
@@ -1164,12 +1163,9 @@ static int xemaclite_of_probe(struct pla
@@ -1149,12 +1148,9 @@ static int xemaclite_of_probe(struct pla
lp->next_rx_buf_to_use = 0x0;
lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong");
lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong");

View File

@@ -1,73 +0,0 @@
From 7c496de538eebd8212dc2a3c9a468386b264d0d4 Mon Sep 17 00:00:00 2001
From: Sasha Neftin <sasha.neftin@intel.com>
Date: Wed, 7 Jul 2021 08:14:40 +0300
Subject: igc: Remove _I_PHY_ID checking
i225 devices have only one PHY vendor. There is no point checking
_I_PHY_ID during the link establishment and auto-negotiation process.
This patch comes to clean up these pointless checkings.
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_base.c | 10 +---------
drivers/net/ethernet/intel/igc/igc_main.c | 3 +--
drivers/net/ethernet/intel/igc/igc_phy.c | 6 ++----
3 files changed, 4 insertions(+), 15 deletions(-)
(limited to 'drivers/net/ethernet/intel/igc')
--- a/drivers/net/ethernet/intel/igc/igc_base.c
+++ b/drivers/net/ethernet/intel/igc/igc_base.c
@@ -187,15 +187,7 @@ static s32 igc_init_phy_params_base(stru
igc_check_for_copper_link(hw);
- /* Verify phy id and set remaining function pointers */
- switch (phy->id) {
- case I225_I_PHY_ID:
- phy->type = igc_phy_i225;
- break;
- default:
- ret_val = -IGC_ERR_PHY;
- goto out;
- }
+ phy->type = igc_phy_i225;
out:
return ret_val;
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4189,8 +4189,7 @@ bool igc_has_link(struct igc_adapter *ad
break;
}
- if (hw->mac.type == igc_i225 &&
- hw->phy.id == I225_I_PHY_ID) {
+ if (hw->mac.type == igc_i225) {
if (!netif_carrier_ok(adapter->netdev)) {
adapter->flags &= ~IGC_FLAG_NEED_LINK_UPDATE;
} else if (!(adapter->flags & IGC_FLAG_NEED_LINK_UPDATE)) {
--- a/drivers/net/ethernet/intel/igc/igc_phy.c
+++ b/drivers/net/ethernet/intel/igc/igc_phy.c
@@ -249,8 +249,7 @@ static s32 igc_phy_setup_autoneg(struct
return ret_val;
}
- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
- hw->phy.id == I225_I_PHY_ID) {
+ if (phy->autoneg_mask & ADVERTISE_2500_FULL) {
/* Read the MULTI GBT AN Control Register - reg 7.32 */
ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK <<
MMD_DEVADDR_SHIFT) |
@@ -390,8 +389,7 @@ static s32 igc_phy_setup_autoneg(struct
ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
mii_1000t_ctrl_reg);
- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
- hw->phy.id == I225_I_PHY_ID)
+ if (phy->autoneg_mask & ADVERTISE_2500_FULL)
ret_val = phy->ops.write_reg(hw,
(STANDARD_AN_REG_MASK <<
MMD_DEVADDR_SHIFT) |

View File

@@ -1,43 +0,0 @@
From 47bca7de6a4fb8dcb564c7ca14d885c91ed19e03 Mon Sep 17 00:00:00 2001
From: Sasha Neftin <sasha.neftin@intel.com>
Date: Sat, 10 Jul 2021 20:57:50 +0300
Subject: igc: Remove phy->type checking
i225 devices have only one phy->type: copper. There is no point checking
phy->type during the igc_has_link method from the watchdog that
invoked every 2 seconds.
This patch comes to clean up these pointless checkings.
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
(limited to 'drivers/net/ethernet/intel/igc')
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4177,17 +4177,10 @@ bool igc_has_link(struct igc_adapter *ad
* false until the igc_check_for_link establishes link
* for copper adapters ONLY
*/
- switch (hw->phy.media_type) {
- case igc_media_type_copper:
- if (!hw->mac.get_link_status)
- return true;
- hw->mac.ops.check_for_link(hw);
- link_active = !hw->mac.get_link_status;
- break;
- default:
- case igc_media_type_unknown:
- break;
- }
+ if (!hw->mac.get_link_status)
+ return true;
+ hw->mac.ops.check_for_link(hw);
+ link_active = !hw->mac.get_link_status;
if (hw->mac.type == igc_i225) {
if (!netif_carrier_ok(adapter->netdev)) {

View File

@@ -1144,7 +1144,6 @@ CONFIG_CRYPTO_KPP=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_ARC4=y
# CONFIG_CRYPTO_LIB_BLAKE2S is not set
# CONFIG_CRYPTO_LIB_CHACHA is not set
# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set
# CONFIG_CRYPTO_LIB_CURVE25519 is not set

View File

@@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CONFIG_MODVERSIONS
@@ -3247,9 +3249,11 @@ static int setup_load_info(struct load_i
@@ -3251,9 +3253,11 @@ static int setup_load_info(struct load_i
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
@@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
@@ -3270,6 +3274,7 @@ static int check_modinfo(struct module *
@@ -3274,6 +3278,7 @@ static int check_modinfo(struct module *
mod->name);
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
}

View File

@@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
bool
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -418,16 +418,16 @@ config BCH_CONST_T
@@ -420,16 +420,16 @@ config BCH_CONST_T
# Textsearch support is select'ed if needed
#
config TEXTSEARCH

View File

@@ -11,7 +11,7 @@
that can be interpreted by the ASN.1 stream decoder and used to
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -589,7 +589,7 @@ config LIBFDT
@@ -591,7 +591,7 @@ config LIBFDT
bool
config OID_REGISTRY

View File

@@ -12,4 +12,4 @@ from backports.
+ tristate "ARC4 cipher library"
config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
tristate
bool

View File

@@ -154,7 +154,7 @@
static int
br_netif_receive_skb(struct net *net, struct sock *sk, struct sk_buff *skb)
@@ -162,6 +163,7 @@ int br_handle_frame_finish(struct net *n
@@ -169,6 +170,7 @@ int br_handle_frame_finish(struct net *n
dst->used = now;
br_forward(dst->dst, skb, local_rcv, false);
} else {
@@ -162,7 +162,7 @@
if (!mcast_hit)
br_flood(br, skb, pkt_type, local_rcv, false);
else
@@ -280,6 +282,9 @@ static rx_handler_result_t br_handle_fra
@@ -287,6 +289,9 @@ static rx_handler_result_t br_handle_fra
memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
p = br_port_get_rcu(skb->dev);
@@ -434,13 +434,13 @@
+ vg = nbp_vlan_group_rcu(inp);
+ vlan = cb->input_vlan_present ? cb->input_vlan_tag : br_get_pvid(vg);
+ fdb_in = br_fdb_find_rcu(p->br, eth_hdr(skb)->h_source, vlan);
+ if (!fdb_in)
+ if (!fdb_in || !fdb_in->dst)
+ goto out;
+
+ vg = nbp_vlan_group_rcu(p);
+ vlan = skb_vlan_tag_present(skb) ? skb_vlan_tag_get_id(skb) : br_get_pvid(vg);
+ fdb_out = br_fdb_find_rcu(p->br, eth_hdr(skb)->h_dest, vlan);
+ if (!fdb_out)
+ if (!fdb_out || !fdb_out->dst)
+ goto out;
+
+ br_offload_prepare_key(p, &key, skb);
@@ -450,7 +450,7 @@
+#endif
+
+ flow = kmem_cache_alloc(offload_cache, GFP_ATOMIC);
+ flow->port = fdb_in->dst;
+ flow->port = inp;
+ memcpy(&flow->key, &key, sizeof(key));
+
+#ifdef CONFIG_BRIDGE_VLAN_FILTERING
@@ -465,7 +465,7 @@
+ spin_lock_bh(&offload_lock);
+ if (!o->enabled ||
+ atomic_read(&p->offload.rht.nelems) >= p->br->offload_cache_size ||
+ rhashtable_insert_fast(&flow->port->offload.rht, &flow->node, flow_params)) {
+ rhashtable_insert_fast(&inp->offload.rht, &flow->node, flow_params)) {
+ kmem_cache_free(offload_cache, flow);
+ goto out_unlock;
+ }
@@ -511,8 +511,8 @@
+#ifdef CONFIG_BRIDGE_VLAN_FILTERING
+ cb->input_vlan_present = key.vlan_present != 0;
+ cb->input_vlan_tag = key.vlan_tag;
+ cb->input_ifindex = p->dev->ifindex;
+#endif
+ cb->input_ifindex = p->dev->ifindex;
+ goto out;
+ }
+

View File

@@ -837,7 +837,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
+EXPORT_SYMBOL_GPL(nf_flow_table_iterate);
static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
{
--- /dev/null
+++ b/include/uapi/linux/netfilter/xt_FLOWOFFLOAD.h

View File

@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -195,6 +195,9 @@ static void __br_handle_local_finish(str
@@ -202,6 +202,9 @@ static void __br_handle_local_finish(str
/* note: already called with rcu_read_lock */
static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
{
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__br_handle_local_finish(skb);
/* return 1 to signal the okfn() was called so it's ok to use the skb */
@@ -348,6 +351,17 @@ static rx_handler_result_t br_handle_fra
@@ -355,6 +358,17 @@ static rx_handler_result_t br_handle_fra
forward:
switch (p->state) {

View File

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -983,8 +983,10 @@ char *symbol_string(char *buf, char *end
@@ -985,8 +985,10 @@ char *symbol_string(char *buf, char *end
struct printf_spec spec, const char *fmt)
{
unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif
if (fmt[1] == 'R')
@@ -1001,8 +1003,14 @@ char *symbol_string(char *buf, char *end
@@ -1003,8 +1005,14 @@ char *symbol_string(char *buf, char *end
return string_nocheck(buf, end, sym, spec);
#else

View File

@@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
#define JFFS2_NODE_ACCURATE 0x2000
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -315,6 +315,12 @@ config ZSTD_DECOMPRESS
@@ -317,6 +317,12 @@ config ZSTD_DECOMPRESS
source "lib/xz/Kconfig"

View File

@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -305,6 +305,8 @@ static rx_handler_result_t br_handle_fra
@@ -312,6 +312,8 @@ static rx_handler_result_t br_handle_fra
fwd_mask |= p->group_fwd_mask;
switch (dest[5]) {
case 0x00: /* Bridge Group Address */

View File

@@ -208,3 +208,12 @@
};
};
};
&wifi0 {
qcom,ath10k-calibration-variant = "Aruba-AP-365";
};
&wifi1 {
qcom,ath10k-calibration-variant = "Aruba-AP-365";
};

View File

@@ -187,7 +187,7 @@ TARGET_DEVICES += aruba_ap-303h
define Device/aruba_ap-365
$(call Device/aruba_glenmorangie)
DEVICE_MODEL := AP-365
DEVICE_PACKAGES += kmod-hwmon-ad7418
DEVICE_PACKAGES := kmod-hwmon-ad7418 ipq-wifi-aruba_ap-365
endef
TARGET_DEVICES += aruba_ap-365

View File

@@ -13,6 +13,7 @@ has 128 bytes OOB. This adds a static NAND ID entry to correct this.
Tested on FRITZ!Box 7530 flashed with OpenWrt.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
(changed id_len to 8, added comment about possible counterfeits)
---
drivers/mtd/nand/raw/nand_ids.c | 3 +++
1 file changed, 3 insertions(+)
@@ -23,9 +24,9 @@ Signed-off-by: Andreas Böhler <dev@aboehler.at>
{"TC58NVG0S3E 1G 3.3V 8-bit",
{ .id = {0x98, 0xd1, 0x90, 0x15, 0x76, 0x14, 0x01, 0x00} },
SZ_2K, SZ_128, SZ_128K, 0, 8, 64, NAND_ECC_INFO(1, SZ_512), },
+ {"TC58NVG0S3HTA00 1G 3.3V 8-bit",
+ { .id = {0x98, 0xf1, 0x80, 0x15} },
+ SZ_2K, SZ_128, SZ_128K, 0, 4, 128, NAND_ECC_INFO(8, SZ_512), },
+ {"TC58NVG0S3HTA00 1G 3.3V 8-bit", /* possibly counterfeit chip - see commit */
+ { .id = {0x98, 0xf1, 0x80, 0x15} /* should be more bytes */ },
+ SZ_2K, SZ_128, SZ_128K, 0, 8, 128, NAND_ECC_INFO(8, SZ_512), },
{"TC58NVG2S0F 4G 3.3V 8-bit",
{ .id = {0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08} },
SZ_4K, SZ_512, SZ_256K, 0, 8, 224, NAND_ECC_INFO(4, SZ_512) },

View File

@@ -40,7 +40,7 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
help
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -86,6 +86,7 @@ obj-$(CONFIG_MICROSEMI_PHY) += mscc/
@@ -88,6 +88,7 @@ obj-$(CONFIG_MICROSEMI_PHY) += mscc/
obj-$(CONFIG_NATIONAL_PHY) += national.o
obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o
obj-$(CONFIG_QSEMI_PHY) += qsemi.o

View File

@@ -41,7 +41,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/* the pci enable helper */
static int pci_enable(struct clk *clk)
{
@@ -571,4 +590,5 @@ void __init ltq_soc_init(void)
@@ -585,4 +604,5 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
}

View File

@@ -1,6 +1,6 @@
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -426,6 +426,20 @@ static void clkdev_add_clkout(void)
@@ -440,6 +440,20 @@ static void clkdev_add_clkout(void)
}
}
@@ -21,7 +21,7 @@
/* bring up all register ranges that we need for basic system control */
void __init ltq_soc_init(void)
{
@@ -591,4 +605,6 @@ void __init ltq_soc_init(void)
@@ -605,4 +619,6 @@ void __init ltq_soc_init(void)
clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
}
usb_set_clock();

View File

@@ -1,13 +0,0 @@
. /lib/functions/uci-defaults.sh
board_config_update
ucidef_set_interface_wan "eth0"
if [ -d "/sys/class/net/eth1" ]; then
ucidef_set_interface_lan "eth1"
fi
board_config_flush
exit 0

View File

@@ -144,8 +144,6 @@
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x0>;
nvmem-cells = <&macaddr_info_8>;
nvmem-cell-names = "mac-address";
};
};

View File

@@ -83,6 +83,10 @@ case "$board" in
hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
;;
tplink,eap615-wall-v1)
hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"
;;
yuncore,ax820)
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress

View File

@@ -33,7 +33,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
phy_led_trigger_change_speed(phydev);
}
@@ -567,7 +567,7 @@ int phy_start_cable_test(struct phy_devi
@@ -572,7 +572,7 @@ int phy_start_cable_test(struct phy_devi
goto out;
/* Mark the carrier down until the test is complete */
@@ -42,7 +42,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
netif_testing_on(dev);
err = phydev->drv->cable_test_start(phydev);
@@ -638,7 +638,7 @@ int phy_start_cable_test_tdr(struct phy_
@@ -643,7 +643,7 @@ int phy_start_cable_test_tdr(struct phy_
goto out;
/* Mark the carrier down until the test is complete */
@@ -51,7 +51,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
netif_testing_on(dev);
err = phydev->drv->cable_test_tdr_start(phydev, config);
@@ -709,7 +709,7 @@ static int phy_check_link_status(struct
@@ -714,7 +714,7 @@ static int phy_check_link_status(struct
phy_link_up(phydev);
} else if (!phydev->link && phydev->state != PHY_NOLINK) {
phydev->state = PHY_NOLINK;
@@ -60,7 +60,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
}
return 0;
@@ -1191,7 +1191,7 @@ void phy_state_machine(struct work_struc
@@ -1226,7 +1226,7 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;

View File

@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -709,7 +709,10 @@ static int phy_check_link_status(struct
@@ -714,7 +714,10 @@ static int phy_check_link_status(struct
phy_link_up(phydev);
} else if (!phydev->link && phydev->state != PHY_NOLINK) {
phydev->state = PHY_NOLINK;
@@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
return 0;
@@ -1191,7 +1194,10 @@ void phy_state_machine(struct work_struc
@@ -1226,7 +1229,10 @@ void phy_state_machine(struct work_struc
case PHY_HALTED:
if (phydev->link) {
phydev->link = 0;

View File

@@ -5,6 +5,30 @@
/ {
compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc";
model = "D-Link DGS-1210-28";
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio1 34 GPIO_ACTIVE_LOW>;
open-source;
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
reset {
label = "reset";
gpios = <&gpio1 33 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
gpio1: rtl8231-gpio {
compatible = "realtek,rtl8231-gpio";
#gpio-cells = <2>;
gpio-controller;
indirect-access-bus-id = <0>;
};
};
&ethernet0 {

View File

@@ -0,0 +1,63 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "rtl8380_zyxel_gs1900.dtsi"
/ {
compatible = "zyxel,gs1900-24e", "realtek,rtl838x-soc";
model = "ZyXEL GS1900-24E";
};
&mdio {
EXTERNAL_PHY(0)
EXTERNAL_PHY(1)
EXTERNAL_PHY(2)
EXTERNAL_PHY(3)
EXTERNAL_PHY(4)
EXTERNAL_PHY(5)
EXTERNAL_PHY(6)
EXTERNAL_PHY(7)
EXTERNAL_PHY(16)
EXTERNAL_PHY(17)
EXTERNAL_PHY(18)
EXTERNAL_PHY(19)
EXTERNAL_PHY(20)
EXTERNAL_PHY(21)
EXTERNAL_PHY(22)
EXTERNAL_PHY(23)
};
&switch0 {
ports {
SWITCH_PORT(1, 1, qsgmii)
SWITCH_PORT(0, 2, qsgmii)
SWITCH_PORT(3, 3, qsgmii)
SWITCH_PORT(2, 4, qsgmii)
SWITCH_PORT(5, 5, qsgmii)
SWITCH_PORT(4, 6, qsgmii)
SWITCH_PORT(7, 7, qsgmii)
SWITCH_PORT(6, 8, qsgmii)
SWITCH_PORT(9, 9, internal)
SWITCH_PORT(8, 10, internal)
SWITCH_PORT(11, 11, internal)
SWITCH_PORT(10, 12, internal)
SWITCH_PORT(13, 13, internal)
SWITCH_PORT(12, 14, internal)
SWITCH_PORT(15, 15, internal)
SWITCH_PORT(14, 16, internal)
SWITCH_PORT(17, 17, qsgmii)
SWITCH_PORT(16, 18, qsgmii)
SWITCH_PORT(19, 19, qsgmii)
SWITCH_PORT(18, 20, qsgmii)
SWITCH_PORT(21, 21, qsgmii)
SWITCH_PORT(20, 22, qsgmii)
SWITCH_PORT(23, 23, qsgmii)
SWITCH_PORT(22, 24, qsgmii)
};
};
&gpio1 {
/delete-node/ poe_enable;
};

View File

@@ -153,6 +153,14 @@ define Device/zyxel_gs1900-24-v1
endef
TARGET_DEVICES += zyxel_gs1900-24-v1
define Device/zyxel_gs1900-24e
$(Device/zyxel_gs1900)
SOC := rtl8382
DEVICE_MODEL := GS1900-24E
ZYXEL_VERS := AAHK
endef
TARGET_DEVICES += zyxel_gs1900-24e
define Device/zyxel_gs1900-24hp-v1
$(Device/zyxel_gs1900)
SOC := rtl8382

View File

@@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14814,6 +14814,13 @@ S: Maintained
@@ -14816,6 +14816,13 @@ S: Maintained
F: include/sound/rt*.h
F: sound/soc/codecs/rt*

View File

@@ -15,7 +15,7 @@
help
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -87,6 +87,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o
@@ -89,6 +89,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o
obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o
obj-$(CONFIG_QSEMI_PHY) += qsemi.o
obj-$(CONFIG_REALTEK_PHY) += realtek.o

View File

@@ -0,0 +1,11 @@
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -42,7 +42,7 @@ static inline ulong map_to_sysmem(void *
}
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
-#define MKIMAGE_MAX_TMPFILE_LEN 256
+#define MKIMAGE_MAX_TMPFILE_LEN 1024
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35

View File

@@ -1 +1 @@
r19374-34b6abf5a8
r19426-2b1941e47d

View File

@@ -1 +1 @@
1653140740
1654845621