qcacld-3.0: Consider host and firmware capa for NAN separate vdev
Firmware advertises the NAN separate vdev capability through the service capability wmi_service_nan_vdev and host advertises through the ini param nan_separate_iface_support. Both of the capabilities must be checked to support the NAN separate vdev support. Define an API to check both the capabilities and made the individual capability APIs static. So that individual APIs are not accessed outside this common API. Use this API to know the support. This is to avoid any possible misses in checking the support. For example, NAN vdev id is fetched from the NAN enable response message received from firmware only based on firmware capability in nan_handle_enable_rsp. If firmware supports the feature and ini is set to 0, then vdev id might be invalid as it's fetched from the NAN enable response without considering host capability. If either firmware or host doesn't support NAN separate vdev feature, firmware creates vdev and it may not fill the vdev id in NAN enable response. Host shall use NAN_PSEUDO_VDEV_ID then. So, consider NAN separate vdev feature as supported only if both host and firmware support. Also fetch the firmware capability to support NAN separate vdev when wma_rx_service_ready_ext_event is received and update to NAN psoc priv object. Change-Id: I50e76fbe17befb28a5262fc26f5675b67f4d21f2 CRs-Fixed: 2650354
This commit is contained in:

committed by
nshrivas

parent
fa9219d45e
commit
11c907f867
@@ -1081,19 +1081,6 @@ bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
HW_MODE_20_MHZ);
|
||||
}
|
||||
|
||||
bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct nan_psoc_priv_obj *psoc_nan_obj;
|
||||
|
||||
psoc_nan_obj = nan_get_psoc_priv_obj(psoc);
|
||||
if (!psoc_nan_obj) {
|
||||
nan_err("psoc_nan_obj is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
return psoc_nan_obj->nan_caps.nan_vdev_allowed;
|
||||
}
|
||||
|
||||
bool
|
||||
ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -1108,14 +1095,15 @@ 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;
|
||||
}
|
||||
|
||||
bool ucfg_nan_get_is_separate_nan_iface(struct wlan_objmgr_psoc *psoc)
|
||||
static inline bool
|
||||
ucfg_nan_is_vdev_creation_supp_by_fw(struct nan_psoc_priv_obj *psoc_nan_obj)
|
||||
{
|
||||
struct nan_psoc_priv_obj *nan_obj = nan_get_psoc_priv_obj(psoc);
|
||||
return psoc_nan_obj->nan_caps.nan_vdev_allowed;
|
||||
}
|
||||
|
||||
if (!nan_obj) {
|
||||
nan_err("NAN obj null");
|
||||
return false;
|
||||
}
|
||||
static inline bool
|
||||
ucfg_nan_is_vdev_creation_supp_by_host(struct nan_psoc_priv_obj *nan_obj)
|
||||
{
|
||||
return nan_obj->cfg_param.nan_separate_iface_support;
|
||||
}
|
||||
|
||||
@@ -1147,3 +1135,35 @@ QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_mem_free(nan_req);
|
||||
return status;
|
||||
}
|
||||
|
||||
bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct nan_psoc_priv_obj *psoc_nan_obj;
|
||||
bool support = false;
|
||||
|
||||
psoc_nan_obj = nan_get_psoc_priv_obj(psoc);
|
||||
if (!psoc_nan_obj) {
|
||||
nan_err("psoc_nan_obj is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ucfg_nan_is_vdev_creation_supp_by_fw(psoc_nan_obj) &&
|
||||
ucfg_nan_is_vdev_creation_supp_by_host(psoc_nan_obj))
|
||||
support = true;
|
||||
|
||||
return support;
|
||||
}
|
||||
|
||||
void
|
||||
ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set)
|
||||
{
|
||||
struct nan_psoc_priv_obj *psoc_nan_obj;
|
||||
|
||||
psoc_nan_obj = nan_get_psoc_priv_obj(psoc);
|
||||
if (!psoc_nan_obj) {
|
||||
nan_err("psoc_nan_obj is null");
|
||||
return;
|
||||
}
|
||||
|
||||
psoc_nan_obj->nan_caps.nan_vdev_allowed = set;
|
||||
}
|
||||
|
Reference in New Issue
Block a user