Kaynağa Gözat

qcacmn: Add scheduler mq handler for mlme

Add mlme message queue handler as the call back for non scan commands
getting activated in the scheduler context.
Add cmd already exists enum to be returned if the command already exists
in the serialization queue.

Change-Id: I24fe453ffddbd4341459874458f11688adebc740
CRs-Fixed: 2377219
Santosh Anbu 6 yıl önce
ebeveyn
işleme
6e2fed8f5f

+ 1 - 1
qdf/linux/src/qdf_trace.c

@@ -3248,7 +3248,7 @@ static void set_default_trace_levels(struct category_info *cinfo)
 		[QDF_MODULE_ID_CRYPTO] = QDF_TRACE_LEVEL_NONE,
 		[QDF_MODULE_ID_DUMPPKTS] = QDF_TRACE_LEVEL_NONE,
 		[QDF_MODULE_ID_DEBUG] = QDF_TRACE_LEVEL_NONE,
-		[QDF_MODULE_ID_MLME] = QDF_TRACE_LEVEL_NONE,
+		[QDF_MODULE_ID_MLME] = QDF_TRACE_LEVEL_ERROR,
 		[QDF_MODULE_ID_RRM] = QDF_TRACE_LEVEL_NONE,
 		[QDF_MODULE_ID_WNM] = QDF_TRACE_LEVEL_NONE,
 		[QDF_MODULE_ID_P2P_PROT] = QDF_TRACE_LEVEL_NONE,

+ 9 - 0
scheduler/inc/scheduler_api.h

@@ -272,6 +272,15 @@ QDF_STATUS scheduler_os_if_mq_handler(struct scheduler_msg *msg);
  */
 QDF_STATUS scheduler_timer_q_mq_handler(struct scheduler_msg *msg);
 
+/**
+ * scheduler_mlme_mq_handler() - top level message queue handler for
+ *                               mlme queue
+ * @msg: pointer to actual message being handled
+ *
+ * Return: QDF status
+ */
+QDF_STATUS scheduler_mlme_mq_handler(struct scheduler_msg *msg);
+
 /**
  * scheduler_scan_mq_handler() - top level message queue handler for
  *                               scan queue

+ 19 - 0
scheduler/src/scheduler_api.c

@@ -472,6 +472,25 @@ QDF_STATUS scheduler_timer_q_mq_handler(struct scheduler_msg *msg)
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS scheduler_mlme_mq_handler(struct scheduler_msg *msg)
+{
+	scheduler_msg_process_fn_t mlme_msg_handler;
+
+	QDF_BUG(msg);
+	if (!msg)
+		return QDF_STATUS_E_FAILURE;
+
+	mlme_msg_handler = msg->callback;
+
+	QDF_BUG(mlme_msg_handler);
+	if (!mlme_msg_handler)
+		return QDF_STATUS_E_FAILURE;
+
+	mlme_msg_handler(msg);
+
+	return QDF_STATUS_SUCCESS;
+}
+
 QDF_STATUS scheduler_scan_mq_handler(struct scheduler_msg *msg)
 {
 	QDF_STATUS (*scan_q_msg_handler)(struct scheduler_msg *);

+ 2 - 0
umac/cmn_services/serialization/inc/wlan_serialization_api.h

@@ -677,6 +677,7 @@ enum wlan_serialization_cancel_type {
  * @WLAN_SER_CMD_DENIED_RULES_FAILED: Command denied as the rules fail
  * @WLAN_SER_CMD_DENIED_LIST_FULL: Command denied as the pending list is full
  * @WLAN_SER_CMD_QUEUE_DISABLED: Command denied as the queue is disabled
+ * @WLAN_SER_CMD_ALREADY_EXISTS: Command already exists in the queue
  * @WLAN_SER_CMD_DENIED_UNSPECIFIED: Command denied due to unknown reason
  */
 enum wlan_serialization_status {
@@ -685,6 +686,7 @@ enum wlan_serialization_status {
 	WLAN_SER_CMD_DENIED_RULES_FAILED,
 	WLAN_SER_CMD_DENIED_LIST_FULL,
 	WLAN_SER_CMD_QUEUE_DISABLED,
+	WLAN_SER_CMD_ALREADY_EXISTS,
 	WLAN_SER_CMD_DENIED_UNSPECIFIED,
 };