1 append DRIVERS
"broadcom"
8 config_get cfg
"$vif" network
14 config_get ifname
"$vif" ifnamea
16 cfg
="$(find_config "$ifname")"
18 [ -z "$cfg" ] && return 0
24 [ -z "$cfg" ] && return 0
29 config_get iftype
"$cfg" type
30 [ "$iftype" = bridge
] && config_get
"$iftype" ifname
36 config_get vifs
"$device" vifs
38 config_get mode
"$vif" mode
50 ap_if
="${ap_if:+$ap_if }$vif"
52 *) echo "$device($vif): Invalid mode";;
57 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
58 config_set
"$vif" ifname
"wl0${_c:+.$_c}"
63 for vif
in 0 1 2 3; do
64 append ifdown
"vif $vif" "$N"
65 append ifdown
"enabled 0" "$N"
73 case "$adhoc:$sta:$ap" in
99 # make sure the interfaces are down and removed from all bridges
100 for dev
in wl0 wl0.1 wl0.2 wl0.3
; do
101 ifconfig
"$dev" down
2>/dev
/null
>/dev
/null
&& {
110 config_get channel
"$device" channel
111 config_get country
"$device" country
112 config_get maxassoc
"$device" maxassoc
118 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
119 append vif_pre_up
"vif $_c" "$N"
120 append vif_post_up
"vif $_c" "$N"
122 [ "$vif" = "$sta_if" ] ||
{
123 config_get_bool hidden
"$vif" hidden
1
124 append vif_pre_up
"closed $hidden" "$N"
125 config_get_bool isolate
"$vif" isolate
126 append vif_pre_up
"ap_isolate $hidden" "$N"
134 config_get enc
"$vif" encryption
141 config_get key
"$vif" key
143 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
144 *) auth
=4; crypto
=2;;
146 eval "${vif}_key=\"\$key\""
147 nasopts
="-k \"\$${vif}_key\""
152 config_get key
"$vif" key
153 config_get server
"$vif" server
154 config_get port
"$vif" port
156 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
157 *) auth
=2; crypto
=2;;
159 eval "${vif}_key=\"\$key\""
160 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
163 append vif_post_up
"wsec $wsec" "$N"
164 append vif_post_up
"wpa_auth $auth" "$N"
165 append vif_post_up
"wsec_restrict $wsec_r" "$N"
166 append vif_post_up
"eap_restrict $eap_r" "$N"
168 config_get ssid
"$vif" ssid
169 append vif_post_up
"vlan_mode 0"
170 append vif_post_up
"ssid $ssid" "$N"
171 append vif_post_up
"enabled 1" "$N"
173 config_get ifname
"$vif" ifname
174 append if_up
"ifconfig $ifname up" ";$N"
175 net_cfg
="$(find_vif_config "$vif")"
176 [ -z "$net_cfg" ] ||
{
177 bridge
="$(bridge_interface "$net_cfg")"
178 append if_up
"start_net '$ifname' '$net_cfg'" ";$N"
180 [ -z "$nasopts" ] ||
{
181 eval "${vif}_ssid=\"\$ssid\""
183 [ "$vif" = "$sta_if" ] && mode
="-S"
184 [ -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 $crypto -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
188 killall
-KILL nas
>&- 2>&-
202 channel ${channel:-0}
203 country ${country:-IL0}
204 maxassoc ${maxassoc:-128}
216 [ -f /proc
/net
/wl0
] ||
return
217 config_get
type wl0
type
218 [ "$type" = broadcom
] && return
220 config wifi-device wl0
229 option encryption none
This page took 0.050453 seconds and 5 git commands to generate.