qcacld-3.0: Pass vdev_id as an argument in policy_mgr_get_pcl()
Pass vdev_id as an argument in policy_mgr_get_pcl() Change-Id: If016b2ad1e47d1d8364037e44bd984e5b95c8d6f CRs-Fixed: 3412927
此提交包含在:
@@ -1211,6 +1211,7 @@ uint32_t policy_mgr_get_channel(struct wlan_objmgr_psoc *psoc,
|
||||
* @len: length of the PCL
|
||||
* @pcl_weight: Weights of the PCL
|
||||
* @weight_len: Max length of the weights list
|
||||
* @vdev_id: Vdev id
|
||||
*
|
||||
* This function provides the preferred channel list on which
|
||||
* policy manager wants the new connection to come up. Various
|
||||
@@ -1222,7 +1223,8 @@ uint32_t policy_mgr_get_channel(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t *pcl_channels, uint32_t *len,
|
||||
uint8_t *pcl_weight, uint32_t weight_len);
|
||||
uint8_t *pcl_weight, uint32_t weight_len,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_init_chan_avoidance() - init channel avoidance in policy manager.
|
||||
@@ -1263,6 +1265,7 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc,
|
||||
* @mode: mode for which preferred non-dfs channel is requested
|
||||
* @for_existing_conn: flag to indicate if preferred channel is requested
|
||||
* for existing connection
|
||||
* @vdev_id: Vdev Id
|
||||
*
|
||||
* this routine will return non-dfs channel
|
||||
* 1) for getting non-dfs preferred channel, first we check if there are any
|
||||
@@ -1277,7 +1280,8 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t
|
||||
policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
bool for_existing_conn);
|
||||
bool for_existing_conn,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_any_nondfs_chnl_present() - Find any non-dfs
|
||||
@@ -1329,6 +1333,7 @@ bool policy_mgr_is_any_dfs_beaconing_session_present(
|
||||
* @ch_freq: channel frequency on which new connection is coming up
|
||||
* @bw: Bandwidth requested by the connection (optional)
|
||||
* @ext_flags: extended flags for concurrency check (union conc_ext_flag)
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* When a new connection is about to come up check if current
|
||||
* concurrency combination including the new connection is
|
||||
@@ -1340,7 +1345,7 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t ch_freq,
|
||||
enum hw_mode_bandwidth bw,
|
||||
uint32_t ext_flags);
|
||||
uint32_t ext_flags, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_check_scc_sbs_channel() - Check for allowed
|
||||
@@ -2647,6 +2652,7 @@ uint32_t policy_mgr_get_mcc_operating_channel(struct wlan_objmgr_psoc *psoc,
|
||||
* @pcl_weight: Pointer to the weights of the PCL
|
||||
* @weight_len: Max length of the weights list
|
||||
* @all_matching_cxn_to_del: Need remove all entries before getting pcl
|
||||
* @vdev_id: Vdev Id
|
||||
*
|
||||
* Get the PCL for an existing connection
|
||||
*
|
||||
@@ -2657,7 +2663,8 @@ QDF_STATUS policy_mgr_get_pcl_for_existing_conn(
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t *pcl_ch, uint32_t *len,
|
||||
uint8_t *pcl_weight, uint32_t weight_len,
|
||||
bool all_matching_cxn_to_del);
|
||||
bool all_matching_cxn_to_del,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_pcl_for_vdev_id() - Get PCL for 1 vdev
|
||||
|
@@ -1758,7 +1758,8 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
|
||||
pcl_weight[0] = 0;
|
||||
status = policy_mgr_get_pcl(psoc, mode, &pcl_channels[1], &pcl_len,
|
||||
&pcl_weight[1],
|
||||
QDF_ARRAY_SIZE(pcl_weight) - 1);
|
||||
QDF_ARRAY_SIZE(pcl_weight) - 1,
|
||||
sap_vdev_id);
|
||||
if (status == QDF_STATUS_SUCCESS)
|
||||
pcl_len++;
|
||||
else
|
||||
@@ -2083,7 +2084,8 @@ void policy_mgr_nan_sap_post_disable_conc_check(struct wlan_objmgr_psoc *psoc)
|
||||
return;
|
||||
|
||||
sap_freq = policy_mgr_get_nondfs_preferred_channel(psoc, PM_SAP_MODE,
|
||||
false);
|
||||
false,
|
||||
sap_info->vdev_id);
|
||||
policy_mgr_debug("User/ACS orig Freq: %d New SAP Freq: %d",
|
||||
policy_mgr_get_user_config_sap_freq(
|
||||
psoc, sap_info->vdev_id),
|
||||
|
@@ -3994,7 +3994,8 @@ policy_mgr_get_pref_force_scc_freq(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_mem_zero(&pcl, sizeof(pcl));
|
||||
status = policy_mgr_get_pcl(psoc, mode, pcl.pcl_list, &pcl.pcl_len,
|
||||
pcl.weight_list,
|
||||
QDF_ARRAY_SIZE(pcl.weight_list));
|
||||
QDF_ARRAY_SIZE(pcl.weight_list),
|
||||
vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status) || !pcl.pcl_len) {
|
||||
policy_mgr_err("get pcl failed for mode: %d, pcl len %d", mode,
|
||||
pcl.pcl_len);
|
||||
|
@@ -7279,7 +7279,7 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t ch_freq,
|
||||
enum hw_mode_bandwidth bw,
|
||||
uint32_t ext_flags)
|
||||
uint32_t ext_flags, uint8_t vdev_id)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct policy_mgr_pcl_list pcl;
|
||||
@@ -7288,7 +7288,7 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_mem_zero(&pcl, sizeof(pcl));
|
||||
status = policy_mgr_get_pcl(psoc, mode, pcl.pcl_list, &pcl.pcl_len,
|
||||
pcl.weight_list,
|
||||
QDF_ARRAY_SIZE(pcl.weight_list));
|
||||
QDF_ARRAY_SIZE(pcl.weight_list), vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
policy_mgr_err("disallow connection:%d", status);
|
||||
return false;
|
||||
@@ -7371,7 +7371,7 @@ policy_mgr_allow_concurrency_csa(struct wlan_objmgr_psoc *psoc,
|
||||
WLAN_POLICY_MGR_ID);
|
||||
conc_ext_flags = policy_mgr_get_conc_ext_flags(vdev, false);
|
||||
allow = policy_mgr_allow_concurrency(psoc, mode, ch_freq,
|
||||
bw, conc_ext_flags);
|
||||
bw, conc_ext_flags, vdev_id);
|
||||
if (vdev)
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
|
||||
|
||||
@@ -7602,7 +7602,7 @@ bool policy_mgr_check_for_session_conc(struct wlan_objmgr_psoc *psoc,
|
||||
/* Take care of 160MHz and 80+80Mhz later */
|
||||
conc_ext_flags = policy_mgr_get_conc_ext_flags(vdev, false);
|
||||
ret = policy_mgr_allow_concurrency(psoc, mode, ch_freq, HW_MODE_20_MHZ,
|
||||
conc_ext_flags);
|
||||
conc_ext_flags, session_id);
|
||||
if (vdev)
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
|
||||
|
||||
|
@@ -80,7 +80,8 @@ QDF_STATUS policy_mgr_get_pcl_for_existing_conn(
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t *pcl_ch, uint32_t *len,
|
||||
uint8_t *pcl_weight, uint32_t weight_len,
|
||||
bool all_matching_cxn_to_del)
|
||||
bool all_matching_cxn_to_del,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct policy_mgr_conc_connection_info
|
||||
info[MAX_NUMBER_OF_CONC_CONNECTIONS] = { {0} };
|
||||
@@ -95,6 +96,7 @@ QDF_STATUS policy_mgr_get_pcl_for_existing_conn(
|
||||
policy_mgr_err("Invalid Context");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*len = 0;
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
if (policy_mgr_mode_specific_connection_count(psoc, mode, NULL) > 0) {
|
||||
@@ -103,7 +105,7 @@ QDF_STATUS policy_mgr_get_pcl_for_existing_conn(
|
||||
all_matching_cxn_to_del, info, &num_cxn_del);
|
||||
/* Get the PCL */
|
||||
status = policy_mgr_get_pcl(psoc, mode, pcl_ch, len,
|
||||
pcl_weight, weight_len);
|
||||
pcl_weight, weight_len, vdev_id);
|
||||
policy_mgr_debug("Get PCL to FW for mode:%d", mode);
|
||||
/* Restore the connection info */
|
||||
policy_mgr_restore_deleted_conn_info(psoc, info, num_cxn_del);
|
||||
@@ -309,7 +311,7 @@ QDF_STATUS policy_mgr_get_pcl_for_vdev_id(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
/* Get the PCL */
|
||||
status = policy_mgr_get_pcl(psoc, mode, pcl_ch, len,
|
||||
pcl_weight, weight_len);
|
||||
pcl_weight, weight_len, vdev_id);
|
||||
policy_mgr_debug("Get PCL to FW for mode:%d", mode);
|
||||
/* Restore the connection info */
|
||||
policy_mgr_restore_deleted_conn_info(psoc, info, total_del);
|
||||
@@ -1292,7 +1294,8 @@ static inline enum policy_mgr_pcl_type policy_mgr_get_pcl_4_port(
|
||||
QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint32_t *pcl_channels, uint32_t *len,
|
||||
uint8_t *pcl_weight, uint32_t weight_len)
|
||||
uint8_t *pcl_weight, uint32_t weight_len,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
uint32_t num_connections = 0;
|
||||
@@ -1316,8 +1319,9 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
/* find the current connection state from pm_conc_connection_list*/
|
||||
num_connections = policy_mgr_get_connection_count(psoc);
|
||||
policy_mgr_debug("connections:%d pref:%d requested mode:%d",
|
||||
num_connections, pm_ctx->cur_conc_system_pref, mode);
|
||||
policy_mgr_debug("connections:%d pref:%d requested mode:%d vdev_id:%d",
|
||||
num_connections, pm_ctx->cur_conc_system_pref, mode,
|
||||
vdev_id);
|
||||
|
||||
switch (pm_ctx->cur_conc_system_pref) {
|
||||
case 0:
|
||||
@@ -3148,7 +3152,8 @@ enum policy_mgr_three_connection_mode
|
||||
uint32_t
|
||||
policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
bool for_existing_conn)
|
||||
bool for_existing_conn,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
uint32_t pcl_channels[NUM_CHANNELS];
|
||||
uint8_t pcl_weight[NUM_CHANNELS];
|
||||
@@ -3183,12 +3188,12 @@ policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
|
||||
psoc, mode,
|
||||
pcl_channels, &pcl_len,
|
||||
pcl_weight, QDF_ARRAY_SIZE(pcl_weight),
|
||||
false))
|
||||
false, vdev_id))
|
||||
return freq;
|
||||
} else {
|
||||
if (QDF_STATUS_SUCCESS != policy_mgr_get_pcl(
|
||||
psoc, mode, pcl_channels, &pcl_len, pcl_weight,
|
||||
QDF_ARRAY_SIZE(pcl_weight)))
|
||||
QDF_ARRAY_SIZE(pcl_weight), vdev_id))
|
||||
return freq;
|
||||
}
|
||||
|
||||
@@ -3524,7 +3529,7 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
|
||||
status = policy_mgr_get_pcl_for_existing_conn(
|
||||
psoc, PM_SAP_MODE, pcl.pcl_list, &pcl.pcl_len,
|
||||
pcl.weight_list, QDF_ARRAY_SIZE(pcl.weight_list),
|
||||
false);
|
||||
false, vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
policy_mgr_err("Unable to get PCL for SAP");
|
||||
return status;
|
||||
@@ -3542,7 +3547,7 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
|
||||
psoc, PM_SAP_MODE,
|
||||
pcl.pcl_list, &pcl.pcl_len,
|
||||
pcl.weight_list,
|
||||
QDF_ARRAY_SIZE(pcl.weight_list));
|
||||
QDF_ARRAY_SIZE(pcl.weight_list), vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
policy_mgr_err("Unable to get PCL for SAP: policy_mgr_get_pcl");
|
||||
return status;
|
||||
@@ -3823,7 +3828,7 @@ uint32_t policy_mgr_get_alternate_channel_for_sap(
|
||||
&info, &num_cxn_del);
|
||||
if (QDF_STATUS_SUCCESS == policy_mgr_get_pcl(
|
||||
psoc, con_mode, pcl_channels, &pcl_len,
|
||||
pcl_weight, QDF_ARRAY_SIZE(pcl_weight))) {
|
||||
pcl_weight, QDF_ARRAY_SIZE(pcl_weight), sap_vdev_id)) {
|
||||
for (i = 0; i < pcl_len; i++) {
|
||||
/*
|
||||
* The API is expected to select the channel on the
|
||||
|
新增問題並參考
封鎖使用者