qcacld-3.0: Do not pass mode as arg in policy_mgr_is_vdev_ll_sap
Do not pass mode as an argument in policy_mgr_is_vdev_ll_sap(). Use vde_id to get the mode for further condition check. Change-Id: Ie12c31d4cf536ba6c80f0e28524b4c99c23600d1 CRs-Fixed: 3414277
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
ee1d5461d9
當前提交
da3f3f0403
@@ -1596,7 +1596,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
|
||||
* policy_mgr_get_pcl_channel_for_ll_sap_concurrency() - Get pcl channel list
|
||||
* for LL SAP concurrency
|
||||
* @psoc: PSOC object information
|
||||
* @curr_mode: Device mode
|
||||
* @vdev_id: Vdev id
|
||||
* @pcl_channels: Preferred channel freq list
|
||||
* @pcl_weight: Weights of the PCL
|
||||
@@ -1608,7 +1607,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
|
||||
QDF_STATUS
|
||||
policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode curr_mode,
|
||||
uint32_t vdev_id,
|
||||
uint32_t *pcl_channels,
|
||||
uint8_t *pcl_weight, uint32_t *len);
|
||||
@@ -1616,14 +1614,12 @@ policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
|
||||
/**
|
||||
* policy_mgr_is_vdev_ll_sap() - Check whether given vdev is LL SAP or not
|
||||
* @psoc: psoc object
|
||||
* @mode: device mode
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: true if it's present otherwise false
|
||||
*/
|
||||
bool
|
||||
policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t vdev_id);
|
||||
|
||||
/**
|
||||
|
@@ -4088,14 +4088,24 @@ bool policy_mgr_is_sta_chan_valid_for_connect_and_roam(
|
||||
|
||||
bool
|
||||
policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode curr_mode,
|
||||
uint32_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
bool is_ll_sap = false;
|
||||
enum QDF_OPMODE mode;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
enum host_concurrent_ap_policy profile =
|
||||
HOST_CONCURRENT_AP_POLICY_UNSPECIFIED;
|
||||
if (curr_mode != PM_SAP_MODE)
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid pm_ctx");
|
||||
return is_ll_sap;
|
||||
}
|
||||
|
||||
mode = wlan_get_opmode_from_vdev_id(pm_ctx->pdev, vdev_id);
|
||||
|
||||
if (mode != QDF_SAP_MODE)
|
||||
return is_ll_sap;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
@@ -4190,7 +4200,6 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
|
||||
uint8_t weight_list[NUM_CHANNELS];
|
||||
qdf_freq_t freq;
|
||||
uint32_t vdev_id;
|
||||
enum policy_mgr_con_mode mode;
|
||||
bool is_ll_sap = 0;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
@@ -4207,8 +4216,7 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
|
||||
|
||||
freq = pm_conc_connection_list[conn_idx].freq;
|
||||
vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
|
||||
mode = pm_conc_connection_list[conn_idx].mode;
|
||||
if (!policy_mgr_is_vdev_ll_sap(psoc, mode, vdev_id))
|
||||
if (!policy_mgr_is_vdev_ll_sap(psoc, vdev_id))
|
||||
continue;
|
||||
|
||||
is_ll_sap = 1;
|
||||
@@ -4242,14 +4250,13 @@ policy_mgr_get_pcl_ch_for_sap_go_with_ll_sap_present(
|
||||
QDF_STATUS
|
||||
policy_mgr_get_pcl_channel_for_ll_sap_concurrency(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode curr_mode,
|
||||
uint32_t vdev_id,
|
||||
uint32_t *pcl_channels,
|
||||
uint8_t *pcl_weight, uint32_t *len)
|
||||
{
|
||||
uint32_t orig_len = *len;
|
||||
|
||||
if (policy_mgr_is_vdev_ll_sap(psoc, curr_mode, vdev_id)) {
|
||||
if (policy_mgr_is_vdev_ll_sap(psoc, vdev_id)) {
|
||||
/* Scenario: If there is some existing interface present and
|
||||
* LL SAP is coming up.
|
||||
* Filter pcl channel for LL SAP
|
||||
|
Reference in New Issue
Block a user