|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2017-2020 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
|
|
@@ -257,6 +257,7 @@ QDF_STATUS pmo_core_ns_check_offload(struct wlan_objmgr_psoc *psoc,
|
|
|
struct pmo_vdev_priv_obj *vdev_ctx;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
bool active_offload_cond, is_applied_cond;
|
|
|
+ enum QDF_OPMODE opmode;
|
|
|
|
|
|
pmo_enter();
|
|
|
|
|
@@ -271,6 +272,13 @@ QDF_STATUS pmo_core_ns_check_offload(struct wlan_objmgr_psoc *psoc,
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
|
goto out;
|
|
|
|
|
|
+ opmode = pmo_get_vdev_opmode(vdev);
|
|
|
+ if (opmode == QDF_NDI_MODE) {
|
|
|
+ pmo_debug("NS offload not supported in NaN mode");
|
|
|
+ pmo_vdev_put_ref(vdev);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
vdev_ctx = pmo_vdev_get_priv(vdev);
|
|
|
psoc_ctx = vdev_ctx->pmo_psoc_ctx;
|
|
|
|