summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-06-26 17:44:43 +0000
committerFelix Fietkau2025-06-26 17:44:43 +0000
commit35a4608a308a7979acd62d300b74f569dc3f11c1 (patch)
treec50a881c7b0004bff014c43d998668027ca7da5c
parentfdcb0e0b24d51a1fb773034d54012cb033e3d18e (diff)
downloadopenwrt-35a4608a308a7979acd62d300b74f569dc3f11c1.tar.gz
wifi-scripts: iwinfo(ucode): add missing null checks
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/iwinfo.uc4
1 files 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 a85614cdcb..811c4487a0 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)
+ if (!phy || !iface.radio.band)
return '';
let htmodes = phy.info.bands[uc(iface.radio.band)].modes;
let list = [];
@@ -446,7 +446,7 @@ export function info(name) {
export function htmodelist(name) {
let iface = ifaces[name];
let phy = board_data.wlan?.['phy' + iface.wiphy];
- if (!phy)
+ if (!phy || !iface.radio.band)
return [];
return filter(phy.info.bands[uc(iface.radio.band)].modes, (v) => v != 'NOHT');