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
Tento commit je obsažen v:

odevzdal
Madan Koyyalamudi

rodič
2c38836b37
revize
7c037e6d50
@@ -486,13 +486,13 @@ ucfg_cm_get_empty_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
|
|||||||
* ucfg_cm_get_neighbor_scan_min_chan_time() -
|
* ucfg_cm_get_neighbor_scan_min_chan_time() -
|
||||||
* get neighbor scan min channel time
|
* get neighbor scan min channel time
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
* @session_id: session_id
|
* @vdev_id: vdev_id
|
||||||
*
|
*
|
||||||
* Return: channel min time value
|
* Return: channel min time value
|
||||||
*/
|
*/
|
||||||
uint16_t
|
uint16_t
|
||||||
ucfg_cm_get_neighbor_scan_min_chan_time(struct wlan_objmgr_psoc *psoc,
|
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
|
* 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
|
uint16_t
|
||||||
ucfg_cm_get_neighbor_scan_period(struct wlan_objmgr_psoc *psoc,
|
ucfg_cm_get_neighbor_scan_period(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t vdev_id);
|
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_ */
|
#endif /* _WLAN_CM_ROAM_UCFG_API_H_ */
|
||||||
|
@@ -574,11 +574,11 @@ ucfg_cm_get_empty_scan_refresh_period(struct wlan_objmgr_psoc *psoc,
|
|||||||
|
|
||||||
uint16_t
|
uint16_t
|
||||||
ucfg_cm_get_neighbor_scan_min_chan_time(struct wlan_objmgr_psoc *psoc,
|
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;
|
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);
|
SCAN_MIN_CHAN_TIME, &temp);
|
||||||
|
|
||||||
return temp.uint_value;
|
return temp.uint_value;
|
||||||
@@ -632,3 +632,36 @@ ucfg_cm_get_neighbor_scan_period(struct wlan_objmgr_psoc *psoc,
|
|||||||
NEIGHBOR_SCAN_PERIOD, &temp);
|
NEIGHBOR_SCAN_PERIOD, &temp);
|
||||||
return temp.uint_value;
|
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;
|
||||||
|
}
|
||||||
|
@@ -3102,7 +3102,7 @@ static int drv_cmd_get_roam_mode(struct hdd_adapter *adapter,
|
|||||||
struct hdd_priv_data *priv_data)
|
struct hdd_priv_data *priv_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool roam_mode = sme_get_is_lfr_feature_enabled(hdd_ctx->mac_handle);
|
bool roam_mode = ucfg_cm_get_is_lfr_feature_enabled(hdd_ctx->psoc);
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
|
|
||||||
@@ -3454,7 +3454,6 @@ static int drv_cmd_get_ccx_mode(struct hdd_adapter *adapter,
|
|||||||
struct hdd_priv_data *priv_data)
|
struct hdd_priv_data *priv_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
|
||||||
bool ese_mode = ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc);
|
bool ese_mode = ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc);
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
@@ -3467,7 +3466,7 @@ static int drv_cmd_get_ccx_mode(struct hdd_adapter *adapter,
|
|||||||
*/
|
*/
|
||||||
if (ese_mode &&
|
if (ese_mode &&
|
||||||
(pmkid_modes.fw_okc || pmkid_modes.fw_pmksa_cache) &&
|
(pmkid_modes.fw_okc || pmkid_modes.fw_pmksa_cache) &&
|
||||||
sme_get_is_ft_feature_enabled(mac_handle)) {
|
ucfg_cm_get_is_ft_feature_enabled(hdd_ctx->psoc)) {
|
||||||
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
@@ -3496,7 +3495,6 @@ static int drv_cmd_get_okc_mode(struct hdd_adapter *adapter,
|
|||||||
struct pmkid_mode_bits pmkid_modes;
|
struct pmkid_mode_bits pmkid_modes;
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
|
||||||
|
|
||||||
hdd_get_pmkid_modes(hdd_ctx, &pmkid_modes);
|
hdd_get_pmkid_modes(hdd_ctx, &pmkid_modes);
|
||||||
/*
|
/*
|
||||||
@@ -3505,7 +3503,7 @@ static int drv_cmd_get_okc_mode(struct hdd_adapter *adapter,
|
|||||||
*/
|
*/
|
||||||
if (pmkid_modes.fw_okc &&
|
if (pmkid_modes.fw_okc &&
|
||||||
ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
||||||
sme_get_is_ft_feature_enabled(mac_handle)) {
|
ucfg_cm_get_is_ft_feature_enabled(hdd_ctx->psoc)) {
|
||||||
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
@@ -3532,7 +3530,7 @@ static int drv_cmd_get_fast_roam(struct hdd_adapter *adapter,
|
|||||||
struct hdd_priv_data *priv_data)
|
struct hdd_priv_data *priv_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool lfr_mode = sme_get_is_lfr_feature_enabled(hdd_ctx->mac_handle);
|
bool lfr_mode = ucfg_cm_get_is_lfr_feature_enabled(hdd_ctx->psoc);
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
|
|
||||||
@@ -3555,7 +3553,7 @@ static int drv_cmd_get_fast_transition(struct hdd_adapter *adapter,
|
|||||||
struct hdd_priv_data *priv_data)
|
struct hdd_priv_data *priv_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool ft = sme_get_is_ft_feature_enabled(hdd_ctx->mac_handle);
|
bool ft = ucfg_cm_get_is_ft_feature_enabled(hdd_ctx->psoc);
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
|
|
||||||
@@ -4093,7 +4091,7 @@ static int drv_cmd_get_wes_mode(struct hdd_adapter *adapter,
|
|||||||
struct hdd_priv_data *priv_data)
|
struct hdd_priv_data *priv_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool wes_mode = sme_get_wes_mode(hdd_ctx->mac_handle);
|
bool wes_mode = ucfg_cm_get_wes_mode(hdd_ctx->psoc);
|
||||||
char extra[32];
|
char extra[32];
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
|
|
||||||
@@ -4351,7 +4349,6 @@ static int drv_cmd_set_okc_mode(struct hdd_adapter *adapter,
|
|||||||
uint8_t *value = command;
|
uint8_t *value = command;
|
||||||
uint32_t okc_mode;
|
uint32_t okc_mode;
|
||||||
struct pmkid_mode_bits pmkid_modes;
|
struct pmkid_mode_bits pmkid_modes;
|
||||||
mac_handle_t mac_handle;
|
|
||||||
uint32_t cur_pmkid_modes;
|
uint32_t cur_pmkid_modes;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
@@ -4361,10 +4358,9 @@ static int drv_cmd_set_okc_mode(struct hdd_adapter *adapter,
|
|||||||
* Check if the features PMKID/ESE/11R are supported simultaneously,
|
* Check if the features PMKID/ESE/11R are supported simultaneously,
|
||||||
* then this operation is not permitted (return FAILURE)
|
* then this operation is not permitted (return FAILURE)
|
||||||
*/
|
*/
|
||||||
mac_handle = hdd_ctx->mac_handle;
|
|
||||||
if (ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
if (ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
||||||
pmkid_modes.fw_okc &&
|
pmkid_modes.fw_okc &&
|
||||||
sme_get_is_ft_feature_enabled(mac_handle)) {
|
ucfg_cm_get_is_ft_feature_enabled(hdd_ctx->psoc)) {
|
||||||
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
hdd_warn("PMKID/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
@@ -4925,7 +4921,7 @@ static int drv_cmd_set_ccx_mode(struct hdd_adapter *adapter,
|
|||||||
*/
|
*/
|
||||||
if (ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
if (ucfg_cm_get_is_ese_feature_enabled(hdd_ctx->psoc) &&
|
||||||
pmkid_modes.fw_okc &&
|
pmkid_modes.fw_okc &&
|
||||||
sme_get_is_ft_feature_enabled(mac_handle)) {
|
ucfg_cm_get_is_ft_feature_enabled(hdd_ctx->psoc)) {
|
||||||
hdd_warn("OKC/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
hdd_warn("OKC/ESE/11R are supported simultaneously hence this operation is not permitted!");
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@@ -1174,9 +1174,6 @@ QDF_STATUS sme_get_roam_scan_channel_list(mac_handle_t mac_handle,
|
|||||||
uint8_t *pNumChannels,
|
uint8_t *pNumChannels,
|
||||||
uint8_t sessionId);
|
uint8_t sessionId);
|
||||||
|
|
||||||
bool sme_get_wes_mode(mac_handle_t mac_handle);
|
|
||||||
bool sme_get_is_lfr_feature_enabled(mac_handle_t mac_handle);
|
|
||||||
bool sme_get_is_ft_feature_enabled(mac_handle_t mac_handle);
|
|
||||||
bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
|
bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
|
||||||
|
|
||||||
QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode);
|
QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode);
|
||||||
|
@@ -7069,49 +7069,6 @@ QDF_STATUS sme_get_roam_scan_channel_list(mac_handle_t mac_handle,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* sme_get_wes_mode() - get WES Mode
|
|
||||||
* This is a synchronous call
|
|
||||||
*
|
|
||||||
* mac_handle - The handle returned by mac_open
|
|
||||||
* Return uint8_t - WES Mode Enabled(1)/Disabled(0)
|
|
||||||
*/
|
|
||||||
bool sme_get_wes_mode(mac_handle_t mac_handle)
|
|
||||||
{
|
|
||||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
|
||||||
|
|
||||||
return mac->mlme_cfg->lfr.wes_mode_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sme_get_is_lfr_feature_enabled() - get LFR feature enabled or not
|
|
||||||
* This is a synchronous call
|
|
||||||
* mac_handle - The handle returned by mac_open.
|
|
||||||
* Return true (1) - if the feature is enabled
|
|
||||||
* false (0) - if feature is disabled (compile or runtime)
|
|
||||||
*/
|
|
||||||
bool sme_get_is_lfr_feature_enabled(mac_handle_t mac_handle)
|
|
||||||
{
|
|
||||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
|
||||||
|
|
||||||
return mac->mlme_cfg->lfr.lfr_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sme_get_is_ft_feature_enabled() - get FT feature enabled or not
|
|
||||||
* This is a synchronous call
|
|
||||||
*
|
|
||||||
* mac_handle - The handle returned by mac_open.
|
|
||||||
* Return true (1) - if the feature is enabled
|
|
||||||
* false (0) - if feature is disabled (compile or runtime)
|
|
||||||
*/
|
|
||||||
bool sme_get_is_ft_feature_enabled(mac_handle_t mac_handle)
|
|
||||||
{
|
|
||||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
|
||||||
|
|
||||||
return mac->mlme_cfg->lfr.fast_transition_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sme_is_feature_supported_by_fw() - check if feature is supported by FW
|
* sme_is_feature_supported_by_fw() - check if feature is supported by FW
|
||||||
* @feature: enum value of requested feature.
|
* @feature: enum value of requested feature.
|
||||||
|
Odkázat v novém úkolu
Zablokovat Uživatele