qcacld-3.0: Configure full scan period from vendor cmd to firmware

Userspace can update the full scan period through the roam subcmd
QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET and the attribute
QCA_ATTR_ROAM_CONTROL_FULL_SCAN_PERIOD. Send the same to firmware
as part of roam scan offload command

Change-Id: I7c1046763d693faa3340b655848d3306ef92e06c
CRs-Fixed: 2508775
This commit is contained in:
Srinivas Dasari
2019-08-22 01:17:38 +05:30
committed by nshrivas
parent 0acd0c4df4
commit 0628e84a29
11 changed files with 132 additions and 0 deletions

View File

@@ -1422,6 +1422,8 @@ struct bss_load_trigger {
* @roam_scan_period_after_inactivity: Roam scan period after device was in
* inactive state
* @fw_akm_bitmap: Supported Akm suites of firmware
* @roam_full_scan_period: Idle period in seconds between two successive
* full channel roam scans
*/
struct wlan_mlme_lfr_cfg {
bool mawc_roam_enabled;
@@ -1524,6 +1526,7 @@ struct wlan_mlme_lfr_cfg {
uint32_t roam_inactive_data_packet_count;
uint32_t roam_scan_period_after_inactivity;
uint32_t fw_akm_bitmap;
uint32_t roam_full_scan_period;
};
/**

View File

@@ -3869,4 +3869,13 @@ ucfg_mlme_get_peer_phymode(struct wlan_objmgr_psoc *psoc, uint8_t *mac,
{
return mlme_get_peer_phymode(psoc, mac, peer_phymode);
}
/**
* ucfg_mlme_validate_full_roam_scan_period() - Validate full roam scan period
* @full_roam_scan_period: Idle period in seconds between two successive
* full channel roam scans
*
* Return: True if full_roam_scan_period is in expected range, false otherwise.
*/
bool ucfg_mlme_validate_full_roam_scan_period(uint32_t full_roam_scan_period);
#endif /* _WLAN_MLME_UCFG_API_H_ */

View File

@@ -1666,3 +1666,19 @@ ucfg_mlme_set_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
bool ucfg_mlme_validate_full_roam_scan_period(uint32_t full_roam_scan_period)
{
bool is_valid = true;
uint32_t min, max;
if (!cfg_in_range(CFG_LFR_FULL_ROAM_SCAN_REFRESH_PERIOD,
full_roam_scan_period)) {
min = (cfg_min(CFG_LFR_FULL_ROAM_SCAN_REFRESH_PERIOD));
max = (cfg_max(CFG_LFR_FULL_ROAM_SCAN_REFRESH_PERIOD));
mlme_legacy_err("Full roam scan period value %d is out of range (Min: %d Max: %d)",
full_roam_scan_period, min, max);
is_valid = false;
}
return is_valid;
}