diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index afa425f075..8956bbd74a 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -35,3 +35,24 @@ case "$board" in *) ;; esac + +OPATH=${DEVPATH##/devices/platform/} +OPATH=${OPATH%%/ieee*} + +# 10 radios is enough for anyone! +for i in `seq 0 9`; + do + BUS=`uci get wireless.@wifi-device[$i].path` + if [ "$BUS " == "$OPATH " ] + then + PHYNAME=${DEVPATH##*ieee80211/} + NPHYNAME=`uci get wireless.@wifi-device[$i].phyname` + if [ "$NPHYNAME " != " " ] + then + if [ "$PHYNAME " != "$NPHYNAME " ] + then + iw $PHYNAME set name $NPHYNAME + fi + fi + fi +done |