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 f95f01e8468..adbfc1b9781 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;