Explorar o código

qcacld-3.0: Add correct BSSID in ADDBA resp for NDI

Currently, host driver extracts the BSSID from pe session while
prepare the ADDBA response. For NDI, it caches BSSID as self mac
address. So, peer receives wrong BSSID from ADDBA response.

To fix this, extract the BSSID from ADDBA request frame and sent it
in ADDBA response frame.

Change-Id: I8addf0f128b1befbfdf3fa68a2e37c511ff5a58f
CRs-Fixed: 3617624
Rahul Gusain hai 1 ano
pai
achega
62104f1d9d

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

@@ -1612,7 +1612,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, buff_size);
+			mac_hdr->fc.wep, buff_size, mac_hdr->bssId);
 		if (qdf_status != QDF_STATUS_SUCCESS) {
 			pe_err("Failed to send addba response frame");
 			cdp_addba_resp_tx_completion(

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

@@ -6226,9 +6226,12 @@ void lim_prepare_tdls_with_mlo(struct pe_session *session,
 #endif
 
 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, uint16_t calc_buff_size)
+					 tSirMacAddr peer_mac, uint16_t tid,
+					 struct pe_session *session,
+					 uint8_t addba_extn_present,
+					 uint8_t amsdu_support, uint8_t is_wep,
+					 uint16_t calc_buff_size,
+					 tSirMacAddr bssid)
 {
 
 	tDot11faddba_rsp frm;
@@ -6407,7 +6410,8 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
 
 	/* Update A3 with the BSSID */
 	mgmt_hdr = (tpSirMacMgmtHdr) frame_ptr;
-	sir_copy_mac_addr(mgmt_hdr->bssId, session->bssId);
+
+	sir_copy_mac_addr(mgmt_hdr->bssId, bssid);
 
 	/* ADDBA Response is a robust mgmt action frame,
 	 * set the "protect" (aka WEP) bit in the FC

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

@@ -1434,6 +1434,7 @@ typedef enum sHalBitVal         /* For Bit operations */
  * @amsdu_support: amsdu in ampdu support
  * @is_wep: protected bit in fc
  * @calc_buff_size: Calculated buf size from peer and self capabilities
+ * @bssid: peer BSSID
  *
  * 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.
@@ -1445,7 +1446,8 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
 					 struct pe_session *session,
 					 uint8_t addba_extn_present,
 					 uint8_t amsdu_support, uint8_t is_wep,
-					 uint16_t calc_buff_size);
+					 uint16_t calc_buff_size,
+					 tSirMacAddr bssid);
 
 /**
  * lim_send_delba_action_frame() - Send delba to peer