qcacld-3.0: Exempt STA + STA + NAN concurrency in host
Currently, host driver does not allow NDP formation if two STA is in connected state. But driver should not allow NAN enable in first if two STA is in connected state as STA + STA + NAN concurrency is not allowed. So, to fix this issue, add check for STA + STA concurrency in NAN pre-enable in which NAN will drop if two STA + STA is present. Change-Id: I6e6baa386d50b2903118660f10cc98ffcba60705 CRs-Fixed: 3481148
This commit is contained in:
@@ -1213,12 +1213,42 @@ void nan_handle_emlsr_concurrency(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
}
|
||||
|
||||
bool nan_is_sta_sta_concurrency_present(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
uint32_t sta_cnt;
|
||||
|
||||
sta_cnt = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
|
||||
NULL);
|
||||
/* Allow if STA is not in connected state */
|
||||
if (!sta_cnt)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* sta > 2 : (STA + STA + STA) or (ML STA + STA) or (ML STA + ML STA),
|
||||
* STA concurrency will be present.
|
||||
*
|
||||
* ML STA: Although both links would be treated as separate STAs
|
||||
* (sta cnt = 2) from policy mgr perspective, but it is not considered
|
||||
* as STA concurrency
|
||||
*/
|
||||
if (sta_cnt > 2 ||
|
||||
(sta_cnt == 2 && policy_mgr_is_non_ml_sta_present(psoc)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t nan_ch_freq)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_INVAL;
|
||||
struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
|
||||
|
||||
if (!psoc) {
|
||||
nan_err("psoc is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = nan_set_discovery_state(psoc, NAN_DISC_ENABLE_IN_PROGRESS);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
@@ -1235,6 +1265,16 @@ QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
|
||||
goto pre_enable_failure;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reject STA+STA in below case
|
||||
* Non-ML STA: STA+STA+NAN concurrency is not supported
|
||||
*/
|
||||
if (nan_is_sta_sta_concurrency_present(psoc)) {
|
||||
nan_err("STA+STA+NAN concurrency is not allowed");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto pre_enable_failure;
|
||||
}
|
||||
|
||||
wlan_p2p_abort_scan(pdev);
|
||||
|
||||
if (policy_mgr_is_hw_dbs_capable(psoc)) {
|
||||
|
@@ -316,5 +316,13 @@ uint8_t nan_get_vdev_id_from_bssid(struct wlan_objmgr_pdev *pdev,
|
||||
tSirMacAddr bssid,
|
||||
wlan_objmgr_ref_dbgid dbg_id);
|
||||
|
||||
/*
|
||||
* nan_is_sta_sta_concurrency_present: Queries whether STA + STA concurrency
|
||||
* present
|
||||
* @psoc: PSOC object
|
||||
*
|
||||
* Return: True if concurrency is present, False otherwise
|
||||
*/
|
||||
bool nan_is_sta_sta_concurrency_present(struct wlan_objmgr_psoc *psoc);
|
||||
#endif /* _WLAN_NAN_MAIN_I_H_ */
|
||||
#endif /* WLAN_FEATURE_NAN */
|
||||
|
@@ -1167,21 +1167,9 @@ bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
uint32_t freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
|
||||
uint32_t ndi_cnt, sta_cnt, id, conc_ext_flags;
|
||||
uint32_t ndi_cnt, id, conc_ext_flags;
|
||||
|
||||
sta_cnt = policy_mgr_mode_specific_connection_count(psoc,
|
||||
PM_STA_MODE, NULL);
|
||||
/* Allow if STA is not in connected state */
|
||||
if (!sta_cnt)
|
||||
return true;
|
||||
|
||||
/* Reject STA+STA in below case
|
||||
* Non-ML STA: STA+STA+NDP concurrency is not supported
|
||||
* ML STA: As both links would be treated as separate STAs from
|
||||
* policy mgr perspective, don't reject here and continue with further
|
||||
* checks
|
||||
*/
|
||||
if (sta_cnt > 1 && !policy_mgr_is_mlo_sta_present(psoc)) {
|
||||
if (nan_is_sta_sta_concurrency_present(psoc)) {
|
||||
nan_err("STA+STA+NDP concurrency is not allowed");
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user