kernel: fq_codel: dont reinit flow state
[openwrt/svn-archive/archive.git] / package / hostapd / files / wpa_supplicant.sh
index 6f89c646aab12212f78f7267ba572f025f93845f..928243e42509156f6400d88985fe9bd7936a4bdd 100644 (file)
@@ -4,6 +4,7 @@ wpa_supplicant_setup_vif() {
        local key="$key"
        local options="$3"
        local freq=""
+       local ht="$5"
        local ap_scan=""
        local scan_ssid="1"
        [ -n "$4" ] && freq="frequency=$4"
@@ -126,6 +127,8 @@ wpa_supplicant_setup_vif() {
        local fixed_freq bssid1 beacon_interval brates mrate
        config_get ifname "$vif" ifname
        config_get bridge "$vif" bridge
+       config_get ssid "$vif" ssid
+       config_get bssid "$vif" bssid
        bssid1=${bssid:+"bssid=$bssid"}
        beacon_interval=${beacon_int:+"beacon_interval=$beacon_int"}
 
@@ -149,6 +152,9 @@ wpa_supplicant_setup_vif() {
                mrate=${mcast_rate:+"mcast_rate=$mcval"}
        }
 
+       local ht_str
+       [ -n "$ht" ] && ht_str="htmode=$ht"
+
        rm -rf /var/run/wpa_supplicant-$ifname
        cat > /var/run/wpa_supplicant-$ifname.conf <<EOF
 ctrl_interface=/var/run/wpa_supplicant-$ifname
@@ -165,6 +171,7 @@ network={
        $beacon_interval
        $brates
        $mrate
+       $ht_str
        $ieee80211w
        $passphrase
        $pairwise
@@ -184,6 +191,9 @@ network={
        $wep_tx_keyidx
 }
 EOF
-       [ -z "$proto" -a "$key_mgmt" != "NONE" ] || \
+       if [ -n "$proto" -o "$key_mgmt" == "NONE" ]; then
                wpa_supplicant ${bridge:+ -b $bridge} -B -P "/var/run/wifi-${ifname}.pid" -D ${driver:-wext} -i "$ifname" -c /var/run/wpa_supplicant-$ifname.conf $options
+       else
+               return 0
+       fi
 }