aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2018-04-20 06:49:19 -0400
committerJohannes Berg <johannes.berg@intel.com>2018-05-07 14:35:15 -0400
commit914eac248d876f9c00cd1792ffec3d182c863f13 (patch)
tree348794992196e4ce0d020481626a1957a9fd3c73
parent407879b690ba3a6bf29be896d02dad63463bd1c0 (diff)
mac80211: use timeout from the AddBA response instead of the request
2016 spec, section 10.24.2 specifies that the block ack timeout in the ADD BA request is advisory. That means we should check the value in the response and act upon it (same as buffer size). Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/agg-tx.c4
-rw-r--r--net/mac80211/tx.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 595c662a61e8..ac4295296514 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -8,6 +8,7 @@
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2007-2010, Intel Corporation 9 * Copyright 2007-2010, Intel Corporation
10 * Copyright(c) 2015-2017 Intel Deutschland GmbH 10 * Copyright(c) 2015-2017 Intel Deutschland GmbH
11 * Copyright (C) 2018 Intel Corporation
11 * 12 *
12 * This program is free software; you can redistribute it and/or modify 13 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as 14 * it under the terms of the GNU General Public License version 2 as
@@ -970,6 +971,9 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
970 971
971 sta->ampdu_mlme.addba_req_num[tid] = 0; 972 sta->ampdu_mlme.addba_req_num[tid] = 0;
972 973
974 tid_tx->timeout =
975 le16_to_cpu(mgmt->u.action.u.addba_resp.timeout);
976
973 if (tid_tx->timeout) { 977 if (tid_tx->timeout) {
974 mod_timer(&tid_tx->session_timer, 978 mod_timer(&tid_tx->session_timer,
975 TU_TO_EXP_TIME(tid_tx->timeout)); 979 TU_TO_EXP_TIME(tid_tx->timeout));
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 535de3161a78..05a265cd573d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4,6 +4,7 @@
4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 * Copyright 2013-2014 Intel Mobile Communications GmbH
7 * Copyright (C) 2018 Intel Corporation
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
@@ -1135,7 +1136,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
1135 } 1136 }
1136 1137
1137 /* reset session timer */ 1138 /* reset session timer */
1138 if (reset_agg_timer && tid_tx->timeout) 1139 if (reset_agg_timer)
1139 tid_tx->last_tx = jiffies; 1140 tid_tx->last_tx = jiffies;
1140 1141
1141 return queued; 1142 return queued;