qcacld-3.0: Add ini support to skip full scan after bmiss

Currently, after FINAL_BMISS detection, FW does channel map
based partial scan followed by one full scan if no candidate
found in partial scan to ROAM to another available AP without
disconnection. This results in additional delay by HOST in
issuing disconnection after a heartbeat failure.

Add INI support (bmiss_skip_full_scan) to allow FW to decide
whether firmware does channel map based partial scan or partial
scan followed by full scan in case no candidate is found in
partial scan after final BMISS.

Change-Id: I48f9bb43bb7933e9ff173f618586ea5986530dcd
CRs-Fixed: 2578848
This commit is contained in:
Abhinav Kumar 2019-12-03 18:56:55 +05:30 committed by nshrivas
parent 523a327e6d
commit 444a5ebc80
6 changed files with 76 additions and 5 deletions

View File

@ -355,6 +355,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
gen->disable_4way_hs_offload =
cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD);
gen->mgmt_retry_max = cfg_get(psoc, CFG_MGMT_RETRY_MAX);
gen->bmiss_skip_full_scan = cfg_get(psoc, CFG_BMISS_SKIP_FULL_SCAN);
}
static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)

View File

@ -640,6 +640,31 @@
CFG_VALUE_OR_DEFAULT, \
"Max retries for mgmt frames")
/*
* <ini>
* bmiss_skip_full_scan - To decide whether firmware does channel map based
* partial scan or partial scan followed by full scan in case no candidate is
* found in partial scan.
* @Min: 0
* @Max: 1
* @Default: 0
*
* 0 : Based on the channel map , firmware does scan to find new AP. if AP is
* not found then it does a full scan on all valid channels.
* 1 : Firmware does channel map based partial scan only.
*
* Related: None
*
* Supported Feature: STA Roaming
*
* Usage: External
*
* </ini>
*/
#define CFG_BMISS_SKIP_FULL_SCAN CFG_INI_BOOL("bmiss_skip_full_scan", \
0, \
"To decide partial/partial scan followed by full scan")
#define CFG_GENERIC_ALL \
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@ -668,5 +693,5 @@
CFG(CFG_ENABLE_BEACON_RECEPTION_STATS) \
CFG(CFG_REMOVE_TIME_STAMP_SYNC_CMD) \
CFG(CFG_MGMT_RETRY_MAX) \
CFG(CFG_BMISS_SKIP_FULL_SCAN)
#endif /* __CFG_MLME_GENERIC_H */

View File

@ -2117,7 +2117,7 @@ wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
bool *value);
/*
/**
* wlan_mlme_get_dtim_selection_diversity() - get dtim selection diversity
* bitmap
* @psoc: pointer to psoc object
@ -2193,7 +2193,7 @@ QDF_STATUS wlan_mlme_override_bmps_imps(struct wlan_objmgr_psoc *psoc);
QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc,
bool *value);
/*
/**
* wlan_mlme_get_wps_uuid() - get the wps uuid string
* @wps_params: pointer to mlme wps parameters structure
* @data: data to which the parameter is to be copied
@ -2204,7 +2204,7 @@ QDF_STATUS wlan_mlme_is_imps_enabled(struct wlan_objmgr_psoc *psoc,
void
wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, uint8_t *data);
/*
/**
* wlan_mlme_get_self_gen_frm_pwr() - get self gen frm pwr
* @psoc: pointer to psoc object
* @val: Pointer to the value which will be filled for the caller
@ -2215,7 +2215,7 @@ QDF_STATUS
wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
uint32_t *value);
/*
/**
* wlan_mlme_get_4way_hs_offload() - get 4-way hs offload to fw cfg
* @psoc: pointer to psoc object
* @val: Pointer to the value which will be filled for the caller
@ -2225,6 +2225,18 @@ wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value);
/**
* wlan_mlme_get_bmiss_skip_full_scan_value() - To get value of
* bmiss_skip_full_scan ini
* @psoc: pointer to psoc object
* @val: Pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
wlan_mlme_get_bmiss_skip_full_scan_value(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* mlme_get_peer_phymode() - get phymode of peer
* @psoc: pointer to psoc object

View File

@ -1121,6 +1121,8 @@ struct wlan_mlme_chainmask {
* @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware
* @as_enabled: antenna sharing enabled or not (FW capability)
* @mgmt_retry_max: maximum retries for management frame
* @bmiss_skip_full_scan: Decide if full scan can be skipped in firmware if no
* candidate is found in partial scan based on channel map
*/
struct wlan_mlme_generic {
enum band_info band_capability;
@ -1153,6 +1155,7 @@ struct wlan_mlme_generic {
bool disable_4way_hs_offload;
bool as_enabled;
uint8_t mgmt_retry_max;
bool bmiss_skip_full_scan;
};
/*

View File

@ -3500,6 +3500,24 @@ wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_bmiss_skip_full_scan_value(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_BMISS_SKIP_FULL_SCAN);
mlme_legacy_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.gen.bmiss_skip_full_scan;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_get_peer_phymode(struct wlan_objmgr_psoc *psoc, uint8_t *mac,
enum wlan_phymode *peer_phymode)
{

View File

@ -3851,6 +3851,7 @@ static void wma_set_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id,
QDF_STATUS status;
uint32_t flag = 0;
bool disable_4way_hs_offload;
bool bmiss_skip_full_scan;
if (is_set) {
flag = WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG |
@ -3864,6 +3865,17 @@ static void wma_set_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id,
*/
if (disable_4way_hs_offload)
flag |= WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE;
wlan_mlme_get_bmiss_skip_full_scan_value(wma->psoc,
&bmiss_skip_full_scan);
/*
* If WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set, then
* WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG decides whether firmware
* does channel map based partial scan or partial scan followed
* by full scan in case no candidate is found in partial scan.
*/
if (bmiss_skip_full_scan)
flag |= WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG;
}
WMA_LOGD("%s: vdev_id:%d, is_set:%d, flag:%d",