[openwrt/openwrt] wifi-scripts: fix phy index lookup in device_capabilities
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 18 21:45:13 PST 2024
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2e03c7d53e84e5e8c964914b78fe4b429563655e
commit 2e03c7d53e84e5e8c964914b78fe4b429563655e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Dec 19 06:44:30 2024 +0100
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 at nbd.name>
---
.../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the lede-commits
mailing list