Module Name:    src
Committed By:   christos
Date:           Wed Apr  3 14:20:03 UTC 2013

Modified Files:
        src/sys/dev/cardbus: if_athn_cardbus.c
        src/sys/dev/ic: aic79xx_inline.h aic79xx_osm.h arn5008.c arn5416.c
            arn9003.c arn9280.c arn9285.c arn9287.c arn9380.c athnvar.h
        src/sys/dev/pci: if_athn_pci.c

Log Message:
instead of ifnet use ethercom.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/cardbus/if_athn_cardbus.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/ic/aic79xx_inline.h
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/aic79xx_osm.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/arn5008.c src/sys/dev/ic/arn5416.c \
    src/sys/dev/ic/arn9003.c src/sys/dev/ic/arn9280.c \
    src/sys/dev/ic/arn9285.c src/sys/dev/ic/arn9287.c \
    src/sys/dev/ic/arn9380.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/athnvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/if_athn_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/cardbus/if_athn_cardbus.c
diff -u src/sys/dev/cardbus/if_athn_cardbus.c:1.1 src/sys/dev/cardbus/if_athn_cardbus.c:1.2
--- src/sys/dev/cardbus/if_athn_cardbus.c:1.1	Fri Mar 29 22:53:00 2013
+++ src/sys/dev/cardbus/if_athn_cardbus.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_athn_cardbus.c,v 1.1 2013/03/30 02:53:00 christos Exp $	*/
+/*	$NetBSD: if_athn_cardbus.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: if_athn_cardbus.c,v 1.13 2011/01/08 10:02:32 damien Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_cardbus.c,v 1.1 2013/03/30 02:53:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_cardbus.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_athn_card
 #include <sys/intr.h>
 
 #include <net/if.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 
 #include <net80211/ieee80211_var.h>

Index: src/sys/dev/ic/aic79xx_inline.h
diff -u src/sys/dev/ic/aic79xx_inline.h:1.19 src/sys/dev/ic/aic79xx_inline.h:1.20
--- src/sys/dev/ic/aic79xx_inline.h:1.19	Sat Sep  5 08:39:25 2009
+++ src/sys/dev/ic/aic79xx_inline.h	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic79xx_inline.h,v 1.19 2009/09/05 12:39:25 tsutsui Exp $	*/
+/*	$NetBSD: aic79xx_inline.h,v 1.20 2013/04/03 14:20:02 christos Exp $	*/
 
 /*
  * Inline routines shareable across OS platforms.
@@ -854,7 +854,7 @@ ahd_check_cmdcmpltqueues(struct ahd_soft
 	u_int retval;
 
 	retval = 0;
-	ahd_dmamap_sync(ahd, ahd->parent_dmat /*shared_data_dmat*/, ahd->shared_data_map.dmamap,
+	ahd_dmamap_sync1(ahd, ahd->parent_dmat /*shared_data_dmat*/, ahd->shared_data_map.dmamap,
 			/*offset*/ahd->qoutfifonext, /*len*/2,
 			BUS_DMASYNC_POSTREAD);
 	if ((ahd->qoutfifo[ahd->qoutfifonext]

Index: src/sys/dev/ic/aic79xx_osm.h
diff -u src/sys/dev/ic/aic79xx_osm.h:1.21 src/sys/dev/ic/aic79xx_osm.h:1.22
--- src/sys/dev/ic/aic79xx_osm.h:1.21	Sat Nov 13 08:52:00 2010
+++ src/sys/dev/ic/aic79xx_osm.h	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic79xx_osm.h,v 1.21 2010/11/13 13:52:00 uebayasi Exp $	*/
+/*	$NetBSD: aic79xx_osm.h,v 1.22 2013/04/03 14:20:02 christos Exp $	*/
 
 /*
  * NetBSD platform specific driver option settings, data structures,
@@ -32,9 +32,9 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $NetBSD: aic79xx_osm.h,v 1.21 2010/11/13 13:52:00 uebayasi Exp $
+ * $NetBSD: aic79xx_osm.h,v 1.22 2013/04/03 14:20:02 christos Exp $
  *
- * //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#19 $$NetBSD: aic79xx_osm.h,v 1.21 2010/11/13 13:52:00 uebayasi Exp $
+ * //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#19 $$NetBSD: aic79xx_osm.h,v 1.22 2013/04/03 14:20:02 christos Exp $
  *
  * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.h,v 1.9 2003/05/26 21:43:29 gibbs Exp $
  */
@@ -129,8 +129,28 @@ typedef pcireg_t ahd_dev_softc_t;
 	bus_dmamap_unload(tag, map)
 
 /* XXX Need to update Bus DMA for partial map syncs */
-#define ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op)		\
-	bus_dmamap_sync(dma_tag, dmamap, offset, len, op)
+#define ahd_dmamap_sync(ahd, dma_tag, dmamap, offset, len, op) 		\
+	do {								\
+		if (((op) & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0)\
+		if ((offset) >= (dmamap)->dm_mapsize) {			\
+			printf("%s, %d: %s: %x >= %x[%x]\n", __FILE__,	\
+			    __LINE__, __func__, (int)(offset),		\
+			    (int)(dmamap)->dm_mapsize, (int)(len));	\
+			return;						\
+		}							\
+		bus_dmamap_sync(dma_tag, dmamap, offset, len, op);	\
+	} while (/*CONSTCOND*/0)
+#define ahd_dmamap_sync1(ahd, dma_tag, dmamap, offset, len, op)		\
+	do {								\
+		if (((op) & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0)\
+		if ((offset) >= (dmamap)->dm_mapsize) {			\
+			printf("%s, %d: %s: %x >= %x[%x]\n", __FILE__,	\
+			    __LINE__, __func__, (int)(offset),		\
+			    (int)(dmamap)->dm_mapsize, (int)(len));	\
+			return 0;					\
+		}							\
+		bus_dmamap_sync(dma_tag, dmamap, offset, len, op);	\
+	} while (/*CONSTCOND*/0)
 
 /************************ Tunable Driver Parameters  **************************/
 /*

Index: src/sys/dev/ic/arn5008.c
diff -u src/sys/dev/ic/arn5008.c:1.1 src/sys/dev/ic/arn5008.c:1.2
--- src/sys/dev/ic/arn5008.c:1.1	Fri Mar 29 22:53:00 2013
+++ src/sys/dev/ic/arn5008.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn5008.c,v 1.1 2013/03/30 02:53:00 christos Exp $	*/
+/*	$NetBSD: arn5008.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.1 2013/03/30 02:53:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -45,6 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn5416.c
diff -u src/sys/dev/ic/arn5416.c:1.1 src/sys/dev/ic/arn5416.c:1.2
--- src/sys/dev/ic/arn5416.c:1.1	Fri Mar 29 22:53:00 2013
+++ src/sys/dev/ic/arn5416.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn5416.c,v 1.1 2013/03/30 02:53:00 christos Exp $	*/
+/*	$NetBSD: arn5416.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar5416.c,v 1.12 2012/06/10 21:23:36 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn5416.c,v 1.1 2013/03/30 02:53:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn5416.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn5416.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn9003.c
diff -u src/sys/dev/ic/arn9003.c:1.1 src/sys/dev/ic/arn9003.c:1.2
--- src/sys/dev/ic/arn9003.c:1.1	Fri Mar 29 22:53:01 2013
+++ src/sys/dev/ic/arn9003.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9003.c,v 1.1 2013/03/30 02:53:01 christos Exp $	*/
+/*	$NetBSD: arn9003.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar9003.c,v 1.25 2012/10/20 09:53:32 stsp Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.1 2013/03/30 02:53:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn9280.c
diff -u src/sys/dev/ic/arn9280.c:1.1 src/sys/dev/ic/arn9280.c:1.2
--- src/sys/dev/ic/arn9280.c:1.1	Fri Mar 29 22:53:01 2013
+++ src/sys/dev/ic/arn9280.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9280.c,v 1.1 2013/03/30 02:53:01 christos Exp $	*/
+/*	$NetBSD: arn9280.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar9280.c,v 1.18 2012/06/10 21:23:36 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9280.c,v 1.1 2013/03/30 02:53:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9280.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn9280.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn9285.c
diff -u src/sys/dev/ic/arn9285.c:1.1 src/sys/dev/ic/arn9285.c:1.2
--- src/sys/dev/ic/arn9285.c:1.1	Fri Mar 29 22:53:01 2013
+++ src/sys/dev/ic/arn9285.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9285.c,v 1.1 2013/03/30 02:53:01 christos Exp $	*/
+/*	$NetBSD: arn9285.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar9285.c,v 1.19 2012/06/10 21:23:36 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9285.c,v 1.1 2013/03/30 02:53:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9285.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #ifndef _MODULE
 #include "athn_usb.h"
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn9285.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn9287.c
diff -u src/sys/dev/ic/arn9287.c:1.1 src/sys/dev/ic/arn9287.c:1.2
--- src/sys/dev/ic/arn9287.c:1.1	Fri Mar 29 22:53:01 2013
+++ src/sys/dev/ic/arn9287.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9287.c,v 1.1 2013/03/30 02:53:01 christos Exp $	*/
+/*	$NetBSD: arn9287.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar9287.c,v 1.17 2012/06/10 21:23:36 kettenis Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9287.c,v 1.1 2013/03/30 02:53:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9287.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn9287.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 
Index: src/sys/dev/ic/arn9380.c
diff -u src/sys/dev/ic/arn9380.c:1.1 src/sys/dev/ic/arn9380.c:1.2
--- src/sys/dev/ic/arn9380.c:1.1	Fri Mar 29 22:53:02 2013
+++ src/sys/dev/ic/arn9380.c	Wed Apr  3 10:20:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arn9380.c,v 1.1 2013/03/30 02:53:02 christos Exp $	*/
+/*	$NetBSD: arn9380.c,v 1.2 2013/04/03 14:20:02 christos Exp $	*/
 /*	$OpenBSD: ar9380.c,v 1.17 2012/10/20 09:54:20 stsp Exp $	*/
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9380.c,v 1.1 2013/03/30 02:53:02 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9380.c,v 1.2 2013/04/03 14:20:02 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: arn9380.c,v 
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_dl.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 #include <net/if_types.h>
 

Index: src/sys/dev/ic/athnvar.h
diff -u src/sys/dev/ic/athnvar.h:1.2 src/sys/dev/ic/athnvar.h:1.3
--- src/sys/dev/ic/athnvar.h:1.2	Sat Mar 30 10:14:30 2013
+++ src/sys/dev/ic/athnvar.h	Wed Apr  3 10:20:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: athnvar.h,v 1.2 2013/03/30 14:14:30 christos Exp $	*/
+/*	$NetBSD: athnvar.h,v 1.3 2013/04/03 14:20:03 christos Exp $	*/
 /*	$OpenBSD: athnvar.h,v 1.33 2012/10/20 09:54:20 stsp Exp $	*/
 
 /*-
@@ -455,7 +455,8 @@ struct athn_softc {
 	device_suspensor_t		sc_suspensor;
 	pmf_qual_t			sc_qual;
 	struct ieee80211com		sc_ic;
-	struct ifnet			sc_if;
+	struct ethercom			sc_ec;
+#define sc_if	sc_ec.ec_if
 
 #if 0
 	int				(*sc_enable)(struct athn_softc *);

Index: src/sys/dev/pci/if_athn_pci.c
diff -u src/sys/dev/pci/if_athn_pci.c:1.4 src/sys/dev/pci/if_athn_pci.c:1.5
--- src/sys/dev/pci/if_athn_pci.c:1.4	Sun Mar 31 07:38:36 2013
+++ src/sys/dev/pci/if_athn_pci.c	Wed Apr  3 10:20:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_athn_pci.c,v 1.4 2013/03/31 11:38:36 martin Exp $	*/
+/*	$NetBSD: if_athn_pci.c,v 1.5 2013/04/03 14:20:03 christos Exp $	*/
 /*	$OpenBSD: if_athn_pci.c,v 1.11 2011/01/08 10:02:32 damien Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_pci.c,v 1.4 2013/03/31 11:38:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_pci.c,v 1.5 2013/04/03 14:20:03 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_athn_pci.
 #include <sys/intr.h>
 
 #include <net/if.h>
+#include <net/if_ether.h>
 #include <net/if_media.h>
 
 #include <net80211/ieee80211_var.h>

Reply via email to