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

committed by
Madan Koyyalamudi

parent
a9850cfe67
commit
a3a9866f7d
@@ -1956,3 +1956,31 @@ done:
|
||||
|
||||
return phymode;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_valid_channels(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *ch_freq_list, uint32_t *list_len)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
uint32_t num_valid_chan;
|
||||
uint8_t i;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*list_len = 0;
|
||||
mlme_legacy_err("Failed to get MLME Obj");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
num_valid_chan = mlme_obj->cfg.reg.valid_channel_list_num;
|
||||
if (num_valid_chan > *list_len) {
|
||||
mlme_err("list len size %d less than expected %d", *list_len,
|
||||
num_valid_chan);
|
||||
num_valid_chan = *list_len;
|
||||
}
|
||||
*list_len = num_valid_chan;
|
||||
for (i = 0; i < *list_len; i++)
|
||||
ch_freq_list[i] = mlme_obj->cfg.reg.valid_channel_freq_list[i];
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user