Skip to content
Snippets Groups Projects
Commit 96d322d5 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

nl80211: retry phy lookup with platform/ prefix


If the first attempt to lookup the phy index by the path value fails, retry to
find the index within the platform/ subdirectory to follow the logic used by
the mac80211 package.

Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent e4aca391
No related branches found
No related tags found
No related merge requests found
...@@ -244,6 +244,9 @@ static int nl80211_phy_idx_from_uci_path(struct uci_section *s) ...@@ -244,6 +244,9 @@ static int nl80211_phy_idx_from_uci_path(struct uci_section *s)
return -1; return -1;
snprintf(buf, sizeof(buf), "/sys/devices/%s/ieee80211/*/index", opt); /**/ snprintf(buf, sizeof(buf), "/sys/devices/%s/ieee80211/*/index", opt); /**/
if (glob(buf, 0, NULL, &gl))
snprintf(buf, sizeof(buf), "/sys/devices/platform/%s/ieee80211/*/index", opt); /**/
if (glob(buf, 0, NULL, &gl)) if (glob(buf, 0, NULL, &gl))
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment