Browse Source

qcacld-3.0: Delete all TDLS peers on receiving CSA from AP

qcacld-2.0 to qcacld-3.0 propagation

On receiving channel switch announcement from AP delete all TDLS
peers before leaving BSS and proceed for channel switch.

Change-Id: I898f501d9d0afbbfef3a553ed63b52da5cd8f978
CRs-Fixed: 914129
Masti, Narayanraddi 9 năm trước cách đây
mục cha
commit
a797903ac9

+ 7 - 0
core/mac/src/pe/lim/lim_process_probe_rsp_frame.c

@@ -211,6 +211,13 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info,
 		}
 		if (LIM_IS_STA_ROLE(session_entry)) {
 			if (probe_rsp->channelSwitchPresent) {
+				/*
+				 * on receiving channel switch announcement
+				 * from AP, delete all TDLS peers before
+				 * leaving BSS and proceed for channel switch
+				 */
+				lim_delete_tdls_peers(mac_ctx, session_entry);
+
 				lim_update_channel_switch(mac_ctx,
 					probe_rsp,
 					session_entry);

+ 6 - 0
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1984,6 +1984,12 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
 	}
 
 	if (LIM_IS_STA_ROLE(session_entry)) {
+		/*
+		 * on receiving channel switch announcement from AP, delete all
+		 * TDLS peers before leaving BSS and proceed for channel switch
+		 */
+		lim_delete_tdls_peers(mac_ctx, session_entry);
+
 		session_entry->gLimChannelSwitch.switchMode =
 			csa_params->switchmode;
 		/* timer already started by firmware, switch immediately */

+ 8 - 2
core/mac/src/pe/lim/lim_types.h

@@ -539,14 +539,20 @@ void lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac,
 					   tpPESession psessionEntry);
 void lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, tpPESession psessionEntry,
 				     uint32_t txCompleteStatus);
-tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal pMac,
-				    tpPESession psessionEntry);
+tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
+				    tpPESession session_entry);
 CDF_STATUS lim_process_tdls_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession);
 tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac,
 					   tSirMacAddr peerMac, uint16_t reason,
 					   uint8_t responder,
 					   tpPESession psessionEntry,
 					   uint8_t *addIe, uint16_t addIeLen);
+#else
+static inline tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
+						tpPESession session_entry)
+{
+	return eSIR_SUCCESS;
+}
 #endif
 
 /* Algorithms & Link Monitoring related functions */

+ 8 - 0
core/mac/src/pe/sch/sch_beacon_process.c

@@ -739,6 +739,14 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx,
 	    || LIM_IS_IBSS_ROLE(session)) {
 		/* Channel Switch information element updated */
 		if (bcn->channelSwitchPresent) {
+			/*
+			 * on receiving channel switch announcement from AP,
+			 * delete all TDLS peers before leaving BSS and proceed
+			 * for channel switch
+			 */
+			if (LIM_IS_STA_ROLE(session))
+				lim_delete_tdls_peers(mac_ctx, session);
+
 			lim_update_channel_switch(mac_ctx, bcn, session);
 		} else if (session->gLimSpecMgmt.dot11hChanSwState ==
 				eLIM_11H_CHANSW_RUNNING) {