Commit 4b86b46e authored by Maxim Altshul's avatar Maxim Altshul Committed by Greg Kroah-Hartman

wlcore: Pass win_size taken from ieee80211_sta to FW

commit 42c7372a 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: default avatarMaxim Altshul <maxim.altshul@ti.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ef67e00
...@@ -1419,7 +1419,8 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, ...@@ -1419,7 +1419,8 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
/* setup BA session receiver setting in the FW. */ /* setup BA session receiver setting in the FW. */
int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
u16 ssn, bool enable, u8 peer_hlid) u16 ssn, bool enable, u8 peer_hlid,
u8 win_size)
{ {
struct wl1271_acx_ba_receiver_setup *acx; struct wl1271_acx_ba_receiver_setup *acx;
int ret; int ret;
...@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, ...@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
acx->hlid = peer_hlid; acx->hlid = peer_hlid;
acx->tid = tid_index; acx->tid = tid_index;
acx->enable = enable; acx->enable = enable;
acx->win_size = wl->conf.ht.rx_ba_win_size; acx->win_size = win_size;
acx->ssn = ssn; acx->ssn = ssn;
ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx,
......
...@@ -1112,7 +1112,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl, ...@@ -1112,7 +1112,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl,
int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
struct wl12xx_vif *wlvif); struct wl12xx_vif *wlvif);
int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
u16 ssn, bool enable, u8 peer_hlid); u16 ssn, bool enable, u8 peer_hlid,
u8 win_size);
int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u64 *mactime); u64 *mactime);
int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
......
...@@ -5328,7 +5328,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, ...@@ -5328,7 +5328,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
} }
ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true, ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true,
hlid); hlid,
params->buf_size);
if (!ret) { if (!ret) {
*ba_bitmap |= BIT(tid); *ba_bitmap |= BIT(tid);
wl->ba_rx_session_count++; wl->ba_rx_session_count++;
...@@ -5349,7 +5351,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, ...@@ -5349,7 +5351,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
} }
ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false, ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false,
hlid); hlid, 0);
if (!ret) { if (!ret) {
*ba_bitmap &= ~BIT(tid); *ba_bitmap &= ~BIT(tid);
wl->ba_rx_session_count--; wl->ba_rx_session_count--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment