config_get enc "$vif" encryption
case "$enc" in
WEP|wep)
- wsec_r=0
+ wsec_r=1
wsec=1
defkey=1
config_get key "$vif" key
macfilter 0
maclist none
wds ${wds:-none}
-channel ${channel:-0}
+${channel:-channel $channel}
country ${country:-IL0}
maxassoc ${maxassoc:-128}
slottime ${slottime:--1}