qcacmn: Add CFG/INI items to scan component
Add following scan CFG items to common scan component 1.CFG_ACTIVE_MAX_CHANNEL_TIME:Max active dwell time 2.CFG_PASSIVE_MAX_CHANNEL_TIME:Max passive dwell time Change-Id: I3aeed28a404984812ebbc56f2a8d28e7e9ab7de2 CRs-Fixed: 2277105
This commit is contained in:

committed by
nshrivas

parent
8b60f1e6c0
commit
ba6526d5a5
@@ -23,8 +23,10 @@
|
||||
#ifndef __CFG_CONVERGED_H
|
||||
#define __CFG_CONVERGED_H
|
||||
|
||||
#include <wlan_scan_cfg.h>
|
||||
|
||||
#define CFG_CONVERGED_ALL \
|
||||
/* i.e. CFG_SCAN_ALL etc. */
|
||||
CFG_SCAN_ALL
|
||||
|
||||
#endif /* __CFG_CONVERGED_H */
|
||||
|
||||
|
41
umac/scan/dispatcher/inc/wlan_scan_cfg.h
Normal file
41
umac/scan/dispatcher/inc/wlan_scan_cfg.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: This file contains centralized definitions of SCAN component
|
||||
*/
|
||||
#ifndef __CONFIG_SCAN_H
|
||||
#define __CONFIG_SCAN_H
|
||||
|
||||
#include "cfg_define.h"
|
||||
|
||||
#define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
|
||||
"gActiveMaxChannelTime",\
|
||||
0, 10000, 40,\
|
||||
CFG_VALUE_OR_DEFAULT, "active dwell time")
|
||||
|
||||
#define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
|
||||
"gPassiveMaxChannelTime",\
|
||||
0, 10000, 100,\
|
||||
CFG_VALUE_OR_DEFAULT, "passive dwell time")
|
||||
|
||||
#define CFG_SCAN_ALL \
|
||||
CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
|
||||
CFG(CFG_PASSIVE_MAX_CHANNEL_TIME)
|
||||
|
||||
#endif
|
@@ -605,4 +605,43 @@ void ucfg_scan_set_vdev_del_in_progress(struct wlan_objmgr_vdev *vdev);
|
||||
* Return: none
|
||||
*/
|
||||
void ucfg_scan_clear_vdev_del_in_progress(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* wlan_scan_cfg_set_active_dwelltime() - API to set scan active dwelltime
|
||||
* @psoc: pointer to psoc object
|
||||
* @dwell_time: scan active dwell time
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void wlan_scan_cfg_set_active_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t dwell_time);
|
||||
/**
|
||||
* wlan_scan_cfg_get_active_dwelltime() - API to get active dwelltime
|
||||
* @psoc: pointer to psoc object
|
||||
* @dwell_time: scan active dwelltime
|
||||
*
|
||||
* Return: scan active dwell time
|
||||
*/
|
||||
void wlan_scan_cfg_get_active_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time);
|
||||
|
||||
/**
|
||||
* wlan_scan_cfg_set_passive_dwelltime() - API to set scan active dwelltime
|
||||
* @psoc: pointer to psoc object
|
||||
* @dwell_time: scan active dwell time
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void wlan_scan_cfg_set_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t dwell_time);
|
||||
/**
|
||||
* wlan_scan_cfg_get_passive_dwelltime() - API to get active dwelltime
|
||||
* @psoc: pointer to psoc object
|
||||
* @dwell_time: scan active dwelltime
|
||||
*
|
||||
* Return: scan active dwell time
|
||||
*/
|
||||
void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time);
|
||||
|
||||
#endif
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <wlan_dfs_utils_api.h>
|
||||
#include <wlan_policy_mgr_api.h>
|
||||
#endif
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
QDF_STATUS ucfg_scan_register_bcn_cb(struct wlan_objmgr_psoc *psoc,
|
||||
update_beacon_cb cb, enum scan_cb_type type)
|
||||
@@ -1334,14 +1335,73 @@ ucfg_scan_register_event_handler(struct wlan_objmgr_pdev *pdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
|
||||
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||
if (!scan_obj) {
|
||||
scm_err("Failed to get scan object");
|
||||
return;
|
||||
}
|
||||
|
||||
*dwell_time = scan_obj->scan_def.passive_dwell;
|
||||
}
|
||||
|
||||
void wlan_scan_cfg_set_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t dwell_time)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
|
||||
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||
if (!scan_obj) {
|
||||
scm_err("Failed to get scan object");
|
||||
return;
|
||||
}
|
||||
|
||||
scan_obj->scan_def.passive_dwell = dwell_time;
|
||||
}
|
||||
|
||||
void wlan_scan_cfg_get_active_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
|
||||
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||
if (!scan_obj) {
|
||||
scm_err("Failed to get scan object");
|
||||
return;
|
||||
}
|
||||
|
||||
*dwell_time = scan_obj->scan_def.active_dwell;
|
||||
}
|
||||
|
||||
void wlan_scan_cfg_set_active_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t dwell_time)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
|
||||
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||
if (!scan_obj) {
|
||||
scm_err("Failed to get scan object");
|
||||
return;
|
||||
}
|
||||
|
||||
scan_obj->scan_def.active_dwell = dwell_time;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
wlan_scan_global_init(struct wlan_scan_obj *scan_obj)
|
||||
wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_scan_obj *scan_obj)
|
||||
{
|
||||
scan_obj->enable_scan = true;
|
||||
scan_obj->drop_bcn_on_chan_mismatch = true;
|
||||
scan_obj->disable_timeout = false;
|
||||
scan_obj->scan_def.active_dwell = SCAN_ACTIVE_DWELL_TIME;
|
||||
scan_obj->scan_def.passive_dwell = SCAN_PASSIVE_DWELL_TIME;
|
||||
scan_obj->scan_def.active_dwell =
|
||||
cfg_get(psoc, CFG_ACTIVE_MAX_CHANNEL_TIME);
|
||||
scan_obj->scan_def.passive_dwell =
|
||||
cfg_get(psoc, CFG_PASSIVE_MAX_CHANNEL_TIME);
|
||||
scan_obj->scan_def.max_rest_time = SCAN_MAX_REST_TIME;
|
||||
scan_obj->scan_def.sta_miracast_mcc_rest_time =
|
||||
SCAN_STA_MIRACAST_MCC_REST_TIME;
|
||||
@@ -1837,7 +1897,6 @@ QDF_STATUS ucfg_scan_update_user_config(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
scan_def = &scan_obj->scan_def;
|
||||
scan_def->active_dwell = scan_cfg->active_dwell;
|
||||
scan_def->passive_dwell = scan_cfg->passive_dwell;
|
||||
scan_def->conc_active_dwell = scan_cfg->conc_active_dwell;
|
||||
scan_def->conc_passive_dwell = scan_cfg->conc_passive_dwell;
|
||||
@@ -2001,7 +2060,7 @@ ucfg_scan_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* Initialize the scan Globals */
|
||||
wlan_scan_global_init(scan_obj);
|
||||
wlan_scan_global_init(psoc, scan_obj);
|
||||
qdf_spinlock_create(&scan_obj->lock);
|
||||
ucfg_scan_register_pmo_handler();
|
||||
scm_db_init(psoc);
|
||||
|
Reference in New Issue
Block a user