qcacld-3.0: Add support to configure max ndi host supports
Introduce INI "ndi_max_support" to configure max number of ndi interfaces host supports. Host configures max number of ndi interfaces support in firmware using WMI_INIT_CMD. Change-Id: I287b9f96b98103e67cf35d0c02488a28af731044 CRs-Fixed: 2701557
This commit is contained in:

committed by
nshrivas

parent
9b85558666
commit
9e3400ac77
@@ -84,6 +84,7 @@ enum nan_disc_state {
|
|||||||
* @support_mp0_discovery: To support discovery of NAN cluster with Master
|
* @support_mp0_discovery: To support discovery of NAN cluster with Master
|
||||||
* Preference (MP) as 0 when a new device is enabling NAN
|
* Preference (MP) as 0 when a new device is enabling NAN
|
||||||
* @max_ndp_sessions: max ndp sessions host supports
|
* @max_ndp_sessions: max ndp sessions host supports
|
||||||
|
* @max_ndi: max number of ndi host supports
|
||||||
*/
|
*/
|
||||||
struct nan_cfg_params {
|
struct nan_cfg_params {
|
||||||
bool enable;
|
bool enable;
|
||||||
@@ -94,6 +95,7 @@ struct nan_cfg_params {
|
|||||||
uint16_t ndp_keep_alive_period;
|
uint16_t ndp_keep_alive_period;
|
||||||
bool support_mp0_discovery;
|
bool support_mp0_discovery;
|
||||||
uint32_t max_ndp_sessions;
|
uint32_t max_ndp_sessions;
|
||||||
|
uint32_t max_ndi;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -215,6 +215,29 @@
|
|||||||
"gSupportMp0Discovery", \
|
"gSupportMp0Discovery", \
|
||||||
1, \
|
1, \
|
||||||
"Enable/Disable discovery of NAN cluster with Master Preference (MP) as 0")
|
"Enable/Disable discovery of NAN cluster with Master Preference (MP) as 0")
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* ndi_max_support - To configure max number of ndi host supports
|
||||||
|
*
|
||||||
|
* @Min: 1
|
||||||
|
* @Max: 2
|
||||||
|
* @Default: 1
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Supported Feature: NAN
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_NDI_MAX_SUPPORT CFG_INI_UINT( \
|
||||||
|
"ndi_max_support", \
|
||||||
|
1, \
|
||||||
|
2, \
|
||||||
|
1, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"Max number of NDI host supports")
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_NAN
|
#ifdef WLAN_FEATURE_NAN
|
||||||
#define CFG_NAN_DISC CFG(CFG_NAN_ENABLE) \
|
#define CFG_NAN_DISC CFG(CFG_NAN_ENABLE) \
|
||||||
@@ -231,6 +254,7 @@
|
|||||||
|
|
||||||
#define CFG_NAN_ALL CFG_NAN_DISC \
|
#define CFG_NAN_ALL CFG_NAN_DISC \
|
||||||
CFG_NAN_DP \
|
CFG_NAN_DP \
|
||||||
CFG(CFG_NDP_MAX_SESSIONS)
|
CFG(CFG_NDP_MAX_SESSIONS) \
|
||||||
|
CFG(CFG_NDI_MAX_SUPPORT)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -84,6 +84,15 @@ QDF_STATUS cfg_nan_get_ndp_keepalive_period(struct wlan_objmgr_psoc *psoc,
|
|||||||
QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t *val);
|
uint32_t *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cfg_nan_get_max_ndi() - get max number of ndi host supports
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: pointer to hold max number of ndi
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS cfg_nan_get_max_ndi(struct wlan_objmgr_psoc *psoc, uint32_t *val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cfg_nan_get_support_mp0_discovery() - get value of config support mp0
|
* cfg_nan_get_support_mp0_discovery() - get value of config support mp0
|
||||||
* discovery
|
* discovery
|
||||||
@@ -144,6 +153,12 @@ QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
QDF_STATUS cfg_nan_get_max_ndi(struct wlan_objmgr_psoc *psoc, uint32_t *val)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool cfg_nan_get_support_mp0_discovery(
|
static inline bool cfg_nan_get_support_mp0_discovery(
|
||||||
struct wlan_objmgr_psoc *psoc)
|
struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
@@ -113,6 +113,20 @@ QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS cfg_nan_get_max_ndi(struct wlan_objmgr_psoc *psoc, uint32_t *val)
|
||||||
|
{
|
||||||
|
struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc);
|
||||||
|
|
||||||
|
if (!nan_obj) {
|
||||||
|
nan_err("NAN obj null");
|
||||||
|
*val = cfg_default(CFG_NDI_MAX_SUPPORT);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*val = nan_obj->cfg_param.max_ndi;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
bool cfg_nan_get_support_mp0_discovery(struct wlan_objmgr_psoc *psoc)
|
bool cfg_nan_get_support_mp0_discovery(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc);
|
struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc);
|
||||||
|
@@ -56,6 +56,7 @@ static void nan_cfg_init(struct wlan_objmgr_psoc *psoc,
|
|||||||
CFG_NDP_KEEP_ALIVE_PERIOD);
|
CFG_NDP_KEEP_ALIVE_PERIOD);
|
||||||
nan_obj->cfg_param.max_ndp_sessions = cfg_get(psoc,
|
nan_obj->cfg_param.max_ndp_sessions = cfg_get(psoc,
|
||||||
CFG_NDP_MAX_SESSIONS);
|
CFG_NDP_MAX_SESSIONS);
|
||||||
|
nan_obj->cfg_param.max_ndi = cfg_get(psoc, CFG_NDI_MAX_SUPPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -342,6 +342,9 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle,
|
|||||||
tgt_cfg->mgmt_comp_evt_bundle_support = true;
|
tgt_cfg->mgmt_comp_evt_bundle_support = true;
|
||||||
tgt_cfg->tx_msdu_new_partition_id_support = true;
|
tgt_cfg->tx_msdu_new_partition_id_support = true;
|
||||||
|
|
||||||
|
cfg_nan_get_max_ndi(wma_handle->psoc,
|
||||||
|
&tgt_cfg->max_ndi);
|
||||||
|
|
||||||
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
|
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
|
||||||
tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_RAW;
|
tgt_cfg->rx_decap_mode = CFG_TGT_RX_DECAP_MODE_RAW;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user