`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>
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>
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>
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>
APK update is currently broken if wget is used as a tool. This wasn't
correctly tested and cause seg fault. Backport the patch fixing this to
restore original functionality.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Add support for Linksys MR5500 (Hydra 6 Pro).
Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Kingston D2516ECMDXGJD (512 MiB)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
QCN9024 (4x4:4 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
QCA8337 switch (4 Ports 10/100/1000 GBASE-T)
* Flash: Gigadevice GD5F2GQ5REYIH (256 MiB)
* LEDs: 1x multi-color PWM LED
1x blue led for USB (GPIO 19 Active High)
* Buttons: 1x WPS (GPIO 27 Active Low)
1x Reset (GPIO 28 Acive Low)
5x ethernet port LEDs (amber for activity & green for link up)
* Peripherals: 1x USB2 (powered by GPIO 17 Active Low)
support for USB3 will be added in a separate PR
* FCC ID: 2AYRA-03734
Flash instructions:
1. On OEM firmware, login to the device (typically at http://192.168.1.1) and click 'CA'
in the bottom right corner -> Connectivity -> Manual Upgrade. Alternatively, browse to
http://<router IP>/fwupdate.html.
Upgrade firmware using openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin image.
Optionally install on second partition, after first boot check actual partition:
fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin kernel
and in case of 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin alt_kernel
2. Installation using serial connection from OEM firmware (default login: root, password: admin):
fw_printenv -n boot_part
In case of 2:
flash_erase /dev/mtd12 0 0
nandwrite -p /dev/mtd12 openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin
or in case of 1:
flash_erase /dev/mtd14 0 0
nandwrite -p /dev/mtd14 openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin
After first boot install firmware on second partition:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin kernel
or:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin alt_kernel
3. Back to the OEM firmware.
Download firmware from OEM website:
MR5500: https://support.linksys.com/kb/article/207-en/
From serial or SSH:
fw_printenv boot_part
in case of 1:
mtd -r -e alt_kernel -n write FW_MR5500_1.1.2.209598_prod.img alt_kernel
else in case of 2:
mtd -r -e kernel -n write FW_MR5500_1.1.2.209598_prod.img kernel
4. Boot from USB
This allows you loading an OpenWrt image into RAM and is meant for recovery scenarios only.
Enable loading image from USB in u-boot. From serial or SSH:
fw_setenv bootusb 'usb start && usbboot &loadaddr && bootm $loadaddr'
fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
Copy OpenWrt initramfs image to USB:
dd bs=1M if=openwrt-qualcommax-ipq50xx-linksys_mr5500-initramfs-uImage.itb of=/dev/sda
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17958
Signed-off-by: Robert Marko <robimarko@gmail.com>
75a236be122a service: add missing null pointer check
f5341f327539 ubus: add api for generating and validating security tokens
3fab99eab4d5 add udebug support
28d86bd30e97 pex: only respond to update requests when we have network data
8e6f37cc361e pex-msg: ignore no-data responses if version is zero
12e6cf7f63e1 pex: create pex host from update responses
edc8fdae463a ubus: show the local addresses in network status
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Currently, enabling USB, BT or Netfilter support after initial compilation
will not trigger a rebuild, so add the missing PKG_CONFIG_DEPENDS so
that rebuild gets triggered.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
btmtk.ko is used by btusb.ko and btmtkuart.ko, add it into an own
package and make both packages depend on it.
Fixes: 1c42a0be3619 ("kernel: modules: bluetooth: separating UART and USB drivers")
Link: https://github.com/openwrt/openwrt/pull/18110
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There is some new changes since 12.5.r2 to 12.5.5, so refresh
and update patches.
Changes:
modified: package/kernel/qca-nss-dp/Makefile
modified: package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
modified: package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch
deleted: package/kernel/qca-nss-dp/patches/0011-01-edma_v1-rework-hw_reset-logic-to-permit-rmmod-and-in.patch
deleted: package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
deleted: package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
deleted: package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
deleted: package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
deleted: package/kernel/qca-nss-dp/patches/0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch
Log:
2024-10-16 |4c9f671| [qca-nss-dp] removed the calling of fal_port_autoneg_status_get
2024-10-16 |fb33119| Merge "[qca-nss-dp] Change Debug Level of TX Complete Errors"
2024-10-15 |e197b9d| [qca-nss-dp] Change Debug Level of TX Complete Errors
2024-10-03 |1b7aeb1| Merge remote-tracking branch origin/AU_LINUX_QSDK_GINGER_OPEN_TARGET_ALL.12.5.5.230.918 into HEAD
2024-10-01 |830ac73| Merge "[qca-nss-dp] Enable rmmod support for qca-nss-dp module."
2024-06-05 |aef242d| [qca-nss-dp] Enable rmmod support for qca-nss-dp module.
2024-09-18 |b1bfeb6| Merge "[qca-nss-dp] Move pr_info to pr_debug"
2024-09-12 |54aee26| Merge "[qca-nss-dp] Fix Loopback ring teardown path"
2024-09-10 |21f6567| Merge "[qca-nss-dp] Extend Tx Complete errors to track individual error type"
2024-09-10 |7fee76f| Merge "[qca-nss-dp] Destination VP xmit support"
2024-09-09 |0d4ecfd| [qca-nss-dp] Fix Loopback ring teardown path
2024-08-29 |438ab8e| [qca-nss-dp] Move pr_info to pr_debug
2024-08-29 |3f45e3d| Merge "[qca-nss-dp] Fix EDMA Recovery API to Prevent Multiple RX NAPI Add Calls"
2024-08-23 |7a792b1| [qca-nss-dp] Fix EDMA Recovery API to Prevent Multiple RX NAPI Add Calls
2024-07-08 |1227746| [qca-nss-dp] Add support for DDR extended buffer
2024-08-20 |d45bceb| [qca-nss-dp] Extend Tx Complete errors to track individual error type
2024-06-17 |a8f7155| [qca-nss-dp] Destination VP xmit support
2024-08-21 |a5d189b| Merge "[qca-nss-dp] Support for the PPE-VP Qdisc feature"
2024-08-16 |da97bc7| Merge "[qca-nss-dp] Restrict compilation of a file in DP module"
2024-06-22 |bf90fe9| [qca-nss-dp] Support for the PPE-VP Qdisc feature
2024-02-07 |6ceeb8f| [qca-nss-dp] Enable EDMA driver to allocate from beyond 4GB space.
2024-03-19 |4a7ff28| [qca-nss-dp] Restrict compilation of a file in DP module
2024-07-09 |73bad34| [qca-nss-dp] Check for DS node state before getting ppe queue
2024-05-03 |22cdbd6| [qca-nss-dp] Add PPE-DS Enqueue vp to queue mapping
2024-07-04 |5d6ef18| Merge "[qca-nss-dp] NAPI Budget change for KPI improvement"
2024-07-02 |cd0b543| Merge "[qca-nss-dp] Read fake_mac header indication from rx_desc"
2024-07-01 |160b988| [qca-nss-dp] NAPI Budget change for KPI improvement
2024-05-22 |54c2fd1| [qca-nss-dp]: Fixing SA warnings as part of qca-nss-dp module.
2024-06-22 |602534b| [qca-nss-dp] Read fake_mac header indication from rx_desc
2023-11-24 |10210e2| [qca-nss-dp] EDMA register changes for ipq54xx
2024-05-22 |1af0d03| Merge "[qca-nss-dp]: Change to support PPE-VP path for MLO Assist"
2024-05-15 |2acd9f3| [qca-nss-dp]: Change to support PPE-VP path for MLO Assist
2023-09-27 |1ca59f2| [qca-nss-dp] DP changes for ipq54xx
2024-04-18 |bc60c5a| Merge "[qca-nss-dp] Add support for the XGMAC latency computation"
2024-04-18 |6a67d6d| Merge "[qca-nss-dp] Fix the packets processing in the Rx NAPI"
Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/17731
Signed-off-by: Robert Marko <robimarko@gmail.com>
ethtool since version 6.9 introduced support for getting/setting RSS
input transformation supported in Linux since version 6.8.
The now changed kernel ioctl ABI, however, cannot be detected from
userland, and ethtool since version 6.9 simply assumes that a previously
reserved field is now used to set the input transformation.
Unfortunately the default value RXH_XFRM_NO_CHANGE (0xff) used by ethtool
userland creates an incompatibility with older kernels which cannot be
resolved easily without introducing even more ABI breakage.
Work-around the issue and fix support for --set-rxfh and --set-rxfh-indir
ethtool userland tool commands by making the support for input_xfrm
conditional on compile time, and keep it disabled for Linux 6.6.
Fixes: 8c2dcd1518 ("ethtool: update to 6.10")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
b43aeb5 wireless-regdb: assert and correct maximum bandwidth within frequency difference
68588bf wireless-regdb: Update regulatory info for Syria (SY) for 2020
0dda57e wireless-regdb: Update regulatory info for Moldova (MD) on 6GHz for 2022
b19ab0b wireless-regdb: Update regulatory info for Azerbaijan (AZ) on 6GHz for 2024
f67f40d wireless-regdb: Update regulatory info for Oman (OM)
bd70876 wireless-regdb: Update regulatory rules for Armenia (AM) on 2.4 and 5 GHz
6c7cbcc wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band in ETSI/CEPT
f9f6b30 wireless-regdb: Update regulatory rules for Austria (AT)
39b47ea wireless-regdb: Update regulatory info for Cayman Islands (KY) for 2024
3dd7ceb wireless-regdb: allow NO-INDOOR flag in db.txt
4d754a1 wireless-regdb: Update regulatory rules for Iran (IR) on both 2.4 and 5Ghz for 2021
8c8308a wireless-regdb: Update frequency range with NO-INDOOR for Oman (OM)
c2f11e2 wireless-regdb: update regulatory database based on preceding changes
Signed-off-by: Rudy Andram <rmandrad@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17957
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This removes -static compile option. The -static option tells GCC to
link this statically with the libc, which we do not want in OpenWrt. We
want to link everything dynamically to the libc. This fixes a compile
problem with glibc.
References: 71bdff91 "ltq-vdsl-mei: Remove static linking"
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Not all devices need Bluetooth UART and USB drivers to be installed together. Three separate drivers have been created:
- kmod-bluetooth
- kmod-hci-uart
- kmod-btusb
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15118
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Move Bluetooth modules to new Bluetooth menu from Other menu.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15118
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Update iproute2 to 6.13.
Release notes:
https://lwn.net/ml/all/20250120194053.3744d96b@hermes.local/
Allows us to drop multiple upstreamed patches:
package/network/utils/iproute2/patches/013-endian.h.patch
package/network/utils/iproute2/patches/014-basename.patch
package/network/utils/iproute2/patches/015-limits.h.patch
package/network/utils/iproute2/patches/016-limits.h.patch
package/network/utils/iproute2/patches/017-linux-limits.patch
package/network/utils/iproute2/patches/018-linux-limits.patch
Link: https://github.com/openwrt/openwrt/pull/18067
Signed-off-by: Robert Marko <robimarko@gmail.com>
Rebased onto dssp5-base. Baseline is:
ss, tc, stubby, irqbalance, usbutils, ethtool, tcpdump, mtr,
bmon, zram-swap, parted, e2fsprogs, gdisk, block-mount,
kmod-fs-ext4, kmod-fs-f2fs, kmod-usb-storage, f2fs-tools-selinux,
kmod-usb-storage-uas, kmod-usb3, wireguard-tools,
openssh-sftp-server, luci-light, resolveip, blockd
Changes since v2.0:
3dcc957 three issues:
434bad8 /new_root related
04d18a5 README armsr combined-efi
506d8c1 /efi is not a thing in armsr combined-efi
c0db1ed efivarfs remove these filecons
4eb35b7 adds efivars noseclabelfs for armsr combined-efi
bbc6a6b adds /dev/ttyS3 to tty serialtermdev
1467206 README local logins
6ae3185 rename eficapsulemiscnodedev
d43ded0 rename to vportserialtermdev
a47d2f8 fixes virtio port serialtermdev
03aec70 blockmount: make it a bit more robust
70f1ed3 hotplugcall not sure what config triggers this
3338764 boarddetect: i was expecting this
d97548a deal with /dev/tty and /dev/vcs
c6ba4a5 adds virtio block device
d03e216 adds virtio vport serialtermdev for qemu guest agent
2dc0291 validatefirmwareimage: allow getattr of *all* dev chr files
fdfb3a7 adds /dev/efi_capsule_loader for armsr combined target
b129fb9 validatefirmwareimage ordering
b5e81b4 validatefirmwareimage clean up
0932dc5 README typo fixes
a1f88f0 README fix
e6c68be README typo fixes
a232c21 hvcloginserialtermdev: macro not used
d7edd95 support /usr/local and update README
c0d2947 validatefirmwareimage comment
7dbc9b3 validatefirmwareimage: allow find to getattr of dev.except char
f647175 platformtmpfile: elaborate a bit in comment
52f32c1 reintroduce misc.cil
320d77f validatefirmwareimage: /lib/upgrade/platform.sh
365fc65 deal with /efi for combined images
183b412 adds hvc logserialtermdev
20cd42a sshdsysagent: limited support for legacy scp -O with firmware images
1ccee8d validatefirmwareimages: some events related to "combined" images
9b47fc3 jshn reads /dev/urandom
f86def7 adds /tmp/log/apk.log
f1247b3 these are relative to the current namespace
32c0cc8 hotplugcall qemu virtio-console-helper
5cc41f5 uclient-fetch for manually downloading sysupgrade related
c8140bd cgi-io creates firmware and backup atomically
edf517b factoryreset deal with firstboot compatibility
f5116b5 pppd: redundant, is implied with shell client type
86be72c updates README
8c08ca1 luci-mod-system: a bit of speculation here
417f4a5 adds /dev/autofs
1ed537c misc.cil: remove
01d014a selinuxsecfile: be more specific
53fca71 rename blockd module
b4c9b15 ttyloginserialtermdev: ordering
016c3c1 sysagent traversal of /root is enough
d0d7c91 hotplugcall: net/00-sysctl
2821746 adds ttyAMA0 and some incomplete rules for board-detect
Run-tested: ilogic-openwrt_one, ipq40xx-generic-linksys_mr8300
Tested-by: Stefan Hellermann <stefan@the2masters.de>
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250116092312.1350223-1-dominick.grift@defensec.nl/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
On exit, the app tries to do an orderly shutdown of the DSL connection
before it is stopped forcibly. Since the driver does 3 attempts with a
timeout of 2 seconds each, this might take about 6 seconds in the worst
case.
This is problematic on sysupgrade, because any process that doesn't exit
within 4 seconds is killed. This means that the DSL connection might not
be stopped at all before the actual system upgrade begins.
To avoid this, use the newly added option in the driver to not retry the
L3 request on failure.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250130102108.1606919-3-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This allows to attempt an orderly shutdown via L3 request while avoiding
excessive delay in the failure case (up to 6 seconds with the currently
hard-coded 3 attempts).
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250130102108.1606919-2-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Commit 7bc487c12eef ("kernel: ltq-vdsl-vr9-mei: fix warning about
field-spanning write") patched the driver to use unsafe_memcpy in
MEI_IoctlCmdMsgWrite.
However, this is not actually necessary. The assignment of the variable
"pDestPtr" can be modified so that the compiler knows about the correct
size. This way, the check in the fortified memcpy works correctly.
While at it, also adjust all places where similar code is used to copy
from a CMV_STD_MESSAGE_T struct.
Also mark all related structs as packed, because the code (and the
driver in general) seems to rely on that anyway.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250206225444.2521817-2-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Since the update to kernel 6.1, a warning like this appears in the
kernel log:
[ 49.773953] ------------[ cut here ]------------
[ 49.773998] WARNING: CPU: 3 PID: 2349 at target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_msg_process.c:3570 MEI_IoctlCmdMsgWrite+0x290/0x2c8 [drv_mei_cpe]
[ 49.777670] memcpy: detected field-spanning write (size 4) of single field "pDestPtr" at target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_msg_process.c:3570 (size 2)
...
[ 50.087078] ---[ end trace 0000000000000000 ]---
The variable "pDestPtr" points to the field "header.index" in a
CMV_STD_MESSAGE_T struct (header is a CMV_STD_MESSAGE_HEADER_T struct).
The offending code intentionally copies data beyond this field, which is
followed by "header.length" and "payload".
To fix this, change the assignment of "pDestPtr" to use the pointer to
the message plus the offset of the "header.index" field. This way, the
compiler knows about the size and thus the false positive warning
disappears.
While at it, also adjust all places where similar code is used to copy
from a CMV_STD_MESSAGE_T struct.
Also mark all related structs as packed, because the code (and the
driver in general) seems to rely on that anyway.
Fixes: https://github.com/openwrt/openwrt/issues/17142
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250206225444.2521817-1-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The fixes are only for the WRT1900X and WRT1200AC.
It contains:
Deletes the driver's ability to modify the debit table.
Remove skb_get(done_skb) in txdone
Reworking ISR
clean code
Napi replaces tasklet
Add rx_decrypt feature
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/17997
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The latest upstream version of Yafut builds on macOS and other
POSIX-compatible systems. Drop the custom OpenWRT patch applying
non-Linux compatibility fixes to the tool's source code.
Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/18014
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
he_spr_psr_enabled is appended to hostapd.conf if it's enabled, but hostapd
doesn't support this config, it should be used as an internal flag to control
the he_spr_sr_control configuring.
Signed-off-by: Lix Zhou <xeontz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18025
Signed-off-by: John Crispin <john@phrozen.org>
On some devices, the rx/tx bitrate may not always be available
right away, or at all when in mesh mode at plink is blocked causing
the following:
```
Reference error: left-hand side expression is null
In assoclist(), file /usr/share/ucode/iwinfo.uc, line 321, byte 46:
called from function info (/usr/share/ucode/iwinfo.uc:427:33)
called from anonymous function (/usr/bin/iwinfo:108:25)
` bitrate_raw: station.sta_info.tx_bitrate.bitrate,`
Near here -----------------------------------------------^
Reference error: left-hand side expression is null
In assoclist(), file /usr/share/ucode/iwinfo.uc, line 314, byte 54:
called from function info (/usr/share/ucode/iwinfo.uc:427:33)
called from anonymous function (/usr/bin/iwinfo:108:25)
` bitrate: format_rate(station.sta_info.rx_bitrate.bitrate),`
Near here -------------------------------------------------------^
Reference error: left-hand side expression is null
In assoc_flags(), file /usr/share/ucode/iwinfo.uc, line 216, byte 12:
called from function assoclist (/usr/share/ucode/iwinfo.uc:323:51)
called from function info (/usr/share/ucode/iwinfo.uc:427:33)
called from anonymous function (/usr/bin/iwinfo:108:25)
` if (data[k])`
Near here -------^
```
This was seen on Linksys MX5300 in mesh mode (QCA9984).
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18027
Signed-off-by: John Crispin <john@phrozen.org>
* Add missing parentheses in the conditionals for VHT160/VHT160-80PLUS80
and VHT_MAX_MPDU capabilities. The missing parentheses caused the bitwise
AND to be evaluated after the equality comparison due to ECMA's operator
precedence, where `==` has higher precedence than `&`.
* Fix Max MPDU length detection by changing the comparison operators to
`>=` vs `>` otherwise the condition would never be met.
* Add missing default values:
- `true` value for `short_gi_80` (As it exists for `short_gi_20`, `short_gi_40`, `short_gi_160`)
- `7` for `vht_max_mpdu` (Without it the loop in MAX-MPDU-* calculation always compares with null)
* Change the `vht160` condition to `config.vht160 <= 2`. This flag is
`2` by default, and only ever set to `0` when `vht_oper_chwidth < 2`.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
Notation for RX-STBC VHT capabilities when specifying number of spatial
streams should be hyphenated, e.g. RX-STBC-1, RX-STBC-2. HT capabilities
use without hyphen, e.g. RX-STBC1, RX-STBC2. This is consistent with
what hostapd expects.
```c
static int hostapd_config_ht_capab(struct hostapd_config *conf,
const char *capab)
{
if (os_strstr(capab, "[RX-STBC1]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_1;
}
if (os_strstr(capab, "[RX-STBC12]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_12;
}
if (os_strstr(capab, "[RX-STBC123]")) {
conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
conf->ht_capab |= HT_CAP_INFO_RX_STBC_123;
}
}
static int hostapd_config_vht_capab(struct hostapd_config *conf,
const char *capab)
{
if (os_strstr(capab, "[RX-STBC-1]"))
conf->vht_capab |= VHT_CAP_RXSTBC_1;
if (os_strstr(capab, "[RX-STBC-12]"))
conf->vht_capab |= VHT_CAP_RXSTBC_2;
if (os_strstr(capab, "[RX-STBC-123]"))
conf->vht_capab |= VHT_CAP_RXSTBC_3;
if (os_strstr(capab, "[RX-STBC-1234]"))
}
```
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
When selecting channels above 100 in VHT160+ modes the center
frequency segment was incorrectly set to 50, causing the interface
to not come up.
Change logic to instead check if the channel is within ±28 channels
of the intended center, which matches the actual 160+ MHz channel
width specification for VHT160, HE160, and EHT160.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
Specifications:
- SoC: Allwinner A31 @ 1GHz
- DRAM: 1/2Gb DDR3
- SD-card slot
- NAND: 8/16Gb MLC
- Ethernet: 1x 10/100/1000Mbps (RTL8211E)
- Wireless: Ampak AP6210 (BCM43362)
- 2x USB2.0
- 1x mPCIe slot for 4G cards
- 1x SIM slot
- HDMI/VGA via simplefb
- RTC with battery
- Power via DC12V / 3A
Installation:
Use the standard sunxi installation to an SD-card. NAND is
not supported.
This is to re-add proper support for an older device.
Link: https://openwrt.org/toh/merrii/hummingbird
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Upgrade the u-boot to a more recent version, and drop and refresh
patches while at it. Additionally, use the correct architecture
when running mkimage.
Runtime-tested:
- SiFive Unleashed
- SiFive Unmatched
Dropped:
0009-riscv-Fix-build-against-binutils.patch
Added:
0006-riscv-sifive-fu740-reduce-DDR-speed-from-1866MT-s-to.patch
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
APK recently introduced python binding support. Disable this sub module
as we don't ship python in normal build to reduce space.
Link: https://github.com/openwrt/openwrt/pull/17925
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5f127fcc415c convdb: preserve newlines at the end of scripts
e94a2212a0d2 convdb: import package names starting with leading dot
9c0d353c7905 adbdump: use literal block if yaml quoting is needed
93c6a09a8ea8 improve compatibility of shellscripts
6c454d13de9b doc: fix pre/post commit hook documentation
3eb0b70b6d0f solver: rework solver name ordering to fix install_if handling
78c3bdc03cbd solver: make dependencies only packages selectable
373b364ef2a8 build: use the VERSION directly as the soname
6f627d93f5a0 update .gitignore
908f1ee7e87b index, add, pkg: check arch in 'add' only to allow 'index' to work
7c164c471251 index: Fix total always 0
0042b035df53 pkg, db: check arch on apk_db_pkg_add
ffc706689603 applet: always show help for global options
f6a66ebc5876 help: use uppercase usage prefix
7ebb23720483 doc: fix manpage sections
5e5e1f088986 genhelp: reorganize and add --debug output mode
9b371e452fb2 genhelp: do man page link wrangling for COMMANDS text only
2a87e46a354b context: introduce and use apknew_suffix
a6180e4cfa1a meson: add tests option
eb100676c5f0 test: move subdir unit to be the first
a12eae1780e8 test/user/hardlink: be portable to bsd-style stat(1)
f0c096bc034b db: attempt new mount user namespace for chroot in usermode
994e5e4e0006 db: fix "fetch --recurisve" to work
24d8f9677d77 Revert "database: move lock file from /lib/apk to /run/apk"
470432aafe77 applets: simplify option group handling
e1275e2f5010 apk: load global options from /etc/apk/config
8c39b525cd0c add support for repository package name specification
5856cf100241 doc, db: fix repository url_base to be allocated and fetch man page
a0411e87187e cache: fix not to remove indexes
cddca5769e98 apk, commit: support --cache-predownload to first download packages
915e9841ed1c ci: always test all features available
4f94807104e3 commit: print version numbers with --verbose --interactive summary
5bd6d49ac447 fetch: call progress early to avoid flicker
fc66fdfc49cd test: portability fixes
3f73ba343cbd test: shellcheck test suite for bash, dash and busybox
d94671bb1235 test: fixup sourcing testlib.sh to work better with shellcheck
6007db9cdde6 print: refactor progress printing API
a1d7042a2d3b print: further refactor progress API
bed4628c9317 print: reorganize progress to be renderred after apk_out
8cd7362a986c add process main loop to pipe stdout/stderr and logs it
ccfd7ac5e518 db: log script output using apk_process api
3c4594962fb4 db: log uvol output using apk_process api and add tests
fc7768c09497 io_url_wget: log wget output using apk_process api
90a62541751f build: only use VERSION up until first space for soname
378d6360ab17 db: rename apk_db_add_repository to add_repository
5d978c2a5924 db: split open_repository out of add_repository
af812cd28c6d print: simplify code a little bit
4c776eb74997 db: make index refresh notices a progress note
64e053071a89 db: fix non-repository reverese dependency indexing
3cf039322ce1 apk-tools-3.0.0_rc1
90220e710c61 commit: fixup progress during package removal
d11521ec6309 apk-tools-3.0.0_rc2
dc191820b1c4 solver: fix name resolving order of pure virtual names
7da628bc455f libfetch: remove remaining ftp references
10b467c0992a libfetch: remove error generation script
b5b130e1d628 print: flush after progress notice if needed
d71722b9a637 libfetch: rework error codes API
7b0b69a3023f commit: advise on using upgrade --prune and/or --available
1fd82ea2d7dc test: fix spelling s/shuld/should
8eb22149138f process: move apk_exit_status_str as static function
752ee96a25b1 db: refactor repository parsing and url printing
bfa763904fe4 doc: update apk-keys(5) and apk-repositories(5)
165333af1a35 db: introduce and use apk_db_foreach_repository
8e98d6889c92 libfetch: remove unused file scheme and manual pages
30b1c0348d6b remove usage of TRUE/FALSE
fa19887d741c crypto: use explicit algorithm fetching for openssl >=3.0
a706cbdfd5b1 crypto: remove support for obsolete md5
35a57547a7d7 db: remove APK_REPOSITORY_CACHED and use cache_repository
7f616711636c db: const correctness for apk_db_pkg_available
2cda62cd3a4c io: adjust scheme detection in apk_url_local_file()
50a2c12a32b8 db: make repo.url_index a pure blob
a186267a8822 db: make repo.url_base_printable prefix of url_index_printable
9fb473c6a269 add .editorconfig
088c584bf515 mkndx: introduce --filter-spec to filter existing index
0c3188793243 atom: remove apk_atomize_dup0
866374c7cda0 python: add initial python binding
bdf492471328 python: add unittests
9afe8dae79a0 ci: install python3-dev
df3424e5c8cd python: move version to a submodule
3e65a63aa4f1 apk-tools-3.0.0_rc3
946027f6abde test: extend blob_split tests
e73b5e313998 db: do not add empty arch
a6c84f8f62f7 atom: use null atom also for zero length blobs
fb8eef15dc52 db: handle not found names in __apk_db_foreach_sorted_package
0ef8a2223cca commit: don't trigger question with --prune/--available warning
fe484a5c06b9 atom: remove apk_atomize
70fc828cf06b update: make --update-cache and and 'update' behave the same
04e83acfb9b9 upgrade: fix previous commit
cdeebc01283d test: add mkpkg/add symlink test
c2f21ce06a67 mkpkg: do not include filename on error message
de0a4886a91c fs_fsys: do not leave temporary files after failed commit
e5e362c1a65c doc: update --cache-max-age documentation
8d41ff40b59a fetch: fix fetch_err_make() for 32-bit arches
2526fd73bc66 walk_gentext: make state per-module, use apk_ostream for output
bb65553e6423 walk_genadb: make state per-module
a920e5976127 adb_walk: rename scheme to start_scheme and always call end for it
92c573fac280 adb_walk: separate string and numeric values
fe4876bd3a4e adbdump: add support for json output
66cc8da577f0 walk_adb: always call the string scalar function
40bfa97ce3e3 adb: reset dynamic on freeing adb_obj
7519b70d42d1 convert adb_walk_gen* to apk_serializer_*
64c484730c9f add missing serialize.c
83e85aaee220 add missing apk_serialize.h
f70638e12ccc serializer: simplify schema and array handling
9bfc259d9fdb serializer: merge start_schema and start_object to one op
a23368b38ff6 serialize_yaml: improve quoting detection
3a33e75b92aa serialize_adb: move from libapk to apk executable
f5c3fd843824 info: fix -W with symlinks
d54fdb753135 update, version: do not print unavailable repositories
8223c10d4c33 doc: extract arguments are files
a3b4ebcefa3b serialize_yaml/adb: support single quoting, and fixes
77aff1daa967 db: fix --no-cache
f0e3aa4c139d mkpkg: do not call openat() with null pathname
28770f552f4e adb: fix adb_block_init check when extended block is needed
1ca73b6ae892 blob: apk_blob_push_int use uint64_t as value
0b159e23432e print: use uint64_t for progress api progress type
5da830ba51d0 db, commit, print: use uint64_t for file size types
a7b5d8d8eeb9 mkndx, extract: use uint64_t for file size types
639f8ab8d9cd io: use uint64_t for file size as needed
49905d47ee90 io: introduce and use apk_istream_skip
8d83f18647d4 defines: drop muldiv and mulmod helpers
d373a9a6971e db: drop now unused apk_repo_format_cache_index
5700b195d67d pkg: update script execution logging style
00c51e267162 pkg: cap sizes that are allowed for scripts and some v2 fields
5157c540d732 io: fix segment_close to read the inner stream
ad741fe98b72 db: implement system repository list configuration path
6ca1831ed563 use #pragma once instead of ifdef guards
64254d190b32 db, ctx: add and use allocator in apk_ctx
581825bb0811 fix handling of etc/apk/config options with an argument
508b312df637 apk: add APK_CONFIG to overwite path to config file
0e8e7e5a8264 test: fix busybox realpath compat
0186a6aa9d5c apk: support loading configuration options from /lib/apk/config
0c52242990f4 db: fix package name orphan check
a7766c933853 add: don't print misleading error after failed non-repository check
4254863de6ac introduce and use apk_array_foreach and apk_array_foreach_item
b276b3c50618 serialize: separate apk_ser_string and its multiline variant
91dc10b1cddf blob: introduce and use apk_blob_foreach_token
d345a9aa6d25 adbgen: split adbgen specific code to separate file
00522cd60e18 apk: introduce and use APK_OPTVAL_* macros
7f8a1ca12465 list, search: fix origin existence checks
b0bb4a99378b adb: allow copying larger arrays
3fe4258d4c1b mkndx: fix matching packages from old index
b263d961ba12 libfetch/http: reuse fetch_netrc_auth for http(s)
1d4ed5525f54 ctype: fix apk_blob_{spn,cspn} for non-ascii characters
1fa9f3c221c7 genhelp.lua: don't match underscores in the middle of words
48980518436f ctx, trust: load public keys also from lib/apk/keys
ba38d6584599 mkndx: remove --rewrite-arch
a9ea20e37029 context: fix --keys-dir
8abae4785c78 various: fix compilation error for missing inttypes.h
fdb10df21486 various: fix compilation error for missing limits.h
89ef2b546087 database: fix compilation error for missing sched.h
8afd4ab47200 process: correctly handle error from pipe2 and open
1cbbf7457721 crypto_openssl: make sha global variables constant for OpenSSL < 3
025710552ac8 io: fix compilation error for missing stdarg.h
908efa92701c libfetch: allow obsolete date format in http timestamps
70494b5bcdf9 apk: add support for boolean flag arguments
16ab8c549a06 apk: add --cache-packages to enable package caching always
460d62ee743c db: extend repositories file format with commands
34771ccb7964 apk-tools-3.0.0_rc4
Link: https://github.com/openwrt/openwrt/pull/17925
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The SPNMX56 is an ISP-branded and distributed device similar to the MX5500
with the same Wifi chips (IPQ5018 for 2.4G and QCN9074 for 5G) but has an
additional QCA8081 PHY providing a 2.5gbps ethernet WAN port.
Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Winbond W634GU6NB-11 (512 MiB DDR3-933)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
QCN9024 (4x4:4 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
QCA8337 switch (3 Ports 10/100/1000 GBASE-T) and a
QCA8081 phy (up to 2.5 Gbps)
* Flash: Gigadevice GD5F2GM7RExxG (256 MiB)
* LEDs: 1x multi-color PWM LED
* Buttons: 1x WPS (GPIO 27 Active Low)
1x Reset (GPIO 28 Acive Low)
Flash instructions:
1. On OEM firmware, login to the device (typically at http://192.168.1.1)
and click 'CA' in the bottom right corner -> Connectivity ->
Manual Upgrade. Alternatively, browse to http://<router IP>/fwupdate.html
Upload openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
Optionally flash 2nd partition, after first boot check actual partition:
fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin kernel
and in case of 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin alt_kernel
2. Installation using serial connection from OEM firmware
hit Enter once booted and enter credentials (login: root, password: admin)
fw_printenv -n boot_part
In case of 2:
flash_erase /dev/mtd12 0 0
nandwrite -p /dev/mtd12 openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
or in case of 1:
flash_erase /dev/mtd14 0 0
nandwrite -p /dev/mtd14 openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
After first boot install firmware on second partition:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin kernel
or:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin alt_kernel
3. Back to the OEM firmware.
Download firmware from OEM website:
Firmware for this device cannot be searched for on the Linksys website.
Instead, we'd have to use serial to intercept the URL of the firmware
while it's trying to update. Firmware is ISP specific:
Toob (UK): http://download.linksys.com/updates/20241125t080737/FW_MX56TB_1.0.1.216218_prod.img
The intention is to collect URLs for different ISPs on a wiki page.
From serial or SSH:
fw_printenv boot_part
in case of 1:
mtd -r -e alt_kernel -n write FW_MX56TB_1.0.1.216218_prod.img alt_kernel
else in case of 2:
mtd -r -e kernel -n write FW_MX56TB_1.0.1.216218_prod.img kernel
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17968
Signed-off-by: Robert Marko <robimarko@gmail.com>
Aliyun AP8220 is an AP manufactured by Edgecore.
(Very similar to Edgecore EAP102)
Hardware specifications:
SoC: Qualcomm IPQ8071A
RAM: 1GB of DDR4 600MHz
Flash1: MX25U3235F 4MB
Flash2: MX30UF1G18AC 128MB
Ethernet: 2x 2.5G RJ45 port
USB: 2x USB-A 2.0 port
WiFi1: QCN5024 2.4GHz
WiFi2: QCN5054 5GHz
Power: DC 12V / PoE
Flash instructions:
1. Connect the router via serial port
2. Keep pressing @ until uboot is interrupted
3. Download the initramfs image, rename it to
initramfs.bin, host it with tftp server
4. Run these commands:
tftpboot initramfs.bin
bootm
5. After openwrt boots up, use scp or luci
to upload sysupgrade.bin to upgrade.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17970
Signed-off-by: Robert Marko <robimarko@gmail.com>