diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a25bde20cd0e..5e13dd234e2c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1581,7 +1581,8 @@ void hdd_indicate_active_ndp_cnt(struct wlan_objmgr_psoc *psoc, adapter = wlan_hdd_get_adapter_from_vdev(psoc, vdev_id); if (adapter && cfg_nan_is_roam_config_disabled(psoc)) { - hdd_debug("vdev_id:%d ndp active sessions %d", vdev_id, cnt); + hdd_debug("vdev_id:%d%s active ndp sessions present", vdev_id, + cnt ? "" : " no more"); if (!cnt) wlan_hdd_enable_roaming(adapter, RSO_NDP_CON_ON_NDI); else diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c index a6c6f65a6b80..94312b5d3975 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -965,6 +965,12 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id, adapter, WLAN_START_ALL_NETIF_QUEUE_N_CARRIER, WLAN_CONTROL_PATH); + /* + * This is called only for first peer. So, no.of NDP sessions + * are always 1 + */ + if (!NDI_CONCURRENCY_SUPPORTED(hdd_ctx->psoc)) + hdd_indicate_active_ndp_cnt(hdd_ctx->psoc, vdev_id, 1); } qdf_mem_free(roam_info); return 0; @@ -1039,5 +1045,11 @@ void hdd_ndp_peer_departed_handler(uint8_t vdev_id, uint16_t sta_id, hdd_debug("No more ndp peers."); hdd_cleanup_ndi(hdd_ctx, adapter); qdf_event_set(&adapter->peer_cleanup_done); + /* + * This is called only for last peer. So, no.of NDP sessions + * are always 0 + */ + if (!NDI_CONCURRENCY_SUPPORTED(hdd_ctx->psoc)) + hdd_indicate_active_ndp_cnt(hdd_ctx->psoc, vdev_id, 0); } }