diff options
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/acx.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 14 | ||||
-rw-r--r-- | sys/dev/ic/athn.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/atw.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/bwi.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/malo.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/rt2560.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/rt2661.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/rt2860.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/rtw.c | 7 |
10 files changed, 24 insertions, 42 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); diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 83cd2339197..89f77189738 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.98 2013/11/26 09:50:32 mpi Exp $ */ +/* $OpenBSD: ath.c,v 1.99 2014/03/19 10:09:19 mpi Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -897,17 +897,7 @@ ath_start(struct ifnet *ifp) } wh = mtod(m, struct ieee80211_frame *); } else { - /* - * Hack! The referenced node pointer is in the - * rcvif field of the packet header. This is - * placed there by ieee80211_mgmt_output because - * we need to hold the reference with the frame - * and there's no other way (other than packet - * tags which we consider too expensive to use) - * to pass it along. - */ - ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; + ni = m->m_pkthdr.ph_cookie; wh = mtod(m, struct ieee80211_frame *); if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index 3aa4f0b64f1..d0c7a498686 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.80 2013/12/06 21:03:02 deraadt Exp $ */ +/* $OpenBSD: athn.c,v 1.81 2014/03/19 10:09:19 mpi Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -2554,7 +2554,7 @@ athn_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) @@ -2562,7 +2562,7 @@ athn_start(struct ifnet *ifp) IF_DEQUEUE(&ic->ic_pwrsaveq, 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) diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 443c1c0d08e..559239ae048 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.80 2013/12/06 21:03:02 deraadt Exp $ */ +/* $OpenBSD: atw.c,v 1.81 2014/03/19 10:09:19 mpi Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -3605,8 +3605,7 @@ atw_start(struct ifnet *ifp) */ IF_DEQUEUE(&ic->ic_mgtq, m0); if (m0 != NULL) { - ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; - m0->m_pkthdr.rcvif = NULL; + ni = m0->m_pkthdr.ph_cookie; } else { /* send no data packets until we are associated */ if (ic->ic_state != IEEE80211_S_RUN) diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 1ac1cdeea16..2f316ecab99 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.100 2013/12/06 21:03:02 deraadt Exp $ */ +/* $OpenBSD: bwi.c,v 1.101 2014/03/19 10:09:19 mpi Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -7202,8 +7202,7 @@ bwi_start(struct ifnet *ifp) if (m != NULL) { IF_DEQUEUE(&ic->ic_mgtq, m); - ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; + ni = m->m_pkthdr.ph_cookie; mgt_pkt = 1; } else { diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index 1d4e370e994..0722b6d0160 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.97 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: malo.c,v 1.98 2014/03/19 10:09:19 mpi Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1026,8 +1026,7 @@ malo_start(struct ifnet *ifp) } IF_DEQUEUE(&ic->ic_mgtq, m0); - ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; - m0->m_pkthdr.rcvif = NULL; + ni = m0->m_pkthdr.ph_cookie; #if NBPFILTER > 0 if (ic->ic_rawbpf != NULL) bpf_mtap(ic->ic_rawbpf, m0, BPF_DIRECTION_OUT); diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 199fe8ff597..8749e1d2e15 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.62 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: rt2560.c,v 1.63 2014/03/19 10:09:19 mpi Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1945,8 +1945,7 @@ rt2560_start(struct ifnet *ifp) } IF_DEQUEUE(&ic->ic_mgtq, m0); - ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; - m0->m_pkthdr.rcvif = NULL; + ni = m0->m_pkthdr.ph_cookie; #if NBPFILTER > 0 if (ic->ic_rawbpf != NULL) bpf_mtap(ic->ic_rawbpf, m0, BPF_DIRECTION_OUT); diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 393b84cadb5..bb9eabe3f11 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.71 2014/03/11 19:45:28 guenther Exp $ */ +/* $OpenBSD: rt2661.c,v 1.72 2014/03/19 10:09:19 mpi Exp $ */ /*- * Copyright (c) 2006 @@ -1947,8 +1947,7 @@ rt2661_start(struct ifnet *ifp) } IF_DEQUEUE(&ic->ic_mgtq, m0); - ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; - m0->m_pkthdr.rcvif = NULL; + ni = m0->m_pkthdr.ph_cookie; #if NBPFILTER > 0 if (ic->ic_rawbpf != NULL) bpf_mtap(ic->ic_rawbpf, m0, BPF_DIRECTION_OUT); diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 21ed2f2b1b9..7879145f740 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.71 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: rt2860.c,v 1.72 2014/03/19 10:09:19 mpi Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -1758,7 +1758,7 @@ rt2860_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) @@ -1767,7 +1767,7 @@ rt2860_start(struct ifnet *ifp) /* send buffered frames for power-save mode */ IF_DEQUEUE(&ic->ic_pwrsaveq, m); if (m != NULL) { - ni = (void *)m->m_pkthdr.rcvif; + ni = m->m_pkthdr.ph_cookie; goto sendit; } diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 02622421ac3..d880dcfd03b 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.83 2013/11/26 09:50:33 mpi Exp $ */ +/* $OpenBSD: rtw.c,v 1.84 2014/03/19 10:09:19 mpi Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -1504,7 +1504,7 @@ rtw_intr_beacon(struct rtw_softc *sc, u_int16_t isr) sc->sc_dev.dv_xname); return; } - m->m_pkthdr.rcvif = (void *)ieee80211_ref_node(ic->ic_bss); + m->m_pkthdr.ph_cookie = ieee80211_ref_node(ic->ic_bss); IF_ENQUEUE(&sc->sc_beaconq, m); rtw_start(&sc->sc_if); } @@ -2706,8 +2706,7 @@ rtw_80211_dequeue(struct rtw_softc *sc, struct ifqueue *ifq, int pri, return NULL; } IF_DEQUEUE(ifq, m); - *nip = (struct ieee80211_node *)m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; + *nip = m->m_pkthdr.ph_cookie; return m; } |