more wpa+wds patches
[openwrt.git] / package / broadcom-wl / files / lib / wifi / broadcom.sh
index 4f11a51..abfbfb9 100644 (file)
@@ -191,7 +191,7 @@ enable_broadcom() {
                append vif_post_up "enabled 1" "$N"
                
                config_get ifname "$vif" ifname
                append vif_post_up "enabled 1" "$N"
                
                config_get ifname "$vif" ifname
-               append if_up "ifconfig $ifname up" ";$N"
+               #append if_up "ifconfig $ifname up" ";$N"
                local net_cfg bridge
                net_cfg="$(find_net_config "$vif")"
                [ -z "$net_cfg" ] || {
                local net_cfg bridge
                net_cfg="$(find_net_config "$vif")"
                [ -z "$net_cfg" ] || {
@@ -200,9 +200,18 @@ enable_broadcom() {
                }
                [ -z "$nasopts" ] || {
                        eval "${vif}_ssid=\"\$ssid\""
                }
                [ -z "$nasopts" ] || {
                        eval "${vif}_ssid=\"\$ssid\""
-                       mode="-A"
-                       [ "$vif" = "$sta_if" ] && mode="-S"
-                       [ -z "$nas" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
+                       nas_mode="-A"
+                       use_nas=1
+                       [ "$mode" = "sta" ] && {
+                               nas_mode="-S"
+                               [ -z "$bridge" ] || {
+                                       append vif_pre_up "supplicant 1" "$N"
+                                       append vif_pre_up "passphrase $key" "$N"
+                                       
+                                       use_nas=0
+                               }
+                       }
+                       [ -z "$nas" -o "$use_nas" = "0" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $nas_mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
                }
                _c=$(($_c + 1))
        done
                }
                _c=$(($_c + 1))
        done
This page took 0.022577 seconds and 4 git commands to generate.