Subject: kern/31037: aironet 350 an(4) pcmcia card with a recent firmware are not working
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <eau@phear.org>
List: netbsd-bugs
Date: 08/22/2005 07:38:00
>Number:         31037
>Category:       kern
>Synopsis:       aironet 350 an(4) pcmcia card with a recent firmware are not working
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 22 07:38:00 +0000 2005
>Originator:     Eric AUGE
>Release:        3.99.6
>Organization:
none
>Environment:
NetBSD mubutu.no.phear.org 3.99.6 NetBSD 3.99.6 (MUBUTU) #3: Mon Aug 22 00:26:03 CEST 2005  root@mubutu.no.phear.org:/usr/src/sys/arch/i386/compile/MUBUTU i386

>Description:
I've updated my aironet firmware and it cannot be attached anymore:

Aug 17 18:01:50 mubutu /netbsd: an0 at pcmcia0 function 0: <Cisco Systems, 350 Series Wireless LAN Adapter>
Aug 17 18:01:52 mubutu /netbsd: an0: record buffer is too small, rid=ff00, size=198, len=258
Aug 17 18:01:52 mubutu /netbsd: an0: read caps failed
Aug 17 18:01:52 mubutu /netbsd: an0: failed to attach controller
Aug 17 18:22:26 mubutu /netbsd: an0 detached

I've made a quick (dirty?) patch to anreg.h so the struct an_softc member sc_caps is as big as requested in an_attach().
>How-To-Repeat:
Update the firmware for your aironet pcmcia card.
>Fix:
--- anreg.h     2005-08-22 00:34:55.000000000 +0200
+++ anreg.h.patched     2005-08-22 00:33:11.000000000 +0200
@@ -408,7 +408,8 @@
        u_int16_t               an_req_hw_support;      /* 0x80 */
        /* extended capabilities */
        u_int16_t               an_ext_softcaps;        /* 0x82 */
-       u_int16_t               an_spare[34];
+       /* u_int16_t            an_spare[34]; */
+       u_int16_t               an_spare[94];
 } __attribute__((__packed__));
 
 #define        AN_REGDOMAIN_USA        0