qcacld-3.0: Replace hHal in sap_module
Recently all instances of tHalHandle were replaced with mac_handle_t
to align with current usage and the Linux coding standard. To align
with the new naming now replace all instances of hHal with mac_handle
in sap_module.
Change-Id: I5422b4a7e1a464a8f870cea33069c47401c73bac
CRs-Fixed: 2349566
diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h
index 0e3104d..106ccb7 100644
--- a/core/sap/inc/sap_api.h
+++ b/core/sap/inc/sap_api.h
@@ -1244,20 +1244,63 @@
*/
QDF_STATUS wlansap_dfs_send_csa_ie_request(struct sap_context *sap_ctx);
-QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t hHal, uint8_t *pIgnore_cac);
-QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t hHal, uint8_t ignore_cac);
-QDF_STATUS wlansap_set_dfs_restrict_japan_w53(mac_handle_t hHal,
- uint8_t disable_Dfs_JapanW3);
+/**
+ * wlansap_get_dfs_ignore_cac() - Get ignore_cac value
+ * @mac_handle: Opaque handle to the global MAC context
+ * @ignore_cac: Location to store ignore_cac value
+ *
+ * This API is used to Get the value of ignore_cac value
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ */
+QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle,
+ uint8_t *ignore_cac);
+
+/**
+ * wlansap_set_dfs_ignore_cac() - Set ignore_cac value
+ * @mac_handle: Opaque handle to the global MAC context
+ * @ignore_cac: value to set for ignore_cac variable in DFS global structure.
+ *
+ * This API is used to Set the value of ignore_cac value
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ */
+QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
+ uint8_t ignore_cac);
+
+/**
+ * wlansap_set_dfs_restrict_japan_w53() - enable/disable dfS for japan
+ * @mac_handle: Opaque handle to the global MAC context
+ * @disable_dfs_w53: Indicates if Japan W53 is disabled when set to 1
+ * Indicates if Japan W53 is enabled when set to 0
+ *
+ * This API is used to enable or disable Japan W53 Band
+ * Return: The QDF_STATUS code associated with performing the operation
+ * QDF_STATUS_SUCCESS: Success
+ */
+QDF_STATUS wlansap_set_dfs_restrict_japan_w53(mac_handle_t mac_handle,
+ uint8_t disable_dfs_w53);
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
QDF_STATUS
wlan_sap_set_channel_avoidance(mac_handle_t hal, bool sap_channel_avoidance);
#endif
-QDF_STATUS wlansap_set_dfs_preferred_channel_location(mac_handle_t hHal,
+QDF_STATUS wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle,
uint8_t dfs_Preferred_Channels_location);
-QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t hHal,
- uint8_t target_channel);
+
+/**
+ * wlansap_set_dfs_target_chnl() - Set target channel
+ * @mac_handle: Opaque handle for the global MAC context
+ * @target_channel: target channel to be set
+ *
+ * This API is used to set next target chnl as provided channel.
+ * you can provide any valid channel to this API.
+ *
+ * Return: The QDF_STATUS code associated with performing the operation
+ */
+QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t mac_handle,
+ uint8_t target_channel);
/**
* wlan_sap_get_roam_profile() - Returns sap roam profile.
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index ef15dd1..b231add 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -1820,73 +1820,33 @@
&pMac->sap.SapDfsInfo.new_ch_params);
}
-/*==========================================================================
- FUNCTION wlansap_get_dfs_ignore_cac
-
- DESCRIPTION
- This API is used to get the value of ignore_cac value
-
- DEPENDENCIES
- NA.
-
- PARAMETERS
- IN
- hHal : HAL pointer
- pIgnore_cac : pointer to ignore_cac variable
-
- RETURN VALUE
- The QDF_STATUS code associated with performing the operation
-
- QDF_STATUS_SUCCESS: Success
-
- SIDE EFFECTS
- ============================================================================*/
-QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t hHal, uint8_t *pIgnore_cac)
+QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle,
+ uint8_t *ignore_cac)
{
tpAniSirGlobal pMac = NULL;
- if (NULL != hHal) {
- pMac = PMAC_STRUCT(hHal);
+ if (NULL != mac_handle) {
+ pMac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s: Invalid hHal pointer", __func__);
+ "%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
- *pIgnore_cac = pMac->sap.SapDfsInfo.ignore_cac;
+ *ignore_cac = pMac->sap.SapDfsInfo.ignore_cac;
return QDF_STATUS_SUCCESS;
}
-/*==========================================================================
- FUNCTION wlansap_set_dfs_ignore_cac
-
- DESCRIPTION
- This API is used to Set the value of ignore_cac value
-
- DEPENDENCIES
- NA.
-
- PARAMETERS
- IN
- hHal : HAL pointer
- ignore_cac : value to set for ignore_cac variable in DFS global structure.
-
- RETURN VALUE
- The QDF_STATUS code associated with performing the operation
-
- QDF_STATUS_SUCCESS: Success
-
- SIDE EFFECTS
- ============================================================================*/
-QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t hHal, uint8_t ignore_cac)
+QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
+ uint8_t ignore_cac)
{
tpAniSirGlobal pMac = NULL;
- if (NULL != hHal) {
- pMac = PMAC_STRUCT(hHal);
+ if (NULL != mac_handle) {
+ pMac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s: Invalid hHal pointer", __func__);
+ "%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
@@ -1895,28 +1855,19 @@
return QDF_STATUS_SUCCESS;
}
-/**
- * wlansap_set_dfs_restrict_japan_w53() - enable/disable dfS for japan
- * @hHal : HAL pointer
- * @disable_Dfs_JapanW3 :Indicates if Japan W53 is disabled when set to 1
- * Indicates if Japan W53 is enabled when set to 0
- *
- * This API is used to enable or disable Japan W53 Band
- * Return: The QDF_STATUS code associated with performing the operation
- * QDF_STATUS_SUCCESS: Success
- */
QDF_STATUS
-wlansap_set_dfs_restrict_japan_w53(mac_handle_t hHal, uint8_t disable_Dfs_W53)
+wlansap_set_dfs_restrict_japan_w53(mac_handle_t mac_handle,
+ uint8_t disable_dfs_w53)
{
tpAniSirGlobal pMac = NULL;
QDF_STATUS status;
enum dfs_reg dfs_region;
- if (NULL != hHal) {
- pMac = PMAC_STRUCT(hHal);
+ if (NULL != mac_handle) {
+ pMac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s: Invalid hHal pointer", __func__);
+ "%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
@@ -1927,7 +1878,7 @@
* regulatory domain is JAPAN.
*/
if (DFS_MKK_REGION == dfs_region) {
- pMac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_Dfs_W53;
+ pMac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_dfs_w53;
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_LOW,
FL("sapdfs: SET DFS JAPAN W53 DISABLED = %d"),
@@ -1985,7 +1936,7 @@
/**
* wlansap_set_dfs_preferred_channel_location() - set dfs preferred channel
- * @hHal : HAL pointer
+ * @mac_handle : HAL pointer
* @dfs_Preferred_Channels_location :
* 0 - Indicates No preferred channel location restrictions
* 1 - Indicates SAP Indoor Channels operation only.
@@ -1999,7 +1950,7 @@
* QDF_STATUS_SUCCESS: Success and error code otherwise.
*/
QDF_STATUS
-wlansap_set_dfs_preferred_channel_location(mac_handle_t hHal,
+wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle,
uint8_t
dfs_Preferred_Channels_location)
{
@@ -2007,11 +1958,11 @@
QDF_STATUS status;
enum dfs_reg dfs_region;
- if (NULL != hHal) {
- pMac = PMAC_STRUCT(hHal);
+ if (NULL != mac_handle) {
+ pMac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s: Invalid hHal pointer", __func__);
+ "%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
@@ -2044,38 +1995,16 @@
return status;
}
-/*==========================================================================
- FUNCTION wlansap_set_dfs_target_chnl
-
- DESCRIPTION
- This API is used to set next target chnl as provided channel.
- you can provide any valid channel to this API.
-
- DEPENDENCIES
- NA.
-
- PARAMETERS
- IN
- hHal : HAL pointer
- target_channel : target channel to be set
-
- RETURN VALUE
- The QDF_STATUS code associated with performing the operation
-
- QDF_STATUS_SUCCESS: Success
-
- SIDE EFFECTS
- ============================================================================*/
-QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t hHal,
+QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t mac_handle,
uint8_t target_channel)
{
tpAniSirGlobal pMac = NULL;
- if (NULL != hHal) {
- pMac = PMAC_STRUCT(hHal);
+ if (NULL != mac_handle) {
+ pMac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
- "%s: Invalid hHal pointer", __func__);
+ "%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
if (target_channel > 0) {