Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix the real cause of the uninitialized warning ...
details: https://anonhg.NetBSD.org/src/rev/7b641d72c849
branches: trunk
changeset: 554514:7b641d72c849
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Oct 29 03:31:22 2003 +0000
description:
Fix the real cause of the uninitialized warning -- we were looking for the VLAN
tag in the wrong place!
diffstat:
sys/dev/pci/if_sip.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 28f4b7f4412a -r 7b641d72c849 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c Wed Oct 29 02:33:51 2003 +0000
+++ b/sys/dev/pci/if_sip.c Wed Oct 29 03:31:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sip.c,v 1.82 2003/10/25 18:31:11 christos Exp $ */
+/* $NetBSD: if_sip.c,v 1.83 2003/10/29 03:31:22 mycroft Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.82 2003/10/25 18:31:11 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.83 2003/10/29 03:31:22 mycroft Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -1117,7 +1117,10 @@
SIP_DECL(start)(struct ifnet *ifp)
{
struct sip_softc *sc = ifp->if_softc;
- struct mbuf *m0, *m = NULL;
+ struct mbuf *m0;
+#ifndef DP83820
+ struct mbuf *m;
+#endif
struct sip_txsoft *txs;
bus_dmamap_t dmamap;
int error, nexttx, lasttx, seg;
@@ -1316,7 +1319,7 @@
(mtag = m_tag_find(m0, PACKET_TAG_VLAN, NULL)) != NULL) {
sc->sc_txdescs[lasttx].sipd_extsts |=
htole32(EXTSTS_VPKT |
- htons(*mtod(m, int *) & EXTSTS_VTCI));
+ (*(u_int *)(mtag + 1) & EXTSTS_VTCI));
}
/*
Home |
Main Index |
Thread Index |
Old Index