1 append DRIVERS
"broadcom"
8 cfg
="$(find_config "$1")"
9 [ -z "$cfg" ] && return 0
10 config_get iftype
"$cfg" type
11 [ "$iftype" = bridge
] && config_get
"$iftype" bridge
18 config_get vifs
"$device" vifs
20 config_get mode
"$vif" mode
32 ap_if
="${ap_if:+$ap_if }$vif"
34 *) echo "$device($vif): Invalid mode";;
39 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
40 config_set
"$vif" ifname
"wl0${_c:+.$_c}"
45 for vif
in 0 1 2 3; do
46 append ifdown
"vif $vif" "$N"
47 append ifdown
"enabled 0" "$N"
55 case "$adhoc:$sta:$ap" in
81 # make sure the interfaces are down and removed from all bridges
82 for dev
in wl0 wl0.1 wl0.2 wl0.3
; do
83 ifconfig
"$dev" down
2>/dev
/null
>/dev
/null
&& {
92 config_get channel
"$device" channel
93 config_get country
"$device" country
94 config_get maxassoc
"$device" maxassoc
100 for vif
in ${adhoc_if:-$sta_if $ap_if}; do
101 append vif_pre_up
"vif $_c" "$N"
102 append vif_post_up
"vif $_c" "$N"
104 [ "$vif" = "$sta_if" ] ||
{
105 config_get_bool hidden
"$vif" hidden
1
106 append vif_pre_up
"closed $hidden" "$N"
107 config_get_bool isolate
"$vif" isolate
108 append vif_pre_up
"ap_isolate $hidden" "$N"
116 config_get enc
"$vif" encryption
123 config_get key
"$vif" key
125 wpa2
*|WPA2
*|PSK2
*|psk2
*) auth
=128; wsec
=4;;
126 *) auth
=4; crypto
=2;;
128 eval "${vif}_key=\"\$key\""
129 nasopts
="-k \"\$${vif}_key\""
134 config_get key
"$vif" key
135 config_get server
"$vif" server
136 config_get port
"$vif" port
138 wpa2
*|WPA2
*) auth
=64; wsec
=4;;
139 *) auth
=2; crypto
=2;;
141 eval "${vif}_key=\"\$key\""
142 nasopts
="-r \"\$${vif}_key\" -h $server -p $port"
145 append vif_post_up
"wsec $wsec" "$N"
146 append vif_post_up
"wpa_auth $auth" "$N"
147 append vif_post_up
"wsec_restrict $wsec_r" "$N"
148 append vif_post_up
"eap_restrict $eap_r" "$N"
150 config_get ssid
"$vif" ssid
151 append vif_post_up
"vlan_mode 0"
152 append vif_post_up
"ssid $ssid" "$N"
153 append vif_post_up
"enabled 1" "$N"
155 config_get ifname
"$vif" ifname
156 append if_up
"ifconfig $ifname up" ";$N"
157 [ -z "$nasopts" ] ||
{
158 bridge
="$(bridge_interface "$ifname")"
159 eval "${vif}_ssid=\"\$ssid\""
161 [ "$vif" = "$sta_if" ] && mode
="-S"
162 [ -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 &"
166 killall
-KILL nas
>&- 2>&-
180 channel ${channel:-0}
181 country ${country:-IL0}
182 maxassoc ${maxassoc:-128}
194 [ -f /proc
/net
/wl0
] ||
return
195 config_get
type wl0
type
196 [ "$type" = broadcom
] && return
198 config wifi-device wl0
207 option encryption none
This page took 0.058966 seconds and 5 git commands to generate.