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: Jo-Philipp Wich <jo@mein.io>
return -1;
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))
return -1;