63440 Commits

Author SHA1 Message Date
Felix Fietkau
9a79cdc7ee package: use service_running instead of service_started for ubus config
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Fixes issue with loading config after a service crash. Should also improve
startup time.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
3b65496654 procd: update to Git HEAD (2025-03-13)
80187cf5badb service: re-run init script "running" command after instance restart
891094aefcb2 rcS: avoid duplicate pending "running" calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
a46a55b407 cli: fix showing empty lists
Display <none> as value instead of hiding the attribute name

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
ae31c0ddd7 cli: fix removing values when attribute has .get_object set
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
228eb7f62a unetd: cli: fix editing service config attributes
They must be set on the config object instead of the main service object

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
John Audia
7cf8f61eb2 kernel: bump 6.6 to 6.6.82
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.82

All patches automatically rebased.

Added CONFIG_MICROCODE_INITRD32=y to x86: config-6.6[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.82&id2=v6.6.81

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
John Audia
aabc61d93f kernel: bump 6.6 to 6.6.81
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.81

All patches automatically rebased.

For x86, CONFIG_MICROCODE_LATE_FORCE_MINREV was introduced in this bump
with hrecommendation to enable it[1].

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.81&id2=v6.6.80

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
Hauke Mehrtens
8d69613125 armsr: Fix kmod-fsl-dpaa2-net build
The build failed because the CONFIG_FSL_DPAA2_ETH_DCB option was not
set. Activate this option to build the driver with DCB support when it
is available.

Fixes: 40f1db9cb11d ("kernel: Add KERNEL_DCB (Data Center Bridging)")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-12 23:56:09 +01:00
Dávid Benko
939628f6b8 hostapd/RADIUS_server: enhance logging
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Currently, logging level of the RADIUS server is a constant corresponding
to the highest verbosity (EXCESSIVE, ALL), but when running as a system
service, the output is discarded.

This commit makes logging verbosity configurable by `log_level` option
and redirects all logs to `logd`. Possible levels are defined in hostap
sources:
https://w1.fi/cgit/hostap/tree/src/utils/wpa_debug.h?id=012a893c469157d5734f6f33953497ea6e3b0169#n23
Their reference is inlined in `radius.config` file.

Default value for logging verbosity is INFO (even if the `-l` flag isn't
specified).

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
Link: https://github.com/openwrt/openwrt/pull/18089
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-12 13:12:12 +01:00
Dávid Benko
dbdd84725d hostapd/RADIUS_server: add config option for IPv6
Even though IPv6 support for hostapd RADIUS server is implemented
(flag `-6`), it's not possible to enable it from configuration.

This commit adds this option and adapts init script.

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
Link: https://github.com/openwrt/openwrt/pull/18089
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-12 13:12:12 +01:00
Martin Schiller
843e50f4fa mediatek: bpi-r4: create additional emmc gpt artifact
This makes it possible to initialize the eMMC from scratch like it is
done for the BPI-R3 mini (without an SD card).

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:04:08 +01:00
Martin Schiller
bbe58f9830 generic: net: phy: sfp: backport some FS copper SFP fixes
This fixes the handling of some FS copper SFP modules using the RollBall
protocol and needing some extra treatment.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:01:53 +01:00
Nick Hainke
79aae6ff42 libnl: update to 3.11.0
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Changes:
c7edc38f libnl-3.11.0 release
b75e27de lib/route: add support for bridge msti
8a73b245 lib/route: add support for bridge info boolopts
3b284a11 lib/route: extend bridge info support
a43a41cd lib/route: add missing bridge info getter functions
756d5161 lib/route: add missing entry in libnl-route-3.sym file
014c33a6 lib/route: add rtnl_neigh ext flags support
acf572b5 route: add support for getting permanent mac address of link
afafe78a lib/route: extend bridge flags
11597b73 xfrm: remove redundant check in xfrm_sa_update_cache()
2abfb089 xfrm: use the new _nl_auto_nl_object helper
831e9868 cache: use the new _nl_auto_nl_object helper
4b9daa6d add _nl_auto_nl_object helper
379a1405 black: fix "target-version" in "pyproject.toml"
8460c9b7 link/bonding: implement parsing link type
d60535c9 link/bonding: implement comparing bond links
22b6cf5c link/bonding: implement io_clone()
e1c75bff link/bonding: add getters for attributes
ee4612ca link/bonding: rename bn_mask to ce_mask
81c40cbb tests: optimize _nltst_assert_route_list_permutate() to short cut search through permutations
9f5fac78 tests: in _nltst_assert_route_list() accept arbitrary order
01f06b57 base: add _nl_swap() helper macro
5b570259 tests: ensure that there are all expected routes in _nltst_assert_route_list()
1aa16ea9 tests: print route list before failure in _nltst_assert_route_list()
7f099cf0 tests: add _nltst_objects_to_string() helper
e76d5697 tests: add _nltst_malloc0() and _nltst_sprintf() helpers
d94a3e81 tests: move definition of asserts in "tests/nl-test-util.h"
798278ea tests: use _nl_ptrarray_len() helper in _nltst_assert_route_list()
def89a2c base: add _nl_ptrarray_len() helper
64fad14b link: link_msg_parser(): keep link info instead of release and reacquire
b8d3cfb2 lib/attr: add nla functions for variable-length integers
2ae88c48 lib/attr: add NLA_{SINT|UINT} attribute types

Link: https://github.com/openwrt/openwrt/pull/18193
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-11 23:57:22 +01:00
Nick Hainke
fe47089878 libxml2: update to 2.13.6
Release Notes:
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.5
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6

Fixes: CVE-2025-24928 CVE-2024-56171

Link: https://github.com/openwrt/openwrt/pull/18194
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-11 23:35:40 +01:00
Rui Salvaterra
371cad4f28 kernel: usb: simplify r8152 dependencies
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
It doesn't depend on either usb-net or usb-net-cdc-ncm. It does, however, depend
on mii. Fix thusly, and make it depend explicitly on usb, not usb-net.

While at it, add a conditional dependency on libphy, for future kernel versions.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rui Salvaterra
979938b99f kernel: usb: simplify usb-net kconfig
Now that CONFIG_USB_NET_DRIVERS is unconditionally enabled, remove it from the
usb-net kconfig symbol list.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rui Salvaterra
17cfcaa754 generic: enable CONFIG_USB_NET_DRIVERS
This is only relevant for devices with USB support, and in itself changes
nothing in the kernel build. However, it is useful to further simplify the
dependencies of some USB network devices.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rosen Penev
0cdcba238f ramips: use regulator for USB
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
The DWC2 driver used here supports a vbus-supply property to control
the GPIO. Use it instead of the local gpio,exports solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17357
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-10 10:42:13 +01:00
Coia Prant
6a1bdcf545 ramips: add support for Hongdian H8922 v30
This is an industrial 4G router equipped with OpenWrt 14.07 OEM
customized version

WARNING: The original firmware device tree is common to multiple
boards, and the device tree name is H9350. This submitted device
tree is a modified version, which deletes the non-this-device parts
and adds GPIO watchdog.

Specification:
- SoC: MediaTek MT7620A
- Flash: 16 MB
- RAM: 128 MB
- Power: DC 5V-36V 1.5A
- Ethernet: 1x WAN, 4x LAN (10/100 Mbps)
- Wireless radio: 802.11n 2.4g-only
- LED:
  System/Power (RUN): GPIO/26 active-low
  Ethernet: 1x WAN, 4x LAN
  Modem 1: GPIO/66 active-low
  RF 1 (Modem 1 Signal): GPIO/67 active-low
  Modem 2: GPIO 71 active-low
  RF 2 (Modem 2 Signal): GPIO/24 active-low
  WLAN: GPIO/72 active-low
  WPS: GPIO/12 active-low
- Button:
  WPS / RESET: GPIO/34 active-low
- UART: 1x UART on PCB - 115200 8N1
- GPIO Watchdog: GPIO/62 mode=toggle timeout=1s
- PCIe: 2x miniPCIe for modem
- SIM Slots: 2x SIM Slots

Issue:
- No factory partition, eeprom is located
 at /lib/firmware/mt7620a.eeprom

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put rootfs into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press Ctrl+C to break auto boot.
5. Use `system 6` command and follow the instruction to set device
   and tftp server IP address and input the rootfs file name.
   U-boot will then load the rootfs and write it into
   the flash.
6. Use `system 1` command and follow the instruction to set device
   and tftp server IP address and input the firmware file name.
   U-boot will then load the firmware once.
7. Login to LuCI and use LuCI upgrade firmware.

Original Firmware Dump / More details:
https://blog.gov.cooking/archives/research-hongdian-h8922-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Tested-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-10 00:42:44 +01:00
Coia Prant
5d266b55ed mac80211: rt2x00: load the eeprom data from devicetree embedded data on Ralink SoCs
It will allow loading eeprom from eeprom-data embedded in device tree.
Ported from mediatek mt76 wireless driver (drivers/net/wireless/mediatek/mt76/eeprom.c)

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-10 00:42:44 +01:00
Bernardus Jansen
6da7352ebe ath79: add support for Fortinet FAP-221-C
FCC ID: TVE-121402

Fortinet FAP-221-C is an indoor access point with 1gb ethernet port,
dual-band wireless, internal antenna plates, and 802.3at PoE+.

Hardware and board design are from Senao. The device appears very
similar to the EnGenius EAP1200H, albeit with double the flash and RAM.

**Specifications:**

  - QCA9557 SOC
  - QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm
  - AR8035-A PHY RGMII GbE with PoE+ IN
  - 40 MHz clock
  - 32 MB FLASH FL256SAIFR0
  - 2x 128 MB RAM NT5TU64M16HG
  - UART populated
  - 4 internal antenna plates
  - 5 LEDs, 1 button (power, 'warning', eth0, wifi1, wifi2) (reset)

  Amber LAN LED appears hardwired to ethernet port. Power LED is green
only. Other LEDs are amber/green.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

Signed-off-by: Bernardus Jansen <bernardus@bajansen.nl>
Link: https://github.com/openwrt/openwrt/pull/18109
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 19:57:26 +01:00
Eric ZHANG
d136c24f7c
dnsmasq: fix handlers for options filter_rr and cache_rr
According to:
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L700
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L402

These two options should be of type `MultiValue` but here there're used as single value. This results in dnsmasq crashes when either of these options are set with multiple values, which leads to an invalid space-separated value.

As these options are designed to take multiple values, I think it's better to use list format eg. `list filter_rr 'AAAA'`, instead of `option filter_rr 'AAAA,HTTPS'`.

See: https://forum.openwrt.org/t/selecting-more-than-one-filter-arbitrary-rr-or-cache-arbitrary-rr-in-v24-10-0-crashes-dnsmasq/225801

Tested on 24.10.0

Signed-off-by: Eric ZHANG <ericzhangjx@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18149
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-09 17:26:48 +01:00
Hauke Mehrtens
40f1db9cb1 kernel: Add KERNEL_DCB (Data Center Bridging)
The kmod-mlxsw-spectrum driver activated CONFIG_DCB indirectly already
on all targets which are building this driver. All other DCB capable
driver did not activate their DCB support.

CONFIG_DCB increases the uncompressed kernel size by about 7.8KB.

CONFIG_DCB is only needed some data center Ethernet cards and not used
on normal routers. Activate it only on the x86_64 and the armsr_arm64
target which are used on normal servers or in VMs.

Link: https://github.com/openwrt/openwrt/pull/17672
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 17:05:26 +01:00
Roland Reinl
8a78637670 ramips: Add support for Cudy M1300 v2
The M1300 v2 is similar to the WR1300 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7621
- MT7603E (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:1C
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WAN (top connector) is label +2, e.g. xx:xx:xx:xx:xx:1E
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WLAN (5G) is the same as WAN, e.g. xx:xx:xx:xx:xx:1E

UART:
- is available via the pin holes on the board
- From inner to outer pin: TX, RX, GND, VCC
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 3) and White (GPIO 4)
- There are two buttons: Reset (GPIO 8) and WPS (GPIO 10)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- The migration image is also available here until a image is provided by Cudy: https://github.com/RolandoMagico/openwrt-build/releases/tag/M1300_Build_20240222
- File: openwrt-ramips-mt7621-cudy_m1300-v2-squashfs-flash-signed.bin
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- In the migration image, LAN and WAN are swapped. Computer must be connected to the other port after flashing
- OpenWrt is now accessible via 192.168.1.1
- After flashing an up to date OpenWrt image, LAN and WAN settings are again the same as in the OEM firmware
- So use the other connector again

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the LAN port (lower port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18139
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 16:51:26 +01:00
Felix Fietkau
84909c62c8 unetd: update to Git HEAD (2025-03-09)
d8b43985e4d7 ubus: fix token_create policy
7326459bd743 ubus: dump service information on network_get
6c9c8fbd8128 service: add @all as alias for all members, unless defined differently

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 16:44:14 +01:00
Felix Fietkau
f6a9cce09a cli: fix spurious error when exiting the cli
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 10:52:07 +01:00
Felix Fietkau
7f0913d7b1 cli: improve error handling on editor select call
Use common error functions instead of explicit warn() calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 10:52:07 +01:00
Aleksander Jan Bajkowski
a2fd837e2e lantiq: xrx200_legacy: migrate ECI V-2FUb/R to upstream PHY LED control
This commit switches the control of the leds connected to the Lantiq PEF7071V
PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18153
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 20:26:03 +01:00
Tianling Shen
2091c29578 ramips: fix reading mac address for hiwifi hc5962
The spaces in variables have been stripped since commit 551e04f3c9c0
("base-files: strip space and tab characters from ASCII mac address"),
resulting "Vfac_mac " matches nothing. Fix the issue by removing the
space at end.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18150
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 20:12:11 +01:00
Mieczyslaw Nalewaj
a0449f8cf3 ramips: mt7621: 02_network optimization
Merging repeating blocks inside the ramips_setup_interfaces() function.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18146
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 16:36:53 +01:00
Tianling Shen
96c6608346 mediatek: add support for CMCC A10
This board is also as known as SuperElectron ZN-M5 and ZN-M8. However,
for ZN-M5 and ZN-M8, there's another version uses ZX279128 as CPU
chip, which is unsupported.
You can check it in "高级设置" > "系统日志" > "内核日志" page from webUI.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Stock layout flash instructions:
Login into webUI and upload sysupgrade firmware in "系统管理" > "升级固件" page.
Remember to unselect "保留配置" ("Keep configurations") first before doing that.

OpenWrt U-Boot layout flash instructions:
1. Flash stock layout firmware first.
2. Connect to the device via SSH, and backup everything,
   especially 'Factory' partition.
3. Unlock MTD partitions:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
4. Write new BL2 and FIP:
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin BL2
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip FIP
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18121
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 15:44:56 +01:00
Christian Marangi
ea6f3e49d6 generic: globally enable CONFIG_PCPU_DEV_REFCNT
Quoting the kconfig description for CONFIG_PCPU_DEV_REFCNT:

network device refcount are using per cpu variables if this option is
set. This can be forced to N to detect underflows (with a performance
drop).

This was introduced from kernel 5.13 and was wrongly set as disabled.
Some target actually enables it but this should be always enabled unless
refcount needs to be debugged (unlikely for production images)

Enable in generic and drop the entry in every other target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18174
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-08 11:33:56 +01:00
Weikai Kong
213799e33e qualcommax: fap650: fix dtc warnings on partitions
This commit adds the missing properties to address the following warnings:
Warning (reg_format): /soc@0/spi@78b5000/flash@0/partitions/partition@x:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)"

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: #18180
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-07 14:03:12 +01:00
Jiri Kastner
2f9ef8a256 mvebu/image/cortexa53.mk: add kmod-dsa-mv88e6xxx
all espressobins have topaz switch as same soc, so it is safe to add
kmod-dsa-mv88e6xxx to all

Signed-off-by: Jiri Kastner <cz172638@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18161
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-07 14:01:51 +01:00
Qingfang Deng
edddbaf79c kernel: Mediatek: set default EEE Tx LPI timer
Due to API changes during the backport, the default value of Tx LPI
timer is accidentally left unset, breaking the network if EEE is on.
Set the default timer to 1ms on init, and fix an incorrect condition.

Fixes: d8315d5358d5 ("kernel: backport Mediatek SoC EEE support")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2025-03-07 20:39:13 +08:00
Martin Schiller
6af46a6984 mediatek: filogic: enable CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
The Cortex-A73 in MediaTek Filogic 880 (MT7988A) is vulnerable to
multiple Spectre variants including Spectre-BHB.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-06 20:26:54 +01:00
Martin Schiller
5013efc4f9 mediatek: Refresh kernel configuration
I selected one subtarget after the other and refreshed their
configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=subtarget

For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually.
Otherwise, building MT7629 with ALL_KMODS we get prompted for
LEDS_SMARTRG_LED and this will break CI and in future buildbot
compilation. See commit 6bdea8c7bd85 ("mediatek: mt7629: 6.6: disable
LEDS_SMARTRG_LED by default") for more details.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-06 20:26:54 +01:00
Ahmed Naseef
ecd609f509 kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC
Prior to commit 8a7d12d674,
cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named
usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption
that local MAC addresses originate exclusively from the kernel. Some
devices provide driver-assigned local MACs, causing point-to-point
interfaces with driver-set MACs to adopt eth%d names instead of usb%d.

Restore the naming exception for point-to-point devices: interfaces
without driver MACs or with driver-provided local MACs will retain the
usb%d convention. This addresses issues reported in [1] and fixed in [2].

[1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/
[2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/

Tested-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17757
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-06 15:49:45 +01:00
Qingfang Deng
d8315d5358 kernel: backport Mediatek SoC EEE support
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Backport Mediatek SoC EEE support from net-next upstream.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[refreshed patches]
2025-03-05 20:16:05 +00:00
Daniel Golle
fad94e8cda libpcap: backport support for various DSA tags
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Trying to tcpdump DSA conduits results in errors such as
"unsupported DSA tag: mtk".
Backport two commits adding support for various DSA tags to libpcap.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-03-05 19:23:50 +00:00
Felix Fietkau
46c17c22cd hostapd: add missing #ifdef to fix compile error when 802.11be support is disabled
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Fixes: d65d546bce36 ("hostapd: add missing ctrl socket initialization on bss add")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 09:19:37 +01:00
Felix Fietkau
4d4e631267 ucode-mod-pkgen: fix refcounting issue
Do not call ucv_get if the reference is transferred without being used
elsewhere

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:25:43 +01:00
Felix Fietkau
12298ca7c4 ucode-mod-uline: fix refcounting errors
Do not call ucv_get if the reference is transferred without being used
elsewhere

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:25:43 +01:00
Felix Fietkau
d65d546bce hostapd: add missing ctrl socket initialization on bss add
Fixes adding/removing individual bss interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
6a10da2934 hostapd: get reference to object before removal
`ucv_array_set` releases the array's reference to the object being cleared.
If this is the last reference to the object, it will be freed, making our
pointer `val` invalid.

To avoid this, we need to obtain our own reference to the object so we
can safely return `val`.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
2025-03-05 08:03:00 +01:00
Matthew Cather
7729f96093 hostapd: consistent reference counting for registry
Since `wpa_ucode_registry_add` collects its own reference to the values added, the
two functions `hostapd_ucode_bss_get_uval` and `hostapd_ucode_iface_get_uval` would
sometimes return a referenced object (from `uc_resource_new`) and sometimes return
an unreferenced object (from `wpa_ucode_registry_get`). Now, both functions always
return a referenced object.

This change also indirectly fixes `hostapd_ucode_bss_get_uval`, ensuring it now
always returns a referenced object.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
22eaf18647 hostapd: clean-up references to local variables
Remove extra ucv_get calls when passing a referenced value to an object
without using it further.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
f79968ee0f hostapd: fix ucode memory leak with strings
This fixes a common reference counting bug typically along the lines of:
```
uc_value_push(ucv_get(ucv_string_new(...)));
```
This would leave our new string with a reference count of 2, one from
the construction of the string, the other from `ucv_get`. This would
prevent the strings from being correctly cleaned up when it goes out
of scope.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
2025-03-05 08:03:00 +01:00
Christian Marangi
90dee1ab30
airoha: drop MTD Airoha parser patch
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Drop Airoha MTD parser patch as a better solution was agreed with a
fixed partition table.

Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # tested on Quantum W1700k
Link: https://github.com/openwrt/openwrt/pull/18112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-05 00:04:36 +01:00
Christian Marangi
7805100e15
airoha: an7581: cleanup kernel config
Cleanup kernel config and drop all unrelated configs. This have the side
effect of fixing the port not going up automatically due to Bridge VLAN
Filtering disabled.

Link: https://github.com/openwrt/openwrt/pull/18112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-05 00:04:35 +01:00