Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2005 00:37:17 +0200
From:      Ville-Pertti Keinonen <will@exomi.com>
To:        freebsd-amd64@freebsd.org
Cc:        wpaul@windriver.com
Subject:   RFC: if_ndis on amd64
Message-ID:  <1105569437.670.45.camel@localhost>

next in thread | raw e-mail | index | archive | help
Now that 64-bit Windows WLAN drivers are actually available, I decided
to see if it would be relatively simple to get a 64-bit driver to work
on FreeBSD/amd64.

It turns out Microsoft doesn't even use the same calling conventions as
everybody else, so it ended up requiring some fairly intrusive changes,
such as making everything in the HAL, NDIS and ntoskrnl tables point to
assembly language wrappers, and making the symbols for the actual
functions visible for linking.  To get it to work, I used the very ugly
trick of #defining away the static keyword for code where those
functions were being defined...

Before I start cleaning things up I'd like some comments on what kind of
solution to this would be preferred and have a chance of actually being
committed (e.g. having an ndis_static that is empty on amd64).

A patch against a recent -current is available at
http://will.iki.fi/patches/ndis-amd64-20050112.diff

It seems reasonably functional; I'm writing this on my Ferrari 3200
running FreeBSD/amd64, and my main route to the outside world is
through:

ndis0: <Broadcom 802.11g Network Adapter> mem 0xd0014000-0xd0015fff irq
19 at device 9.0 on pci0
ndis0: NDIS API version: 5.1
ndis0: Ethernet address: 00:0b:6b:4a:7e:76

I found the 64-bit Windows driver I'm using through a link on
http://www.linuxant.com/driverloader/drivers.php

The .inf file needed some editing for ndiscvt to do anything useful with
it (asciification and getting rid of the NTamd64 strings).

Although ndis.ko builds on amd64, for some reason if_ndis.ko can't find
symbols that it defines, so currently "option NDISAPI" needs to be in
the kernel.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1105569437.670.45.camel>