From 8b3684b10aaf6b72052bf01f8d29c1a11784bfb5 Mon Sep 17 00:00:00 2001 From: Rahul Gusain Date: Wed, 20 Apr 2022 15:14:47 +0530 Subject: [PATCH] qcacld-3.0: Check for NAN state only if NAN SM is in host A check is added recently to avoid creating NDI if NAN is not in enabled state. This is to avoid wastage of resources(vdev, peers,..) in firmware.But this check is valid only for the platforms where NAN statemachine is in host driver. This check is not valid for legacy platforms where NAN state machine is in firmware. Bypass the same for legacy targets. CRs-Fixed: 3178939 Change-Id: I1475b4313d1e7ac2c05d5edd215e929f3eb6335e --- os_if/nan/src/os_if_nan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_if/nan/src/os_if_nan.c b/os_if/nan/src/os_if_nan.c index dcd91855ae..b28094dc9e 100644 --- a/os_if/nan/src/os_if_nan.c +++ b/os_if/nan/src/os_if_nan.c @@ -1169,7 +1169,8 @@ int os_if_nan_process_ndp_cmd(struct wlan_objmgr_psoc *psoc, * lead to issues if NDI has to be started in a * 2GHz channel and if the target is not operating in DBS mode. */ - if (!ucfg_is_nan_disc_active(psoc)) { + if ((ucfg_is_nan_conc_control_supported(psoc)) && + (!ucfg_is_nan_disc_active(psoc))) { osif_err("NDI creation is not allowed when NAN discovery is not running"); return -EOPNOTSUPP; }