[uml] add 2.6.34 support
[openwrt.git] / package / hostapd / files / wpa_supplicant.sh
index ccf31ba..a9f8ca1 100644 (file)
@@ -6,11 +6,22 @@ wpa_supplicant_setup_vif() {
        # wpa_supplicant should use wext for mac80211 cards
        [ "$driver" = "mac80211" ] && driver='wext'
 
-       # make sure we have the psk
+       # make sure we have the encryption type and the psk
+       [ -n "$enc" ] || {
+               config_get enc "$vif" encryption
+       }
        [ -n "$key" ] || {
                config_get key "$vif" key
        }
 
+       local net_cfg bridge
+       config_get bridge "$vif" bridge
+       [ -z "$bridge" ] && {
+               net_cfg="$(find_net_config "$vif")"
+               [ -z "$net_cfg" ] || bridge="$(bridge_interface "$net_cfg")"
+               config_set "$vif" bridge "$bridge"
+       }
+
        case "$enc" in
                *none*)
                        key_mgmt='NONE'
This page took 0.026223 seconds and 4 git commands to generate.