Prechádzať zdrojové kódy

qcacmn: Fix compilation error in vdev state machine

Fix the compilation error in vdev state machine and make state
transition logs from debug to info.

Change-Id: I7d7975931232f041206bdb64c639456bf9327b3f
CRs-Fixed: 2321726
Abhishek Singh 6 rokov pred
rodič
commit
97d6a98c03

+ 11 - 0
umac/cmn_services/sm_engine/inc/wlan_sm_engine_dbg.h

@@ -39,6 +39,17 @@
 #define sm_engine_debug(params...) \
 		QDF_TRACE_DEBUG(QDF_MODULE_ID_SM_ENGINE, params)
 
+#define sm_engine_nofl_alert(params...) \
+	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_SM_ENGINE, params)
+#define sm_engine_nofl_err(params...) \
+	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_SM_ENGINE, params)
+#define sm_engine_nofl_warn(params...) \
+	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_SM_ENGINE, params)
+#define sm_engine_nofl_info(params...) \
+	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_SM_ENGINE, params)
+#define sm_engine_nofl_debug(params...) \
+	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_SM_ENGINE, params)
+
 #define WLAN_SM_ENGINE_HISTORY_SIZE  50
 struct wlan_sm;
 /**

+ 20 - 19
umac/cmn_services/sm_engine/src/wlan_sm_engine.c

@@ -53,25 +53,24 @@ QDF_STATUS wlan_sm_dispatch(struct wlan_sm *sm, uint16_t event,
 		if (event < sm->num_event_names)
 			event_name = sm->event_names[event];
 
-		sm_engine_debug("%s: current state %s event %s[%d]",
-				sm->name,
-				sm->state_info[sm->cur_state].name,
-				event_name ? event_name : "UNKNOWN_EVENT",
-				event);
+		sm_engine_nofl_info("%s: current state %s[%d] event %s[%d]",
+				    sm->name, sm->state_info[state].name, state,
+				    event_name ? event_name : "UNKNOWN_EVENT",
+				    event);
 	} else {
-		sm_engine_debug("%s: current state %s event %d",
-				sm->name,
-				sm->state_info[sm->cur_state].name,
-				event);
+		sm_engine_nofl_info("%s: current state %s[%d] event %d",
+				    sm->name,
+				    sm->state_info[state].name, state,
+				    event);
 	}
 
 	if (state != WLAN_SM_ENGINE_STATE_NONE) {
 		event_handled = (*sm->state_info[state].wlan_sm_event) (
 				 sm->ctx, event, event_data_len, event_data);
 		if (!event_handled) {
-			sm_engine_err("%s: event %d not handled in state %s",
-				      sm->name, event,
-				      sm->state_info[sm->cur_state].name);
+			sm_engine_nofl_err("%s: event %d not handled in state %s",
+					   sm->name, event,
+					   sm->state_info[sm->cur_state].name);
 			return QDF_STATUS_E_INVAL;
 		}
 	}
@@ -146,13 +145,15 @@ void wlan_sm_transition_to(struct wlan_sm *sm, uint8_t state)
 	else
 		new_sub_st = 0;
 
-	sm_engine_debug("%s: transition(state) %s => %s",
-			sm->name, state_info[old_state].name,
-			state_info[new_state].name);
-	sm_engine_debug("%s: transition(sub_state) %s => %s",
-			sm->name,
-			ol_sub_st ? state_info[ol_sub_st].name : "IDLE",
-			new_sub_st ? state_info[new_sub_st].name : "IDLE");
+	sm_engine_nofl_info("%s: transition(state) %s[%d] => %s[%d]",
+			    sm->name, state_info[old_state].name, old_state,
+			    state_info[new_state].name, new_state);
+	sm_engine_nofl_info("%s: transition(sub_state) %s[%d] => %s[%d]",
+			    sm->name,
+			    ol_sub_st ? state_info[ol_sub_st].name : "IDLE",
+			    ol_sub_st,
+			    new_sub_st ? state_info[new_sub_st].name : "IDLE",
+			    new_sub_st);
 
 	/*
 	 * call the exit function(s) of the current state hierarchy

+ 9 - 2
umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c

@@ -1783,8 +1783,11 @@ void mlme_vdev_sm_history_print(struct vdev_mlme_obj *vdev_mlme)
 QDF_STATUS mlme_vdev_sm_create(struct vdev_mlme_obj *vdev_mlme)
 {
 	struct wlan_sm *sm;
+	uint8_t name[WLAN_SM_ENGINE_MAX_NAME];
 
-	sm = wlan_sm_create("VDEV MLME", vdev_mlme,
+	snprintf(name, sizeof(name), "VDEV%d-MLME",
+		 wlan_vdev_get_id(vdev_mlme->vdev));
+	sm = wlan_sm_create(name, vdev_mlme,
 			    WLAN_VDEV_S_INIT,
 			    sm_info,
 			    QDF_ARRAY_SIZE(sm_info),
@@ -1806,8 +1809,12 @@ QDF_STATUS mlme_vdev_sm_create(struct vdev_mlme_obj *vdev_mlme)
 QDF_STATUS mlme_vdev_sm_create(struct vdev_mlme_obj *vdev_mlme)
 {
 	struct wlan_sm *sm;
+	uint8_t name[WLAN_SM_ENGINE_MAX_NAME];
 
-	sm = wlan_sm_create("VDEV MLME", vdev_mlme, 0, NULL, 0, NULL, 0);
+	snprintf(name, sizeof(name), "VDEV%d-MLME",
+		 wlan_vdev_get_id(vdev_mlme->vdev));
+
+	sm = wlan_sm_create(name, vdev_mlme, 0, NULL, 0, NULL, 0);
 	if (!sm) {
 		mlme_err("VDEV MLME SM allocation failed");
 		return QDF_STATUS_E_FAILURE;

+ 1 - 0
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mlme_api.c

@@ -25,6 +25,7 @@
 #include "include/wlan_vdev_mlme.h"
 #include "../../core/src/vdev_mlme_sm.h"
 #include <wlan_vdev_mlme_api.h>
+#include <qdf_module.h>
 
 struct vdev_mlme_obj *wlan_vdev_mlme_get_cmpt_obj(struct wlan_objmgr_vdev *vdev)
 {

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -864,7 +864,9 @@ struct hidden_ssid_vdev_restart_params {
 	uint32_t info;
 	uint32_t reg_info_1;
 	uint32_t reg_info_2;
+#ifndef CONFIG_VDEV_SM
 	qdf_atomic_t hidden_ssid_restart_in_progress;
+#endif
 };
 
 /**