qcacld-3.0: Set NDP state to disconnect if no peers exist

Currently, host driver checks if there are peers present on the NDI
and clean them up as part of NDI cleanup. Cleanup is done in below steps,
1. Set the state to NAN_DATA_END_STATE
2. Send NDP_END_ALL to firmware to end all existing NDP sessions on the
NDI and to cleanup corresponding peers
3. Move the state to NAN_DATA_DISCONNECTED_STATE finally if NDP_END_ALL
goes fine.
But if no peers are present on NDP, none of the above happens and NDI
state stays and doesn't move to DELETED. So, set the NDI state to
DISCONNECTED if no peers are present.

Change-Id: I0d22c240b3e3eee5f62ba8b369bab500e27487b7
CRs-Fixed: 3463614
This commit is contained in:
Rahul Gusain
2023-04-11 18:01:47 +05:30
committato da Madan Koyyalamudi
parent 2c3ad4db6d
commit 583019cf27
2 ha cambiato i file con 56 aggiunte e 4 eliminazioni

Vedi File

@@ -2531,7 +2531,7 @@ void os_if_nan_ndi_session_end(struct wlan_objmgr_vdev *vdev)
* call and NDI state remains to created "NAN_DATA_NDI_CREATED_STATE".
*/
if (state == NAN_DATA_NDI_CREATED_STATE) {
osif_err("NDI interface is just created: %u", state);
osif_debug("NDI interface is just created: %u", state);
return;
} else if (state != NAN_DATA_NDI_DELETING_STATE &&
state != NAN_DATA_DISCONNECTED_STATE) {