mac80211: fix check for existing config section from r48426
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 21 Jan 2016 15:51:52 +0000 (15:51 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 21 Jan 2016 15:51:52 +0000 (15:51 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48439 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/kernel/mac80211/files/lib/wifi/mac80211.sh

index 1be99ec..92a9fce 100644 (file)
@@ -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
        }