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:

zatwierdzone przez
nshrivas

rodzic
fa9219d45e
commit
11c907f867
@@ -361,11 +361,23 @@ bool ucfg_nan_is_enable_disable_in_progress(struct wlan_objmgr_psoc *psoc);
|
||||
bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_nan_set_vdev_creation_supp_by_fw()- Set the NAN separate vdev psoc param
|
||||
* @psoc: pointer to psoc object
|
||||
* @set: True if firmware supports NAN separate vdev feature
|
||||
*
|
||||
* Cache the value of set in NAN psoc object param.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set);
|
||||
|
||||
/**
|
||||
* ucfg_nan_is_vdev_creation_allowed()- Get support for NAN vdev creation
|
||||
* @psoc: pointer to psoc object
|
||||
*
|
||||
* Return: True if NAN vdev creation is allowed else false
|
||||
* Return: True if NAN vdev creation is allowed by host and firmware else false
|
||||
*/
|
||||
bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
@@ -378,15 +390,6 @@ bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc);
|
||||
*/
|
||||
bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_nan_get_is_separate_nan_iface() - get is_separate_nan_iface value
|
||||
* @psoc: pointer to psoc object
|
||||
*
|
||||
* Return: True if host supports separate vdev for NAN, false otherwise
|
||||
*/
|
||||
bool
|
||||
ucfg_nan_get_is_separate_nan_iface(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_disable_nan_discovery() - Disable NAN discovery
|
||||
* @psoc: pointer to psoc object
|
||||
@@ -453,6 +456,11 @@ bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -465,12 +473,6 @@ bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_nan_get_is_separate_nan_iface(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *data, uint32_t data_len)
|
||||
|
@@ -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