# WLAN-NG to WIRELESS option file converter
#
MODE="Managed"
ESSID="any"
CHANNEL=""
KEY="off"
#
if [ -e /etc/pcmcia/wlan-ng.opts ]; then 
  . /etc/pcmcia/wlan-ng.opts
fi
if [ -e /etc/sq_wlancfg.conf ]; then
  . /etc/sq_wlancfg.conf
fi
#
if [ "$dot11PrivacyInvoked" = "true" ]; then
  case $dot11WEPDefaultKeyID in
  0) KEY="$dot11WEPDefaultKey0 [1]" ;;
  1) KEY="$dot11WEPDefaultKey1 [2]" ;;
  2) KEY="$dot11WEPDefaultKey2 [3]" ;;
  3) KEY="$dot11WEPDefaultKey3 [4]" ;;
  esac
  if [ "$KEY" = "" ]; then
    KEY="off"
  fi
else
  KEY="off"
fi
if is_true "$IS_ADHOC" ; then
  MODE="Ad-Hoc"
  #CHANNEL=$CHANNEL
  ESSID=$SSID
else
  MODE="Managed"
  ESSID=$DesiredSSID
  if [ "$KEY" != "off" ]; then
    if [ "$AuthType" = "sharedkey" ]; then
	KEY="$KEY restricted"
    else
	KEY="$KEY open"
    fi
  fi
fi
#
NWID=""
FREQ=""
SENS=""
RATE=""
RTS=""
FRAG=""
IWCONFIG=""
IWSPY=""
IWPRIV=""

