This reverts commit f628467dfd6b32ead172d33a2593f04901395343.
The initial fix was correct. However, a recently introduced bug in
base-files can cause some unexpected byte overwriting in eeprom.
Since it has been fixed, let's accept this patch again.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 43bc5e6e122b06eb9bfd22cf0bdf3212b84073f3)
`$(( ))` will convert uninitialized variable to "0". If we want to
use "-n" to check the string length, it's necessary to make sure the
converted variable is not empty.
Fixes: 652a6677d5fa ("base-files: Add new functions for ath11k caldata")
Fixes: https://github.com/openwrt/openwrt/issues/17818
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 094b6f593fb4943005e13e2f8581e66bb7c2c8cf)
When eeprom name is not defined, the file load function should
return an error code so that it can fallthrough to read eeprom
form NIC inside eFuse.
Fixes: https://github.com/openwrt/openwrt/issues/17854
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 693108a31835d43d5e92f116b4dbd9fbed06b7ed)
When support for Routerboard 911G was introduced, Routerboad 912UAG
device tree was used as a base, and the common part. This led to use of
40MHz as the reference clock frequency for both [1], while RB911G uses 25MHz
crystal on the board, causing heavy system clock drift.
Split the definition, and set the reference clock frequency for RB911G
back to 25MHz.
[1] a716ac556497 ("ath79: fix reference clock for RouterBoard 912UAG")
Fixes: bcc44b1212b2 ("ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17944
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 40fc6bd5cc679875e38ea1769527affdb5be12ba)
It seems the that this was forgotten during initial adding of the
device in 0688cf5aebe1dc9a2e7f3820861783c2a7a75d44
Thanks to
https://forum.openwrt.org/t/zyxel-gs1900-10hp-revision-b1-support-openwrt-firmware/131841/32
for putting me on the right track for this problem
Error that is being fixed - running fw_printenv results in:
"Warning: Bad CRC, using default environment"
and not showing boardmodel
Workaround, manually changing /etc/fw_env.config to
"/dev/mtd1 0x0 0x400 0x10000"
Signed-off-by: Klaas Demter <psychic-stool-cozy@duck.com>
Link: https://github.com/openwrt/openwrt/pull/17920
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 71a966c480432febcc5dd120e5b01662fa8ec328)
Fix the model name to reflect the stock partitioning and the wan eth1 detection in the 02_network script.
Fixes: https://github.com/openwrt/openwrt/issues/14432
Fixes: b5df398a36f1 ("mediatek: add Zyxel EX5601-T0 with uboot custom partition")
Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
Link: https://github.com/openwrt/openwrt/pull/17859
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d023ee7439f6d5c9bffa6f6e10b3b90f5782e84d)
Depending on the config / circumstances, the get_psk call can be called
multiple times from differnt places, which can lead to wrong sta->psk_idx
values. The correct call is the one that is also interested in the vlan_id,
so use the vlan_id pointer as indication of when to set sta->psk_idx.
Also fix off-by-one error for secondary PSKs
Fixes: b2a2c286170d ("hostapd: add support for authenticating with multiple PSKs via ubus helper")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8118b2dace06de839e1e23f018059995f4af5e11)
The 00 address_mask needs to be inverted, otherwise the mac address
allocation will modify the last byte instead of the first one.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1ee44825ad0d00527c8850446affc820d74c6e8b)
Add missing select NEED_BPF_TOOLCHAIN in order to ensure that the toolchain
actually gets built.
Fixes: https://github.com/openwrt/openwrt/issues/17926
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 04570f5ee2dfe6609c22d2d21678b14cd3314309)
93458ac dns: fix response to TYPE_PTR query
68af311 fix unicast response port and timeout
a2b4979 service: announce all services in single dns answer
4537734 display announced services in ubus call umdns browse
0b50c29 display more srv attributes in output of ubus browse function
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit d162fd5ed44af7a33c9aefd72479c1c77f3234e4)
c293afa01c13 network: add support for the local_network option
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c34eee5f39827ca38c9d4d0acef46848098867fe)
322500403615 service: add default group @ to match all nodes
5f7860306200 ubus: rename unetd_ubus_notify to unetd_ubus_network_notify
d13752814651 enroll: add PEX sub-protocol to support enrolling new nodes into a network
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c0f06cb6ac002ce90c10839b3d98aed8b41a2da5)
47b54cf5a4b6 types: introduce `ucv_array_sort_r()` and `ucv_object_sort_r()`
efeb57806552 types, vm: refactor usage of global variables
f9d2faf67de6 vm: reset signals when freeing VM
4e86847d802d lib: utilize `ucv_array_sort_r()` and `ucv_object_sort_r()`
c71444ea301f types: ucv_resource_create(): rename `typename` parameter to `type`
373df7299c79 nl80211: properly support split_wiphy_dump for single phys
9bcd25f54708 lexer: Preserve keyword, regexp flags until processing non-comment tokens
0a7ff4715cb8 main: pretty-print `-p` output by default
4c3d5b469156 struct: Add new buffer API for incremental packing/unpacking
efc4122124cb struct: do not use global variables for caching types
Fixes: https://github.com/jow-/ucode/issues/248
Fixes: https://github.com/jow-/ucode/issues/250
Fixes: https://github.com/efahl/owut/issues/25
Link: https://github.com/openwrt/openwrt/pull/17191
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit af6f1a90bbc824bd22814568c5b6990aa082ce8b)
b0b5d93 Merge pull request #234 from IdWV/fs
60e7a88 Merge pull request #232 from sebastianertz/lib-digest
1752779 digest: implement compile time option to exclude less common algorithms
c7268a1 ci: include libmd in MacOS CI builds
fcb6f70 lib: introduce digest library
1323a27 Merge pull request #246 from jow-/fix-upvalue-resolve
ed5ce8f types: resolve upvalue values in arrays and objects
a6e0641 vm: resolve upvalues before pushing them onto the stack
ef1baab ci: drop OpenWrt tests for now
63e18ea fs: eliminate the usage of global variables
b1bd7b5 types: add ucv_resource_create() helper
3408edf Merge pull request #244 from nbd168/nl80211
8af77e7 nl80211: add new attributes for multi-radio support
1423ad7 nl80211: cover extended feature and EHT rate info attributes
ee1d6d8 Merge pull request #237 from sebastianertz/math
4b18a9b Merge pull request #213 from jow-/improve-vector-macros
1f022c0 math: removed global variable for thread safety
e5fe6b1 treewide: refactor vector usage code
20307ee utils: improve vector utilities
aa18952 Merge pull request #241 from jow-/socket-local-fanout-decl
79ccd9c socket: provide local definition of `struct fanout_args`
402280d Merge pull request #239 from jow-/safe-insert-during-obj-iteration
07afe96 Merge pull request #240 from jow-/stricter-number-conversion
736d450 types: fix potential use after free on adding keys during iteration
4134e71 vallist: more thoroughly check for trailing garbage after numeric string
9cf53dd Merge pull request #226 from jow-/lexer-improvements
2b2e732 lexer: make api functions public
855854f lexer: emit comment and template statement block tokens
328a50f lexer: improve token position reporting
fa22732 Merge pull request #225 from jow-/compiler-fix-keyword-property-labels-after-spread
6e88c62 Merge pull request #224 from jow-/lib-fs-readline-leak
94d1211 compiler: properly treat property names after spread expressions
67cd123 fs: fix potential memory leak on i/o errors in .read()
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit ba9cdbeea862fada261b0a874e464b63ffa860ac)
The GW82xx-2x has two network ports. By convention, the first
port (eth0) should be the WAN port and the second port (eth1)
should be the LAN port.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d2eaaa90d502fa418d7d9bb8d4e6ccbe0131c832)
The act of attempting link at gen1 then trying to link at higher speeds
causes a hang with the specific PCIe switch used on the Gateworks Venice
boards. Work around this by linking at the highest speed first as is
common with all other PCI controller drivers.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 23a18a57cf750d9081353cdd34e44982ea10e191)
Add several dt backports for the Gateworks Venice product family.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1ce87cf25c19f030b81954639545db2ab7f17062)
Add a backport of a btsdio patch for the cyw437 bluetooth controller.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit c9f11523dd5b8639b24b97043d70f2a197a00a84)
This commit fixes nmbm configuration mismatch error on Xiaomi AX3000t
with Winbond W25N01KVZEIR spi-nand:
'''
[ 0.786783] NMBM configuration mismatch
'''
Root cause:
1. U-Boot W25N01KV spi-nand driver ia compiled with 64B OOB size for the
chip and store this size in the nmbm signature;
2. Linux W25N01KV driver use 96B OOB.
The change doesn't affect AX3000t variants with other spi-nand chips
(ESMT, Foresee) because their Linux drivers use 64B OOB.
Fixes: openwrt#16972
Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3299d19c01080c3320e3ff6964d7825da81bb8b4)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit adds new "mediatek,bmt-mtd-overridden-oobsize" property. The
property helps avoid "NMBM configuration mismatch" error if mtd "OOB size"
is not equal to the "spare size" which is stored in the nmbm signature.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit e585ae70d4f2a563b3b0e430e15ee19ad25caeb5)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Makes it easier to enable MDNS on wan without having to edit the firewall
configuration for it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 05138fe898ce2d102795bdc979a6d874a3d24424)
Unless another toolchain is present (or selected), build the bpf toolchain
whenever a package is selected that needs it.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 6605e45676815156f0c47d4117ee401e6616fcac)
b11bff90f2ad r8169: add support for RTL8125BP rev.b
b3593df26ab1 r8169: add support for RTL8125D rev.b
b299ea006928 r8169: adjust version numbering for RTL8126
bb18265c3aba r8169: remove support for chip version 11
2e20bf8cc057 r8169: remove unused flag RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE
e340bff27e63 r8169: copy vendor driver 2.5G/5G EEE advertisement constraints
The EEE advertisement patch has been reworked for linux v6.6 because
phy_set_eee_broken() is only present on linux >= v6.13 and eee_broken_modes
declaration has been converted to a bitmap, so linkmode_set_bit() can't be
used either.
e340bff27eed623fb8e3721aa69e70
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 084618f8db7d0e413b47bab3e0ea70804bf84ee2)
This reverts commit 3295f6f1c254cd7e5e5285a05581bf6abbde8999.
It looks like the eeprom gets broken after this change.
I think this change was not tested on a real device before it was
merged.
The MAC addresses will be broken again after this revert.
Fixes: #17818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f628467dfd6b32ead172d33a2593f04901395343)
Fix broken WAN on Linksys EAX and Asrock G10 by incrementing the WAN
interface MAC address + 1. This caused conflicting entry in the FDB
table and caused the WAN port to malfunction with the DSA conversion.
Fixes: #17157Fixes: #15585Fixes: #16604
Link: https://github.com/openwrt/openwrt/pull/17839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit eba2fbf63814bbcf8c99c98177818476fca808a7)
Two commits which made their way into Linux stable broke the SATA
support on the BPi-R64.
Fix this by reverting a node rename which broke DT-overlay application
and import a (still pending) patch re-adding the 'syscon' compatible to
the pciesys clock-controller which also contains phy-mode bits
referenced by the ahci_mtk driver expecting to access them using
syscon_regmap_lookup_by_phandle().
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 69890e16b37d59b55ba64633522c727f957cb2fd)
On some but not all devices using the RTL8221B 2.5GBit/s PHY the SerDes
setup sequence may hang under some circumstances (eg. <2500M link
partner present during boot).
RTL8221B-VB-CG 2.5Gbps PHY (C45) mdio-bus:01: rtl822xb_config_init failed: -110
Work-around the issue by performing a hardware reset and subsequent
retry of the SerDes setup, which seems to always succeed.
Doing this requires moving ALDPS setup to config_init (which is anyway
the better place for that) as it otherwise doesn't survive the reset.
Also disable listening on MDIO address 0 which may be used by other PHYs
despite being spec'ed as "broadcast address", as bus activity on address
0 may otherwise confuse the RealTek PHY for good reasons.
Tested-by: Luis Mita <luis@luismita.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c87a767801ef375feadb0a5c41d5a674ad3a7d2c)
Link: https://github.com/openwrt/openwrt/pull/17790
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add kmod-drm-i915 to the default packages. It was build into the kernel
before and is now build as a kernel module.
Fixes: 77cfe8fd15d3 ("x86: make i915 as a kmod with required firmware")
Link: https://github.com/openwrt/openwrt/pull/17781
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 8390599c9a29dbb0019447df9086cb8667bfd3d7)
Link: https://github.com/openwrt/openwrt/pull/17792
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The mt76x8 SDXC pin register definition is incompatible with the
mtmips generic pinctrl driver structure. This hack allows us to
mux the SDXC IO to different pin groups in device tree.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
(cherry picked from commit 05ec3b50a8e673786dda0224b23f18b5d96a4a65)
Link: https://github.com/openwrt/openwrt/pull/17754
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
To find the DS record for a given zone the parent zone's nameserver must
be queried and not the nameserver for the zone. Otherwise DNSSEC
verification for unsigned delegations breaks.
Signed-off-by: Uwe Kleine-König <uwe+openwrt@kleine-koenig.org>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250127151223.1420006-1-uwe+openwrt@kleine-koenig.org/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6dc0f0c50cf1072ec3751c0fb1fc152a0a86487d)
The definition for the netgear_wndr4700 had two different
DEVICE_COMPAT_VERSION definitions.
In commit 5815884c3a2 ("apm821xx: migrate to DSA"), an additional
DEVICE_COMPAT_VERSION := 3.0 attribute was added to the device
definition. The old one with version 2.0 stayed and was defined later
overwriting the new one.
Replace the old version 2.0 with the new version 3.0
Fixes: 5815884c3a2a ("apm821xx: migrate to DSA")
Link: https://forum.openwrt.org/t/openwrt-24-10-0-rc6-sixth-release-candidate/222466/43
Link: https://github.com/openwrt/openwrt/pull/17741
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit dab52c00d712a421d6e61eebc51359e5d38ad347)
Adjust wolfssl version for apk by removing the "-stable"
from the OpenWrt version, although it is still needed for
upstream download archive name.
Define PKG_BUILD_DIR accordingly.
Utilize new short version to simplify ABI_VERSION calculation.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/16906
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit be952e98bc1d768a0da5b84e59a6e7c04a1cdab8)
The STM32MP135F-DK board uses the LAN8742 PHY.
Enable CONFIG_SMSC_PHY to have full PHY support.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/17745
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit d981f28f762a559ae50386fa089b050aaaa78555)
Since commit f1c9afd80138 ("ramips: mt7621-dts: mux phy0/4 to gmac1") the
USW-Flex lan1 port has been attached directly to the CPU. This improves
routing performance but hinders switching.
This is a generally accepted trade-off in that commit but for USW-Flex it
is a questionable choice. This switch is designed to deliver PoE to remote
places and using it as a router is unlikely. Meanwhile, the lan1 port is
also PoE-in and will often be the uplink, carrying most of the traffic.
Reverting f1c9afd80138 for USW-Flex restores full 1 Gbps switching
performance on all ports.
Signed-off-by: Anders Melchiorsen <amelchio@nogoto.net>
Link: https://github.com/openwrt/openwrt/pull/17703
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 62872f8bfd5c8bc80bb014417c6ed8057bbeb773)
Replace clock patch for eMMC with upstream version to add the tag and
flag them as upstreamed.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a9b408a97f7bf8b1f98f355fefe3c9bfc959d5a6)
Replace eMMC support with upstream version where we declare dummy clock
and dummy regulator instead of a specific compatible. Also drop the
downstream patch for it.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit b7edf88b0fe15b32be802c7de54036ff8e66dcc1)
Refresh cpufreq with merged upstream version. Also fix the PM Domain
rebased patch to correctly expose the symbol for non Mediatek target.
Update dtsi with new pm domain name.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit fbbfcbf150cd7c72f49c149e7f9b9f4d0bf43e4b)