aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/files/lib/wifi/mac80211.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 1be99ec22b..92a9fce744 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -9,9 +9,9 @@ lookup_phy() {
local devpath
config_get devpath "$device" path
[ -n "$devpath" ] && {
- for _phy in /sys/devices/$devpath/ieee80211/phy*; do
- case "$(readlink -f /sys/class/ieee80211/$_phy/device)" in
- *$devpath) return 0;;
+ for phy in $(ls /sys/class/ieee80211 2>/dev/null); do
+ case "$(readlink -f /sys/class/ieee80211/$phy/device)" in
+ *$devpath) return;;
esac
done
}