mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
qcacld-3.0: Update empty scan refresh period to neighbor info only
Currently, roam empty scan refresh period is updated to global mac ctx when it's updated through DRIVER command. But the update should happen only to the neighbor roam info of the corresponding vdev. Retrieval also should happen based on vdev. Change-Id: Ic0496c326bca459c6ef6da1d84f1fd4645373cb9 CRs-Fixed: 2530335
This commit is contained in:
parent
7f48ac026d
commit
456aa70f29
3 changed files with 44 additions and 16 deletions
|
|
@ -3610,10 +3610,19 @@ static int drv_cmd_get_roam_scan_period(struct hdd_adapter *adapter,
|
|||
struct hdd_priv_data *priv_data)
|
||||
{
|
||||
int ret = 0;
|
||||
uint16_t empty_scan_refresh_period =
|
||||
sme_get_empty_scan_refresh_period(hdd_ctx->mac_handle);
|
||||
uint16_t empty_scan_refresh_period;
|
||||
char extra[32];
|
||||
uint8_t len;
|
||||
QDF_STATUS status;
|
||||
|
||||
status = sme_get_empty_scan_refresh_period(hdd_ctx->mac_handle,
|
||||
adapter->vdev_id,
|
||||
&empty_scan_refresh_period);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return qdf_status_to_os_return(status);
|
||||
|
||||
hdd_debug("vdev_id: %u, empty_scan_refresh_period: %u",
|
||||
adapter->vdev_id, empty_scan_refresh_period);
|
||||
|
||||
qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_GETROAMSCANPERIOD_IOCTL,
|
||||
|
|
|
|||
|
|
@ -847,7 +847,19 @@ QDF_STATUS sme_get_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);
|
||||
uint16_t sme_get_empty_scan_refresh_period(mac_handle_t mac_handle);
|
||||
|
||||
/**
|
||||
* sme_get_empty_scan_refresh_period() - get empty scan refresh period
|
||||
* @mac_handle: The handle returned by mac_open.
|
||||
* @vdev_id: vdev identifier
|
||||
* @refresh_threshold: Buffer to fill the empty scan refresh period.
|
||||
* Valid only if the return status is success.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_get_empty_scan_refresh_period(mac_handle_t mac_handle,
|
||||
uint8_t vdev_id,
|
||||
uint16_t *refresh_threshold);
|
||||
QDF_STATUS sme_update_empty_scan_refresh_period(mac_handle_t mac_handle,
|
||||
uint8_t sessionId, uint16_t empty_scan_refresh_period);
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6739,19 +6739,28 @@ uint16_t sme_get_neighbor_scan_refresh_period(mac_handle_t mac_handle)
|
|||
return mac->mlme_cfg->lfr.neighbor_scan_results_refresh_period;
|
||||
}
|
||||
|
||||
/*
|
||||
* sme_get_empty_scan_refresh_period() - get empty scan refresh period
|
||||
* This is a synchronuous call
|
||||
*
|
||||
* mac_handle - The handle returned by mac_open.
|
||||
* Return QDF_STATUS_SUCCESS - SME update config successful.
|
||||
* Other status means SME is failed to update
|
||||
*/
|
||||
uint16_t sme_get_empty_scan_refresh_period(mac_handle_t mac_handle)
|
||||
QDF_STATUS sme_get_empty_scan_refresh_period(mac_handle_t mac_handle,
|
||||
uint8_t vdev_id,
|
||||
uint16_t *refresh_threshold)
|
||||
{
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
tCsrNeighborRoamControlInfo *neighbor_roam_info;
|
||||
QDF_STATUS status;
|
||||
|
||||
return mac->mlme_cfg->lfr.empty_scan_refresh_period;
|
||||
if (vdev_id >= WLAN_MAX_VDEVS) {
|
||||
sme_err("Invalid vdev_id: %d", vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
neighbor_roam_info = &mac->roam.neighborRoamInfo[vdev_id];
|
||||
|
||||
*refresh_threshold =
|
||||
neighbor_roam_info->cfgParams.emptyScanRefreshPeriod;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -6788,13 +6797,11 @@ QDF_STATUS sme_update_empty_scan_refresh_period(mac_handle_t mac_handle,
|
|||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
"LFR runtime successfully set roam scan period to %d -old value is %d - roam state is %s",
|
||||
empty_scan_refresh_period,
|
||||
mac->mlme_cfg->lfr.empty_scan_refresh_period,
|
||||
pNeighborRoamInfo->cfgParams.emptyScanRefreshPeriod,
|
||||
mac_trace_get_neighbour_roam_state(mac->roam.
|
||||
neighborRoamInfo
|
||||
[sessionId].
|
||||
neighborRoamState));
|
||||
mac->mlme_cfg->lfr.empty_scan_refresh_period =
|
||||
empty_scan_refresh_period;
|
||||
pNeighborRoamInfo->cfgParams.emptyScanRefreshPeriod =
|
||||
empty_scan_refresh_period;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue