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:
Abhishek Ambure
2020-06-09 21:17:39 +05:30
committed by nshrivas
szülő 9b85558666
commit 9e3400ac77
6 fájl változott, egészen pontosan 60 új sor hozzáadva és 1 régi sor törölve

Fájl megtekintése

@@ -84,6 +84,7 @@ enum nan_disc_state {
* @support_mp0_discovery: To support discovery of NAN cluster with Master
* Preference (MP) as 0 when a new device is enabling NAN
* @max_ndp_sessions: max ndp sessions host supports
* @max_ndi: max number of ndi host supports
*/
struct nan_cfg_params {
bool enable;
@@ -94,6 +95,7 @@ struct nan_cfg_params {
uint16_t ndp_keep_alive_period;
bool support_mp0_discovery;
uint32_t max_ndp_sessions;
uint32_t max_ndi;
};
/**

Fájl megtekintése

@@ -215,6 +215,29 @@
"gSupportMp0Discovery", \
1, \
"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
#define CFG_NAN_DISC CFG(CFG_NAN_ENABLE) \
@@ -231,6 +254,7 @@
#define CFG_NAN_ALL CFG_NAN_DISC \
CFG_NAN_DP \
CFG(CFG_NDP_MAX_SESSIONS)
CFG(CFG_NDP_MAX_SESSIONS) \
CFG(CFG_NDI_MAX_SUPPORT)
#endif

Fájl megtekintése

@@ -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,
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
* discovery
@@ -144,6 +153,12 @@ QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
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(
struct wlan_objmgr_psoc *psoc)
{

Fájl megtekintése

@@ -113,6 +113,20 @@ QDF_STATUS cfg_nan_get_ndp_max_sessions(struct wlan_objmgr_psoc *psoc,
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)
{
struct nan_psoc_priv_obj *nan_obj = cfg_nan_get_priv_obj(psoc);

Fájl megtekintése

@@ -56,6 +56,7 @@ static void nan_cfg_init(struct wlan_objmgr_psoc *psoc,
CFG_NDP_KEEP_ALIVE_PERIOD);
nan_obj->cfg_param.max_ndp_sessions = cfg_get(psoc,
CFG_NDP_MAX_SESSIONS);
nan_obj->cfg_param.max_ndi = cfg_get(psoc, CFG_NDI_MAX_SUPPORT);
}
/**