madwifi: only set the desired mode for the first vap
authorFelix Fietkau <nbd@openwrt.org>
Sun, 29 Mar 2009 00:10:31 +0000 (00:10 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 29 Mar 2009 00:10:31 +0000 (00:10 +0000)
SVN-Revision: 15059

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 
                }