tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iwn 5100AGN for netbsd-5



On 12/14/2010 3:36 PM, FUKAUMI Naoki wrote:
> On 12/15/10 05:02, Chuck Zmudzinski wrote:
>> On 12/12/2010 6:24 AM, Manuel Bouyer wrote:
>>> I think it's a difference in network stack between -current and netbsd-5,
>>> most probably a difference in the way a network driver interfaces with
>>> sys/net/if_ethersubr.c
>>> You may be missing a call to a function which is not present anymore in
>>> -current. You should probably compare what your driver is doing in
>>> initialisation and ioctl functions with another, working ethernet driver.
>>>
>> It looks like the netbsd-5 arp routines cannot get information from the 
> (snip)
>
> did you compare ioctl() which already mentioned by Manuel Bouyer?
>
> ...and you should read "#ifdef INET" as "#if 0" unless you added
> necessary "#include".
>
> --
> FUKAUMI Naoki
Thanks for the tips!

I got it working by removing the the case SIOCSIFADDR: statement
from iwn_ioctl in if_iwn.c revision 1.33 - then it worked with netbsd-5.

So, to summarize, to get the newer iwn devices working in netbsd-5, I used
revision 1.6 of if_iwnvar.h and if_iwnreg.h, and I patched revision 1.33
of if_iwn.c
as follows (I also edited pcidevs with the new devices and included the
patch to
pcireg.h that went with the first commit that got the new iwn devices
working in
-current and added the firmware for the 5100 to the filesystem):

--- if_iwn.c 2009-09-10 20:28:20.000000000 -0500
+++ if_iwn.c 2010-12-17 11:31:52.000000000 -0600
@@ -1,6 +1,10 @@
/* $NetBSD: if_iwn.c,v 1.33 2009/09/11 01:28:20 christos Exp $ */
/* $OpenBSD: if_iwn.c,v 1.49 2009/03/29 21:53:52 sthen Exp $ */
-
+/*-
+ * This file is modified for use with netbsd-5 release kernels
+ * The changes in revision 1.25 of iwn.c have been removed
+ * The iwn_ioctl routine was modified to remove case SIOCSIFADDR:
+ */
/*-
* Copyright (c) 2007, 2008
* Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -3194,11 +3198,7 @@
s = splnet();

switch (cmd) {
- case SIOCSIFADDR:
- /* FALLTHROUGH */
case SIOCSIFFLAGS:
- if ((error = ifioctl_common(ifp, cmd, data)) != 0)
- break;
if (ifp->if_flags & IFF_UP) {
/*
* resync the radio state just in case we missed





Home | Main Index | Thread Index | Old Index