From 26cac01ab27a4d3210990ebbbd73ae241c30351f Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Mon, 3 Jul 2017 14:38:16 -0700 Subject: [PATCH] qcacmn: Allow nan data interface delete with peers attached Service layer was not allowed to delete NDI if there are active NDP sessions (peers). Service layer is expected to delete the active NDP sessions before issuing NDI delete. However, that is not guaranteed to happen. Hence allowing internal cleanup to happen by allowing the command to firmware. Change-Id: Iab9bc3bca431475792c164d16cdd18be2f346188 CRs-Fixed: 2072505 --- os_if/linux/nan/src/os_if_nan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/os_if/linux/nan/src/os_if_nan.c b/os_if/linux/nan/src/os_if_nan.c index 31b7a00dde85..9facb972c7c2 100644 --- a/os_if/linux/nan/src/os_if_nan.c +++ b/os_if/linux/nan/src/os_if_nan.c @@ -158,11 +158,9 @@ static int os_if_nan_process_ndi_delete(struct wlan_objmgr_psoc *psoc, wlan_objmgr_vdev_release_ref(nan_vdev, WLAN_NAN_ID); /* check if there are active peers on the adapter */ - if (num_peers) { - cfg80211_err("NDP peers active: %d, cannot delete NDI", + if (num_peers) + cfg80211_err("NDP peers active: %d, active NDPs may not be terminated", num_peers); - return -EINVAL; - } status = ucfg_nan_get_callbacks(psoc, &cb_obj); if (QDF_IS_STATUS_ERROR(status)) {