Skip to content

Commit

Permalink
wifi-scripts: fix phy index lookup in device_capabilities
Browse files Browse the repository at this point in the history
For renamed phys, the index cannot be derived from the name

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Dec 19, 2024
1 parent 8943430 commit 2e03c7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2e03c7d

Please sign in to comment.