Преглед на файлове

qcacld-3.0: Enable policy mgr component in CLD

Policy mgr component related files moved from hostcmn to CLD, this
change add its initializion functions to CLD framework, change Kbuild
to enable it.

Change-Id: I0a87d93b9cf639aa66a10f9ae55ef8cb1dfbb80e
CRs-Fixed: 2361570
Wu Gao преди 6 години
родител
ревизия
d6b5e40780
променени са 3 файла, в които са добавени 30 реда и са изтрити 12 реда
  1. 11 11
      Kbuild
  2. 10 1
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c
  3. 9 0
      core/hdd/src/wlan_hdd_main.c

+ 11 - 11
Kbuild

@@ -986,17 +986,17 @@ P2P_OBJS := $(P2P_DISPATCHER_OBJ_DIR)/wlan_p2p_ucfg_api.o \
 	    $(P2P_TARGET_IF_SRC)/target_if_p2p.o
 
 ###### UMAC POLICY MGR ########
-UMAC_POLICY_MGR_DIR := $(WLAN_COMMON_ROOT)/umac/cmn_services/policy_mgr
+POLICY_MGR_DIR := components/cmn_services/policy_mgr
 
-UMAC_POLICY_MGR_INC := -I$(WLAN_COMMON_INC)/umac/cmn_services/policy_mgr/inc \
-		-I$(WLAN_COMMON_INC)/umac/cmn_services/policy_mgr/src
+POLICY_MGR_INC := -I$(WLAN_ROOT)/$(POLICY_MGR_DIR)/inc \
+		  -I$(WLAN_ROOT)/$(POLICY_MGR_DIR)/src
 
-UMAC_POLICY_MGR_OBJS := $(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_action.o \
-	$(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_core.o \
-	$(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_get_set_utils.o \
-	$(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_init_deinit.o \
-	$(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_ucfg.o \
-	$(UMAC_POLICY_MGR_DIR)/src/wlan_policy_mgr_pcl.o \
+POLICY_MGR_OBJS := $(POLICY_MGR_DIR)/src/wlan_policy_mgr_action.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_core.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_get_set_utils.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_init_deinit.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_ucfg.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_pcl.o \
 
 ###### UMAC TDLS ########
 UMAC_TDLS_DIR := $(WLAN_COMMON_ROOT)/umac/tdls
@@ -1714,7 +1714,7 @@ INCS +=		$(UMAC_OBJMGR_INC)
 INCS +=		$(UMAC_MGMT_TXRX_INC)
 INCS +=		$(PMO_INC)
 INCS +=		$(P2P_INC)
-INCS +=		$(UMAC_POLICY_MGR_INC)
+INCS +=		$(POLICY_MGR_INC)
 INCS +=		$(TARGET_INC)
 INCS +=		$(UMAC_TDLS_INC)
 INCS +=		$(UMAC_SER_INC)
@@ -1803,7 +1803,7 @@ OBJS +=		$(UMAC_MGMT_TXRX_OBJS)
 OBJS +=		$(UMAC_TDLS_OBJS)
 OBJS +=		$(PMO_OBJS)
 OBJS +=		$(P2P_OBJS)
-OBJS +=		$(UMAC_POLICY_MGR_OBJS)
+OBJS +=		$(POLICY_MGR_OBJS)
 OBJS +=		$(WLAN_LOGGING_OBJS)
 OBJS +=		$(NLINK_OBJS)
 OBJS +=		$(PTT_OBJS)

+ 10 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c

@@ -82,15 +82,24 @@ QDF_STATUS ucfg_policy_mgr_psoc_open(struct wlan_objmgr_psoc *psoc)
 	QDF_STATUS status;
 
 	status = policy_mgr_init_cfg(psoc);
-	if (status != QDF_STATUS_SUCCESS) {
+	if (QDF_IS_STATUS_ERROR(status)) {
 		policy_mgr_err("pm_ctx is NULL");
 		return status;
 	}
+
+	status = policy_mgr_psoc_open(psoc);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		policy_mgr_err("psoc open fail");
+		policy_mgr_psoc_close(psoc);
+		return status;
+	}
+
 	return QDF_STATUS_SUCCESS;
 }
 
 void ucfg_policy_mgr_psoc_close(struct wlan_objmgr_psoc *psoc)
 {
+	policy_mgr_psoc_close(psoc);
 	policy_mgr_deinit_cfg(psoc);
 }
 

+ 9 - 0
core/hdd/src/wlan_hdd_main.c

@@ -13021,8 +13021,14 @@ static QDF_STATUS hdd_component_init(void)
 	if (QDF_IS_STATUS_ERROR(status))
 		goto nan_deinit;
 
+	status = policy_mgr_init();
+	if (QDF_IS_STATUS_ERROR(status))
+		goto p2p_deinit;
+
 	return QDF_STATUS_SUCCESS;
 
+p2p_deinit:
+	ucfg_p2p_deinit();
 nan_deinit:
 	nan_deinit();
 action_oui_deinit:
@@ -13053,6 +13059,7 @@ dispatcher_deinit:
 static void hdd_component_deinit(void)
 {
 	/* deinitialize non-converged components */
+	policy_mgr_deinit();
 	ucfg_p2p_deinit();
 	nan_deinit();
 	ucfg_action_oui_deinit();
@@ -13119,10 +13126,12 @@ void hdd_component_psoc_enable(struct wlan_objmgr_psoc *psoc)
 	disa_psoc_enable(psoc);
 	nan_psoc_enable(psoc);
 	p2p_psoc_enable(psoc);
+	policy_mgr_psoc_enable(psoc);
 }
 
 void hdd_component_psoc_disable(struct wlan_objmgr_psoc *psoc)
 {
+	policy_mgr_psoc_disable(psoc);
 	p2p_psoc_disable(psoc);
 	nan_psoc_disable(psoc);
 	disa_psoc_disable(psoc);