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
&& {
111 config_get channel
"$device" channel
112 config_get country
"$device" country
113 config_get maxassoc
"$device" maxassoc
119 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
120 append vif_pre_up
"vif $_c" "$N"
121 append vif_post_up
"vif $_c" "$N"
123 [ "$vif" = "$sta_if" ] ||
{
124 config_get_bool hidden
"$vif" hidden
1
125 append vif_pre_up
"closed $hidden" "$N"
126 config_get_bool isolate
"$vif" isolate
127 append vif_pre_up
"ap_isolate $hidden" "$N"
135 config_get enc
"$vif" encryption
142 config_get key
"$vif" key
144 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
145 *) auth
=4; crypto
=2;;
147 eval "${vif}_key=\"\$key\""
148 nasopts
="-k \"\$${vif}_key\""
153 config_get key
"$vif" key
154 config_get server
"$vif" server
155 config_get port
"$vif" port
157 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
158 *) auth
=2; crypto
=2;;
160 eval "${vif}_key=\"\$key\""
161 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
164 append vif_post_up
"wsec $wsec" "$N"
165 append vif_post_up
"wpa_auth $auth" "$N"
166 append vif_post_up
"wsec_restrict $wsec_r" "$N"
167 append vif_post_up
"eap_restrict $eap_r" "$N"
169 config_get ssid
"$vif" ssid
170 append vif_post_up
"vlan_mode 0"
171 append vif_post_up
"ssid $ssid" "$N"
172 append vif_post_up
"enabled 1" "$N"
174 config_get ifname
"$vif" ifname
175 append if_up
"ifconfig $ifname up" ";$N"
176 net_cfg
="$(find_vif_config "$vif")"
177 [ -z "$net_cfg" ] ||
{
178 bridge
="$(bridge_interface "$net_cfg")"
179 append if_up
"start_net '$ifname' '$net_cfg'" ";$N"
181 [ -z "$nasopts" ] ||
{
182 eval "${vif}_ssid=\"\$ssid\""
184 [ "$vif" = "$sta_if" ] && mode
="-S"
185 [ -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 &"
189 killall
-KILL nas
>&- 2>&-
203 channel ${channel:-0}
204 country ${country:-IL0}
205 maxassoc ${maxassoc:-128}
217 [ -f /proc
/net
/wl0
] ||
return
218 config_get
type wl0
type
219 [ "$type" = broadcom
] && return
221 config wifi-device wl0
230 option encryption none
This page took 0.04972 seconds and 5 git commands to generate.