qcacld-3.0: Clean up code for sme apis
Clean up code for sme_get_empty_scan_refresh_period_global() and sme_get_neighbor_scan_refresh_period() apis and replace it with ucfg api. Change-Id: Iaa511024467f45dc408da3db202b25f9b5276453 CRs-Fixed: 3335898
This commit is contained in:

committed by
Madan Koyyalamudi

parent
091ad81795
commit
3ecc75ecc3
@@ -605,4 +605,29 @@ ucfg_cm_get_roam_opportunistic_scan_threshold_diff(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
int8_t *val);
|
||||
|
||||
/**
|
||||
* ucfg_cm_get_neighbor_scan_refresh_period() - Get neighbor scan results
|
||||
* refresh period.
|
||||
* This is a synchronous call
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: value for scan results refresh period
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_cm_get_neighbor_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value);
|
||||
|
||||
/**
|
||||
* ucfg_cm_get_empty_scan_refresh_period_global() - Get global scan
|
||||
* refresh period
|
||||
* @psoc: pointer to psoc object
|
||||
* @roam_scan_period_global: value for empty scan refresh period
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_cm_get_empty_scan_refresh_period_global(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *roam_scan_period_global);
|
||||
|
||||
#endif /* _WLAN_CM_ROAM_UCFG_API_H_ */
|
||||
|
@@ -695,3 +695,34 @@ ucfg_cm_get_roam_opportunistic_scan_threshold_diff(
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_cm_get_neighbor_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
*value = mlme_obj->cfg.lfr.neighbor_scan_results_refresh_period;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_cm_get_empty_scan_refresh_period_global(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *roam_scan_period_global)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
*roam_scan_period_global =
|
||||
mlme_obj->cfg.lfr.empty_scan_refresh_period;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -5560,7 +5560,7 @@ hdd_send_roam_scan_period_to_sme(struct hdd_context *hdd_ctx,
|
||||
bool check_and_update)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint16_t roam_scan_period_current, roam_scan_period_global;
|
||||
uint16_t roam_scan_period_current, roam_scan_period_global = 0;
|
||||
|
||||
if (!ucfg_mlme_validate_scan_period(hdd_ctx->psoc,
|
||||
roam_scan_period * 1000))
|
||||
@@ -5575,8 +5575,8 @@ hdd_send_roam_scan_period_to_sme(struct hdd_context *hdd_ctx,
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
roam_scan_period_global =
|
||||
sme_get_empty_scan_refresh_period_global(hdd_ctx->mac_handle);
|
||||
ucfg_cm_get_empty_scan_refresh_period_global(hdd_ctx->psoc,
|
||||
&roam_scan_period_global);
|
||||
if (check_and_update &&
|
||||
roam_scan_period_current != roam_scan_period_global) {
|
||||
hdd_debug("roam scan period is already updated, value: %u",
|
||||
|
@@ -2972,11 +2972,11 @@ static int drv_cmd_get_roam_scan_refresh_period(struct hdd_adapter *adapter,
|
||||
struct hdd_priv_data *priv_data)
|
||||
{
|
||||
int ret = 0;
|
||||
uint16_t value =
|
||||
sme_get_neighbor_scan_refresh_period(hdd_ctx->mac_handle);
|
||||
uint16_t value = 0;
|
||||
char extra[32];
|
||||
uint8_t len;
|
||||
|
||||
ucfg_cm_get_neighbor_scan_refresh_period(hdd_ctx->psoc, &value);
|
||||
len = scnprintf(extra, sizeof(extra), "%s %d",
|
||||
"GETROAMSCANREFRESHPERIOD",
|
||||
(value / 1000));
|
||||
|
@@ -1050,15 +1050,6 @@ sme_set_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle,
|
||||
|
||||
QDF_STATUS sme_set_neighbor_scan_refresh_period(mac_handle_t mac_handle,
|
||||
uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod);
|
||||
uint16_t sme_get_neighbor_scan_refresh_period(mac_handle_t mac_handle);
|
||||
|
||||
/**
|
||||
* sme_get_empty_scan_refresh_period_global() - get global scan refresh period
|
||||
* @mac_handle: The handle returned by mac_open
|
||||
*
|
||||
* Return: Empty scan refresh period configured through ini
|
||||
*/
|
||||
uint16_t sme_get_empty_scan_refresh_period_global(mac_handle_t mac_handle);
|
||||
|
||||
QDF_STATUS sme_update_empty_scan_refresh_period(mac_handle_t mac_handle,
|
||||
uint8_t sessionId, uint16_t empty_scan_refresh_period);
|
||||
|
@@ -6601,28 +6601,6 @@ QDF_STATUS sme_set_neighbor_scan_refresh_period(mac_handle_t mac_handle,
|
||||
&src_config);
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_get_neighbor_scan_refresh_period() - get neighbor scan results
|
||||
* refresh period
|
||||
* This is a synchronous call
|
||||
*
|
||||
* \param mac_handle - The handle returned by mac_open.
|
||||
* \return uint16_t - Neighbor scan results refresh period value
|
||||
*/
|
||||
uint16_t sme_get_neighbor_scan_refresh_period(mac_handle_t mac_handle)
|
||||
{
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
|
||||
return mac->mlme_cfg->lfr.neighbor_scan_results_refresh_period;
|
||||
}
|
||||
|
||||
uint16_t sme_get_empty_scan_refresh_period_global(mac_handle_t mac_handle)
|
||||
{
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
|
||||
return mac->mlme_cfg->lfr.empty_scan_refresh_period;
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_update_empty_scan_refresh_period
|
||||
* Update empty_scan_refresh_period
|
||||
|
Reference in New Issue
Block a user