From 793ea6f87be6501e81dbda0230c81b2a2b01b588 Mon Sep 17 00:00:00 2001 From: Tiger Yu Date: Fri, 6 Dec 2019 15:22:26 +0800 Subject: [PATCH] qcacld-3.0: Recover the ba_status when fail to send addba response frame If the first addba response frame is not sent out successfully for some corner cases, the ba_status will be always set to DP_RX_BA_IN_PROGRESS. The processing for next coming addba request frames will be in dead loop. Which will block finishing the addba exchanging procedure. Add checking with the return of lim_send_addba_response_frame, if failure, will recover the ba_status to inactive status to give chance for next coming addba request frame. And also use pe_err_rl instead of pe_err to avoid excessive logging. Change-Id: Ifc6adc166b5093742b34dd7d74924f9d54146ea4 CRs-Fixed: 2579510 --- core/mac/src/pe/lim/lim_process_action_frame.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 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 90182859d7d3..d235261b953b 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -1682,17 +1682,25 @@ static void lim_process_addba_req(struct mac_context *mac_ctx, uint8_t *rx_pkt_i addba_req->addba_param_set.buff_size, addba_req->ba_start_seq_ctrl.ssn); - cdp_peer_release_ref(soc, peer, PEER_DEBUG_ID_WMA_ADDBA_REQ); - if (QDF_STATUS_SUCCESS == qdf_status) { - lim_send_addba_response_frame(mac_ctx, mac_hdr->sa, - addba_req->addba_param_set.tid, session, + qdf_status = lim_send_addba_response_frame(mac_ctx, + mac_hdr->sa, + addba_req->addba_param_set.tid, + session, addba_req->addba_extn_element.present, addba_req->addba_param_set.amsdu_supp); + if (qdf_status != QDF_STATUS_SUCCESS) { + pe_err("Failed to send addba response frame"); + cdp_addba_resp_tx_completion(soc, peer, + addba_req->addba_param_set.tid, + WMI_MGMT_TX_COMP_TYPE_DISCARD); + } } else { - pe_err("Failed to process addba request"); + pe_err_rl("Failed to process addba request"); } + cdp_peer_release_ref(soc, peer, PEER_DEBUG_ID_WMA_ADDBA_REQ); + error: qdf_mem_free(addba_req); return;