diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-21 15:51:52 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-21 15:51:52 +0000 |
commit | dcee094fc3840ff31a220dbafeb491c913c49f68 (patch) | |
tree | a0511ad86557582428df1a8d08c306886ec68fa5 /package/kernel/mac80211/files/lib/wifi | |
parent | b5f1545686aab34894cf5e1d3291a4147241f7d7 (diff) | |
download | master-187ad058-dcee094fc3840ff31a220dbafeb491c913c49f68.tar.gz master-187ad058-dcee094fc3840ff31a220dbafeb491c913c49f68.tar.bz2 master-187ad058-dcee094fc3840ff31a220dbafeb491c913c49f68.zip |
mac80211: fix check for existing config section from r48426
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48439 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files/lib/wifi')
-rw-r--r-- | package/kernel/mac80211/files/lib/wifi/mac80211.sh | 6 |
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 } |