Parcourir la source

qcacld-3.0: Add src, and dst id support in PE

In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: Iaa595f9676d469bef8e4d2e284c0b1d14c2321eb
CRs-Fixed: 2305979
gaurank kathpalia il y a 6 ans
Parent
commit
3a7f25b00f

+ 6 - 2
core/mac/src/pe/lim/lim_api.c

@@ -1058,7 +1058,9 @@ void pe_free_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg)
 
 QDF_STATUS lim_post_msg_api(tpAniSirGlobal mac, struct scheduler_msg *msg)
 {
-	return scheduler_post_msg(QDF_MODULE_ID_PE, msg);
+	return scheduler_post_message(QDF_MODULE_ID_PE,
+				      QDF_MODULE_ID_PE,
+				      QDF_MODULE_ID_PE, msg);
 }
 
 QDF_STATUS lim_post_msg_high_priority(tpAniSirGlobal mac,
@@ -1277,7 +1279,9 @@ static QDF_STATUS pe_handle_probe_req_frames(tpAniSirGlobal mac_ctx,
 	msg.bodyval = 0;
 	msg.callback = pe_mc_process_handler;
 
-	status = scheduler_post_msg(QDF_MODULE_ID_SCAN, &msg);
+	status = scheduler_post_message(QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_SCAN, &msg);
 
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		pe_err_rl("Failed to post probe req frame to Scan Queue");

+ 17 - 5
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -162,7 +162,9 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg)
 	message.type    = SIR_HAL_PDEV_SET_HW_MODE;
 
 	pe_debug("Posting SIR_HAL_SOC_SET_HW_MOD to WMA");
-	status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
+	status = scheduler_post_message(QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_WMA,
+					QDF_MODULE_ID_WMA, &message);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		pe_err("scheduler_post_msg failed!(err=%d)",
 			status);
@@ -233,7 +235,9 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac,
 
 	pe_debug("Post SIR_HAL_PDEV_DUAL_MAC_CFG_REQ to WMA: %x %x",
 		req_msg->scan_config, req_msg->fw_mode_config);
-	status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
+	status = scheduler_post_message(QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_WMA,
+					QDF_MODULE_ID_WMA, &message);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		pe_err("scheduler_post_msg failed!(err=%d)",
 				status);
@@ -297,7 +301,9 @@ static QDF_STATUS lim_process_set_antenna_mode_req(tpAniSirGlobal mac,
 	pe_debug("Post SIR_HAL_SOC_ANTENNA_MODE_REQ to WMA: %d %d",
 		req_msg->num_rx_chains,
 		req_msg->num_tx_chains);
-	status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
+	status = scheduler_post_message(QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_WMA,
+					QDF_MODULE_ID_WMA, &message);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		pe_err("scheduler_post_msg failed!(err=%d)",
 				status);
@@ -4032,7 +4038,10 @@ static void __lim_process_sme_set_ht2040_mode(tpAniSirGlobal pMac,
 			msg.reserved = 0;
 			msg.bodyptr = pHtOpMode;
 			if (!QDF_IS_STATUS_SUCCESS
-				    (scheduler_post_msg(QDF_MODULE_ID_WMA, &msg))) {
+				    (scheduler_post_message(QDF_MODULE_ID_PE,
+							    QDF_MODULE_ID_WMA,
+							    QDF_MODULE_ID_WMA,
+							    &msg))) {
 				pe_err("Not able to post WMA_UPDATE_OP_MODE message to WMA");
 				qdf_mem_free(pHtOpMode);
 				return;
@@ -6031,7 +6040,10 @@ void lim_send_obss_color_collision_cfg(tpAniSirGlobal mac_ctx,
 	msg.bodyptr = cfg_param;
 	msg.reserved = 0;
 
-	if (QDF_IS_STATUS_ERROR(scheduler_post_msg(QDF_MODULE_ID_WMA, &msg))) {
+	if (QDF_IS_STATUS_ERROR(scheduler_post_message(QDF_MODULE_ID_PE,
+						       QDF_MODULE_ID_WMA,
+						       QDF_MODULE_ID_WMA,
+						       &msg))) {
 		pe_err("Failed to post WMA_OBSS_COLOR_COLLISION_REQ to WMA");
 		qdf_mem_free(cfg_param);
 	} else {

+ 9 - 3
core/mac/src/pe/lim/lim_process_tdls.c

@@ -2709,7 +2709,9 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(tpAniSirGlobal pMac,
 	mmhMsg.bodyptr = addStaRsp;
 	mmhMsg.callback = tgt_tdls_add_peer_rsp;
 
-	return scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
+	return scheduler_post_message(QDF_MODULE_ID_PE,
+				      QDF_MODULE_ID_TDLS,
+				      QDF_MODULE_ID_TARGET_IF, &mmhMsg);
 }
 
 /*
@@ -2801,7 +2803,9 @@ lim_send_tdls_comp_mgmt_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 	sme_rsp->psoc = mac_ctx->psoc;
 	msg.bodyptr = sme_rsp;
 	msg.callback = tgt_tdls_send_mgmt_rsp;
-	scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &msg);
+	scheduler_post_message(QDF_MODULE_ID_PE,
+			       QDF_MODULE_ID_TDLS,
+			       QDF_MODULE_ID_TARGET_IF, &msg);
 
 }
 
@@ -2970,7 +2974,9 @@ static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac,
 	pDelSta->psoc = pMac->psoc;
 	mmhMsg.bodyptr = pDelSta;
 	mmhMsg.callback = tgt_tdls_del_peer_rsp;
-	return scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
+	return scheduler_post_message(QDF_MODULE_ID_PE,
+				      QDF_MODULE_ID_TDLS,
+				      QDF_MODULE_ID_TARGET_IF, &mmhMsg);
 }
 
 /*

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

@@ -1169,7 +1169,9 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac,
 
 	pSirMgmtTxCompletionInd->psoc = pMac->psoc;
 	mmhMsg.callback = tgt_tdls_send_mgmt_tx_completion;
-	scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &mmhMsg);
+	scheduler_post_message(QDF_MODULE_ID_PE,
+			       QDF_MODULE_ID_TDLS,
+			       QDF_MODULE_ID_TARGET_IF, &mmhMsg);
 	return;
 } /*** end lim_send_sme_tdls_delete_all_peer_ind() ***/
 
@@ -2499,7 +2501,9 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal mac_ctx, uint16_t msgType,
 		msg.type = eWNI_SME_NSS_UPDATE_RSP;
 		msg.bodyptr = bcn_tx_comp_rsp;
 		msg.bodyval = 0;
-		status = scheduler_post_msg(QDF_MODULE_ID_SME, &msg);
+		status = scheduler_post_message(QDF_MODULE_ID_PE,
+						QDF_MODULE_ID_SME,
+						QDF_MODULE_ID_SME, &msg);
 		if (QDF_IS_STATUS_ERROR(status)) {
 			sme_err("Failed to post eWNI_SME_NSS_UPDATE_RSP");
 			qdf_mem_free(bcn_tx_comp_rsp);

+ 9 - 3
core/mac/src/pe/lim/lim_utils.c

@@ -6359,7 +6359,9 @@ static QDF_STATUS lim_send_ie(tpAniSirGlobal mac_ctx, uint32_t sme_session_id,
 	msg.bodyptr = ie_msg;
 	msg.reserved = 0;
 
-	status = scheduler_post_msg(QDF_MODULE_ID_WMA, &msg);
+	status = scheduler_post_message(QDF_MODULE_ID_PE,
+					QDF_MODULE_ID_WMA,
+					QDF_MODULE_ID_WMA, &msg);
 	if (QDF_STATUS_SUCCESS != status) {
 		pe_err("Not able to post WMA_SET_IE_INFO to WMA");
 		qdf_mem_free(ie_msg);
@@ -6537,7 +6539,9 @@ QDF_STATUS lim_send_ext_cap_ie(tpAniSirGlobal mac_ctx,
 	msg.reserved = 0;
 
 	if (QDF_STATUS_SUCCESS !=
-		scheduler_post_msg(QDF_MODULE_ID_WMA, &msg)) {
+		scheduler_post_message(QDF_MODULE_ID_PE,
+				       QDF_MODULE_ID_WMA,
+				       QDF_MODULE_ID_WMA, &msg)) {
 		pe_err("Not able to post WMA_SET_IE_INFO to WDA");
 		qdf_mem_free(vdev_ie);
 		return QDF_STATUS_E_FAILURE;
@@ -8416,7 +8420,9 @@ void lim_process_ap_ecsa_timeout(void *data)
 		msg.type = eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND;
 		msg.bodyptr = chan_switch_tx_rsp;
 
-		status = scheduler_post_msg(QDF_MODULE_ID_SME, &msg);
+		status = scheduler_post_message(QDF_MODULE_ID_PE,
+						QDF_MODULE_ID_SME,
+						QDF_MODULE_ID_SME, &msg);
 		if (QDF_IS_STATUS_ERROR(status)) {
 			sme_err("Failed to post eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND");
 			qdf_mem_free(chan_switch_tx_rsp);

+ 3 - 1
core/mac/src/pe/sch/sch_beacon_process.c

@@ -1459,7 +1459,9 @@ QDF_STATUS lim_obss_send_detection_cfg(tpAniSirGlobal mac_ctx,
 		msg.type = WMA_OBSS_DETECTION_REQ;
 		msg.bodyptr = req_param;
 		msg.reserved = 0;
-		status = scheduler_post_msg(QDF_MODULE_ID_WMA, &msg);
+		status = scheduler_post_message(QDF_MODULE_ID_PE,
+						QDF_MODULE_ID_WMA,
+						QDF_MODULE_ID_WMA, &msg);
 		if (QDF_IS_STATUS_ERROR(status)) {
 			pe_err("Failed to post WMA_OBSS_DETECTION_REQ to WMA");
 			qdf_mem_free(req_param);