mac80211: make the path phy lookup more robust regarding config upgrades, allow partial path matching
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48425
This commit is contained in:
@@ -10,10 +10,9 @@ lookup_phy() {
|
||||
config_get devpath "$device" path
|
||||
[ -n "$devpath" ] && {
|
||||
for _phy in /sys/devices/$devpath/ieee80211/phy*; do
|
||||
[ -e "$_phy" ] && {
|
||||
phy="${_phy##*/}"
|
||||
return
|
||||
}
|
||||
case "$(readlink -f /sys/class/ieee80211/$_phy/device)" in
|
||||
*$devpath) return 0;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user