|
@@ -3982,9 +3982,8 @@ QDF_STATUS csr_roam_call_callback(struct mac_context *mac, uint32_t sessionId,
|
|
|
* to 0 if unknown. eSIR_BEACON_MISSED reason code is
|
|
|
* not recognizable so that we set to 0 instead.
|
|
|
*/
|
|
|
- roam_info->reasonCode =
|
|
|
- (roam_info->reasonCode == eSIR_BEACON_MISSED) ?
|
|
|
- 0 : roam_info->reasonCode;
|
|
|
+ if (roam_info->reasonCode == eSIR_MAC_BEACON_MISSED)
|
|
|
+ roam_info->reasonCode = 0;
|
|
|
}
|
|
|
status = mac->session_roam_complete_cb(mac->psoc, sessionId, roam_info,
|
|
|
roamId, u1, u2);
|
|
@@ -8769,7 +8768,8 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
|
|
|
!csr_is_ssid_in_list(&pSession->connectedProfile.SSID,
|
|
|
&pProfile->SSIDs))
|
|
|
csr_roam_issue_disassociate_cmd(mac, sessionId,
|
|
|
- eCSR_DISCONNECT_REASON_UNSPECIFIED);
|
|
|
+ eCSR_DISCONNECT_REASON_UNSPECIFIED,
|
|
|
+ eSIR_MAC_UNSPEC_FAILURE_REASON);
|
|
|
/*
|
|
|
* If roamSession.connectState is disconnecting that mean
|
|
|
* disconnect was received with scan for ssid in progress
|
|
@@ -9019,7 +9019,8 @@ QDF_STATUS csr_roam_process_disassoc_deauth(struct mac_context *mac,
|
|
|
}
|
|
|
/* change state to 'Roaming'... */
|
|
|
csr_roam_state_change(mac, eCSR_ROAMING_STATE_JOINING, sessionId);
|
|
|
-
|
|
|
+ mlme_set_discon_reason_n_from_ap(mac->psoc, pCommand->vdev_id, false,
|
|
|
+ pCommand->u.roamCmd.disconnect_reason);
|
|
|
if (csr_is_conn_state_ibss(mac, sessionId)) {
|
|
|
/* If we are in an IBSS, then stop the IBSS... */
|
|
|
status =
|
|
@@ -9100,7 +9101,8 @@ QDF_STATUS csr_roam_process_disassoc_deauth(struct mac_context *mac,
|
|
|
|
|
|
QDF_STATUS csr_roam_issue_disassociate_cmd(struct mac_context *mac,
|
|
|
uint32_t sessionId,
|
|
|
- eCsrRoamDisconnectReason reason)
|
|
|
+ eCsrRoamDisconnectReason reason,
|
|
|
+ tSirMacReasonCodes mac_reason)
|
|
|
{
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
tSmeCmd *pCommand;
|
|
@@ -9159,7 +9161,7 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(struct mac_context *mac,
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- pCommand->u.roamCmd.disconnect_reason = reason;
|
|
|
+ pCommand->u.roamCmd.disconnect_reason = mac_reason;
|
|
|
status = csr_queue_sme_command(mac, pCommand, true);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
|
|
sme_err("fail to send message status: %d", status);
|
|
@@ -9195,7 +9197,8 @@ QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac, uint32_t session
|
|
|
}
|
|
|
|
|
|
QDF_STATUS csr_roam_disconnect_internal(struct mac_context *mac, uint32_t sessionId,
|
|
|
- eCsrRoamDisconnectReason reason)
|
|
|
+ eCsrRoamDisconnectReason reason,
|
|
|
+ tSirMacReasonCodes mac_reason)
|
|
|
{
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
|
@@ -9212,7 +9215,7 @@ QDF_STATUS csr_roam_disconnect_internal(struct mac_context *mac, uint32_t sessio
|
|
|
|| CSR_IS_CONN_NDI(&pSession->connectedProfile)) {
|
|
|
sme_debug("called");
|
|
|
status = csr_roam_issue_disassociate_cmd(mac, sessionId,
|
|
|
- reason);
|
|
|
+ reason, mac_reason);
|
|
|
} else if (pSession->scan_info.profile) {
|
|
|
mac->roam.roamSession[sessionId].connectState =
|
|
|
eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING;
|
|
@@ -9226,7 +9229,8 @@ QDF_STATUS csr_roam_disconnect_internal(struct mac_context *mac, uint32_t sessio
|
|
|
}
|
|
|
|
|
|
QDF_STATUS csr_roam_disconnect(struct mac_context *mac_ctx, uint32_t session_id,
|
|
|
- eCsrRoamDisconnectReason reason)
|
|
|
+ eCsrRoamDisconnectReason reason,
|
|
|
+ tSirMacReasonCodes mac_reason)
|
|
|
{
|
|
|
struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
|
|
|
|
|
@@ -9240,7 +9244,8 @@ QDF_STATUS csr_roam_disconnect(struct mac_context *mac_ctx, uint32_t session_id,
|
|
|
csr_roam_remove_duplicate_command(mac_ctx, session_id, NULL,
|
|
|
eCsrForcedDisassoc);
|
|
|
|
|
|
- return csr_roam_disconnect_internal(mac_ctx, session_id, reason);
|
|
|
+ return csr_roam_disconnect_internal(mac_ctx, session_id, reason,
|
|
|
+ mac_reason);
|
|
|
}
|
|
|
|
|
|
QDF_STATUS
|
|
@@ -9949,6 +9954,9 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
|
|
|
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
|
|
if (!roam_info)
|
|
|
return;
|
|
|
+ mlme_set_discon_reason_n_from_ap(mac->psoc,
|
|
|
+ pSmeJoinRsp->vdev_id, false,
|
|
|
+ eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE);
|
|
|
csr_roam_call_callback(mac,
|
|
|
pSmeJoinRsp->vdev_id,
|
|
|
roam_info, roam_id,
|
|
@@ -10332,6 +10340,8 @@ void csr_handle_disassoc_ho(struct mac_context *mac, uint32_t session_id)
|
|
|
csr_scan_result_purge(mac, scan_handle_roam_ap);
|
|
|
|
|
|
POST_ROAM_FAILURE:
|
|
|
+ mlme_set_discon_reason_n_from_ap(mac->psoc, session_id, false,
|
|
|
+ eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE);
|
|
|
csr_post_roam_failure(mac, session_id, roam_info, NULL);
|
|
|
qdf_mem_free(roam_info);
|
|
|
}
|
|
@@ -12007,7 +12017,7 @@ csr_roam_chk_lnk_deauth_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|
|
session->disconnect_stats.disconnection_cnt++;
|
|
|
session->disconnect_stats.deauth_by_peer++;
|
|
|
break;
|
|
|
- case eSIR_BEACON_MISSED:
|
|
|
+ case eSIR_MAC_BEACON_MISSED:
|
|
|
session->disconnect_stats.disconnection_cnt++;
|
|
|
session->disconnect_stats.bmiss++;
|
|
|
break;
|
|
@@ -12060,7 +12070,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|
|
if (QDF_IS_STATUS_ERROR(pSwitchChnInd->status)) {
|
|
|
sme_err("Channel switch failed");
|
|
|
csr_roam_disconnect_internal(mac_ctx, sessionId,
|
|
|
- eCSR_DISCONNECT_REASON_DEAUTH);
|
|
|
+ eCSR_DISCONNECT_REASON_DEAUTH,
|
|
|
+ eSIR_MAC_CHANNEL_SWITCH_FAILED);
|
|
|
return;
|
|
|
}
|
|
|
session->connectedProfile.op_freq = pSwitchChnInd->freq;
|
|
@@ -12421,7 +12432,8 @@ csr_roam_chk_lnk_wm_status_change_ntf(struct mac_context *mac_ctx,
|
|
|
mac_ctx->roam.curSubState[sessionId]))) {
|
|
|
sme_warn("Calling csr_roam_disconnect_internal");
|
|
|
csr_roam_disconnect_internal(mac_ctx, sessionId,
|
|
|
- eCSR_DISCONNECT_REASON_UNSPECIFIED);
|
|
|
+ eCSR_DISCONNECT_REASON_UNSPECIFIED,
|
|
|
+ eSIR_MAC_UNSPEC_FAILURE_REASON);
|
|
|
} else {
|
|
|
sme_warn("Skipping the new scan as CSR is in state: %s and sub-state: %s",
|
|
|
mac_trace_getcsr_roam_state(
|
|
@@ -12764,7 +12776,8 @@ bool csr_roam_complete_roaming(struct mac_context *mac, uint32_t sessionId,
|
|
|
* detinguish it. For missed beacon, LIM set reason to
|
|
|
* be eSIR_BEACON_MISSED
|
|
|
*/
|
|
|
- if (eSIR_BEACON_MISSED == pSession->roamingStatusCode) {
|
|
|
+ if (eSIR_MAC_BEACON_MISSED ==
|
|
|
+ pSession->roamingStatusCode) {
|
|
|
roamResult = eCSR_ROAM_RESULT_LOSTLINK;
|
|
|
} else if (eCsrLostlinkRoamingDisassoc ==
|
|
|
pSession->roamingReason) {
|
|
@@ -12991,7 +13004,8 @@ void csr_roam_wait_for_key_time_out_handler(void *pv)
|
|
|
pSession->connectedProfile.bssid);
|
|
|
if (QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
csr_roam_disconnect(mac, vdev_id,
|
|
|
- eCSR_DISCONNECT_REASON_UNSPECIFIED);
|
|
|
+ eCSR_DISCONNECT_REASON_UNSPECIFIED,
|
|
|
+ eSIR_MAC_KEY_TIMEOUT);
|
|
|
}
|
|
|
} else {
|
|
|
sme_err("session not found");
|
|
@@ -13179,6 +13193,7 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
|
|
|
eCsrRoamResult result = eCSR_ROAM_RESULT_LOSTLINK;
|
|
|
struct csr_roam_info *roam_info;
|
|
|
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
|
|
+ bool from_ap = false;
|
|
|
|
|
|
if (!pSession) {
|
|
|
sme_err("session: %d not found", sessionId);
|
|
@@ -13193,7 +13208,7 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
|
|
|
pSession->roamingStatusCode = pDisassocIndMsg->status_code;
|
|
|
pSession->joinFailStatusCode.reasonCode =
|
|
|
pDisassocIndMsg->reasonCode;
|
|
|
-
|
|
|
+ from_ap = pDisassocIndMsg->from_ap;
|
|
|
qdf_copy_macaddr(&roam_info->peerMac,
|
|
|
&pDisassocIndMsg->peer_macaddr);
|
|
|
} else if (eWNI_SME_DEAUTH_IND == type) {
|
|
@@ -13202,7 +13217,7 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
|
|
|
pSession->roamingStatusCode = pDeauthIndMsg->status_code;
|
|
|
pSession->joinFailStatusCode.reasonCode =
|
|
|
pDeauthIndMsg->reasonCode;
|
|
|
-
|
|
|
+ from_ap = pDeauthIndMsg->from_ap;
|
|
|
qdf_copy_macaddr(&roam_info->peerMac,
|
|
|
&pDeauthIndMsg->peer_macaddr);
|
|
|
|
|
@@ -13212,6 +13227,9 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
|
|
|
pSession->joinFailStatusCode.reasonCode = 1;
|
|
|
}
|
|
|
|
|
|
+ mlme_set_discon_reason_n_from_ap(mac->psoc, sessionId, from_ap,
|
|
|
+ pSession->joinFailStatusCode.reasonCode);
|
|
|
+
|
|
|
if (type == eWNI_SME_DISASSOC_IND || type == eWNI_SME_DEAUTH_IND) {
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
struct request_info info = {0};
|
|
@@ -20336,7 +20354,8 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
|
|
|
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
|
|
"LFR3:Issue Disconnect on session %d", sessionId);
|
|
|
csr_roam_disconnect(mac_ctx, sessionId,
|
|
|
- eCSR_DISCONNECT_REASON_ROAM_HO_FAIL);
|
|
|
+ eCSR_DISCONNECT_REASON_ROAM_HO_FAIL,
|
|
|
+ eSIR_MAC_FW_TRIGGERED_ROAM_FAILURE);
|
|
|
if (mac_ctx->mlme_cfg->gen.fatal_event_trigger)
|
|
|
cds_flush_logs(WLAN_LOG_TYPE_FATAL,
|
|
|
WLAN_LOG_INDICATOR_HOST_DRIVER,
|
|
@@ -21167,7 +21186,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
|
|
|
if (vdev_roam_params->source == USERSPACE_INITIATED) {
|
|
|
/* Userspace roam req fail, disconnect with AP */
|
|
|
csr_roam_disconnect(mac_ctx, session_id,
|
|
|
- eCSR_DISCONNECT_REASON_DEAUTH);
|
|
|
+ eCSR_DISCONNECT_REASON_DEAUTH,
|
|
|
+ eSIR_MAC_USER_TRIGGERED_ROAM_FAILURE);
|
|
|
}
|
|
|
vdev_roam_params->roam_invoke_in_progress = false;
|
|
|
goto end;
|
|
@@ -21184,7 +21204,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
|
|
|
if (wlan_reg_is_disable_for_freq(mac_ctx->pdev,
|
|
|
roam_synch_data->chan_freq)) {
|
|
|
csr_roam_disconnect(mac_ctx, session_id,
|
|
|
- eCSR_DISCONNECT_REASON_DEAUTH);
|
|
|
+ eCSR_DISCONNECT_REASON_DEAUTH,
|
|
|
+ eSIR_MAC_OPER_CHANNEL_BAND_CHANGE);
|
|
|
sme_debug("Roaming Failed for disabled channel or band");
|
|
|
vdev_roam_params->roam_invoke_in_progress = false;
|
|
|
goto end;
|