From 0d86c3cb300dd6cf04ce7bd7bde15c7085801268 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Fri, 18 Jun 2021 00:14:34 +0530 Subject: [PATCH] qcacld-3.0: Consider calculated buf size for NDI ADDBA window size Currently, ADDBA window size is calculated based on self HE capability and peer advertised window size in lim_process_addba_req(). But HE capability of the peer is also considered while sending ADDBA response. In NDI case, peer HE capability is not available and results in a non-HE window size(64). But there is no need to check peer HE capability as it advertises the window size in ADDBA request. Skip the he_cap check for NDI. Change-Id: I2d1df6f3cba9eac009ba59fcf33db88c907171bb CRs-Fixed: 2961524 --- core/mac/src/pe/lim/lim_process_action_frame.c | 2 +- core/mac/src/pe/lim/lim_send_management_frames.c | 6 ++++-- core/mac/src/pe/lim/lim_types.h | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c index 3af5b2e04f8f..f5d319e62853 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -1510,7 +1510,7 @@ static void lim_process_addba_req(struct mac_context *mac_ctx, uint8_t *rx_pkt_i session, addba_req->addba_extn_element.present, addba_req->addba_param_set.amsdu_supp, - mac_hdr->fc.wep); + mac_hdr->fc.wep, buff_size); if (qdf_status != QDF_STATUS_SUCCESS) { pe_err("Failed to send addba response frame"); cdp_addba_resp_tx_completion( diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 06e3345b6f37..a42eed93d0bf 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -5319,7 +5319,7 @@ returnAfterError: QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx, tSirMacAddr peer_mac, uint16_t tid, struct pe_session *session, uint8_t addba_extn_present, - uint8_t amsdu_support, uint8_t is_wep) + uint8_t amsdu_support, uint8_t is_wep, uint16_t calc_buff_size) { tDot11faddba_rsp frm; @@ -5363,7 +5363,9 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx, if (sta_ds && lim_is_session_he_capable(session)) he_cap = lim_is_sta_he_capable(sta_ds); - if (he_cap) + if (sta_ds && sta_ds->staType == STA_ENTRY_NDI_PEER) + frm.addba_param_set.buff_size = calc_buff_size; + else if (he_cap) frm.addba_param_set.buff_size = MAX_BA_BUFF_SIZE; else frm.addba_param_set.buff_size = SIR_MAC_BA_DEFAULT_BUFF_SIZE; diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 3b2f44821e06..c7265930407e 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -1232,6 +1232,7 @@ typedef enum sHalBitVal /* For Bit operations */ * @addba_extn_present: ADDBA extension present flag * @amsdu_support: amsdu in ampdu support * @is_wep: protected bit in fc + * @calc_buff_size: Calculated buf size from peer and self capabilities * * This function is called when ADDBA request is successful. ADDBA response is * setup by calling addba_response_setup API and frame is then sent out OTA. @@ -1242,7 +1243,8 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx, tSirMacAddr peer_mac, uint16_t tid, struct pe_session *session, uint8_t addba_extn_present, - uint8_t amsdu_support, uint8_t is_wep); + uint8_t amsdu_support, uint8_t is_wep, + uint16_t calc_buff_size); /** * lim_send_delba_action_frame() - Send delba to peer