qcacld-3.0: Ini bitmap to enable/disable a particular NAN feature
NAN protocol runs in firmware and controlled by framework. Framework configures multiple NAN discovery params while enabling NAN. Framework configurations would be based on the framework constraints or realtime scenarios like resource(memory/power/..) consumption. But some of these params might need to be controlled explicitly based on the usage. NAN DW is one such parameter, which is configured as 4 seconds when the device is in sync role and the screen is off. But for some usecases, this param might have to be 512ms always irrespective of screen off/on for some targets. Add an ini param "nan_feature_config" to set a bit to indicate firmware whether to honor framework configured DW value or the firmware default value. Send the vdev param on NAN supported vdev by setting the "bit 0" to indicate firmware to allow framework configured DW value. If this bit is not set, firmware shall consider its default value. Change-Id: I0476bca2bbe676beccfff207f5b4ea31e89031e2 CRs-Fixed: 2721970
This commit is contained in:

committed by
nshrivas

parent
d001e72975
commit
c2b4e154f3
@@ -57,6 +57,8 @@ static void nan_cfg_init(struct wlan_objmgr_psoc *psoc,
|
||||
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);
|
||||
nan_obj->cfg_param.nan_feature_config =
|
||||
cfg_get(psoc, CFG_NAN_FEATURE_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1196,3 +1198,29 @@ ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set)
|
||||
|
||||
psoc_nan_obj->nan_caps.nan_vdev_allowed = set;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_get_nan_feature_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *nan_feature_config)
|
||||
{
|
||||
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");
|
||||
*nan_feature_config = cfg_default(CFG_NAN_FEATURE_CONFIG);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*nan_feature_config = psoc_nan_obj->cfg_param.nan_feature_config;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool ucfg_is_nan_vdev(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_NAN_DISC_MODE ||
|
||||
(!ucfg_nan_is_vdev_creation_allowed(wlan_vdev_get_psoc(vdev)) &&
|
||||
wlan_vdev_mlme_get_opmode(vdev) == QDF_STA_MODE))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user