Subject: Patch to get aironet (an0) cards working
To: None <tech-net@NetBSD.org>
From: Dheeraj Reddy <dheeraj@ece.gatech.edu>
List: tech-net
Date: 10/30/2004 15:20:14
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello there,
Can someone kindly commit the attached patches. These make the aironet
cards working again. I have checked using the 350 series with the newest
firmwares (5.41)
truely
dheeraj
--
It is better to be silent and be thought a fool than to speak and remove
all doubt
--WIyZ46R2i8wDzkSu
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="diff-an.c"
Index: an.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/an.c,v
retrieving revision 1.32
diff -u -r1.32 an.c
--- an.c 24 Aug 2004 00:53:29 -0000 1.32
+++ an.c 30 Oct 2004 19:09:55 -0000
@@ -1273,8 +1273,8 @@
ifp->if_ierrors++;
DPRINTF(("an_rx_intr: oversized packet %d\n", len));
return;
- }
- len = 0;
+ } else
+ len = 0;
}
MGETHDR(m, M_DONTWAIT, MT_DATA);
@@ -1319,8 +1319,10 @@
memcpy(m->m_data, &frmhdr.an_whdr, sizeof(struct ieee80211_frame));
an_read_bap(sc, fid, -1, m->m_data + sizeof(struct ieee80211_frame),
len);
- m->m_pkthdr.len = m->m_len = sizeof(struct ieee80211_frame) + len;
+ m->m_pkthdr.len = m->m_len = sizeof(struct ieee80211_frame) + len;
m->m_pkthdr.rcvif = ifp;
+ m_adj(m, -sizeof(u_int16_t));
+
CSR_WRITE_2(sc, AN_EVENT_ACK, AN_EV_RX);
wh = mtod(m, struct ieee80211_frame *);
--WIyZ46R2i8wDzkSu
Content-Type: text/x-chdr; charset=us-ascii
Content-Disposition: attachment; filename="diff-an-reg.h"
Index: anreg.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/anreg.h,v
retrieving revision 1.10
diff -u -r1.10 anreg.h
--- anreg.h 28 Jan 2004 15:07:52 -0000 1.10
+++ anreg.h 30 Oct 2004 19:10:07 -0000
@@ -255,7 +255,7 @@
u_int8_t an_magic_packet_action; /* 0x98 */
u_int8_t an_magic_packet_ctl; /* 0x99 */
u_int16_t an_rsvd9;
- u_int16_t an_spare[16];
+ u_int16_t an_spare[24];
} __attribute__((__packed__));
#define AN_OPMODE_IBSS_ADHOC 0x0000
--WIyZ46R2i8wDzkSu
Content-Type: text/x-chdr; charset=us-ascii
Content-Disposition: attachment; filename="diff-an-var.h"
Index: anvar.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/anvar.h,v
retrieving revision 1.8
diff -u -r1.8 anvar.h
--- anvar.h 28 Jan 2004 15:07:52 -0000 1.8
+++ anvar.h 30 Oct 2004 19:10:19 -0000
@@ -74,10 +74,9 @@
struct an_softc {
struct device sc_dev;
struct ieee80211com sc_ic;
- bus_space_tag_t sc_iot;
- bus_space_handle_t sc_ioh;
int (*sc_enable)(struct an_softc *);
void (*sc_disable)(struct an_softc *);
+ int (*sc_reset)(struct an_softc *);
int (*sc_newstate)(struct ieee80211com *,
enum ieee80211_state, int);
@@ -85,6 +84,11 @@
int sc_invalid;
int sc_attached;
+ bus_space_tag_t sc_iot;
+ bus_space_handle_t sc_ioh;
+
+ caddr_t sc_drvbpf;
+
int sc_bap_id;
int sc_bap_off;
--WIyZ46R2i8wDzkSu--