Browse Source

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
Srinivas Dasari 3 years ago
parent
commit
06b376bbee

+ 1 - 1
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -1520,7 +1520,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(

+ 4 - 2
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -5346,7 +5346,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;
@@ -5390,7 +5390,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;

+ 3 - 1
core/mac/src/pe/lim/lim_types.h

@@ -1217,6 +1217,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.
@@ -1227,7 +1228,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