Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Nov 2004 12:14:39 +0100
From:      bart <bderksvdven@pieterbas.nl>
To:        freebsd-current@freebsd.org
Subject:   compiling ndis into kernel
Message-ID:  <418F551F.4070507@pieterbas.nl>

next in thread | raw e-mail | index | archive | help
Hi,

After successfully using the ndis modules with my Belkin f5d7000 PCI 
wireless card, I decided to
build support for it into the kernel. I have ipfilter rules referring to 
my ndis0 interface so it's better to have the interface available at 
boot time :)

Building the kernel, I ran into a compile error that I worked around by 
commenting out some code.  Maybe someone can supply me with a more 
'appropiate' fix ;)

in the kernel config:
options NDISAPI
device ndis

cd /sys/i386/compile/GATEKEEPER
make

linking kernel
if_ndis.o(.text+0x522): In function `ndis_attach':
: undefined reference to `ndis_alloc_amem'
if_ndis.o(.text+0x103f): In function `ndis_detach':
: undefined reference to `ndis_free_amem'
*** Error code 1

I commented out this piece in /sys/dev/if_ndis/if_ndis.c starting line 393

/*      if (sc->ndis_iftype == PCMCIABus) {
                error = ndis_alloc_amem(sc);
                if (error) {
                        device_printf(dev, "failed to allocate "
                            "attribute memory\n");
                        goto fail;
                }
        }
*/
and line 756:
/*      if (sc->ndis_iftype == PCMCIABus)
                ndis_free_amem(sc);
*/

I probably can go without this because I don't have a PCMCIA card :) 
Anyway, ndis0 is now built in, and works like a charm!

Grtz,

Bart






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