qcacld-3.0: Send vdev pcl command when STA + STA roaming is active

Send Vdev pcl command on both connected STA vdev when sta+sta
roaming is enabled. Handle below cases:
1. When 1st STA is connected send PDEV pcl command for the
first sta. Set pcl_vdev_cmd_active false.
2. When 2nd STA comes up, Set pcl_vdev_cmd_active to true,
send vdev PCL for 1st sta before enabling roaming(disabled
as part of the connect on 2nd STA).
3. For second STA force dbs connection when
enable_dual_sta_roam_offload ini is enabled. Set the channels
of the 1st connected STA band as invalid and remove these
channels from the scan filter.
4. On disconnection of 2nd STA connection, clear the vdev
PCL sent for 1st STA and then send PDEV pcl command.

Also make changes to send set PCL command after roam init
is done before RSO start is done at firmware to avoid assert.
Post set pcl command from sme/csr through lim/wma/wmi to avoid
the above condition.
Disable roaming on the vdev before sending set PCL command to
avoid roaming on undesirable band & channels.

Change-Id: I6bd869015b7248fe5c5c90b6e2fa0174995be197
CRs-Fixed: 2725360
Šī revīzija ir iekļauta:
Pragaspathi Thilagaraj
2020-07-04 21:52:17 +05:30
revīziju iesūtīja nshrivas
vecāks f4f96bd3b2
revīzija 750e889d9e
20 mainīti faili ar 369 papildinājumiem un 85 dzēšanām

Parādīt failu

@@ -30,7 +30,9 @@
#include "qdf_status.h"
#include "wlan_objmgr_psoc_obj.h"
#include "wlan_policy_mgr_public_struct.h"
#include "wlan_cm_roam_public_srtuct.h"
#include "wlan_utility.h"
#include "sir_types.h"
struct target_psoc_info;
@@ -595,11 +597,13 @@ static inline void policy_mgr_change_sap_channel_with_csa(
* policy_mgr_set_pcl_for_existing_combo() - SET PCL for existing combo
* @psoc: PSOC object information
* @mode: Adapter mode
* @vdev_id: Vdev Id
*
* Return: None
*/
void policy_mgr_set_pcl_for_existing_combo(struct wlan_objmgr_psoc *psoc,
enum policy_mgr_con_mode mode);
enum policy_mgr_con_mode mode,
uint8_t vdev_id);
/**
* policy_mgr_incr_active_session() - increments the number of active sessions
* @psoc: PSOC object information
@@ -1344,9 +1348,11 @@ typedef void (*policy_mgr_nss_update_cback)(struct wlan_objmgr_psoc *psoc,
* @sme_soc_set_dual_mac_config: Set the dual MAC scan & FW
* config
* @sme_pdev_set_hw_mode: Set the new HW mode to FW
* @sme_pdev_set_pcl: Set new PCL to FW
* @sme_set_pcl: Set new PCL to FW
* @sme_nss_update_request: Update NSS value to FW
* @sme_change_mcc_beacon_interval: Set MCC beacon interval to FW
* @sme_rso_start_cb: Enable roaming offload callback
* @sme_rso_stop_cb: Disable roaming offload callback
*/
struct policy_mgr_sme_cbacks {
void (*sme_get_nss_for_vdev)(enum QDF_OPMODE,
@@ -1354,7 +1360,8 @@ struct policy_mgr_sme_cbacks {
QDF_STATUS (*sme_soc_set_dual_mac_config)(
struct policy_mgr_dual_mac_config msg);
QDF_STATUS (*sme_pdev_set_hw_mode)(struct policy_mgr_hw_mode msg);
QDF_STATUS (*sme_pdev_set_pcl)(struct policy_mgr_pcl_list *msg);
QDF_STATUS (*sme_set_pcl)(struct policy_mgr_pcl_list *msg,
uint8_t vdev_id, bool clear_vdev_pcl);
QDF_STATUS (*sme_nss_update_request)(uint32_t vdev_id,
uint8_t new_nss, uint8_t ch_width,
policy_mgr_nss_update_cback cback,
@@ -1368,6 +1375,12 @@ struct policy_mgr_sme_cbacks {
uint32_t *ch_freq);
QDF_STATUS (*sme_scan_result_purge)(
void *scan_result);
QDF_STATUS (*sme_rso_start_cb)(
mac_handle_t mac_handle, uint8_t vdev_id,
uint8_t reason, enum wlan_cm_rso_control_requestor requestor);
QDF_STATUS (*sme_rso_stop_cb)(
mac_handle_t mac_handle, uint8_t vdev_id,
uint8_t reason, enum wlan_cm_rso_control_requestor requestor);
};
/**

Parādīt failu

@@ -1346,13 +1346,15 @@ QDF_STATUS policy_mgr_pdev_get_pcl(struct wlan_objmgr_psoc *psoc,
/**
* policy_mgr_set_pcl_for_existing_combo() - Set PCL for existing connection
* @mode: Connection mode of type 'policy_mgr_con_mode'
* @vdev_id: Vdev Id
*
* Set the PCL for an existing connection
*
* Return: None
*/
void policy_mgr_set_pcl_for_existing_combo(
struct wlan_objmgr_psoc *psoc, enum policy_mgr_con_mode mode)
void policy_mgr_set_pcl_for_existing_combo(struct wlan_objmgr_psoc *psoc,
enum policy_mgr_con_mode mode,
uint8_t vdev_id)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct policy_mgr_conc_connection_info
@@ -1386,7 +1388,7 @@ void policy_mgr_set_pcl_for_existing_combo(
/* Send PCL only if policy_mgr_pdev_get_pcl returned success */
if (QDF_IS_STATUS_SUCCESS(status)) {
status = pm_ctx->sme_cbacks.sme_pdev_set_pcl(&pcl);
status = pm_ctx->sme_cbacks.sme_set_pcl(&pcl, vdev_id, false);
if (QDF_IS_STATUS_ERROR(status))
policy_mgr_err("Send set PCL to SME failed");
}

Parādīt failu

@@ -35,6 +35,8 @@
#include "wlan_nan_api.h"
#include "nan_public_structs.h"
#include "wlan_reg_services_api.h"
#include "wlan_cm_roam_public_srtuct.h"
#include "csr_neighbor_roam.h"
/* invalid channel id. */
#define INVALID_CHANNEL_ID 0
@@ -1717,8 +1719,10 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
enum QDF_OPMODE mode,
uint8_t session_id)
{
mac_handle_t mac_handle = cds_get_context(QDF_MODULE_ID_SME);
struct policy_mgr_psoc_priv_obj *pm_ctx;
uint32_t conn_6ghz_flag = 0;
uint32_t conn_6ghz_flag = 0, conn_idx = 0;
uint8_t vdev_id = WLAN_INVALID_VDEV_ID;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
@@ -1759,10 +1763,36 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
policy_mgr_debug("No.# of active sessions for mode %d = %d",
mode, pm_ctx->no_of_active_sessions[mode]);
policy_mgr_incr_connection_count(psoc, session_id, mode);
if ((policy_mgr_mode_specific_connection_count(
psoc, PM_STA_MODE, NULL) > 0) && (mode != QDF_STA_MODE)) {
/* Send set pcl for all the connected STA vdev */
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
policy_mgr_set_pcl_for_existing_combo(psoc, PM_STA_MODE);
for (conn_idx = 0; conn_idx < MAX_NUMBER_OF_CONC_CONNECTIONS;
conn_idx++) {
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
if (!(pm_conc_connection_list[conn_idx].mode ==
PM_STA_MODE &&
pm_conc_connection_list[conn_idx].in_use)) {
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
continue;
}
vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
pm_ctx->sme_cbacks.sme_rso_stop_cb(
mac_handle, vdev_id,
REASON_DRIVER_DISABLED,
RSO_SET_PCL);
policy_mgr_set_pcl_for_existing_combo(psoc, PM_STA_MODE,
vdev_id);
pm_ctx->sme_cbacks.sme_rso_start_cb(
mac_handle, vdev_id,
REASON_DRIVER_ENABLED,
RSO_SET_PCL);
}
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
}

Parādīt failu

@@ -655,8 +655,8 @@ QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc,
sme_cbacks->sme_nss_update_request;
pm_ctx->sme_cbacks.sme_pdev_set_hw_mode =
sme_cbacks->sme_pdev_set_hw_mode;
pm_ctx->sme_cbacks.sme_pdev_set_pcl =
sme_cbacks->sme_pdev_set_pcl;
pm_ctx->sme_cbacks.sme_set_pcl =
sme_cbacks->sme_set_pcl;
pm_ctx->sme_cbacks.sme_soc_set_dual_mac_config =
sme_cbacks->sme_soc_set_dual_mac_config;
pm_ctx->sme_cbacks.sme_change_mcc_beacon_interval =
@@ -665,6 +665,10 @@ QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc,
sme_cbacks->sme_get_ap_channel_from_scan;
pm_ctx->sme_cbacks.sme_scan_result_purge =
sme_cbacks->sme_scan_result_purge;
pm_ctx->sme_cbacks.sme_rso_start_cb =
sme_cbacks->sme_rso_start_cb;
pm_ctx->sme_cbacks.sme_rso_stop_cb =
sme_cbacks->sme_rso_stop_cb;
return QDF_STATUS_SUCCESS;
}

Parādīt failu

@@ -33,6 +33,7 @@
#include "wlan_objmgr_global_obj.h"
#include "wlan_utility.h"
#include "wlan_mlme_ucfg_api.h"
#include "csr_neighbor_roam.h"
/**
* first_connection_pcl_table - table which provides PCL for the
@@ -112,6 +113,9 @@ void policy_mgr_decr_session_set_pcl(struct wlan_objmgr_psoc *psoc,
{
QDF_STATUS qdf_status;
struct policy_mgr_psoc_priv_obj *pm_ctx;
mac_handle_t mac_handle = cds_get_context(QDF_MODULE_ID_SME);
uint32_t conn_idx = 0;
uint8_t vdev_id = WLAN_INVALID_VDEV_ID;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
@@ -139,7 +143,38 @@ void policy_mgr_decr_session_set_pcl(struct wlan_objmgr_psoc *psoc,
* given to the FW. After setting the PCL, we need to restore
* the entry that we have saved before.
*/
policy_mgr_set_pcl_for_existing_combo(psoc, PM_STA_MODE);
if ((policy_mgr_mode_specific_connection_count(
psoc, PM_STA_MODE, NULL) > 0) && mode != QDF_STA_MODE) {
for (conn_idx = 0; conn_idx < MAX_NUMBER_OF_CONC_CONNECTIONS;
conn_idx++) {
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
if (!(pm_conc_connection_list[conn_idx].mode ==
PM_STA_MODE &&
pm_conc_connection_list[conn_idx].in_use)) {
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
continue;
}
vdev_id = pm_conc_connection_list[conn_idx].vdev_id;
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
/* Send RSO stop before sending set pcl command */
pm_ctx->sme_cbacks.sme_rso_stop_cb(
mac_handle, session_id,
REASON_DRIVER_DISABLED,
RSO_SET_PCL);
policy_mgr_set_pcl_for_existing_combo(psoc, PM_STA_MODE,
session_id);
pm_ctx->sme_cbacks.sme_rso_start_cb(
mac_handle, session_id,
REASON_DRIVER_ENABLED,
RSO_SET_PCL);
}
}
/* do we need to change the HW mode */
policy_mgr_check_n_start_opportunistic_timer(psoc);
return;