[openwrt/openwrt] wifi-scripts: ucode: fix iwinfo crash on untracked interfaces
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 5 05:44:24 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/14b686247aec2e1b57f78f78b7ce7d8cda005320
commit 14b686247aec2e1b57f78f78b7ce7d8cda005320
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jun 30 13:13:03 2025 +0200
wifi-scripts: ucode: fix iwinfo crash on untracked interfaces
Deal with data.radio being null
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
.../network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc
index 811c4487a0..29d75b4130 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc
@@ -285,7 +285,7 @@ function hwmodelist(name) {
const mode = { 'HT*': 'n', 'VHT*': 'ac', 'HE*': 'ax' };
let iface = ifaces[name];
let phy = board_data.wlan?.['phy' + iface.wiphy];
- if (!phy || !iface.radio.band)
+ if (!phy || !iface.radio?.band)
return '';
let htmodes = phy.info.bands[uc(iface.radio.band)].modes;
let list = [];
@@ -393,7 +393,7 @@ export function info(name) {
mode: data.mode,
channel: format_channel(data.wiphy_freq),
freq: format_frequency(data.wiphy_freq),
- htmode: data.radio.htmode,
+ htmode: data.radio?.htmode,
center_freq1: format_channel(data.center_freq1) || 'unknown',
center_freq2: format_channel(data.center_freq2) || 'unknown',
txpower: data.wiphy_tx_power_level / 100,
More information about the lede-commits
mailing list