Subject: Re: Kernel fails to build with NDIS support
To: None <current-users@NetBSD.org>
From: Chris Tribo <ctribo@dtcc.edu>
List: current-users
Date: 10/09/2006 11:15:15
Apparently NDIS doesn't want to compile without wi in the kernel. So  
now that I have it compiled, I booted to:

(bunch of warnings about void regions and ignoring 64-bit BARs)

in IoGetDriverObjectExtension
found
ndis0: NDIS API version: 5.1
sc->ndis_chars->nmc_version_major=5
    sc->ndis_chars->nmc_version_minot = 1
pci2: NDIS ERROR: c005000e (unknown error)
pci2: NDIS NUMERRORS: 1
pci2 argptr: 0xc00000001
pci2: NDIS ERROR: c0050014 (unknown error)
pci2: NDIS NUMERRORS: 1
pci2: argptr: 0x1
status = c00000001ndis0: init handler failed
extent 'iomem' (0x0 - 0xffffffff), flags = 0x3
  0x0 - 0x9f3ff
  0xa0000 - 0xbffff
  0xc0000 - 0cx7fff
  0x100000 - 0x6f35efff
...
extent_free: start 0x1, end 0x10
panic: extent_free: region not found
stopped in pid 0.1(swapper) at netbsd:cpu_Debugger+0x4: leave
db> (keyboard non-functional)



On Oct 4, 2006, at 3:59 PM, Chris Tribo wrote:

> I copied the includes from if_wi_pci.c and if_ral_pci.c for the  
> 802.11 layer into the ndis C files:
>
> #include <net80211/ieee80211_netbsd.h>
> #include <net80211/ieee80211_var.h>
> #include <net80211/ieee80211_rssadapt.h>
> #include <net80211/ieee80211_radiotap.h>
>
>
> And now I get:
>
> In file included from /usr/src/sys/dev/if_ndis/if_ndis_pci.c:68:
> /usr/src/sys/net80211/ieee80211_rssadapt.h:75: error:  
> 'IEEE80211_RATE_SIZE' undeclared here (not in a function)
> cc1: warnings being treated as errors
> /usr/src/sys/net80211/ieee80211_rssadapt.h:100: warning: 'struct  
> ieee80211_frame' declared inside parameter list
> /usr/src/sys/net80211/ieee80211_rssadapt.h:100: warning: its scope  
> is only this definition or declaration, which is probably not what  
> you want
> /usr/src/sys/net80211/ieee80211_rssadapt.h:100: warning: 'struct  
> ieee80211_rateset' declared inside parameter list
> *** Error code 1
>
>
> On Oct 4, 2006, at 3:38 PM, Chris Tribo wrote:
>
>> The man page only mentions needing COMPAT_NDIS and ndis* at pci?,  
>> do I need to uncomment a wirless card to pull in the 802.11 layer?  
>> I had to define LKM to kill the lkmentry warnings, but this isn't  
>> an LKM is it?
>>
>> making sure the kern library is up to date...
>> `libkern.a' is up to date.
>> #      link  SoulCollector/netbsd
>> ld -Map netbsd.map --cref -T /usr/src/sys/arch/i386/conf/ 
>> kern.ldscript -Ttext c0100000 -e start -X -o netbsd ${SYSTEM_OBJ} $ 
>> {EXTRA_OBJ} vers.o
>> if_ndis.o: In function `ndis_media_status':
>> if_ndis.c:(.text+0x5da): undefined reference to  
>> `ieee80211_rate2media'
>> if_ndis.c:(.text+0x648): undefined reference to  
>> `ieee80211_rate2media'
>> if_ndis.o: In function `ndis_setstate_80211':
>> if_ndis.c:(.text+0xb7c): undefined reference to `ieee80211_chan2ieee'
>> if_ndis.c:(.text+0xb93): undefined reference to `ieee80211_mhz2ieee'
>> if_ndis.o: In function `ndis_ticktask':
>> if_ndis.c:(.text+0x14be): undefined reference to `ieee80211_mhz2ieee'
>> if_ndis.o: In function `ndis_detach':
>> if_ndis.c:(.text+0x183a): undefined reference to `ieee80211_ifdetach'
>> if_ndis.o: In function `ndis_attach':
>> if_ndis.c:(.text+0x20be): undefined reference to `ieee80211_ieee2mhz'
>> if_ndis.c:(.text+0x21e0): undefined reference to `ieee80211_ifattach'
>> if_ndis.c:(.text+0x21ed): undefined reference to  
>> `ieee80211_media_change'
>> if_ndis.c:(.text+0x21f3): undefined reference to  
>> `ieee80211_media_init'
>> if_ndis.o: In function `ndis_ioctl':
>> if_ndis.c:(.text+0x2995): undefined reference to `ieee80211_ioctl'
>> if_ndis.c:(.text+0x2adf): undefined reference to `ieee80211_ioctl'
>> if_ndis.c:(.text+0x2e2b): undefined reference to `ieee80211_mhz2ieee'
>> kern_ndis.o: In function `ndis_lkmentry':
>> kern_ndis.c:(.text+0x166a): undefined reference to `lkmdispatch'
>> kern_ndis.c:(.text+0x1696): undefined reference to `lkmdispatch'
>> kern_ndis.c:(.text+0x1635): undefined reference to `lkmdispatch'
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/src/sys/arch/i386/compile/obj/SoulCollector
>>
>>
>>
>>
>>
>
>
> !DSPAM:452412b4145392132233558!
>
>
>