[Solved] Mint 11 64-bit + WNA3100

Questions about WIFI networks and devices
Forum rules
Before you post please read this

[Solved] Mint 11 64-bit + WNA3100

Postby daveelton on Sun Aug 14, 2011 1:58 pm

Hi all, I have seen many posts related to getting the WNA3100 to work in Mint/Ubuntu but everything seems to be bits and pieces, and in the end, I never actually did find anybody who got their 64-bit machine to work with this device - it seemed everybody having success, I presume, was on 32-bit Mint. There was only one additional step I had to take to get the 64-bit version to work, step 6 below, but I will try to describe everything it took to work in one shot in hopes that it helps somebody. If you don't want to do any hand editing of code files, simply copy the four edited files over the ndiswrapper source files extracted in step 3.

1. Get a copy of the source for ndiswrapper 1.56 - http://sourceforge.net/projects/ndiswrapper/files/
2. Get a copy of the wireless drivers for Broadcom bcm43xx based devices - I have attached a copy. Yes this is for Netgear WNA3100, but the Broadcom chipset is present.
3. Extract ndiswrapper, cd to driver, and make this addition to ntoskernel_io.c (or just download from attachment) - http://matthew-4gl.wikispaces.com/wna3100_ubuntu_linux ** NOTE ** The reason for this is because the driver listed on that page uses the symbol IoUnregisterPlugPlayNotification, which must be added to ntoskernel_io.c. I ended up using the driver attached and not the one listed on that page. It is possible that this step is not necessary with the attached driver, but it will not hurt. Any input would be appreciated.
4. At this point, the link listed in step 3 suggests to make/make install, but our kernels do not support some of the code in the ndiswrapper build. Apply these changes to loader.c, wrapndis.c, and usb.c (or just download from attachment): viewtopic.php?f=53&t=74793#p435023 ** NOTE ** The two patches here, for whatever reason, did not work for me. I had to hand edit the code using the suggested patches as a guideline.
5. Additionally, I had to make these changes to wrapndis.c to get things to compile - basically, just shuffling around the #include order - http://chakra-project.org/bbs/viewtopic ... 450#p28450
6. This is where I think those of us who are using 64-bit Mint have to deviate a bit. Following steps I had found on the net, after adding my driver to ndiswrapper, I would get a rather lengthy error after plugging in my network device relating to USBD_InterfaceIsDeviceHighSpeed. Full text of error here: http://ubuntuforums.org/showthread.php?t=1773140. Assuming your have high speed USB (I guess this is what this function is trying to determine?), make another additional change to usb.c - or download attached file:

Code: Select all
wstdcall BOOLEAN USBD_InterfaceIsDeviceHighSpeed(void *context)
{
   struct wrap_device *wd = context;

   USBTRACE("wd: %p", wd);
   if (wd->usb.udev->speed == USB_SPEED_HIGH)
      USBEXIT(return TRUE);
   else
      USBEXIT(return FALSE);
}


becomes

Code: Select all
wstdcall BOOLEAN USBD_InterfaceIsDeviceHighSpeed(void *context)
{
   /*struct wrap_device *wd = context;

   USBTRACE("wd: %p", wd);
   if (wd->usb.udev->speed == USB_SPEED_HIGH)
      USBEXIT(return TRUE);
   else
      USBEXIT(return FALSE);*/
   USBEXIT(return TRUE);
}


I imagine the problem is in casting context to type wrap_device, but my C skills are a bit rusty. Any insight here would be great - or better yet, a solution that will actually check to see if the interface is high speed and return true or false, but actually work :)

7. In the ndiswrapper directory, in a terminal, do "sudo make", then "sudo make install".
8. Unsure if this step is necessary, but I noticed the module builds to /lib/modules/misc/ndiswrapper.ko, but "ndiswrapper -v" reports the module is installed at /lib/modules/2.6.38-8-generic/kernel/ubuntu/ndiswrapper/ndiswrapper.ko. I renamed the latter to ndiswrapper.ko.old and copied the other into this location.
9. At this point I rebooted since I had just created a new module, again, unsure if this is necessary (I admit I'm a bit of a Linux noob). Go to where you extracted the Broadcom drivers, and run "ndiswrapper -i bcmn43xx64.inf". If you get permission errors run "sudo" first. Plug in your device, and hope for the best. After plugging in the device, the results of "ndiswrapper -l" should be:
Code: Select all
bcmn43xx64 : driver installed
   device (0846:9020) present


And your network icon in the tray by the clock should start to spin as it looks for networks.

I hope this helps somebody not have to spend many hours on this like I have. If anybody has any input please let me know and I will make the appropriate edits.
Attachments
ndiswrapper_codeedits.tar.gz
contains loader.c, usb.c, ntoskernel_io.c, and wrapndis.c
(37.36 KiB) Downloaded 281 times
broadcom_64bit_drivers.tar.gz
contains bcmn43xx64.inf and bcmn43xx64.sys
(454.29 KiB) Downloaded 406 times
daveelton
Level 1
Level 1
 
Posts: 2
Joined: Sun Aug 14, 2011 1:06 pm

Linux Mint is funded by ads and donations.
 

Return to Wireless

Who is online

Users browsing this forum: No registered users and 6 guests