diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-07-21 18:43:20 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-07-21 18:43:20 +0000 |
commit | 38298a179ae37e8a1e9763c06a5565a4acd82b54 (patch) | |
tree | 0569c67a19a6fbbc2c69aa626233ddc0b27b169d /sys/dev/ic | |
parent | adaaa36fe8afda5af0ba42de32cc4f680ec8937b (diff) |
instead of passing rx tstamp and rssi to the ieee80211_input function,
pass a pointer to an ieee80211_rxinfo structure containing those two
fields plus an extra flags field that indicates whether the frame was
decrypted by hardware or not.
required for a future fix.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/acx.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/an.c | 11 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 18 | ||||
-rw-r--r-- | sys/dev/ic/athvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/atw.c | 18 | ||||
-rw-r--r-- | sys/dev/ic/atwvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/bwi.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/malo.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/pgt.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/rt2560.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/rt2661.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/rt2860.c | 15 | ||||
-rw-r--r-- | sys/dev/ic/rtw.c | 17 | ||||
-rw-r--r-- | sys/dev/ic/rtwvar.h | 4 |
14 files changed, 94 insertions, 49 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 9cc1e50f265..ff8a1360273 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.84 2008/06/22 21:40:36 brad Exp $ */ +/* $OpenBSD: acx.c,v 1.85 2008/07/21 18:43:19 damien Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -1315,6 +1315,7 @@ acx_rxeof(struct acx_softc *sc) struct acx_rxbuf_hdr *head; struct acx_rxbuf *buf; struct mbuf *m; + struct ieee80211_rxinfo rxi; uint32_t desc_status; uint16_t desc_ctrl; int len, error; @@ -1350,6 +1351,7 @@ acx_rxeof(struct acx_softc *sc) sc->chip_rxbuf_exhdr); wh = mtod(m, struct ieee80211_frame *); + rxi.rxi_flags = 0; if ((wh->i_fc[1] & IEEE80211_FC1_WEP) && sc->chip_hw_crypt) { /* Short circuit software WEP */ @@ -1360,6 +1362,7 @@ acx_rxeof(struct acx_softc *sc) sc->chip_proc_wep_rxbuf(sc, m, &len); wh = mtod(m, struct ieee80211_frame *); } + rxi.rxi_flags |= IEEE80211_RXI_HWDEC; } m->m_len = m->m_pkthdr.len = len; @@ -1390,8 +1393,9 @@ acx_rxeof(struct acx_softc *sc) ni = ieee80211_find_rxnode(ic, wh); - ieee80211_input(ifp, m, ni, head->rbh_level, - letoh32(head->rbh_time)); + rxi.rxi_rssi = head->rbh_level; + rxi.rxi_tstamp = letoh32(head->rbh_time); + ieee80211_input(ifp, m, ni, &rxi); ieee80211_release_node(ic, ni); } else { diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index a2f2f5787df..0f238c326c5 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.54 2007/09/30 11:33:14 kettenis Exp $ */ +/* $OpenBSD: an.c,v 1.55 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -357,6 +357,7 @@ an_rxeof(struct an_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct an_rxframe frmhdr; struct mbuf *m; @@ -474,17 +475,21 @@ an_rxeof(struct an_softc *sc) #endif /* NBPFILTER > 0 */ wh = mtod(m, struct ieee80211_frame *); + rxi.rxi_flags = 0; if (wh->i_fc[1] & IEEE80211_FC1_WEP) { /* * WEP is decrypted by hardware. Clear WEP bit * header for ieee80211_input(). */ wh->i_fc[1] &= ~IEEE80211_FC1_WEP; + + rxi.rxi_flags |= IEEE80211_RXI_HWDEC; } ni = ieee80211_find_rxnode(ic, wh); - ieee80211_input(ifp, m, ni, frmhdr.an_rx_signal_strength, - an_switch32(frmhdr.an_rx_time)); + rxi.rxi_rssi = frmhdr.an_rx_signal_strength; + rxi.rxi_tstamp = an_switch32(frmhdr.an_rx_time); + ieee80211_input(ifp, m, ni, &rxi); ieee80211_release_node(ic, ni); } diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index d8dbc2d6d96..8d9e9abf71d 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.69 2007/10/13 16:12:29 fgsch Exp $ */ +/* $OpenBSD: ath.c,v 1.70 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -134,7 +134,7 @@ void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); void ath_rssadapt_updatenode(void *, struct ieee80211_node *); void ath_rssadapt_updatestats(void *); void ath_recv_mgmt(struct ieee80211com *, struct mbuf *, - struct ieee80211_node *, int, int, u_int32_t); + struct ieee80211_node *, struct ieee80211_rxinfo *, int); void ath_disable(struct ath_softc *); void ath_power(int, void *); @@ -1886,6 +1886,7 @@ ath_rx_proc(void *arg, int npending) struct ath_desc *ds; struct mbuf *m; struct ieee80211_frame *wh, whbuf; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct ath_node *an; struct ath_recv_hist *rh; @@ -2018,9 +2019,9 @@ ath_rx_proc(void *arg, int npending) bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_IN); } #endif - m_adj(m, -IEEE80211_CRC_LEN); wh = mtod(m, struct ieee80211_frame *); + rxi.rxi_flags = 0; if (wh->i_fc[1] & IEEE80211_FC1_WEP) { /* * WEP is decrypted by hardware. Clear WEP bit @@ -2039,6 +2040,8 @@ ath_rx_proc(void *arg, int npending) * The header has probably moved. */ wh = mtod(m, struct ieee80211_frame *); + + rxi.rxi_flags |= IEEE80211_RXI_HWDEC; } /* @@ -2062,8 +2065,9 @@ ath_rx_proc(void *arg, int npending) /* * Send frame up for processing. */ - ieee80211_input(ifp, m, ni, - ds->ds_rxstat.rs_rssi, ds->ds_rxstat.rs_tstamp); + rxi.rxi_rssi = ds->ds_rxstat.rs_rssi; + rxi.rxi_tstamp = ds->ds_rxstat.rs_tstamp; + ieee80211_input(ifp, m, ni, &rxi); /* Handle the rate adaption */ ieee80211_rssadapt_input(ic, ni, &an->an_rssadapt, @@ -2982,12 +2986,12 @@ bad: void ath_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, - struct ieee80211_node *ni, int subtype, int rssi, u_int32_t rstamp) + struct ieee80211_node *ni, struct ieee80211_rxinfo *rxi, int subtype) { struct ath_softc *sc = (struct ath_softc*)ic->ic_softc; struct ath_hal *ah = sc->sc_ah; - (*sc->sc_recv_mgmt)(ic, m, ni, subtype, rssi, rstamp); + (*sc->sc_recv_mgmt)(ic, m, ni, rxi, subtype); switch (subtype) { case IEEE80211_FC0_SUBTYPE_PROBE_RESP: diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h index f59a5a8167d..8ca19b847ec 100644 --- a/sys/dev/ic/athvar.h +++ b/sys/dev/ic/athvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athvar.h,v 1.22 2008/06/14 02:28:14 jsing Exp $ */ +/* $OpenBSD: athvar.h,v 1.23 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */ /*- @@ -214,7 +214,7 @@ struct ath_softc { const struct ieee80211_node *); void (*sc_recv_mgmt)(struct ieee80211com *, struct mbuf *, struct ieee80211_node *, - int, int, u_int32_t); + struct ieee80211_rxinfo *, int); #ifdef __FreeBSD__ device_t sc_dev; #endif diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 0bbf5464d5d..d2b549bc5a8 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.59 2008/06/26 05:42:15 ray Exp $ */ +/* $OpenBSD: atw.c,v 1.60 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -201,7 +201,7 @@ void atw_linkintr(struct atw_softc *, u_int32_t); int atw_newstate(struct ieee80211com *, enum ieee80211_state, int); int atw_tune(struct atw_softc *); void atw_recv_mgmt(struct ieee80211com *, struct mbuf *, - struct ieee80211_node *, int, int, u_int32_t); + struct ieee80211_node *, struct ieee80211_rxinfo *, int); void atw_next_scan(void *); /* Device initialization */ @@ -2262,7 +2262,7 @@ atw_change_ibss(struct atw_softc *sc) void atw_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, - struct ieee80211_node *ni, int subtype, int rssi, u_int32_t rstamp) + struct ieee80211_node *ni, struct ieee80211_rxinfo *rxi, int subtype) { struct atw_softc *sc = (struct atw_softc*)ic->ic_softc; @@ -2271,7 +2271,7 @@ atw_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, sc->sc_rev < ATW_REVISION_BA) return; - (*sc->sc_recv_mgmt)(ic, m, ni, subtype, rssi, rstamp); + (*sc->sc_recv_mgmt)(ic, m, ni, rxi, subtype); switch (subtype) { case IEEE80211_FC0_SUBTYPE_PROBE_RESP: @@ -3066,6 +3066,7 @@ atw_rxintr(struct atw_softc *sc) { static int rate_tbl[] = {2, 4, 11, 22, 44}; struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct ieee80211_frame *wh; struct ifnet *ifp = &ic->ic_if; @@ -3213,11 +3214,16 @@ atw_rxintr(struct atw_softc *sc) wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, wh); + rxi.rxi_flags = 0; #if 0 - if (atw_hw_decrypted(sc, wh)) + if (atw_hw_decrypted(sc, wh)) { wh->i_fc[1] &= ~IEEE80211_FC1_WEP; + rxi.rxi_flags |= IEEE80211_RXI_HWDEC; + } #endif - ieee80211_input(ifp, m, ni, (int)rssi, 0); + rxi.rxi_rssi = (int)rssi; + rxi.rxi_tstamp = 0; + ieee80211_input(ifp, m, ni, &rxi); /* * The frame may have caused the node to be marked for * reclamation (e.g. in response to a DEAUTH message) diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h index c83523b47b1..b784dab5403 100644 --- a/sys/dev/ic/atwvar.h +++ b/sys/dev/ic/atwvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atwvar.h,v 1.14 2008/06/27 06:03:08 ray Exp $ */ +/* $OpenBSD: atwvar.h,v 1.15 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: atwvar.h,v 1.13 2004/07/23 07:07:55 dyoung Exp $ */ /* @@ -197,7 +197,7 @@ struct atw_softc { enum ieee80211_state, int); void (*sc_recv_mgmt)(struct ieee80211com *, struct mbuf *, struct ieee80211_node *, - int, int, u_int32_t); + struct ieee80211_rxinfo *, int); struct ieee80211_node *(*sc_node_alloc)(struct ieee80211com *); void (*sc_node_free)(struct ieee80211com *, struct ieee80211_node *); diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index fd77d56d030..bae421f45cc 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.76 2008/06/11 00:17:17 jsg Exp $ */ +/* $OpenBSD: bwi.c,v 1.77 2008/07/21 18:43:19 damien Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -8214,6 +8214,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_idx) struct bwi_rxbuf *rb = &rbd->rbd_buf[idx]; struct bwi_rxbuf_hdr *hdr; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct mbuf *m; void *plcp; @@ -8290,8 +8291,9 @@ bwi_rxeof(struct bwi_softc *sc, int end_idx) ni = ieee80211_find_rxnode(ic, wh); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - ieee80211_input(ifp, m, ni, hdr->rxh_rssi, - letoh16(hdr->rxh_tsf)); + rxi.rxi_rssi = hdr->rxh_rssi; + rxi.rxi_tstamp = letoh16(hdr->rxh_tsf); + ieee80211_input(ifp, m, ni, &rxi); ieee80211_release_node(ic, ni); diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index e17cd6585cb..eacfefd661e 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.82 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: malo.c,v 1.83 2008/07/21 18:43:19 damien Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1626,6 +1626,7 @@ malo_rx_intr(struct malo_softc *sc) struct malo_rx_desc *desc; struct malo_rx_data *data; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct mbuf *mnew, *m; uint32_t rxRdPtr, rxWrPtr; @@ -1736,7 +1737,10 @@ malo_rx_intr(struct malo_softc *sc) ni = ieee80211_find_rxnode(ic, wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ifp, m, ni, desc->rssi, 0); + rxi.rxi_flags = 0; + rxi.rxi_rssi = desc->rssi; + rxi.rxi_tstamp = 0; /* unused */ + ieee80211_input(ifp, m, ni, &rxi); /* node is no longer needed */ ieee80211_release_node(ic, ni); diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index d141e768054..9d40b54e299 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.49 2008/07/01 11:44:12 claudio Exp $ */ +/* $OpenBSD: pgt.c,v 1.50 2008/07/21 18:43:19 damien Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -916,6 +916,7 @@ pgt_input_frames(struct pgt_softc *sc, struct mbuf *m) struct ether_header eh; struct ifnet *ifp; struct ieee80211_channel *chan; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct ieee80211com *ic; struct pgt_rx_annex *pra; @@ -1034,9 +1035,10 @@ input: bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_IN); } #endif - ni->ni_rssi = rssi; - ni->ni_rstamp = rstamp; - ieee80211_input(ifp, m, ni, rssi, rstamp); + rxi.rxi_flags = 0; + ni->ni_rssi = rxi.rxi_rssi = rssi; + ni->ni_rstamp = rxi.rxi_tstamp = rstamp; + ieee80211_input(ifp, m, ni, &rxi); /* * The frame may have caused the node to be marked for * reclamation (e.g. in response to a DEAUTH message) diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 81bbb9f93f0..ab8d87fbb7c 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.36 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: rt2560.c,v 1.37 2008/07/21 18:43:19 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1071,6 +1071,7 @@ rt2560_decryption_intr(struct rt2560_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct mbuf *mnew, *m; int hw, error; @@ -1193,7 +1194,10 @@ rt2560_decryption_intr(struct rt2560_softc *sc) ni = ieee80211_find_rxnode(ic, wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ifp, m, ni, desc->rssi, 0); + rxi.rxi_flags = 0; + rxi.rxi_rssi = desc->rssi; + rxi.rxi_tstamp = 0; /* unused */ + ieee80211_input(ifp, m, ni, &rxi); /* node is no longer needed */ ieee80211_release_node(ic, ni); diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 04a98615465..a55f5a6efc0 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.41 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: rt2661.c,v 1.42 2008/07/21 18:43:19 damien Exp $ */ /*- * Copyright (c) 2006 @@ -995,6 +995,7 @@ rt2661_rx_intr(struct rt2661_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct mbuf *mnew, *m; int error, rssi; @@ -1115,7 +1116,10 @@ rt2661_rx_intr(struct rt2661_softc *sc) ni = ieee80211_find_rxnode(ic, wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ifp, m, ni, desc->rssi, 0); + rxi.rxi_flags = 0; + rxi.rxi_rssi = desc->rssi; + rxi.rxi_tstamp = 0; /* unused */ + ieee80211_input(ifp, m, ni, &rxi); /*- * Keep track of the average RSSI using an Exponential Moving diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index dec6a71b21f..71be64a3891 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.15 2008/06/08 19:34:14 jsg Exp $ */ +/* $OpenBSD: rt2860.c,v 1.16 2008/07/21 18:43:19 damien Exp $ */ /*- * Copyright (c) 2007,2008 @@ -1014,6 +1014,7 @@ rt2860_rx_intr(struct rt2860_softc *sc) struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; struct ieee80211_frame *wh; + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct mbuf *m, *mnew; uint8_t ant, rssi; @@ -1101,8 +1102,12 @@ rt2860_rx_intr(struct rt2860_softc *sc) m->m_pkthdr.len = m->m_len = letoh16(rxwi->len) & 0xfff; wh = mtod(m, struct ieee80211_frame *); - /* frame is decrypted by hardware */ - wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + rxi.rxi_flags = 0; + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + /* frame is decrypted by hardware */ + wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + rxi.rxi_flags |= IEEE80211_RXI_HWDEC; + } /* HW may insert 2 padding bytes after 802.11 header */ if (rxd->flags & htole32(RT2860_RX_L2PAD)) { @@ -1164,7 +1169,9 @@ skipbpf: ni = ieee80211_find_rxnode(ic, wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ifp, m, ni, rssi, 0); + rxi.rxi_rssi = rssi; + rxi.rxi_tstamp = 0; /* unused */ + ieee80211_input(ifp, m, ni, &rxi); /* node is no longer needed */ ieee80211_release_node(ic, ni); diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index f0071a2be4e..0dca15b1685 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.66 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: rtw.c,v 1.67 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -106,7 +106,7 @@ void rtw_start(struct ifnet *); void rtw_watchdog(struct ifnet *); void rtw_next_scan(void *); void rtw_recv_mgmt(struct ieee80211com *, struct mbuf *, - struct ieee80211_node *, int, int, u_int32_t); + struct ieee80211_node *, struct ieee80211_rxinfo *, int); struct ieee80211_node *rtw_node_alloc(struct ieee80211com *); void rtw_node_free(struct ieee80211com *, struct ieee80211_node *); void rtw_media_status(struct ifnet *, struct ifmediareq *); @@ -1090,7 +1090,7 @@ rtw_intr_rx(struct rtw_softc *sc, u_int16_t isr) struct rtw_rxsoft *rs; struct rtw_rxdesc_blk *rdb; struct mbuf *m; - + struct ieee80211_rxinfo rxi; struct ieee80211_node *ni; struct ieee80211_frame *wh; @@ -1289,7 +1289,10 @@ rtw_intr_rx(struct rtw_softc *sc, u_int16_t isr) } #endif /* NBPFILTER > 0 */ - ieee80211_input(&sc->sc_if, m, ni, rssi, htsftl); + rxi.rxi_flags = 0; + rxi.rxi_rssi = rssi; + rxi.rxi_tstamp = htsftl; + ieee80211_input(&sc->sc_if, m, ni, &rxi); ieee80211_release_node(&sc->sc_ic, ni); next: rtw_rxdesc_init(rdb, rs, next, 0); @@ -3511,11 +3514,11 @@ rtw_ibss_merge(struct rtw_softc *sc, struct ieee80211_node *ni, void rtw_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, - struct ieee80211_node *ni, int subtype, int rssi, u_int32_t rstamp) + struct ieee80211_node *ni, struct ieee80211_rxinfo *rxi, int subtype) { struct rtw_softc *sc = (struct rtw_softc*)ic->ic_softc; - (*sc->sc_mtbl.mt_recv_mgmt)(ic, m, ni, subtype, rssi, rstamp); + (*sc->sc_mtbl.mt_recv_mgmt)(ic, m, ni, rxi, subtype); switch (subtype) { case IEEE80211_FC0_SUBTYPE_PROBE_RESP: @@ -3523,7 +3526,7 @@ rtw_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, if (ic->ic_opmode != IEEE80211_M_IBSS || ic->ic_state != IEEE80211_S_RUN) return; - rtw_ibss_merge(sc, ni, rstamp); + rtw_ibss_merge(sc, ni, rxi->rxi_tstamp); break; default: break; diff --git a/sys/dev/ic/rtwvar.h b/sys/dev/ic/rtwvar.h index fbadf60822f..8337581fcea 100644 --- a/sys/dev/ic/rtwvar.h +++ b/sys/dev/ic/rtwvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwvar.h,v 1.23 2007/06/07 20:20:15 damien Exp $ */ +/* $OpenBSD: rtwvar.h,v 1.24 2008/07/21 18:43:19 damien Exp $ */ /* $NetBSD: rtwvar.h,v 1.10 2004/12/26 22:37:57 mycroft Exp $ */ /*- @@ -300,7 +300,7 @@ struct rtw_mtbl { enum ieee80211_state, int); void (*mt_recv_mgmt)(struct ieee80211com *, struct mbuf *, struct ieee80211_node *, - int, int, u_int32_t); + struct ieee80211_rxinfo *, int); struct ieee80211_node *(*mt_node_alloc)(struct ieee80211com *); void (*mt_node_free)(struct ieee80211com *, struct ieee80211_node *); |