Fri Aug 7 18:25:33 2009 UTC ()
Pull up following revision(s) (requested by sborrill in ticket #903):
	sys/dev/cardbus/if_ath_cardbus.c: revision 1.32
	sys/dev/pci/if_ath_pci.c: revision 1.32
Sync ath(4) with the new HAL, mostly based on <jmcneill>'s patches.
Everything should be fine again !


(snj)
diff -r1.31 -r1.31.4.1 src/sys/dev/cardbus/if_ath_cardbus.c
diff -r1.31 -r1.31.4.1 src/sys/dev/pci/if_ath_pci.c

cvs diff -r1.31 -r1.31.4.1 src/sys/dev/cardbus/if_ath_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/if_ath_cardbus.c 2008/07/10 05:11:10 1.31
+++ src/sys/dev/cardbus/if_ath_cardbus.c 2009/08/07 18:25:33 1.31.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_ath_cardbus.c,v 1.31 2008/07/10 05:11:10 cegger Exp $ */ 1/* $NetBSD: if_ath_cardbus.c,v 1.31.4.1 2009/08/07 18:25:33 snj Exp $ */
2/* 2/*
3 * Copyright (c) 2003 3 * Copyright (c) 2003
4 * Ichiro FUKUHARA <ichiro@ichiro.org>. 4 * Ichiro FUKUHARA <ichiro@ichiro.org>.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 */ 33 */
34/* 34/*
35 * CardBus bus front-end for the AR5001 Wireless LAN 802.11a/b/g CardBus. 35 * CardBus bus front-end for the AR5001 Wireless LAN 802.11a/b/g CardBus.
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.31 2008/07/10 05:11:10 cegger Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.31.4.1 2009/08/07 18:25:33 snj Exp $");
40 40
41#include "opt_inet.h" 41#include "opt_inet.h"
42#include "bpfilter.h" 42#include "bpfilter.h"
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/mbuf.h> 46#include <sys/mbuf.h>
47#include <sys/malloc.h> 47#include <sys/malloc.h>
48#include <sys/kernel.h> 48#include <sys/kernel.h>
49#include <sys/socket.h> 49#include <sys/socket.h>
50#include <sys/ioctl.h> 50#include <sys/ioctl.h>
51#include <sys/errno.h> 51#include <sys/errno.h>
52#include <sys/device.h> 52#include <sys/device.h>
@@ -69,27 +69,28 @@ __KERNEL_RCSID(0, "$NetBSD: if_ath_cardb @@ -69,27 +69,28 @@ __KERNEL_RCSID(0, "$NetBSD: if_ath_cardb
69#include <netinet/in.h> 69#include <netinet/in.h>
70#include <netinet/if_inarp.h> 70#include <netinet/if_inarp.h>
71#endif 71#endif
72 72
73 73
74#include <sys/bus.h> 74#include <sys/bus.h>
75#include <sys/intr.h> 75#include <sys/intr.h>
76 76
77#include <dev/mii/miivar.h> 77#include <dev/mii/miivar.h>
78#include <dev/mii/mii_bitbang.h> 78#include <dev/mii/mii_bitbang.h>
79 79
80#include <dev/ic/ath_netbsd.h> 80#include <dev/ic/ath_netbsd.h>
81#include <dev/ic/athvar.h> 81#include <dev/ic/athvar.h>
82#include <contrib/dev/ath/ah.h> 82
 83#include <external/isc/atheros_hal/dist/ah.h>
83 84
84#include <dev/pci/pcivar.h> 85#include <dev/pci/pcivar.h>
85#include <dev/pci/pcireg.h> 86#include <dev/pci/pcireg.h>
86#include <dev/pci/pcidevs.h> 87#include <dev/pci/pcidevs.h>
87 88
88#include <dev/cardbus/cardbusvar.h> 89#include <dev/cardbus/cardbusvar.h>
89#include <dev/pci/pcidevs.h> 90#include <dev/pci/pcidevs.h>
90 91
91/* 92/*
92 * PCI configuration space registers 93 * PCI configuration space registers
93 */ 94 */
94#define ATH_PCI_MMBA 0x10 /* memory mapped base */ 95#define ATH_PCI_MMBA 0x10 /* memory mapped base */
95 96

cvs diff -r1.31 -r1.31.4.1 src/sys/dev/pci/if_ath_pci.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_ath_pci.c 2008/07/09 19:47:24 1.31
+++ src/sys/dev/pci/if_ath_pci.c 2009/08/07 18:25:33 1.31.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_ath_pci.c,v 1.31 2008/07/09 19:47:24 joerg Exp $ */ 1/* $NetBSD: if_ath_pci.c,v 1.31.4.1 2009/08/07 18:25:33 snj Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 4 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer, 11 * notice, this list of conditions and the following disclaimer,
12 * without modification. 12 * without modification.
13 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 13 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
14 * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 14 * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
@@ -31,56 +31,57 @@ @@ -31,56 +31,57 @@
31 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
34 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 * THE POSSIBILITY OF SUCH DAMAGES. 36 * THE POSSIBILITY OF SUCH DAMAGES.
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40#ifdef __FreeBSD__ 40#ifdef __FreeBSD__
41__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.11 2005/01/18 18:08:16 sam Exp $"); 41__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.11 2005/01/18 18:08:16 sam Exp $");
42#endif 42#endif
43#ifdef __NetBSD__ 43#ifdef __NetBSD__
44__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.31 2008/07/09 19:47:24 joerg Exp $"); 44__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.31.4.1 2009/08/07 18:25:33 snj Exp $");
45#endif 45#endif
46 46
47/* 47/*
48 * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver. 48 * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
49 */ 49 */
50 50
51#include <sys/param.h> 51#include <sys/param.h>
52#include <sys/systm.h> 52#include <sys/systm.h>
53#include <sys/mbuf.h> 53#include <sys/mbuf.h>
54#include <sys/malloc.h> 54#include <sys/malloc.h>
55#include <sys/kernel.h> 55#include <sys/kernel.h>
56#include <sys/socket.h> 56#include <sys/socket.h>
57#include <sys/errno.h> 57#include <sys/errno.h>
58#include <sys/device.h> 58#include <sys/device.h>
59 59
60#include <net/if.h> 60#include <net/if.h>
61#include <net/if_media.h> 61#include <net/if_media.h>
62#include <net/if_ether.h> 62#include <net/if_ether.h>
63 63
64#include <net80211/ieee80211_netbsd.h> 64#include <net80211/ieee80211_netbsd.h>
65#include <net80211/ieee80211_var.h> 65#include <net80211/ieee80211_var.h>
66 66
67#ifdef INET 67#ifdef INET
68#include <netinet/in.h> 68#include <netinet/in.h>
69#endif 69#endif
70 70
 71#include <external/isc/atheros_hal/dist/ah.h>
 72
71#include <dev/ic/ath_netbsd.h> 73#include <dev/ic/ath_netbsd.h>
72#include <dev/ic/athvar.h> 74#include <dev/ic/athvar.h>
73#include <contrib/dev/ath/ah.h> 
74 75
75#include <dev/pci/pcivar.h> 76#include <dev/pci/pcivar.h>
76#include <dev/pci/pcireg.h> 77#include <dev/pci/pcireg.h>
77#include <dev/pci/pcidevs.h> 78#include <dev/pci/pcidevs.h>
78 79
79/* 80/*
80 * PCI glue. 81 * PCI glue.
81 */ 82 */
82 83
83struct ath_pci_softc { 84struct ath_pci_softc {
84 struct ath_softc sc_sc; 85 struct ath_softc sc_sc;
85 pci_chipset_tag_t sc_pc; 86 pci_chipset_tag_t sc_pc;
86 pcitag_t sc_pcitag;  87 pcitag_t sc_pcitag;