qcacmn: Green AP UMAC componentization
Add APIs, structures for Green AP component.
Change-Id: I4a39470104c89c20eec5440b7ae251a764151fd5
CRs-Fixed: 2166428
diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h
index 3b1230f..73d487a 100644
--- a/umac/cmn_services/inc/wlan_cmn.h
+++ b/umac/cmn_services/inc/wlan_cmn.h
@@ -122,6 +122,7 @@
* @WLAN_UMAC_COMP_OFFCHAN_TXRX: Offchan TxRx
* @WLAN_UMAC_COMP_SPLITMAC: SplitMAC
* @WLAN_UMAC_COMP_DISA: DISA encryption test
+ * @WLAN_UMAC_COMP_GREEN_AP: Green AP
*
* This id is static.
* On Adding new component, new id has to be assigned
@@ -149,6 +150,7 @@
WLAN_UMAC_COMP_SPECTRAL,
WLAN_UMAC_COMP_SPLITMAC,
WLAN_UMAC_COMP_DISA,
+ WLAN_UMAC_COMP_GREEN_AP,
WLAN_UMAC_COMP_ID_MAX,
};
diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h
index 4b77fca..493b6fe 100644
--- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h
+++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -971,6 +971,19 @@
void *roam_profile, uint8_t *channel);
/**
+ * policy_mgr_mode_specific_num_open_sessions() - to get number of open sessions
+ * for a specific mode
+ * @psoc: PSOC object information
+ * @mode: device mode
+ * @num_sessions: to store num open sessions
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS policy_mgr_mode_specific_num_open_sessions(
+ struct wlan_objmgr_psoc *psoc, enum QDF_OPMODE mode,
+ uint8_t *num_sessions);
+
+/**
* policy_mgr_concurrent_open_sessions_running() - Checks for
* concurrent open session
* @psoc: PSOC object information
diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c
index d477600..33483e0 100644
--- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c
+++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c
@@ -2053,6 +2053,22 @@
return mode;
}
+QDF_STATUS policy_mgr_mode_specific_num_open_sessions(
+ struct wlan_objmgr_psoc *psoc, enum QDF_OPMODE mode,
+ uint8_t *num_sessions)
+{
+ struct policy_mgr_psoc_priv_obj *pm_ctx;
+
+ pm_ctx = policy_mgr_get_context(psoc);
+ if (!pm_ctx) {
+ policy_mgr_err("Invalid context");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *num_sessions = pm_ctx->no_of_open_sessions[mode];
+ return QDF_STATUS_SUCCESS;
+}
+
/**
* policy_mgr_concurrent_open_sessions_running() - Checks for
* concurrent open session