Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci twiddle bpf related.
details: https://anonhg.NetBSD.org/src/rev/9fb68caad6c5
branches: trunk
changeset: 350242:9fb68caad6c5
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun Jan 08 06:48:06 2017 +0000
description:
twiddle bpf related.
diffstat:
sys/dev/pci/if_iwm.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (65 lines):
diff -r 49e17eb34640 -r 9fb68caad6c5 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Sun Jan 08 06:23:29 2017 +0000
+++ b/sys/dev/pci/if_iwm.c Sun Jan 08 06:48:06 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $ */
+/* $NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $ */
/* OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp */
#define IEEE80211_NO_HT
/*
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.47 2017/01/08 06:23:29 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.48 2017/01/08 06:48:06 nonaka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -3523,7 +3523,7 @@
if (c)
ni->ni_chan = c;
- if (sc->sc_drvbpf != NULL) {
+ if (__predict_false(sc->sc_drvbpf != NULL)) {
struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap;
tap->wr_flags = 0;
@@ -4161,7 +4161,7 @@
rinfo = iwm_tx_fill_cmd(sc, in, wh, tx);
- if (sc->sc_drvbpf != NULL) {
+ if (__predict_false(sc->sc_drvbpf != NULL)) {
struct iwm_tx_radiotap_header *tap = &sc->sc_txtap;
tap->wt_flags = 0;
@@ -6326,8 +6326,6 @@
ifp->if_oerrors++;
continue;
}
- if (ifp->if_bpf != NULL)
- bpf_mtap(ifp, m);
eh = mtod(m, struct ether_header *);
ni = ieee80211_find_txnode(ic, eh->ether_dhost);
@@ -6348,6 +6346,8 @@
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
M_WME_GETAC(m) : WME_AC_BE;
+ bpf_mtap(ifp, m);
+
if ((m = ieee80211_encap(ic, m, ni)) == NULL) {
ieee80211_free_node(ni);
ifp->if_oerrors++;
@@ -6355,8 +6355,8 @@
}
sendit:
- if (ic->ic_rawbpf != NULL)
- bpf_mtap3(ic->ic_rawbpf, m);
+ bpf_mtap3(ic->ic_rawbpf, m);
+
if (iwm_tx(sc, m, ni, ac) != 0) {
ieee80211_free_node(ni);
ifp->if_oerrors++;
Home |
Main Index |
Thread Index |
Old Index