qcacld-3.0: Use correct hw mode switch reason

Currently the driver uses the reason code
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH for
chanenl switch for P2P-CLI which is same
reason code used for hw mode change in case
of SAP, so after the hw mode is changed the
VDEV-SM does call the callback of SAP CSA
also.

Fix is to use a different reason code for
SAP CSA.

Change-Id: I16b0521d5a21391e642f29e86037f9eb4fd2af62
CRs-Fixed: 2663915
This commit is contained in:
gaurank kathpalia
2020-04-17 12:14:32 +05:30
gecommit door nshrivas
bovenliggende 670a0b4e58
commit 4d769c247d
5 gewijzigde bestanden met toevoegingen van 9 en 7 verwijderingen

Bestand weergeven

@@ -904,8 +904,9 @@ enum policy_mgr_band {
* @POLICY_MGR_UPDATE_REASON_HIDDEN_STA: Connection to Hidden STA
* @POLICY_MGR_UPDATE_REASON_OPPORTUNISTIC: Opportunistic HW mode update
* @POLICY_MGR_UPDATE_REASON_NSS_UPDATE: NSS update
* @POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH: Channel switch
* @POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_STA: Channel switch for STA
* @POLICY_MGR_UPDATE_REASON_AFTER_CHANNEL_SWITCH: After Channel switch
* @POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_STA: Before Channel switch for STA
* @POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_SAP: Before Channel switch for SAP
* @POLICY_MGR_UPDATE_REASON_PRI_VDEV_CHANGE: In Dual DBS HW, if the vdev based
* 2x2 preference enabled, the vdev down may cause prioritized active
* vdev change, then DBS hw mode may needs to change from one DBS mode
@@ -922,8 +923,9 @@ enum policy_mgr_conn_update_reason {
POLICY_MGR_UPDATE_REASON_HIDDEN_STA,
POLICY_MGR_UPDATE_REASON_OPPORTUNISTIC,
POLICY_MGR_UPDATE_REASON_NSS_UPDATE,
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH,
POLICY_MGR_UPDATE_REASON_AFTER_CHANNEL_SWITCH,
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_STA,
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_SAP,
POLICY_MGR_UPDATE_REASON_PRE_CAC,
POLICY_MGR_UPDATE_REASON_PRI_VDEV_CHANGE,
POLICY_MGR_UPDATE_REASON_NAN_DISCOVERY,

Bestand weergeven

@@ -2509,7 +2509,7 @@ QDF_STATUS policy_mgr_set_hw_mode_on_channel_switch(
/* For DBS, we want to move right away to DBS mode */
status = policy_mgr_next_actions(psoc, session_id, action,
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH);
POLICY_MGR_UPDATE_REASON_AFTER_CHANNEL_SWITCH);
if (!QDF_IS_STATUS_SUCCESS(status)) {
policy_mgr_err("no set hw mode command was issued");
goto done;

Bestand weergeven

@@ -2853,7 +2853,7 @@ static void policy_mgr_nss_update_cb(struct wlan_objmgr_psoc *psoc,
policy_mgr_debug("nss update successful for vdev:%d ori %d reason %d",
vdev_id, original_vdev_id, reason);
if (PM_NOP != next_action) {
if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH)
if (reason == POLICY_MGR_UPDATE_REASON_AFTER_CHANNEL_SWITCH)
policy_mgr_next_actions(psoc, vdev_id, next_action,
reason);
else

Bestand weergeven

@@ -1401,7 +1401,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
policy_mgr_check_and_set_hw_mode_for_channel_switch(
mac->psoc, sap_ctx->sessionId,
target_chan_freq,
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH);
POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_SAP);
/*
* If hw_mode_status is QDF_STATUS_E_FAILURE, mean HW

Bestand weergeven

@@ -221,7 +221,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
csr_sta_continue_csa(mac, session_id);
}
if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH) {
if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_SAP) {
sme_info("Continue channel switch for SAP on vdev %d",
session_id);
csr_csa_restart(mac, session_id);