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
37 config_get vifs
"$device" vifs
39 config_get mode
"$vif" mode
51 ap_if
="${ap_if:+$ap_if }$vif"
54 config_get addr
"$vif" bssid
55 [ -z "$addr" ] || append wds
"$addr"
57 *) echo "$device($vif): Invalid mode";;
60 config_set
"$device" wds
"$wds"
63 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
64 config_set
"$vif" ifname
"wl0${_c:+.$_c}"
69 for vif
in 0 1 2 3; do
70 append ifdown
"vif $vif" "$N"
71 append ifdown
"enabled 0" "$N"
79 case "$adhoc:$sta:$ap" in
105 # make sure the interfaces are down and removed from all bridges
106 for dev
in wl0 wl0.1 wl0.2 wl0.3
; do
107 ifconfig
"$dev" down
2>/dev
/null
>/dev
/null
&& {
117 config_get channel
"$device" channel
118 config_get country
"$device" country
119 config_get maxassoc
"$device" maxassoc
120 config_get wds
"$device" wds
126 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
127 append vif_pre_up
"vif $_c" "$N"
128 append vif_post_up
"vif $_c" "$N"
130 [ "$vif" = "$sta_if" ] ||
{
131 config_get_bool hidden
"$vif" hidden
1
132 append vif_pre_up
"closed $hidden" "$N"
133 config_get_bool isolate
"$vif" isolate
134 append vif_pre_up
"ap_isolate $hidden" "$N"
142 config_get enc
"$vif" encryption
149 config_get key
"$vif" key
151 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
152 *) auth
=4; crypto
=2;;
154 eval "${vif}_key=\"\$key\""
155 nasopts
="-k \"\$${vif}_key\""
160 config_get key
"$vif" key
161 config_get server
"$vif" server
162 config_get port
"$vif" port
164 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
165 *) auth
=2; crypto
=2;;
167 eval "${vif}_key=\"\$key\""
168 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
171 append vif_post_up
"wsec $wsec" "$N"
172 append vif_post_up
"wpa_auth $auth" "$N"
173 append vif_post_up
"wsec_restrict $wsec_r" "$N"
174 append vif_post_up
"eap_restrict $eap_r" "$N"
176 config_get ssid
"$vif" ssid
177 append vif_post_up
"vlan_mode 0"
178 append vif_post_up
"ssid $ssid" "$N"
179 append vif_post_up
"enabled 1" "$N"
181 config_get ifname
"$vif" ifname
182 append if_up
"ifconfig $ifname up" ";$N"
183 net_cfg
="$(find_vif_config "$vif")"
184 [ -z "$net_cfg" ] ||
{
185 bridge
="$(bridge_interface "$net_cfg")"
186 append if_up
"start_net '$ifname' '$net_cfg'" ";$N"
188 [ -z "$nasopts" ] ||
{
189 eval "${vif}_ssid=\"\$ssid\""
191 [ "$vif" = "$sta_if" ] && mode
="-S"
192 [ -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 &"
196 killall
-KILL nas
>&- 2>&-
210 channel ${channel:-0}
211 country ${country:-IL0}
212 maxassoc ${maxassoc:-128}
224 [ -f /proc
/net
/wl0
] ||
return
225 config_get
type wl0
type
226 [ "$type" = broadcom
] && return
228 config wifi-device wl0
237 option encryption none
This page took 0.059261 seconds and 5 git commands to generate.