Netgear MA401, WPA2, and Debian.
This post has been saved as a draft for a long time, and unfortunately I can’t remember the exact specifics. I’m publishing just in case it (albeit in a very rough, unfinished form) may help someone!
For the past couple of days I’ve been trying to get the Netgear MA401 wireless card working with my WPA2 secured wireless network.
In order to do this, yo
Stop the PCMCIA card from using IRQ3 by putting the following line in /etc/pcmcia/config.opts
exclude irq 3
Install hostap-utils, which should automatically blacklist the orinoco drivers:
apt-get install hostap-utils
If after a lsmod | grep orinoco they’re still in use, blacklist the orinico modules within /etc/modprobe.d/blacklist:
blacklist orinoco
blacklist orinoco_cs
The hostap modules should be automatically loaded. If not, run:
modprobe hostap_cs
If you do a iwconfig, you should see a wlan1 and a wifi0. The fact that udev has renamed it from wlan0 to wlan1 will cause problems with the prism2_srec program we’ll use to flash the card later, so change the device name by editing /etc/udev/rules.d/70-persistent-net.rules
# PCMCIA device 0×7300:0x000b (hostap_cs)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:09:5b:28:0b:48″, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan1″
# PCMCIA device 0×7300:0x000b (hostap_cs)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:09:5b:28:0b:48″, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″
You can implement this change immediately by running udevadm trigger, or if you have problems try a restart.
You should now be able to probe the card by using the hostap_diag utility:
vaio:~# hostap_diag wlan0
Host AP driver diagnostics information for ‘wlan0′
NICID: id=0x800c v1.0.0 (PRISM II (2.5) PCMCIA (SST parallel flash))
PRIID: id=0×0015 v1.0.7
STAID: id=0x001f v1.3.6 (station firmware)
vaio:~#
So as you can see, I’m using v1.0.7 of the Primary Firmware, and v1.3.6 of the Station Firmware. I intend to update mine to v1.1.1 and v1.8.4 as various places online report that they work with WPA2 (though I’m sure earlier/later firmwares do too).
So next we need to flash the Prism firmware on the MA401 to enable support for WPA/WPA2. You can download the firmware here (**zip file**). [1]
Now, if you try and flash the card using prism2_srec as shown below (and as detailed at Jun Sun’s blog), you’ll no doubt get an error as shown:
Downloading to non-volatile memory (flash).
Note! This can take about 30 seconds. Do _not_ remove card during download.
Odd.. Download request for the kernel driver failed.
Are you sure you have compiled (and loaded the correct version of)
hostap.o module with PRISM2_DOWNLOAD_SUPPORT definition in
driver/module/hostap_config.h?
In addition, non-volatile download requires PRISM2_NON_VOLATILE_DOWNLOAD
to be defined.
ioctl[PRISM2_IOCTL_DOWNLOAD]: Operation not supported
You’ll also get the following message in dmesg:
wifi0: non-volatile downloading not enabled
Once you’ve extracted the firmware, you will need to recompile your kernel to allow support for the firmware flashing. First off, install the necessary packages:
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
Download the appropriate kernel source from www.kernel.org – for my laptop I used 2.6.26.
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2
Unpack the source and create a symlink:
tar xjf linux-2.6.18.1.tar.bz2
ln -s linux-2.6.18.1 linux
cd /usr/src/linux
Copy your current kernel config to the sources directory:
cp /boot/config-`uname -r` ./.config
Now, ensuring we’re within the /usr/src/linux folder, run:
make menuconfig
You’ll be presented with a ncurses GUI, select “Load an Alternate Configuration File”, and then specify .config (should already be specified).
Then within the ncurses GUI navigate to the following:
Device Drivers —>
Network device support —>
Wireless LAN (non-hamradio) —>
IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)
Support downloading firmware images with Host AP driver
Support for non-volatile firmware download
Host AP driver for Prism2.5 PCI adaptors
Ensure that the “Support for non-volatile firmware download” is marked with an asterisk (change it by using space bar). Once that’s selected, keep selecting ‘Exit’ to leave the GUI. You’ll be prompted to ask if you want to save the new kernel configuration, select Yes.
Now you can build the kernel using the following commands:
make-kpkg clean
fakeroot make-kpkg –initrd –append-to-version=-hostap kernel_image kernel_headers
This can take a few hours (it’s advisable to do the kernerl build on your most powerful machine; once the kernel has been recompiled you can transfer it to any other system and install it there).
Once the kernel has compiled, you should be able to see the .deb packages within /usr/src.
Install them using dpkg:
dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
Once they’re installed, reboot, and then check that the new kernel has loaded by running:
uname -r
This should display something like 2.6.26-2-486-hostap.
In Kernel:
Device Drivers —>
Network device support —>
Wireless LAN (non-hamradio) —>
IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)
Support downloading firmware images with Host AP driver
Support for non-volatile firmware download
Host AP driver for Prism2.5 PCI adaptors
[1] http://linux.junsun.net/intersil-prism/