From asaddi@cisco.com  Sun Jan  7 15:35:46 2001
Return-Path: <asaddi@cisco.com>
Received: from sj-msg-core-1.cisco.com (sj-msg-core-1.cisco.com [171.71.163.11])
	by hub.freebsd.org (Postfix) with ESMTP id 1951A37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Jan 2001 15:35:45 -0800 (PST)
Received: from alephnull.cisco.com (alephnull.cisco.com [171.69.92.51])
	by sj-msg-core-1.cisco.com (8.9.3/8.9.1) with ESMTP id PAA13820
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 7 Jan 2001 15:35:27 -0800 (PST)
Received: (from asaddi@localhost)
	by alephnull.cisco.com (8.11.1/8.11.1) id f07NYqQ88827;
	Sun, 7 Jan 2001 15:34:52 -0800 (PST)
	(envelope-from asaddi)
Message-Id: <200101072334.f07NYqQ88827@alephnull.cisco.com>
Date: Sun, 7 Jan 2001 15:34:52 -0800 (PST)
From: asaddi@philosophysw.com
Sender: asaddi@cisco.com
Reply-To: asaddi@philosophysw.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Aironet driver breaks after firmware upgrade
X-Send-Pr-Version: 3.2

>Number:         24137
>Category:       kern
>Synopsis:       Aironet driver breaks after firmware upgrade
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 07 15:40:02 PST 2001
>Closed-Date:    Fri Jul 20 16:26:41 PDT 2001
>Last-Modified:  Fri Jul 20 16:27:36 PDT 2001
>Originator:     Allan Saddi
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Philosophy SoftWorks
>Environment:

FreeBSD tranquility.philosophysw.com 4.2-STABLE FreeBSD 4.2-STABLE #42: Sun Jan  7 15:08:24 PST 2001     root@tranquility.philosophysw.com:/usr/src/sys/compile/TRANQUILITY  i386

>Description:

After upgrading the firmware of my Aironet cards to 4.13, I found
that the driver no longer worked. The console began to fill up with
these messages:

Jan  7 15:03:09 tranquility /kernel: an0: record length mismatch -- expected 134
, got 136

It seems that the new firmware returns an an_ltv_status structure which
is 2 bytes larger than expected. (What those 2 bytes are, I have no
idea!) Extending the structure by 2 bytes seems to quell the messages,
as well as make the driver work again.

I was not able to test these changes against cards with older firmware.

>How-To-Repeat:

Upgrade firmware to 4.13.

>Fix:

--- ./sys/dev/an/if_aironet_ieee.h.orig	Wed Dec 20 13:25:31 2000
+++ ./sys/dev/an/if_aironet_ieee.h	Sun Jan  7 15:07:32 2001
@@ -523,7 +523,7 @@
 	u_int16_t		an_max_noise_prev_sec;	/* 0x7A */
 	u_int16_t		an_avg_noise_prev_min;	/* 0x7C */
 	u_int16_t		an_max_noise_prev_min;	/* 0x7E */
-	u_int16_t		an_spare[2];
+	u_int16_t		an_spare[3];
 };
 
 #define AN_STATUS_OPMODE_CONFIGURED		0x0001
--- ./sys/dev/an/if_anreg.h.orig	Wed Dec 20 13:25:31 2000
+++ ./sys/dev/an/if_anreg.h	Sun Jan  7 15:07:22 2001
@@ -528,7 +528,7 @@
 	u_int16_t		an_max_noise_prev_sec;	/* 0x7A */
 	u_int16_t		an_avg_noise_prev_min;	/* 0x7C */
 	u_int16_t		an_max_noise_prev_min;	/* 0x7E */
-	u_int16_t		an_spare[2];
+	u_int16_t		an_spare[3];
 };
 
 #define AN_STATUS_OPMODE_CONFIGURED		0x0001

>Release-Note:
>Audit-Trail:

From: Martin Blapp <mb@imp.ch>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc: <asaddi@philosophysw.com>
Subject: Re: kern/24137: Aironet driver breaks after firmware upgrade
Date: Tue, 5 Jun 2001 13:49:37 +0200 (CEST)

 Hi,
 
 This issue still exists. Your patch has been comitted to CURRENT,
 but as you said there were two bytes, not one. I have now:
 
 -       u_int16_t               an_spare[2];
 +       u_int16_t               an_spare[5];
 
 and now it works good. (Maybe four is enough, but with three, I still get
 the same checksum missmatch.)
 
 Martin
 
 Martin Blapp, mb@imp.ch
 ------------------------------------------------
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 ------------------------------------------------
 
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Fri Jul 20 16:26:41 PDT 2001 
State-Changed-Why:  
Fix committed to current and stable. 


Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Fri Jul 20 16:26:41 PDT 2001 
Responsible-Changed-Why:  
I committed the fix so followups can go to me if they happen. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24137 
>Unformatted:
