|
@@ -9645,6 +9645,64 @@ csr_roam_roaming_state_start_bss_rsp_processor(struct mac_context *mac,
|
|
|
pSmeStartBssRsp->sessionId);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * csr_roam_send_disconnect_done_indication() - Send disconnect ind to HDD.
|
|
|
+ *
|
|
|
+ * @mac_ctx: mac global context
|
|
|
+ * @msg_ptr: incoming message
|
|
|
+ *
|
|
|
+ * This function gives final disconnect event to HDD after all cleanup in
|
|
|
+ * lower layers is done.
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void
|
|
|
+csr_roam_send_disconnect_done_indication(struct mac_context *mac_ctx,
|
|
|
+ tSirSmeRsp *msg_ptr)
|
|
|
+{
|
|
|
+ struct sir_sme_discon_done_ind *discon_ind =
|
|
|
+ (struct sir_sme_discon_done_ind *)(msg_ptr);
|
|
|
+ struct csr_roam_info *roam_info;
|
|
|
+ struct csr_roam_session *session;
|
|
|
+
|
|
|
+ roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
|
|
+ if (!roam_info)
|
|
|
+ return;
|
|
|
+
|
|
|
+ sme_debug("DISCONNECT_DONE_IND RC:%d", discon_ind->reason_code);
|
|
|
+
|
|
|
+ if (CSR_IS_SESSION_VALID(mac_ctx, discon_ind->session_id)) {
|
|
|
+ roam_info->reasonCode = discon_ind->reason_code;
|
|
|
+ roam_info->statusCode = eSIR_SME_STA_NOT_ASSOCIATED;
|
|
|
+ qdf_mem_copy(roam_info->peerMac.bytes, discon_ind->peer_mac,
|
|
|
+ ETH_ALEN);
|
|
|
+
|
|
|
+ roam_info->rssi = mac_ctx->peer_rssi;
|
|
|
+ roam_info->tx_rate = mac_ctx->peer_txrate;
|
|
|
+ roam_info->rx_rate = mac_ctx->peer_rxrate;
|
|
|
+ roam_info->disassoc_reason = discon_ind->reason_code;
|
|
|
+
|
|
|
+ csr_roam_call_callback(mac_ctx, discon_ind->session_id,
|
|
|
+ roam_info, 0, eCSR_ROAM_LOSTLINK,
|
|
|
+ eCSR_ROAM_RESULT_DISASSOC_IND);
|
|
|
+ session = CSR_GET_SESSION(mac_ctx, discon_ind->session_id);
|
|
|
+ if (session &&
|
|
|
+ !CSR_IS_INFRA_AP(&session->connectedProfile))
|
|
|
+ csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
|
|
|
+ discon_ind->session_id);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ sme_err("Inactive session %d", discon_ind->session_id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Release WM status change command as eWNI_SME_DISCONNECT_DONE_IND
|
|
|
+ * has been sent to HDD and there is nothing else left to do.
|
|
|
+ */
|
|
|
+ csr_roam_wm_status_change_complete(mac_ctx, discon_ind->session_id);
|
|
|
+ qdf_mem_free(roam_info);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* csr_roaming_state_msg_processor() - process roaming messages
|
|
|
* @mac: mac global context
|
|
@@ -9766,6 +9824,10 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
|
|
|
csr_roam_check_for_link_status_change(mac, pSmeRsp);
|
|
|
break;
|
|
|
|
|
|
+ case eWNI_SME_DISCONNECT_DONE_IND:
|
|
|
+ csr_roam_send_disconnect_done_indication(mac, pSmeRsp);
|
|
|
+ break;
|
|
|
+
|
|
|
case eWNI_SME_UPPER_LAYER_ASSOC_CNF:
|
|
|
{
|
|
|
tSirSmeAssocIndToUpperLayerCnf *upper_layer_assoc_cnf =
|
|
@@ -11296,65 +11358,6 @@ csr_roam_chk_lnk_disassoc_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|
|
qdf_mem_free(cmd);
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * csr_roam_send_disconnect_done_indication() - Send disconnect ind to HDD.
|
|
|
- *
|
|
|
- * @mac_ctx: mac global context
|
|
|
- * @msg_ptr: incoming message
|
|
|
- *
|
|
|
- * This function gives final disconnect event to HDD after all cleanup in
|
|
|
- * lower layers is done.
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
-static void
|
|
|
-csr_roam_send_disconnect_done_indication(struct mac_context *mac_ctx, tSirSmeRsp
|
|
|
- *msg_ptr)
|
|
|
-{
|
|
|
- struct sir_sme_discon_done_ind *discon_ind =
|
|
|
- (struct sir_sme_discon_done_ind *)(msg_ptr);
|
|
|
- struct csr_roam_info *roam_info;
|
|
|
- struct csr_roam_session *session;
|
|
|
-
|
|
|
- roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
|
|
- if (!roam_info)
|
|
|
- return;
|
|
|
-
|
|
|
- sme_debug("eWNI_SME_DISCONNECT_DONE_IND RC:%d",
|
|
|
- discon_ind->reason_code);
|
|
|
-
|
|
|
- if (CSR_IS_SESSION_VALID(mac_ctx, discon_ind->session_id)) {
|
|
|
- roam_info->reasonCode = discon_ind->reason_code;
|
|
|
- roam_info->statusCode = eSIR_SME_STA_NOT_ASSOCIATED;
|
|
|
- qdf_mem_copy(roam_info->peerMac.bytes, discon_ind->peer_mac,
|
|
|
- ETH_ALEN);
|
|
|
-
|
|
|
- roam_info->rssi = mac_ctx->peer_rssi;
|
|
|
- roam_info->tx_rate = mac_ctx->peer_txrate;
|
|
|
- roam_info->rx_rate = mac_ctx->peer_rxrate;
|
|
|
- roam_info->disassoc_reason = discon_ind->reason_code;
|
|
|
-
|
|
|
- csr_roam_call_callback(mac_ctx, discon_ind->session_id,
|
|
|
- roam_info, 0, eCSR_ROAM_LOSTLINK,
|
|
|
- eCSR_ROAM_RESULT_DISASSOC_IND);
|
|
|
- session = CSR_GET_SESSION(mac_ctx, discon_ind->session_id);
|
|
|
- if (session &&
|
|
|
- !CSR_IS_INFRA_AP(&session->connectedProfile))
|
|
|
- csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
|
|
|
- discon_ind->session_id);
|
|
|
-
|
|
|
- } else
|
|
|
- sme_err("Inactive session %d",
|
|
|
- discon_ind->session_id);
|
|
|
-
|
|
|
- /*
|
|
|
- * Release WM status change command as eWNI_SME_DISCONNECT_DONE_IND
|
|
|
- * has been sent to HDD and there is nothing else left to do.
|
|
|
- */
|
|
|
- csr_roam_wm_status_change_complete(mac_ctx, discon_ind->session_id);
|
|
|
- qdf_mem_free(roam_info);
|
|
|
-}
|
|
|
-
|
|
|
static void
|
|
|
csr_roam_chk_lnk_deauth_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|
|
{
|