aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Altshul <maxim.altshul@ti.com>2016-08-21 07:24:24 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-14 08:00:22 -0400
commitbbd839a40dde64d9cffee083225415f94f9a8106 (patch)
treec7e6ecc7e15555de1787b294bcc7882492fcc6e7
parent5d7ab8339a9a9e745c672279437657654268be81 (diff)
wlcore: Pass win_size taken from ieee80211_sta to FW
commit 42c7372a111630dab200c2f959424f5ec3bf79a4 upstream. When starting a new BA session, we must pass the win_size to the FW. To do this we take max_rx_aggregation_subframes (BA RX win size) which is stored in ieee80211_sta structure (e.g per link and not per HW) We will use the value stored per link when passing the win_size to firmware through the ACX_BA_SESSION_RX_SETUP command. Signed-off-by: Maxim Altshul <maxim.altshul@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/wireless/ti/wlcore/acx.c5
-rw-r--r--drivers/net/wireless/ti/wlcore/acx.h3
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index 26cc23f32241..a4859993db3c 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -1419,7 +1419,8 @@ out:
1419 1419
1420/* setup BA session receiver setting in the FW. */ 1420/* setup BA session receiver setting in the FW. */
1421int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, 1421int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
1422 u16 ssn, bool enable, u8 peer_hlid) 1422 u16 ssn, bool enable, u8 peer_hlid,
1423 u8 win_size)
1423{ 1424{
1424 struct wl1271_acx_ba_receiver_setup *acx; 1425 struct wl1271_acx_ba_receiver_setup *acx;
1425 int ret; 1426 int ret;
@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
1435 acx->hlid = peer_hlid; 1436 acx->hlid = peer_hlid;
1436 acx->tid = tid_index; 1437 acx->tid = tid_index;
1437 acx->enable = enable; 1438 acx->enable = enable;
1438 acx->win_size = wl->conf.ht.rx_ba_win_size; 1439 acx->win_size = win_size;
1439 acx->ssn = ssn; 1440 acx->ssn = ssn;
1440 1441
1441 ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, 1442 ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx,
diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h
index 6321ed472891..f46d7fdf9a00 100644
--- a/drivers/net/wireless/ti/wlcore/acx.h
+++ b/drivers/net/wireless/ti/wlcore/acx.h
@@ -1113,7 +1113,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl,
1113int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, 1113int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
1114 struct wl12xx_vif *wlvif); 1114 struct wl12xx_vif *wlvif);
1115int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, 1115int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
1116 u16 ssn, bool enable, u8 peer_hlid); 1116 u16 ssn, bool enable, u8 peer_hlid,
1117 u8 win_size);
1117int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, 1118int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1118 u64 *mactime); 1119 u64 *mactime);
1119int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, 1120int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 471521a0db7b..5438975c7ff2 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5285,7 +5285,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
5285 } 5285 }
5286 5286
5287 ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true, 5287 ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true,
5288 hlid); 5288 hlid,
5289 params->buf_size);
5290
5289 if (!ret) { 5291 if (!ret) {
5290 *ba_bitmap |= BIT(tid); 5292 *ba_bitmap |= BIT(tid);
5291 wl->ba_rx_session_count++; 5293 wl->ba_rx_session_count++;
@@ -5306,7 +5308,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
5306 } 5308 }
5307 5309
5308 ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false, 5310 ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false,
5309 hlid); 5311 hlid, 0);
5310 if (!ret) { 5312 if (!ret) {
5311 *ba_bitmap &= ~BIT(tid); 5313 *ba_bitmap &= ~BIT(tid);
5312 wl->ba_rx_session_count--; 5314 wl->ba_rx_session_count--;