This is what I did to get wifi running with a D-Link DWL-G122 USB Wireless Adapter and WPA2.
All commands were given as root.
Download the driver package from ralink to get the rt73.bin firmware:
Go to
http://www.ralink.com.tw/Home/Support/Linux.html and click on RT2501USB(RT73:RT2571W/RT2573/RT2671) to get 2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2
Check that the package contains the firmware, extract it and move it to the correct directory:
tar tjf 2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2 |grep rt73.bin
tar xjf 2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2 2009_0206_RT73_Linux_STA_Drv1.1.0.2/Module/rt73.bin
mkdir /lib/firmware
mv 2009_0206_RT73_Linux_STA_Drv1.1.0.2/Module/rt73.bin /lib/firmware/
Add lib/firmware to /opt/.filetool.lst.
Install wireless_tools.tcz.
Install wpa_supplicant.tce (I couldn't use the .tcz-version since it gave me a segmentation fault).
Create /etc/wpa_supplicant.conf with this contents:
# allow frontend (e.g., wpa_cli) to be used by all users in root group
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=root
#
# home network; allow all valid ciphers
network={
ssid="myssid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="mypsk"
}
Add etc/wpa_supplicant.conf to /opt.filetool.lst
Add the following to /opt/bootlocal.sh:
/usr/local/sbin/wpa_supplicant -Bdd -D wext -i wlan0 -c /etc/wpa_supplicant.conf
udhcpc -b -i wlan0