qcacld-3.0: Remove lim_send_sme_disassoc_ntf() serdes logic
An ancestor of the current driver used mailboxes for communication between SME and LIM, and serialization/deserialization routines were used to encode and decode the mailbox messages. This mechanism is no longer in use, but there are remnants still present. Two such remnants are in lim_send_sme_disassoc_ntf(). The logic for creating both the Disassoc Response and the Disassoc Indication use a combination of direct structure writes and serialized buffer writes. Bring this logic up to date by removing all serialized buffer writes and exclusively use direct structure writes. Change-Id: I73be566a1512fdc9b8dc28c9ddf818b7c4aa26ed CRs-Fixed: 2402223
This commit is contained in:
@@ -731,10 +731,9 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
|||||||
uint16_t disassocTrigger,
|
uint16_t disassocTrigger,
|
||||||
uint16_t aid,
|
uint16_t aid,
|
||||||
uint8_t smesessionId,
|
uint8_t smesessionId,
|
||||||
uint16_t smetransactionId, struct pe_session *pe_session)
|
uint16_t smetransactionId,
|
||||||
|
struct pe_session *pe_session)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint8_t *pBuf;
|
|
||||||
struct disassoc_rsp *pSirSmeDisassocRsp;
|
struct disassoc_rsp *pSirSmeDisassocRsp;
|
||||||
struct disassoc_ind *pSirSmeDisassocInd;
|
struct disassoc_ind *pSirSmeDisassocInd;
|
||||||
uint32_t *pMsg = NULL;
|
uint32_t *pMsg = NULL;
|
||||||
@@ -801,29 +800,16 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
|||||||
failure = true;
|
failure = true;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
pe_debug("send eWNI_SME_DISASSOC_RSP with retCode: %d for " MAC_ADDRESS_STR,
|
pe_debug("send eWNI_SME_DISASSOC_RSP with retCode: %d for "
|
||||||
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
MAC_ADDRESS_STR,
|
||||||
|
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
||||||
pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP;
|
pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP;
|
||||||
pSirSmeDisassocRsp->length = sizeof(struct disassoc_rsp);
|
pSirSmeDisassocRsp->length = sizeof(struct disassoc_rsp);
|
||||||
/* sessionId */
|
pSirSmeDisassocRsp->sessionId = smesessionId;
|
||||||
pBuf = (uint8_t *) &pSirSmeDisassocRsp->sessionId;
|
pSirSmeDisassocRsp->transactionId = smetransactionId;
|
||||||
*pBuf = smesessionId;
|
pSirSmeDisassocRsp->statusCode = reasonCode;
|
||||||
pBuf++;
|
qdf_mem_copy(pSirSmeDisassocRsp->peer_macaddr.bytes,
|
||||||
|
peerMacAddr, sizeof(tSirMacAddr));
|
||||||
/* transactionId */
|
|
||||||
lim_copy_u16(pBuf, smetransactionId);
|
|
||||||
pBuf += sizeof(uint16_t);
|
|
||||||
|
|
||||||
/* statusCode */
|
|
||||||
lim_copy_u32(pBuf, reasonCode);
|
|
||||||
pBuf += sizeof(tSirResultCodes);
|
|
||||||
|
|
||||||
/* peerMacAddr */
|
|
||||||
qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
|
|
||||||
pBuf += sizeof(tSirMacAddr);
|
|
||||||
|
|
||||||
/* Clear Station Stats */
|
|
||||||
/* for sta, it is always 1, IBSS is handled at halInitSta */
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||||
|
|
||||||
@@ -856,24 +842,19 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
|||||||
failure = true;
|
failure = true;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
pe_debug("send eWNI_SME_DISASSOC_IND with retCode: %d for " MAC_ADDRESS_STR,
|
pe_debug("send eWNI_SME_DISASSOC_IND with retCode: %d for "
|
||||||
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
MAC_ADDRESS_STR,
|
||||||
|
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
||||||
pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
|
pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
|
||||||
pSirSmeDisassocInd->length = sizeof(*pSirSmeDisassocInd);
|
pSirSmeDisassocInd->length = sizeof(*pSirSmeDisassocInd);
|
||||||
|
|
||||||
/* Update SME session Id and Transaction Id */
|
|
||||||
pSirSmeDisassocInd->sessionId = smesessionId;
|
pSirSmeDisassocInd->sessionId = smesessionId;
|
||||||
pSirSmeDisassocInd->transactionId = smetransactionId;
|
pSirSmeDisassocInd->transactionId = smetransactionId;
|
||||||
pSirSmeDisassocInd->reasonCode = reasonCode;
|
pSirSmeDisassocInd->reasonCode = reasonCode;
|
||||||
pBuf = (uint8_t *) &pSirSmeDisassocInd->statusCode;
|
pSirSmeDisassocInd->statusCode = reasonCode;
|
||||||
|
qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes,
|
||||||
lim_copy_u32(pBuf, reasonCode);
|
pe_session->bssId, sizeof(tSirMacAddr));
|
||||||
pBuf += sizeof(tSirResultCodes);
|
qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes,
|
||||||
|
peerMacAddr, sizeof(tSirMacAddr));
|
||||||
qdf_mem_copy(pBuf, pe_session->bssId, sizeof(tSirMacAddr));
|
|
||||||
pBuf += sizeof(tSirMacAddr);
|
|
||||||
|
|
||||||
qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||||
lim_diag_event_report(mac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,
|
lim_diag_event_report(mac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,
|
||||||
|
Reference in New Issue
Block a user