summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_run.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-03-19 10:09:19 +0000
committermpi <mpi@openbsd.org>2014-03-19 10:09:19 +0000
commit6da4b19dd192d05212a0bb90172069f13d0a9559 (patch)
tree702a20faa01285fb6c3408d72743ef90c645f05a /sys/dev/usb/if_run.c
parentupd(4) attaches at uhidev(4), ok andre@ (diff)
downloadwireguard-openbsd-6da4b19dd192d05212a0bb90172069f13d0a9559.tar.xz
wireguard-openbsd-6da4b19dd192d05212a0bb90172069f13d0a9559.zip
Stop abusing the rcvif pointer to pass wireless nodes down to the
driver start routines. Instead add & use a pointer in the pkthdr since we don't want the overhead of using a mbuf_tags(9). claudio@ pointed out that other subsystems might want to use this pointer too, so here's a new cookie! ok claudio@, mikeb@, deraadt@
Diffstat (limited to 'sys/dev/usb/if_run.c')
-rw-r--r--sys/dev/usb/if_run.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 214cf12d630..4a3ee8966e7 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.96 2014/03/07 18:39:02 mpi Exp $ */
+/* $OpenBSD: if_run.c,v 1.97 2014/03/19 10:09:19 mpi Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2273,7 +2273,7 @@ run_start(struct ifnet *ifp)
/* send pending management frames first */
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
- ni = (void *)m->m_pkthdr.rcvif;
+ ni = m->m_pkthdr.ph_cookie;
goto sendit;
}
if (ic->ic_state != IEEE80211_S_RUN)