Эх сурвалжийг харах

qcacmn: Add activation reason to serialization cmd structure

Add field for activation reason to serialization cmd structure
Also modified the other boolean fields to a bit field for optimization

The new field added to serialization command structure will be used
to update the activation reason about how the command was activated,
either directly from active queue or as part of movement of
pending to active queue.

Change-Id: I8a1da79b7ef60e8d8a739ae2f265418418e2c859
CRs-Fixed: 2361327
Vivek 6 жил өмнө
parent
commit
40d1bc8914

+ 14 - 3
umac/cmn_services/serialization/inc/wlan_serialization_api.h

@@ -500,6 +500,16 @@ void *wlan_serialization_get_active_cmd(struct wlan_objmgr_psoc *psoc,
 
 /* Preprocessor Definitions and Constants */
 
+enum ser_queue_reason {
+	SER_REQUEST,
+	SER_REMOVE,
+	SER_CANCEL,
+	SER_TIMEOUT,
+	SER_ACTIVATION_FAILED,
+	SER_PENDING_TO_ACTIVE,
+	SER_QUEUE_ACTION_MAX,
+};
+
 /*
  * struct wlan_serialization_queued_cmd_info member queue_type specifies the
  * below values to cancel the commands in these queues. Setting both the
@@ -712,9 +722,10 @@ struct wlan_serialization_command {
 	uint32_t cmd_id;
 	wlan_serialization_cmd_callback cmd_cb;
 	enum wlan_umac_comp_id source;
-	bool is_high_priority;
-	bool is_blocking;
-	bool queue_disable;
+	uint8_t is_high_priority:1,
+		is_blocking:1,
+		queue_disable:1,
+		activation_reason:3;
 	uint16_t cmd_timeout_duration;
 	union {
 		struct wlan_objmgr_vdev *vdev;

+ 5 - 2
umac/cmn_services/serialization/src/wlan_serialization_internal.c

@@ -276,7 +276,7 @@ wlan_serialization_enqueue_cmd(struct wlan_serialization_command *cmd,
 
 	if (WLAN_SER_CMD_ACTIVE == status)
 		wlan_serialization_activate_cmd(cmd_list,
-						ser_pdev_obj);
+						ser_pdev_obj, ser_reason);
 
 error:
 	ser_exit();
@@ -286,7 +286,8 @@ error:
 
 QDF_STATUS wlan_serialization_activate_cmd(
 			struct wlan_serialization_command_list *cmd_list,
-			struct wlan_ser_pdev_obj *ser_pdev_obj)
+			struct wlan_ser_pdev_obj *ser_pdev_obj,
+			enum ser_queue_reason ser_reason)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	struct wlan_objmgr_psoc *psoc = NULL;
@@ -319,6 +320,8 @@ QDF_STATUS wlan_serialization_activate_cmd(
 		  cmd_list->cmd.cmd_id,
 		  "WLAN_SER_CB_ACTIVATE_CMD");
 
+	cmd_list->cmd.activation_reason = ser_reason;
+
 	status = cmd_list->cmd.cmd_cb(&cmd_list->cmd,
 				WLAN_SER_CB_ACTIVATE_CMD);
 

+ 2 - 1
umac/cmn_services/serialization/src/wlan_serialization_internal_i.h

@@ -83,7 +83,8 @@ wlan_serialization_enqueue_cmd(struct wlan_serialization_command *cmd,
 QDF_STATUS
 wlan_serialization_activate_cmd(
 		struct wlan_serialization_command_list *cmd_list,
-		struct wlan_ser_pdev_obj *ser_pdev_obj);
+		struct wlan_ser_pdev_obj *ser_pdev_obj,
+		enum ser_queue_reason ser_reason);
 
 /**
  * wlan_serialization_move_pending_to_active() - Move a cmd from pending

+ 2 - 1
umac/cmn_services/serialization/src/wlan_serialization_non_scan.c

@@ -364,7 +364,8 @@ wlan_ser_move_non_scan_pending_to_active(
 
 		wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
 
-		wlan_serialization_activate_cmd(active_cmd_list, ser_pdev_obj);
+		wlan_serialization_activate_cmd(active_cmd_list, ser_pdev_obj,
+						SER_PENDING_TO_ACTIVE);
 
 		wlan_serialization_acquire_lock(&pdev_queue->pdev_queue_lock);
 

+ 2 - 1
umac/cmn_services/serialization/src/wlan_serialization_scan.c

@@ -443,7 +443,8 @@ enum wlan_serialization_status wlan_ser_move_scan_pending_to_active(
 
 	wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
 
-	wlan_serialization_activate_cmd(active_cmd_list, ser_pdev_obj);
+	wlan_serialization_activate_cmd(active_cmd_list, ser_pdev_obj,
+					SER_PENDING_TO_ACTIVE);
 error:
 	ser_exit();
 	return status;

+ 0 - 10
umac/cmn_services/serialization/src/wlan_serialization_utils_i.h

@@ -629,16 +629,6 @@ QDF_STATUS wlan_serialization_peek_next(
 #include "wlan_serialization_debug_i.h"
 #endif
 
-enum ser_queue_reason {
-	SER_REQUEST,
-	SER_REMOVE,
-	SER_CANCEL,
-	SER_TIMEOUT,
-	SER_ACTIVATION_FAILED,
-	SER_PENDING_TO_ACTIVE,
-	SER_QUEUE_ACTION_MAX,
-};
-
 /*
  * Below bit positions are used to identify if a
  * serialization command is in use or marked for