qcacld-3.0: Store the NAN target caps inside its private obj

Host will receive the NAN related service capabilities from
the SERVICE_AVAILABLE event. In the HDD callback that gets
called afterwards, set the NAN related capabilities into
the NAN's private PSOC object.

Store the NAN target capabilities inside its private object.

Change-Id: If398b6f253613fc424b7821cfc62b0984ad34b6c
CRs-Fixed: 2356709
This commit is contained in:
Nachiket Kukade
2018-11-02 20:12:34 +05:30
zatwierdzone przez nshrivas
rodzic a6a70a98f1
commit 85aa3788b6
7 zmienionych plików z 104 dodań i 6 usunięć

Wyświetl plik

@@ -26,6 +26,7 @@
#include "wlan_objmgr_cmn.h"
#include "nan_public_structs.h"
#ifdef WLAN_FEATURE_NAN
/**
* ucfg_nan_set_ndi_state: set ndi state
* @vdev: pointer to vdev object
@@ -248,10 +249,7 @@ static inline QDF_STATUS ucfg_nan_discovery_req(void *in_req, uint32_t req_type)
*
* Return: True if NAN DBS is supported, False otherwise
*/
static inline bool ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc *psoc)
{
return true;
}
bool ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_is_nan_enable_allowed() - ucfg API to query if NAN Discovery is
@@ -264,4 +262,23 @@ static inline bool ucfg_is_nan_enable_allowed(struct wlan_objmgr_psoc *psoc)
{
return true;
}
/**
* ucfg_nan_set_tgt_caps: ucfg API to set the NAN capabilities of the Target
* @psoc: pointer to psoc object
* @nan_caps: pointer to the structure of NAN capability bits
*
* Return: status of operation
*/
void ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc *psoc,
struct nan_tgt_caps *nan_caps);
#else /* WLAN_FEATURE_NAN */
static inline
void ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc *psoc,
struct nan_tgt_caps *nan_caps)
{
}
#endif /* WLAN_FEATURE_NAN */
#endif /* _NAN_UCFG_API_H_ */

Wyświetl plik

@@ -445,3 +445,29 @@ int ucfg_nan_register_lim_callbacks(struct wlan_objmgr_psoc *psoc,
return 0;
}
void ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc *psoc,
struct nan_tgt_caps *nan_caps)
{
struct nan_psoc_priv_obj *psoc_priv = nan_get_psoc_priv_obj(psoc);
if (!psoc_priv) {
nan_err("nan psoc priv object is NULL");
return;
}
psoc_priv->nan_caps = *nan_caps;
}
bool ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc *psoc)
{
struct nan_psoc_priv_obj *psoc_priv;
psoc_priv = nan_get_psoc_priv_obj(psoc);
if (!psoc_priv) {
nan_err("nan psoc priv object is NULL");
return false;
}
return (psoc_priv->nan_caps.nan_dbs_supported == 1);
}