|
@@ -806,7 +806,6 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac,
|
|
|
tpPESession session = NULL;
|
|
|
uint16_t i, assoc_id;
|
|
|
tpDphHashNode sta_ds = NULL;
|
|
|
- struct sir_sme_discon_done_ind *sir_sme_dis_ind;
|
|
|
|
|
|
pe_debug("Disassoc Ntf with trigger : %d reasonCode: %d",
|
|
|
disassocTrigger, reasonCode);
|
|
@@ -894,37 +893,9 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac,
|
|
|
|
|
|
case eLIM_PEER_ENTITY_DISASSOC:
|
|
|
case eLIM_LINK_MONITORING_DISASSOC:
|
|
|
- sir_sme_dis_ind =
|
|
|
- qdf_mem_malloc(sizeof(*sir_sme_dis_ind));
|
|
|
- if (!sir_sme_dis_ind) {
|
|
|
- pe_err("call to AllocateMemory failed for disconnect indication");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- pe_debug("send eWNI_SME_DISCONNECT_DONE_IND with retCode: %d",
|
|
|
- reasonCode);
|
|
|
-
|
|
|
- sir_sme_dis_ind->message_type =
|
|
|
- eWNI_SME_DISCONNECT_DONE_IND;
|
|
|
- sir_sme_dis_ind->length =
|
|
|
- sizeof(*sir_sme_dis_ind);
|
|
|
- qdf_mem_copy(sir_sme_dis_ind->peer_mac, peerMacAddr,
|
|
|
- sizeof(tSirMacAddr));
|
|
|
- sir_sme_dis_ind->session_id = smesessionId;
|
|
|
- sir_sme_dis_ind->reason_code = reasonCode;
|
|
|
- /*
|
|
|
- * Instead of sending deauth reason code as 505 which is
|
|
|
- * internal value(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
- * Send reason code as zero to Supplicant
|
|
|
- */
|
|
|
- if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
- sir_sme_dis_ind->reason_code = 0;
|
|
|
- else
|
|
|
- sir_sme_dis_ind->reason_code = reasonCode;
|
|
|
-
|
|
|
- pMsg = (uint32_t *)sir_sme_dis_ind;
|
|
|
-
|
|
|
- break;
|
|
|
+ lim_send_disconnect_done_ind(pMac, psessionEntry, smesessionId,
|
|
|
+ reasonCode, peerMacAddr);
|
|
|
+ return;
|
|
|
|
|
|
default:
|
|
|
/**
|
|
@@ -1191,6 +1162,51 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac,
|
|
|
|
|
|
#endif /* FEATURE_WLAN_TDLS */
|
|
|
|
|
|
+void lim_send_disconnect_done_ind(tpAniSirGlobal mac_ctx,
|
|
|
+ tpPESession session_entry, uint8_t session_id,
|
|
|
+ tSirResultCodes reason_code,
|
|
|
+ tSirMacAddr peer_mac_addr)
|
|
|
+{
|
|
|
+ struct sir_sme_discon_done_ind *sir_sme_dis_ind;
|
|
|
+ uint32_t *msg;
|
|
|
+
|
|
|
+ sir_sme_dis_ind =
|
|
|
+ qdf_mem_malloc(sizeof(*sir_sme_dis_ind));
|
|
|
+ if (!sir_sme_dis_ind) {
|
|
|
+ pe_err("call to AllocateMemory failed for disconnect indication");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ pe_debug("send eWNI_SME_DISCONNECT_DONE_IND withretCode: %d",
|
|
|
+ reason_code);
|
|
|
+
|
|
|
+ sir_sme_dis_ind->message_type =
|
|
|
+ eWNI_SME_DISCONNECT_DONE_IND;
|
|
|
+ sir_sme_dis_ind->length =
|
|
|
+ sizeof(*sir_sme_dis_ind);
|
|
|
+ sir_sme_dis_ind->session_id = session_id;
|
|
|
+ qdf_mem_copy(sir_sme_dis_ind->peer_mac, peer_mac_addr,
|
|
|
+ ETH_ALEN);
|
|
|
+ /*
|
|
|
+ * Instead of sending deauth reason code as 505 which is
|
|
|
+ * internal value(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
+ * Send reason code as zero to Supplicant
|
|
|
+ */
|
|
|
+ if (reason_code == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
+ sir_sme_dis_ind->reason_code = 0;
|
|
|
+ else
|
|
|
+ sir_sme_dis_ind->reason_code = reason_code;
|
|
|
+
|
|
|
+ msg = (uint32_t *)sir_sme_dis_ind;
|
|
|
+
|
|
|
+ /*Delete the PE session created */
|
|
|
+ if (session_entry)
|
|
|
+ pe_delete_session(mac_ctx, session_entry);
|
|
|
+
|
|
|
+ lim_send_sme_disassoc_deauth_ntf(mac_ctx, QDF_STATUS_SUCCESS,
|
|
|
+ (uint32_t *)msg);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* lim_send_sme_deauth_ntf()
|
|
|
*
|
|
@@ -1230,7 +1246,6 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
|
|
|
tpPESession psessionEntry;
|
|
|
uint8_t sessionId;
|
|
|
uint32_t *pMsg;
|
|
|
- struct sir_sme_discon_done_ind *sir_sme_dis_ind;
|
|
|
|
|
|
psessionEntry = pe_find_session_by_bssid(pMac, peerMacAddr, &sessionId);
|
|
|
switch (deauthTrigger) {
|
|
@@ -1266,38 +1281,9 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
|
|
|
|
|
|
case eLIM_PEER_ENTITY_DEAUTH:
|
|
|
case eLIM_LINK_MONITORING_DEAUTH:
|
|
|
- sir_sme_dis_ind =
|
|
|
- qdf_mem_malloc(sizeof(*sir_sme_dis_ind));
|
|
|
- if (!sir_sme_dis_ind) {
|
|
|
- pe_err("call to AllocateMemory failed for disconnect indication");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- pe_debug("send eWNI_SME_DISCONNECT_DONE_IND withretCode: %d",
|
|
|
- reasonCode);
|
|
|
-
|
|
|
- sir_sme_dis_ind->message_type =
|
|
|
- eWNI_SME_DISCONNECT_DONE_IND;
|
|
|
- sir_sme_dis_ind->length =
|
|
|
- sizeof(*sir_sme_dis_ind);
|
|
|
- sir_sme_dis_ind->session_id = smesessionId;
|
|
|
- sir_sme_dis_ind->reason_code = reasonCode;
|
|
|
- qdf_mem_copy(sir_sme_dis_ind->peer_mac, peerMacAddr,
|
|
|
- ETH_ALEN);
|
|
|
- /*
|
|
|
- * Instead of sending deauth reason code as 505 which is
|
|
|
- * internal value(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
- * Send reason code as zero to Supplicant
|
|
|
- */
|
|
|
- if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
|
|
|
- sir_sme_dis_ind->reason_code = 0;
|
|
|
- else
|
|
|
- sir_sme_dis_ind->reason_code = reasonCode;
|
|
|
-
|
|
|
- pMsg = (uint32_t *)sir_sme_dis_ind;
|
|
|
-
|
|
|
- break;
|
|
|
-
|
|
|
+ lim_send_disconnect_done_ind(pMac, psessionEntry, smesessionId,
|
|
|
+ reasonCode, peerMacAddr);
|
|
|
+ return;
|
|
|
default:
|
|
|
/**
|
|
|
* Deauthentication indication due to Deauthentication
|