diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-01-21 20:33:21 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-01-21 20:33:21 +0000 |
commit | c6c4584cb28aadbca7a883db50ab2f42172b7b85 (patch) | |
tree | 6b03319430b50ccdb89e8e9d2a8e7965ddcd6d38 /sys | |
parent | a0eba21cbc07314778bd6858995705f95b6b1c4e (diff) |
Fix the timeout value sent in ADDBA request and response frames.
ba_timeout_val is in usec so we must divide by TU when copying it to the frame.
ok kettenis@ millert@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 269e8d2d272..961c2e0ab80 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.107 2016/01/12 09:28:09 stsp Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.108 2016/01/21 20:33:20 stsp Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -1430,7 +1430,7 @@ ieee80211_get_addba_req(struct ieee80211com *ic, struct ieee80211_node *ni, if ((ic->ic_htcaps & IEEE80211_HTCAP_DELAYEDBA) == 0) params |= IEEE80211_ADDBA_BA_POLICY; /* use immediate BA */ LE_WRITE_2(frm, params); frm += 2; - LE_WRITE_2(frm, ba->ba_timeout_val); frm += 2; + LE_WRITE_2(frm, ba->ba_timeout_val / IEEE80211_DUR_TU); frm += 2; LE_WRITE_2(frm, ba->ba_winstart); frm += 2; m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *); @@ -1470,7 +1470,7 @@ ieee80211_get_addba_resp(struct ieee80211com *ic, struct ieee80211_node *ni, params |= ba->ba_winsize << 6; LE_WRITE_2(frm, params); frm += 2; if (status == 0) - LE_WRITE_2(frm, ba->ba_timeout_val); + LE_WRITE_2(frm, ba->ba_timeout_val / IEEE80211_DUR_TU); else LE_WRITE_2(frm, 0); frm += 2; |