mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
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>
This commit is contained in:
parent
8943430b9f
commit
2e03c7d53e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user