config_get_bool antdiv "$device" diversity
config_get antrx "$device" rxantenna
config_get anttx "$device" txantenna
- config_get_bool softled "$device" softled 1
+ config_get_bool softled "$device" softled
config_get antenna "$device" antenna
devname="$(cat /proc/sys/dev/$device/dev_name)"
}
case "$enc" in
- WEP|wep)
+ wep*)
+ case "$enc" in
+ *shared*) iwpriv "$ifname" authmode 2;;
+ *) iwpriv "$ifname" authmode 1;;
+ esac
for idx in 1 2 3 4; do
config_get key "$vif" "key${idx}"
iwconfig "$ifname" enc "[$idx]" "${key:-off}"