mac80211: fix ad-hoc network setup with netifd (#14564)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 3 Dec 2013 16:22:56 +0000 (16:22 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 3 Dec 2013 16:22:56 +0000 (16:22 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 38993

package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

index eefe1fed5dff70e4f0e93cc786a27f5c6aff1e1b..16bcdb9ef4853258372d6e699c1f54e7d659a828 100644 (file)
@@ -271,8 +271,7 @@ mac80211_setup_adhoc() {
        mcval=
        [ -n "$mcast_rate" ] && hostapd_add_rate mcval "$mcast_rate"
 
-       iw dev "$ifname" ibss join "$ssid" $freq $htmode \
-               ${fixed:+fixed-freq} $bssid \
+       iw dev "$ifname" ibss join "$ssid" $freq $htmode fixed-freq $bssid \
                ${beacon_int:+beacon-interval $beacon_int} \
                ${brstr:+basic-rates $brstr} \
                ${mcval:+mcast-rate $mcval} \
@@ -309,7 +308,7 @@ mac80211_setup_vif() {
                ;;
                adhoc)
                        wireless_vif_parse_encryption
-                       if [ "$wpa" -gt 0 ]; then
+                       if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then
                                mac80211_setup_supplicant || failed=1
                        else
                                mac80211_setup_adhoc