Mon Mar 6 08:36:20 2017 UTC ()
Fix incrementing wrong counter


(ozaki-r)
diff -r1.87 -r1.88 src/sys/net80211/ieee80211_input.c

cvs diff -r1.87 -r1.88 src/sys/net80211/ieee80211_input.c (expand / switch to unified diff)

--- src/sys/net80211/ieee80211_input.c 2017/02/02 10:05:35 1.87
+++ src/sys/net80211/ieee80211_input.c 2017/03/06 08:36:20 1.88
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ieee80211_input.c,v 1.87 2017/02/02 10:05:35 nonaka Exp $ */ 1/* $NetBSD: ieee80211_input.c,v 1.88 2017/03/06 08:36:20 ozaki-r Exp $ */
2/*- 2/*-
3 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2001 Atsushi Onoe
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 * 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 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35#ifdef __FreeBSD__ 35#ifdef __FreeBSD__
36__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $"); 36__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
37#endif 37#endif
38#ifdef __NetBSD__ 38#ifdef __NetBSD__
39__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.87 2017/02/02 10:05:35 nonaka Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.88 2017/03/06 08:36:20 ozaki-r Exp $");
40#endif 40#endif
41 41
42#ifdef _KERNEL_OPT 42#ifdef _KERNEL_OPT
43#include "opt_inet.h" 43#include "opt_inet.h"
44#endif 44#endif
45 45
46#ifdef __NetBSD__ 46#ifdef __NetBSD__
47#endif /* __NetBSD__ */ 47#endif /* __NetBSD__ */
48 48
49#include <sys/param.h> 49#include <sys/param.h>
50#include <sys/systm.h> 50#include <sys/systm.h>
51#include <sys/mbuf.h> 51#include <sys/mbuf.h>
52#include <sys/malloc.h> 52#include <sys/malloc.h>
@@ -770,27 +770,27 @@ ieee80211_deliver_data(struct ieee80211c @@ -770,27 +770,27 @@ ieee80211_deliver_data(struct ieee80211c
770 ieee80211_free_node(sta); 770 ieee80211_free_node(sta);
771 } 771 }
772 } 772 }
773 if (m1 != NULL) { 773 if (m1 != NULL) {
774 int len; 774 int len;
775#ifdef ALTQ 775#ifdef ALTQ
776 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { 776 if (ALTQ_IS_ENABLED(&ifp->if_snd)) {
777 altq_etherclassify(&ifp->if_snd, m1); 777 altq_etherclassify(&ifp->if_snd, m1);
778 } 778 }
779#endif 779#endif
780 len = m1->m_pkthdr.len; 780 len = m1->m_pkthdr.len;
781 IFQ_ENQUEUE(&ifp->if_snd, m1, error); 781 IFQ_ENQUEUE(&ifp->if_snd, m1, error);
782 if (error) { 782 if (error) {
783 ifp->if_omcasts++; 783 ifp->if_oerrors++;
784 m = NULL; 784 m = NULL;
785 } 785 }
786 ifp->if_obytes += len; 786 ifp->if_obytes += len;
787 } 787 }
788 } 788 }
789 if (m != NULL) { 789 if (m != NULL) {
790 790
791 if (ni->ni_vlan != 0) { 791 if (ni->ni_vlan != 0) {
792 /* attach vlan tag */ 792 /* attach vlan tag */
793 /* XXX goto err? */ 793 /* XXX goto err? */
794 VLAN_INPUT_TAG(ifp, m, ni->ni_vlan, goto out); 794 VLAN_INPUT_TAG(ifp, m, ni->ni_vlan, goto out);
795 } 795 }
796 796