diff options
Diffstat (limited to 'sys/net80211/ieee80211_tdma.c')
-rw-r--r-- | sys/net80211/ieee80211_tdma.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_tdma.c b/sys/net80211/ieee80211_tdma.c index f9dd317..8747b4e 100644 --- a/sys/net80211/ieee80211_tdma.c +++ b/sys/net80211/ieee80211_tdma.c @@ -108,12 +108,12 @@ static void tdma_vdetach(struct ieee80211vap *vap); static int tdma_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void tdma_beacon_miss(struct ieee80211vap *vap); static void tdma_recv_mgmt(struct ieee80211_node *, struct mbuf *, - int subtype, int rssi, int noise, uint32_t rstamp); + int subtype, int rssi, int nf); static int tdma_update(struct ieee80211vap *vap, const struct ieee80211_tdma_param *tdma, struct ieee80211_node *ni, int pickslot); static int tdma_process_params(struct ieee80211_node *ni, - const u_int8_t *ie, u_int32_t rstamp, const struct ieee80211_frame *wh); + const u_int8_t *ie, int rssi, int nf, const struct ieee80211_frame *wh); static void settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate) @@ -304,7 +304,7 @@ tdma_beacon_miss(struct ieee80211vap *vap) static void tdma_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, - int subtype, int rssi, int noise, uint32_t rstamp) + int subtype, int rssi, int nf) { struct ieee80211com *ic = ni->ni_ic; struct ieee80211vap *vap = ni->ni_vap; @@ -367,7 +367,7 @@ tdma_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, * Process tdma ie. The contents are used to sync * the slot timing, reconfigure the bss, etc. */ - (void) tdma_process_params(ni, scan.tdma, rstamp, wh); + (void) tdma_process_params(ni, scan.tdma, rssi, nf, wh); return; } /* @@ -375,7 +375,7 @@ tdma_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, * 2x parsing of the frame but should happen infrequently */ } - ts->tdma_recv_mgmt(ni, m0, subtype, rssi, noise, rstamp); + ts->tdma_recv_mgmt(ni, m0, subtype, rssi, nf); } /* @@ -497,8 +497,8 @@ tdma_update(struct ieee80211vap *vap, const struct ieee80211_tdma_param *tdma, * Process received TDMA parameters. */ static int -tdma_process_params(struct ieee80211_node *ni, - const u_int8_t *ie, u_int32_t rstamp, const struct ieee80211_frame *wh) +tdma_process_params(struct ieee80211_node *ni, const u_int8_t *ie, + int rssi, int nf, const struct ieee80211_frame *wh) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_tdma_state *ts = vap->iv_tdma; @@ -563,12 +563,16 @@ tdma_process_params(struct ieee80211_node *ni, /* XXX reschedule swbmiss timer on parameter change */ } else if (tdma->tdma_slot == ts->tdma_slot+1) { uint64_t tstamp; +#if 0 + uint32_t rstamp = (uint32_t) le64toh(rs->tsf); int32_t rtt; +#endif /* * Use returned timstamp to calculate the * roundtrip time. */ memcpy(&tstamp, tdma->tdma_tstamp, 8); +#if 0 /* XXX use only 15 bits of rstamp */ rtt = rstamp - (le64toh(tstamp) & 0x7fff); if (rtt < 0) @@ -578,6 +582,7 @@ tdma_process_params(struct ieee80211_node *ni, "tdma rtt %5u [rstamp %5u tstamp %llu]\n", rtt, rstamp, (unsigned long long) le64toh(tstamp)); +#endif } else if (tdma->tdma_slot == ts->tdma_slot && le64toh(ni->ni_tstamp.tsf) > vap->iv_bss->ni_tstamp.tsf) { /* |