1
0

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
Este cometimento está contido em:
Jeff Johnson
2019-02-20 09:50:54 -08:00
cometido por nshrivas
ascendente 9f72f45926
cometimento ff1fd4311e

Ver ficheiro

@@ -731,10 +731,9 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
uint16_t disassocTrigger,
uint16_t aid,
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_ind *pSirSmeDisassocInd;
uint32_t *pMsg = NULL;
@@ -801,29 +800,16 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
failure = true;
goto error;
}
pe_debug("send eWNI_SME_DISASSOC_RSP with retCode: %d for " MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pe_debug("send eWNI_SME_DISASSOC_RSP with retCode: %d for "
MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP;
pSirSmeDisassocRsp->length = sizeof(struct disassoc_rsp);
/* sessionId */
pBuf = (uint8_t *) &pSirSmeDisassocRsp->sessionId;
*pBuf = smesessionId;
pBuf++;
/* 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 */
pSirSmeDisassocRsp->sessionId = smesessionId;
pSirSmeDisassocRsp->transactionId = smetransactionId;
pSirSmeDisassocRsp->statusCode = reasonCode;
qdf_mem_copy(pSirSmeDisassocRsp->peer_macaddr.bytes,
peerMacAddr, sizeof(tSirMacAddr));
#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;
goto error;
}
pe_debug("send eWNI_SME_DISASSOC_IND with retCode: %d for " MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pe_debug("send eWNI_SME_DISASSOC_IND with retCode: %d for "
MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
pSirSmeDisassocInd->length = sizeof(*pSirSmeDisassocInd);
/* Update SME session Id and Transaction Id */
pSirSmeDisassocInd->sessionId = smesessionId;
pSirSmeDisassocInd->transactionId = smetransactionId;
pSirSmeDisassocInd->reasonCode = reasonCode;
pBuf = (uint8_t *) &pSirSmeDisassocInd->statusCode;
lim_copy_u32(pBuf, reasonCode);
pBuf += sizeof(tSirResultCodes);
qdf_mem_copy(pBuf, pe_session->bssId, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
pSirSmeDisassocInd->statusCode = reasonCode;
qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes,
pe_session->bssId, sizeof(tSirMacAddr));
qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes,
peerMacAddr, sizeof(tSirMacAddr));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
lim_diag_event_report(mac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,