Parcourir la source

qcacmn: Fix type of parameter passed to serialization timeout callback

By mistake, current serialization is passing component's command pointer
instead passing serialization's command pointer which leads to confusion
and incorrect behavior. Fix by passing correct parameters.

When serialization module's callback to activate the command fails, it
doesn't give callback to release the memory which will lead to memory
leak. Fix by calling release memory callback.

CRs-Fixed: 2000032
Change-Id: Ic08e00fd1a815674f54c16593baeb0dd6d14d033
Krunal Soni il y a 8 ans
Parent
commit
c336de23c9

+ 2 - 0
umac/cmn_services/serialization/src/wlan_serialization_enqueue.c

@@ -97,6 +97,8 @@ wlan_serialization_add_cmd_to_given_queue(qdf_list_t *queue,
 			if (qdf_status != QDF_STATUS_SUCCESS) {
 				wlan_serialization_find_and_stop_timer(psoc,
 								&cmd_list->cmd);
+				cmd_list->cmd.cmd_cb(&cmd_list->cmd,
+						WLAN_SER_CB_RELEASE_MEM_CMD);
 				wlan_serialization_put_back_to_global_list(
 						queue, ser_pdev_obj, cmd_list);
 				wlan_serialization_move_pending_to_active(

+ 2 - 2
umac/cmn_services/serialization/src/wlan_serialization_utils.c

@@ -154,8 +154,8 @@ static void wlan_serialization_generic_timer_callback(void *arg)
 		return;
 	}
 	if (cmd->cmd_cb) {
-		cmd->cmd_cb(cmd->umac_cmd, WLAN_SER_CB_ACTIVE_CMD_TIMEOUT);
-		cmd->cmd_cb(cmd->umac_cmd, WLAN_SER_CB_RELEASE_MEM_CMD);
+		cmd->cmd_cb(cmd, WLAN_SER_CB_ACTIVE_CMD_TIMEOUT);
+		cmd->cmd_cb(cmd, WLAN_SER_CB_RELEASE_MEM_CMD);
 	}
 	serialization_err("active command timeout for cmd_id[%d]", cmd->cmd_id);
 	if (cmd->cmd_type != WLAN_SER_CMD_SCAN)