Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci only get vtag when we have vtag like the other d...



details:   https://anonhg.NetBSD.org/src/rev/07211446af87
branches:  trunk
changeset: 826772:07211446af87
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 28 16:23:57 2017 +0000

description:
only get vtag when we have vtag like the other drivers.

diffstat:

 sys/dev/pci/if_stge.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 6306ca5253e7 -r 07211446af87 sys/dev/pci/if_stge.c
--- a/sys/dev/pci/if_stge.c     Thu Sep 28 15:03:18 2017 +0000
+++ b/sys/dev/pci/if_stge.c     Thu Sep 28 16:23:57 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_stge.c,v 1.63 2017/09/26 07:42:06 knakahara Exp $   */
+/*     $NetBSD: if_stge.c,v 1.64 2017/09/28 16:23:57 christos Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.63 2017/09/26 07:42:06 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.64 2017/09/28 16:23:57 christos Exp $");
 
 
 #include <sys/param.h>
@@ -829,7 +829,8 @@
                 * See if we have any VLAN stuff.
                 */
                have_vtag = vlan_has_tag(m0);
-               vtag = vlan_get_tag(m0);
+               if (have_vtag)
+                       vtag = vlan_get_tag(m0);
 
                /*
                 * Get the last and next available transmit descriptor.



Home | Main Index | Thread Index | Old Index