mac80211: always use wpa_supplicant for client connections (patch by Stijn Tintel)
[openwrt/openwrt.git] / package / hostapd / files / wpa_supplicant.sh
index ccf31baa903c01dc844b358281485bb8e80a8690..97a00829dab82570c16eb635a25e4d1f657a2ee3 100644 (file)
@@ -6,7 +6,10 @@ 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
        }