qcacld-3.0: Clean up code for sme apis

Clean up code for sme_get_wes_mode(), sme_get_is_lfr_feature_enabled()
and sme_get_is_ft_feature_enabled() apis and
replace it with ucfg api.

Change-Id: I7715ba361264fcb2c0c93d8d073813538347dd31
CRs-Fixed: 3335898
This commit is contained in:
Krupali Dhanvijay
2022-11-16 14:53:22 +05:30
committed by Madan Koyyalamudi
parent 2c38836b37
commit 7c037e6d50
5 changed files with 75 additions and 62 deletions

View File

@@ -486,13 +486,13 @@ ucfg_cm_get_empty_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
* ucfg_cm_get_neighbor_scan_min_chan_time() -
* get neighbor scan min channel time
* @psoc: pointer to psoc object
* @session_id: session_id
* @vdev_id: vdev_id
*
* Return: channel min time value
*/
uint16_t
ucfg_cm_get_neighbor_scan_min_chan_time(struct wlan_objmgr_psoc *psoc,
uint8_t session_id);
uint8_t vdev_id);
/**
* ucfg_cm_get_roam_rssi_diff() - Get Roam rssi diff
@@ -548,4 +548,34 @@ ucfg_cm_get_neighbor_scan_max_chan_time(struct wlan_objmgr_psoc *psoc,
uint16_t
ucfg_cm_get_neighbor_scan_period(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
/**
* ucfg_cm_get_wes_mode() - Get WES Mode
* This is a synchronous call
* @psoc: pointer to psoc object
*
* Return: WES Mode Enabled(1)/Disabled(0)
*/
bool ucfg_cm_get_wes_mode(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_cm_get_is_lfr_feature_enabled() - Get LFR feature enabled or not
* This is a synchronous call
* @psoc: pointer to psoc object
*
* Return: true (1) - if the feature is enabled
* false (0) - if feature is disabled (compile or runtime)
*/
bool ucfg_cm_get_is_lfr_feature_enabled(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_cm_get_is_ft_feature_enabled() - Get FT feature enabled or not
* This is a synchronous call
* @psoc: pointer to psoc object
*
* Return: true (1) - if the feature is enabled
* false (0) - if feature is disabled (compile or runtime)
*/
bool ucfg_cm_get_is_ft_feature_enabled(struct wlan_objmgr_psoc *psoc);
#endif /* _WLAN_CM_ROAM_UCFG_API_H_ */

View File

@@ -574,11 +574,11 @@ ucfg_cm_get_empty_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
uint16_t
ucfg_cm_get_neighbor_scan_min_chan_time(struct wlan_objmgr_psoc *psoc,
uint8_t session_id)
uint8_t vdev_id)
{
struct cm_roam_values_copy temp;
wlan_cm_roam_cfg_get_value(psoc, session_id,
wlan_cm_roam_cfg_get_value(psoc, vdev_id,
SCAN_MIN_CHAN_TIME, &temp);
return temp.uint_value;
@@ -632,3 +632,36 @@ ucfg_cm_get_neighbor_scan_period(struct wlan_objmgr_psoc *psoc,
NEIGHBOR_SCAN_PERIOD, &temp);
return temp.uint_value;
}
bool ucfg_cm_get_wes_mode(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
return mlme_obj->cfg.lfr.wes_mode_enabled;
}
bool ucfg_cm_get_is_lfr_feature_enabled(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
return mlme_obj->cfg.lfr.lfr_enabled;
}
bool ucfg_cm_get_is_ft_feature_enabled(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
return mlme_obj->cfg.lfr.fast_transition_enabled;
}