qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components. Change-Id: I3cb9524dbda4b2b172f7252750bf95fbd0f14491 CRs-Fixed: 2995047
This commit is contained in:

zatwierdzone przez
Madan Koyyalamudi

rodzic
5f871547d8
commit
897285c1bd
@@ -129,6 +129,20 @@ void wlan_scan_cfg_set_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time);
|
||||
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
/*
|
||||
* wlan_scan_update_pno_dwell_time() - update active and passive dwell time
|
||||
* depending on active concurrency modes
|
||||
* @vdev: vdev object pointer
|
||||
* @req: scan request
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
struct scan_default_params *scan_def);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_scan_cfg_get_conc_active_dwelltime() - Get concurrent active dwelltime
|
||||
* @psoc: pointer to psoc object
|
||||
|
@@ -1047,6 +1047,32 @@ ucfg_scan_get_max_sched_scan_plan_iterations(struct wlan_objmgr_psoc *psoc);
|
||||
bool
|
||||
ucfg_scan_get_user_config_sched_scan_plan(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
/*
|
||||
* ucfg_scan_update_pno_dwell_time() - update active and passive dwell time
|
||||
* depending on active concurrency modes
|
||||
* @vdev: vdev object pointer
|
||||
* @req: scan request
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void ucfg_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
struct scan_default_params *scan_def)
|
||||
{
|
||||
wlan_scan_update_pno_dwell_time(vdev, req, scan_def);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline
|
||||
void ucfg_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
struct scan_default_params *scan_def)
|
||||
{}
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
static inline
|
||||
bool ucfg_scan_is_pno_offload_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
|
@@ -23,6 +23,10 @@
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "wlan_scan_api.h"
|
||||
#include "../../core/src/wlan_scan_manager.h"
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
#include <wlan_policy_mgr_api.h>
|
||||
#include "wlan_policy_mgr_public_struct.h"
|
||||
#endif
|
||||
|
||||
void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time)
|
||||
@@ -149,6 +153,36 @@ QDF_STATUS wlan_scan_cfg_set_passive_6g_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
void wlan_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
struct scan_default_params *scan_def)
|
||||
{
|
||||
bool sap_or_p2p_present;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
if (!psoc)
|
||||
return;
|
||||
|
||||
sap_or_p2p_present = policy_mgr_mode_specific_connection_count
|
||||
(psoc,
|
||||
PM_SAP_MODE, NULL) ||
|
||||
policy_mgr_mode_specific_connection_count
|
||||
(psoc,
|
||||
PM_P2P_GO_MODE, NULL) ||
|
||||
policy_mgr_mode_specific_connection_count
|
||||
(psoc,
|
||||
PM_P2P_CLIENT_MODE, NULL);
|
||||
|
||||
if (sap_or_p2p_present) {
|
||||
req->active_dwell_time = scan_def->conc_active_dwell;
|
||||
req->passive_dwell_time = scan_def->conc_passive_dwell;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dwell_time)
|
||||
{
|
||||
|
@@ -284,44 +284,6 @@ wlan_pno_global_deinit(struct wlan_scan_obj *scan_obj)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
/*
|
||||
* ucfg_scan_update_pno_dwell_time() - update active and passive dwell time
|
||||
* depending on active concurrency modes
|
||||
* @vdev: vdev object pointer
|
||||
* @req: scan request
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void ucfg_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req, struct scan_default_params *scan_def)
|
||||
{
|
||||
bool sap_or_p2p_present;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
if (!psoc)
|
||||
return;
|
||||
|
||||
sap_or_p2p_present = policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_SAP_MODE, NULL) ||
|
||||
policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_P2P_GO_MODE, NULL) ||
|
||||
policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_P2P_CLIENT_MODE, NULL);
|
||||
|
||||
if (sap_or_p2p_present) {
|
||||
req->active_dwell_time = scan_def->conc_active_dwell;
|
||||
req->passive_dwell_time = scan_def->conc_passive_dwell;
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
static inline void ucfg_scan_update_pno_dwell_time(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req, struct scan_default_params *scan_def){}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_scan_get_pno_def_params(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req)
|
||||
@@ -356,7 +318,7 @@ ucfg_scan_get_pno_def_params(struct wlan_objmgr_vdev *vdev,
|
||||
* Update active and passive dwell time depending
|
||||
* upon the present active concurrency mode
|
||||
*/
|
||||
ucfg_scan_update_pno_dwell_time(vdev, req, scan_def);
|
||||
wlan_scan_update_pno_dwell_time(vdev, req, scan_def);
|
||||
req->adaptive_dwell_mode = pno_def->adaptive_dwell_mode;
|
||||
req->pno_channel_prediction = pno_def->channel_prediction;
|
||||
req->top_k_num_of_channels = pno_def->top_k_num_of_channels;
|
||||
@@ -619,7 +581,7 @@ ucfg_scan_cancel_sync(struct scan_cancel_request *req)
|
||||
cancel_vdev = true;
|
||||
|
||||
vdev = req->vdev;
|
||||
status = ucfg_scan_cancel(req);
|
||||
status = wlan_scan_cancel(req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
@@ -1101,7 +1063,7 @@ ucfg_scan_init_chanlist_params(struct scan_start_request *req,
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto end;
|
||||
}
|
||||
status = ucfg_reg_get_current_chan_list(pdev, reg_chan_list);
|
||||
status = wlan_reg_get_current_chan_list(pdev, reg_chan_list);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
goto end;
|
||||
|
||||
|
Reference in New Issue
Block a user