diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-19 10:09:21 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-19 10:09:21 +0000 |
commit | 6e2621c23c35516b6036c2c0d9bb69fd5e1d9376 (patch) | |
tree | 7e406591ea45d943e4280b6c731addef3ed25457 /sys/dev/ic/acx.c | |
parent | d4a210e66036f42d4f704fa1ac3c075ca0172eb6 (diff) |
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/ic/acx.c')
-rw-r--r-- | sys/dev/ic/acx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 39910bc988f..96b0cbcd9a3 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.101 2013/08/07 01:06:27 bluhm Exp $ */ +/* $OpenBSD: acx.c,v 1.102 2014/03/19 10:09:19 mpi Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -948,8 +948,7 @@ acx_start(struct ifnet *ifp) IF_DEQUEUE(&ic->ic_mgtq, m); /* first dequeue management frames */ if (m != NULL) { - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; + ni = m->m_pkthdr.ph_cookie; /* * probe response mgmt frames are handled by the @@ -976,8 +975,7 @@ acx_start(struct ifnet *ifp) /* then dequeue packets on the powersave queue */ IF_DEQUEUE(&ic->ic_pwrsaveq, m); if (m != NULL) { - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; + ni = m->m_pkthdr.ph_cookie; goto encapped; } else { IFQ_DEQUEUE(&ifp->if_snd, m); |