Pārlūkot izejas kodu

qcacld-3.0: Remove tSirAutoShutdownEvtParams usage

Currently when an auto-shutdown timer event is handled by WMA it
allocates a tSirAutoShutdownEvtParams struct which is then passed as
the payload of a eWNI_SME_AUTO_SHUTDOWN_IND message. However when this
message is processed by SME the payload is ignored since the callback
to HDD does not require it. Therefore it is pointless for WMA to
allocate and fill a payload which SME will ignore, so remove that
aspect of the auto-shutdown timer event handling.

Change-Id: Ibb1e1122c2e29c9369c1d1119d58d15fe9b93159
CRs-Fixed: 2400335
Jeff Johnson 6 gadi atpakaļ
vecāks
revīzija
aebd823208
3 mainītis faili ar 2 papildinājumiem un 20 dzēšanām
  1. 0 4
      core/mac/inc/sir_api.h
  2. 0 1
      core/sme/src/common/sme_api.c
  3. 2 15
      core/wma/src/wma_features.c

+ 0 - 4
core/mac/inc/sir_api.h

@@ -3477,10 +3477,6 @@ struct wifi_passpoint_match {
 typedef struct {
 	uint32_t timer_val;
 } tSirAutoShutdownCmdParams;
-
-typedef struct {
-	uint32_t shutdown_reason;
-} tSirAutoShutdownEvtParams;
 #endif
 
 #ifdef WLAN_POWER_DEBUGFS

+ 0 - 1
core/sme/src/common/sme_api.c

@@ -2038,7 +2038,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 				  FL("Auto shutdown notification"));
 			mac->sme.pAutoShutdownNotificationCb();
 		}
-		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif
 	case eWNI_SME_DFS_RADAR_FOUND:

+ 2 - 15
core/wma/src/wma_features.c

@@ -185,30 +185,17 @@ static inline void qdf_wma_wow_wakeup_stats_event(tp_wma_handle wma)
  */
 static int wma_wake_reason_auto_shutdown(void)
 {
-	tSirAutoShutdownEvtParams *auto_sh_evt;
 	QDF_STATUS qdf_status;
 	struct scheduler_msg sme_msg = { 0 };
 
-	auto_sh_evt = qdf_mem_malloc(sizeof(tSirAutoShutdownEvtParams));
-	if (!auto_sh_evt)
-		return -ENOMEM;
-
-	auto_sh_evt->shutdown_reason =
-		WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY;
 	sme_msg.type = eWNI_SME_AUTO_SHUTDOWN_IND;
-	sme_msg.bodyptr = auto_sh_evt;
-	sme_msg.bodyval = 0;
-
 	qdf_status = scheduler_post_message(QDF_MODULE_ID_WMA,
 					    QDF_MODULE_ID_SME,
 					    QDF_MODULE_ID_SME, &sme_msg);
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
 		WMA_LOGE("Fail to post eWNI_SME_AUTO_SHUTDOWN_IND msg to SME");
-		qdf_mem_free(auto_sh_evt);
-		return -EINVAL;
-	}
 
-	return 0;
+	return qdf_status_to_os_return(qdf_status);
 }
 #else
 static inline int wma_wake_reason_auto_shutdown(void)