As you can see, the Ethernet Controller is from Marvell. I figured that I'd try and use ndisgen with the drivers supplied on the CD. I mounted the CD and found out that there were no .inf or .sys files. It was most probably in the .cab or .exe files. I wasn't sure if there was a way to extract cab files in PC-BSD and I wasn't going to find out now. So I fired up Wine and ran the setup files. The files were extracted to ~usename/.wine/drive_c/Program Files/NETGEAR/WN311T.

I cd'd to the directory and ran ndisgen. It complained of a syntax error in line 995. I opened up the .inf file in vi and noticed that there wasn't a ^M (CRLF on DOS/Win systems) on the last line. I removed all ^M with a substitution command (:%s/[CTRL+V][CTRL+M]//g (actually press the ctrl+v and ctrl+m)). I ran ndisgen and this time it was able to parse the file. However, when it tried to build the driver, I got the following error:

I opened up windrv.h and found that the offending lines contained unescaped backslash characters. I fixed the errors and started up ndisgen again. That's when I realized that when it would regenerate the header files, my changes would be overwritten. So I copied windrv.h to windrv2.h and ran ndisgen again. Right before it tells you to press any key to build, I copied windrv2.h over windrv.h and continued the build process. This time, it worked and it created a .ko file.

At this point, I noticed that there were .sys files. I wasn't sure which one to use, so I compiled modules for both. I kldloaded netmw145_sys.ko first, and the device showed up under Network Control. Unfortunately, I wasn't able to see any networks (I was able to with the D-Link, but unable to connect to the WPA protected network even after using wpa_supplicant). I kldunloaded the module and tried netmw143_sys.ko. This time I wasn't able to see ANY device. Fine. So I kldloaded BOTH of them. This time, I was able to see the device, but still unable to see any networks.

So that's where I stand right now. Any help in resolving this matter will be appreciated. Should I try to use the Marvell driver for this? Any other things I can try?

Update:

I checked out this page and it says that the driver is supposed to work (but makes no mention of the two sys files - I tried out the latest drivers on Netgear's site that the page links to. Same problem, although this time, both sys files loaded on their own will cause the card to be shown in the list of devices). I have another one of these cards running fine on a WinXP system. I will swap the card to see if it's a hardware problem. Oh yeah, and the light shows up on the card and it flashes while it tries to search for Wireless networks. But it doesn't find any.

Update:

I swapped out the cards with the XP machine. The new card I bought works fine, so I know it's not a hardware problem (the antenna also works fine). I'm going to keep researching this issue, but if anyone knows of anything else I can try, please do help.

Update:

I'm trying to use wpa_supplicant. I've set up /etc/wpa_supplicant.conf and I am running

Code:

wpa_supplicant -i ndis0 -c /etc/wpa_supplicant.conf

But I get:

Code:

ioctl[SIOCG80211, op 24, len 24576]: No space left on device

over and over again.

FIXED!!!

Ok, so I fixed it! (I hope it stays that way!) I really didn't do anything different. All I did was unload and then reload the modules after I ran wpa_supplicant.

Code:

network={
ssid="myssid"
psk="mypsk"
}

Then I kldloaded both the modules. Right after I did that, the blue network ball thing at the bottom-right showed a notification saying that the card is now associated. I am able to access the internet without any problems. All I have to do now is automate it. I have to edit my loader file to load the drivers and then add the following line to /etc/rc.conf:

Code:

wpa_supplicant_enable="YES"

Update

Ok, so another thing. I reinstalled by system and was unable to get it to work using my own instructions. *sigh*. But I found out the problem. Make sure you have this in your rc.conf:

Code:

if_ndis0="WPA DHCP"
wpa_supplicant_enable="YES"

This should be enough to help you start up wpa_supplicant on startup. If not, you might have to do this: