Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Introduce M_CLEARCTX and use it instead of open-coding r...
details: https://anonhg.NetBSD.org/src/rev/cf5d08c56575
branches: trunk
changeset: 345423:cf5d08c56575
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu May 26 05:04:46 2016 +0000
description:
Introduce M_CLEARCTX and use it instead of open-coding rcvif
No functional change.
diffstat:
sys/dev/ic/ath.c | 6 +++---
sys/dev/ic/atw.c | 6 +++---
sys/dev/ic/bwi.c | 6 +++---
sys/dev/ic/malo.c | 6 +++---
sys/dev/ic/rt2560.c | 6 +++---
sys/dev/ic/rt2661.c | 6 +++---
sys/dev/ic/rt2860.c | 6 +++---
sys/dev/ic/wi.c | 6 +++---
sys/dev/pci/if_rtwn.c | 6 +++---
sys/dev/pci/if_wpi.c | 6 +++---
sys/dev/usb/if_athn_usb.c | 6 +++---
sys/dev/usb/if_atu.c | 6 +++---
sys/dev/usb/if_otus.c | 6 +++---
sys/dev/usb/if_rum.c | 6 +++---
sys/dev/usb/if_run.c | 6 +++---
sys/dev/usb/if_upgt.c | 6 +++---
sys/dev/usb/if_ural.c | 6 +++---
sys/dev/usb/if_urtw.c | 6 +++---
sys/dev/usb/if_urtwn.c | 6 +++---
sys/dev/usb/if_zyd.c | 6 +++---
sys/sys/mbuf.h | 3 ++-
21 files changed, 62 insertions(+), 61 deletions(-)
diffs (truncated from 559 to 300 lines):
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/ath.c
--- a/sys/dev/ic/ath.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/ath.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ath.c,v 1.120 2016/05/26 05:01:11 ozaki-r Exp $ */
+/* $NetBSD: ath.c,v 1.121 2016/05/26 05:04:46 ozaki-r Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.120 2016/05/26 05:01:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.121 2016/05/26 05:04:46 ozaki-r Exp $");
#endif
/*
@@ -1400,7 +1400,7 @@
* to pass it along.
*/
ni = M_GETCTX(m, struct ieee80211_node *);
- m->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m);
wh = mtod(m, struct ieee80211_frame *);
if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) ==
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/atw.c
--- a/sys/dev/ic/atw.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/atw.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atw.c,v 1.158 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: atw.c,v 1.159 2016/05/26 05:04:46 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.158 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.159 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
@@ -3492,7 +3492,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m0);
if (m0 != NULL) {
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
} else if (ic->ic_state != IEEE80211_S_RUN)
break; /* send no data until associated */
else {
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/bwi.c
--- a/sys/dev/ic/bwi.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/bwi.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwi.c,v 1.28 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: bwi.c,v 1.29 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */
/*
@@ -48,7 +48,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.28 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.29 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -7366,7 +7366,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
ni = M_GETCTX(m, struct ieee80211_node *);
- m->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m);
mgt_pkt = 1;
} else {
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/malo.c
--- a/sys/dev/ic/malo.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/malo.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: malo.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: malo.c,v 1.7 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.7 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -998,7 +998,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m0);
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
bpf_mtap3(ic->ic_rawbpf, m0);
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/rt2560.c
--- a/sys/dev/ic/rt2560.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/rt2560.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2560.c,v 1.26 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: rt2560.c,v 1.27 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: rt2560.c,v 1.15 2006/04/20 20:31:12 miod Exp $ */
/* $FreeBSD: rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $*/
@@ -24,7 +24,7 @@
* http://www.ralinktech.com/
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.26 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.27 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
@@ -2073,7 +2073,7 @@
break;
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
bpf_mtap3(ic->ic_rawbpf, m0);
if (rt2560_tx_mgt(sc, m0, ni) != 0)
break;
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/rt2661.c
--- a/sys/dev/ic/rt2661.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/rt2661.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2661.c,v 1.31 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: rt2661.c,v 1.32 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: rt2661.c,v 1.17 2006/05/01 08:41:11 damien Exp $ */
/* $FreeBSD: rt2560.c,v 1.5 2006/06/02 19:59:31 csjp Exp $ */
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.31 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.32 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
@@ -1807,7 +1807,7 @@
break;
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
bpf_mtap3(ic->ic_rawbpf, m0);
if (rt2661_tx_mgt(sc, m0, ni) != 0)
break;
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/rt2860.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2860.c,v 1.9 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: rt2860.c,v 1.10 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.9 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.10 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -1734,7 +1734,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
ni = M_GETCTX(m, struct ieee80211_node *);
- m->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m);
goto sendit;
}
if (ic->ic_state != IEEE80211_S_RUN)
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/ic/wi.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.238 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: wi.c,v 1.239 2016/05/26 05:04:46 ozaki-r Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.238 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.239 2016/05/26 05:04:46 ozaki-r Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -1107,7 +1107,7 @@
frmhdr.wi_ehdr.ether_type = 0;
wh = mtod(m0, struct ieee80211_frame *);
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
} else if (ic->ic_state == IEEE80211_S_RUN) {
IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/pci/if_rtwn.c
--- a/sys/dev/pci/if_rtwn.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/pci/if_rtwn.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtwn.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: if_rtwn.c,v 1.7 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: if_rtwn.c,v 1.5 2015/06/14 08:02:47 stsp Exp $ */
#define IEEE80211_NO_HT
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.7 2016/05/26 05:04:46 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -2061,7 +2061,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
ni = M_GETCTX(m, struct ieee80211_node *);
- m->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m);
goto sendit;
}
if (ic->ic_state != IEEE80211_S_RUN)
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/pci/if_wpi.c
--- a/sys/dev/pci/if_wpi.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/pci/if_wpi.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wpi.c,v 1.72 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: if_wpi.c,v 1.73 2016/05/26 05:04:46 ozaki-r Exp $ */
/*-
* Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.72 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.73 2016/05/26 05:04:46 ozaki-r Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -2059,7 +2059,7 @@
if (m0 != NULL) {
ni = M_GETCTX(m0, struct ieee80211_node *);
- m0->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m0);
/* management frames go into ring 0 */
if (sc->txq[0].queued > sc->txq[0].count - 8) {
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/usb/if_athn_usb.c
--- a/sys/dev/usb/if_athn_usb.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/usb/if_athn_usb.c Thu May 26 05:04:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_athn_usb.c,v 1.10 2016/05/26 05:01:12 ozaki-r Exp $ */
+/* $NetBSD: if_athn_usb.c,v 1.11 2016/05/26 05:04:46 ozaki-r Exp $ */
/* $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $ */
/*-
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.10 2016/05/26 05:01:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.11 2016/05/26 05:04:46 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2428,7 +2428,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
ni = M_GETCTX(m, struct ieee80211_node *);
- m->m_pkthdr.rcvif = NULL;
+ M_CLEARCTX(m);
goto sendit;
}
if (ic->ic_state != IEEE80211_S_RUN)
diff -r fb643c1f08ae -r cf5d08c56575 sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c Thu May 26 05:01:11 2016 +0000
+++ b/sys/dev/usb/if_atu.c Thu May 26 05:04:46 2016 +0000
Home |
Main Index |
Thread Index |
Old Index