qcacld-3.0: Don't create wifi-aware0 interface if NAN is not supported

Currently, NAN discovery interface(wifi-aware0) is created if both
host and firmware support NAN separate vdev feature. But NAN
feature capability(gEnableNanSupport) is the master of these
capabilities. Don't create wifi-aware0 if gEnableNanSupport is
disabled.
Also, don't allow NAN iface creation for the kernels less
than 4.14 as NAN interface is allowed by kernel only from 4.14.

Change-Id: Iaf10974c373b2a77d2c24a78540910f78a3dc768
CRs-Fixed: 2706997
This commit is contained in:
Srinivas Dasari
2020-06-10 14:32:21 +05:30
committed by nshrivas
parent 160fab39e1
commit 662a62841c
3 changed files with 26 additions and 5 deletions

View File

@@ -1101,6 +1101,12 @@ ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
return psoc_nan_obj->nan_caps.sta_nan_ndi_ndi_allowed;
}
static inline bool
ucfg_is_nan_enabled(struct nan_psoc_priv_obj *psoc_nan_obj)
{
return psoc_nan_obj->cfg_param.enable;
}
static inline bool
ucfg_nan_is_vdev_creation_supp_by_fw(struct nan_psoc_priv_obj *psoc_nan_obj)
{
@@ -1153,6 +1159,11 @@ bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
return false;
}
if (!ucfg_is_nan_enabled(psoc_nan_obj)) {
nan_debug("NAN is not enabled");
return false;
}
host_support = ucfg_nan_is_vdev_creation_supp_by_host(psoc_nan_obj);
fw_support = ucfg_nan_is_vdev_creation_supp_by_fw(psoc_nan_obj);
if (!host_support || !fw_support) {