diff --git a/core/hdd/src/wlan_hdd_nan.c b/core/hdd/src/wlan_hdd_nan.c index 108dae301585..a0f7792443b4 100644 --- a/core/hdd/src/wlan_hdd_nan.c +++ b/core/hdd/src/wlan_hdd_nan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -69,6 +69,8 @@ static int __wlan_hdd_cfg80211_nan_ext_request(struct wiphy *wiphy, { int ret_val; struct hdd_context *hdd_ctx = wiphy_priv(wiphy); + struct net_device *dev = wdev->netdev; + struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_enter_dev(wdev->netdev); @@ -86,8 +88,8 @@ static int __wlan_hdd_cfg80211_nan_ext_request(struct wiphy *wiphy, return -EPERM; } - return os_if_process_nan_req(hdd_ctx->psoc, - data, data_len); + return os_if_process_nan_req(hdd_ctx->psoc, adapter->vdev_id, + data, data_len); } int wlan_hdd_cfg80211_nan_ext_request(struct wiphy *wiphy, diff --git a/os_if/nan/inc/os_if_nan.h b/os_if/nan/inc/os_if_nan.h index 168078df2759..17f829b13339 100644 --- a/os_if/nan/inc/os_if_nan.h +++ b/os_if/nan/inc/os_if_nan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -159,12 +159,13 @@ static inline QDF_STATUS os_if_nan_set_ndp_delete_transaction_id( * os_if_process_nan_req: os_if api to handle NAN requests attached to the * vendor command QCA_NL80211_VENDOR_SUBCMD_NAN_EXT * @psoc: pointer to psoc object + * @vdev_id: NAN vdev id * @data: request data. contains vendor cmd tlvs * @data_len: length of data * * Return: status of operation */ -int os_if_process_nan_req(struct wlan_objmgr_psoc *psoc, +int os_if_process_nan_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, const void *data, int data_len); #else diff --git a/os_if/nan/src/os_if_nan.c b/os_if/nan/src/os_if_nan.c index 49428797012a..aa2227bc410e 100644 --- a/os_if/nan/src/os_if_nan.c +++ b/os_if/nan/src/os_if_nan.c @@ -2594,7 +2594,7 @@ static int os_if_process_nan_enable_req(struct wlan_objmgr_psoc *psoc, return qdf_status_to_os_return(status); } -int os_if_process_nan_req(struct wlan_objmgr_psoc *psoc, +int os_if_process_nan_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, const void *data, int data_len) { uint32_t nan_subcmd; @@ -2617,8 +2617,10 @@ int os_if_process_nan_req(struct wlan_objmgr_psoc *psoc, * sure that HW mode is not set to DBS by NAN Enable request. NAN state * machine will remain unaffected in this case. */ - if (!NAN_CONCURRENCY_SUPPORTED(psoc)) + if (!NAN_CONCURRENCY_SUPPORTED(psoc)) { + policy_mgr_check_and_stop_opportunistic_timer(psoc, vdev_id); return os_if_nan_generic_req(psoc, tb); + } /* * Send all requests other than Enable/Disable as type GENERIC.