|
@@ -364,9 +364,13 @@ mac80211_generate_mac() {
|
|
|
|
|
|
find_phy() {
|
|
find_phy() {
|
|
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
|
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
|
- [ -n "$path" -a -d "/sys/devices/$path/ieee80211" ] && {
|
|
|
|
- phy="$(ls /sys/devices/$path/ieee80211 | grep -m 1 phy)"
|
|
|
|
- [ -n "$phy" ] && return 0
|
|
|
|
|
|
+ [ -n "$path" ] && {
|
|
|
|
+ for phy in /sys/devices/$path/ieee80211/phy*; do
|
|
|
|
+ [ -e "$phy" ] && {
|
|
|
|
+ phy="${phy##*/}"
|
|
|
|
+ return 0
|
|
|
|
+ }
|
|
|
|
+ done
|
|
}
|
|
}
|
|
[ -n "$macaddr" ] && {
|
|
[ -n "$macaddr" ] && {
|
|
for phy in $(ls /sys/class/ieee80211 2>/dev/null); do
|
|
for phy in $(ls /sys/class/ieee80211 2>/dev/null); do
|