summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2024-12-19 05:44:30 +0000
committerFelix Fietkau2024-12-19 05:44:48 +0000
commit2e03c7d53e84e5e8c964914b78fe4b429563655e (patch)
treea2cfb4f94a4191d7758cb1509a33e621798e4606
parent8943430b9f8046d49842de6b40f9c90fb57fff04 (diff)
downloadopenwrt-2e03c7d53e84e5e8c964914b78fe4b429563655e.tar.gz
wifi-scripts: fix phy index lookup in device_capabilities
For renamed phys, the index cannot be derived from the name Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index f95f01e846..adbfc1b978 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -437,7 +437,7 @@ function device_extended_features(data, flag) {
}
function device_capabilities(phy) {
- let idx = +substr(phy, 3, 1);;
+ let idx = +fs.readfile(`/sys/class/ieee80211/${phy}/index`);
phy = nl80211.request(nl80211.const.NL80211_CMD_GET_WIPHY, nl80211.const.NLM_F_DUMP, { wiphy: idx, split_wiphy_dump: true });
if (!phy)
return;