madwifi: only set the desired mode for the first vap
[openwrt/staging/yousong.git] / package / madwifi / files / lib / wifi / madwifi.sh
index 3c4112a4ffe021794e80544aa4a10fbe414354ac..0124285d08bb24b8a14098827e1f580ab858b808 100755 (executable)
@@ -120,10 +120,10 @@ enable_atheros() {
                        *fh) hwmode=fh;;
                        *) hwmode=auto;;
                esac
-               iwpriv "$ifname" mode "$hwmode"
                iwpriv "$ifname" pureg "$pureg"
 
                [ "$first" = 1 ] && {
+                       iwpriv "$ifname" mode "$hwmode"
                        iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
                }