Merge "wlan: DISA support for WDA/WDI layers"
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 823e80a..8835dae 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -123,6 +123,8 @@
MAC_SPOOFED_SCAN = 44,
BMU_ERROR_GENERIC_RECOVERY = 45,
+ DISA = 46,
+ FW_STATS = 47,
WPS_PRBRSP_TMPL = 48,
BCN_IE_FLT_DELTA = 49,
//MAX_FEATURE_SUPPORTED = 128
@@ -692,6 +694,9 @@
#endif
#define SIR_HAL_SPOOF_MAC_ADDR_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 260)
+#define SIR_HAL_ENCRYPT_MSG_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 261)
+#define SIR_HAL_ENCRYPT_MSG_RSP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 262)
+
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
// CFG message types
#define SIR_CFG_MSG_TYPES_BEGIN (SIR_CFG_MODULE_ID << 8)
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 5f3a8cb..536c8ae 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1209,6 +1209,8 @@
#define WDA_HT40_OBSS_STOP_SCAN_IND SIR_HAL_HT40_OBSS_STOP_SCAN_IND
#define WDA_GET_BCN_MISS_RATE_REQ SIR_HAL_BCN_MISS_RATE_REQ
+#define WDA_ENCRYPT_MSG_REQ SIR_HAL_ENCRYPT_MSG_REQ
+#define WDA_ENCRYPT_MSG_RSP SIR_HAL_ENCRYPT_MSG_RSP
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
#define WDA_LINK_LAYER_STATS_CLEAR_REQ SIR_HAL_LL_STATS_CLEAR_REQ
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 49d6f09..190073d 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -252,6 +252,10 @@
VOS_STATUS WDA_ProcessLLStatsClearReq(tWDA_CbContext *pWDA,
tSirLLStatsClearReq *wdaRequest);
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
+
+VOS_STATUS WDA_ProcessEncryptMsgReq(tWDA_CbContext *pWDA,
+ u8 *wdaRequest);
+
/*
* FUNCTION: WDA_open
* Allocate the WDA context
@@ -13400,6 +13404,11 @@
WDA_ProcessSetSpoofMacAddrReq(pWDA, (tpSpoofMacAddrReqParams)pMsg->bodyptr);
break;
}
+ case WDA_ENCRYPT_MSG_REQ:
+ {
+ WDA_ProcessEncryptMsgReq(pWDA, (u8 *)pMsg->bodyptr);
+ break;
+ }
default:
{
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
@@ -17991,3 +18000,140 @@
}
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
+
+/*==========================================================================
+ FUNCTION WDA_EncryptMsgRspCallback
+
+ DESCRIPTION
+ API to send Encrypt message response to HDD
+
+ PARAMETERS
+ pEventData: Response from FW
+ pUserData: Data sent to firmware as part of request
+===========================================================================*/
+void WDA_EncryptMsgRspCallback(WDI_Status status, void *pEventData,
+ void* pUserData)
+{
+ tWDA_ReqParams *pWdaParams = (tWDA_ReqParams *)pUserData;
+ tWDA_CbContext *pWDA = NULL;
+ tpAniSirGlobal pMac;
+ vos_msg_t vosMsg;
+ tpSirEncryptedDataRspParams pEncRspParams;
+ tpSetEncryptedDataRspParams pEncryptedDataRsp;
+
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
+ FL("%s:"), __func__);
+ if (NULL == pWdaParams)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("%s: pWdaParams received NULL"), __func__);
+ VOS_ASSERT(0);
+ return;
+ }
+
+ pWDA = (tWDA_CbContext *) pWdaParams->pWdaContext;
+
+ if (NULL == pWDA)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("%s: pWDA received NULL"), __func__);
+ VOS_ASSERT(0);
+ goto error;
+ }
+
+ pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext);
+ if (NULL == pMac)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("%s:pMac is NULL"), __func__);
+ VOS_ASSERT(0);
+ goto error;
+ }
+
+ pEncryptedDataRsp = (tpSetEncryptedDataRspParams) pEventData;
+
+ pEncRspParams = vos_mem_malloc(sizeof(tSirEncryptedDataRspParams));
+ if (NULL == pEncRspParams)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("%s: VOS MEM Alloc Failure"), __func__);
+ VOS_ASSERT(0);
+ goto error;
+ }
+
+ /* Message Header */
+ pEncRspParams->mesgType = eWNI_SME_ENCRYPT_MSG_RSP;
+ pEncRspParams->mesgLen = sizeof(tSirEncryptedDataRspParams);
+ pEncRspParams->encryptedDataRsp.encryptedPayload.length =
+ pEncryptedDataRsp->encryptedPayload.length;
+ vos_mem_copy(pEncRspParams->encryptedDataRsp.encryptedPayload.data,
+ pEncryptedDataRsp->encryptedPayload.data,
+ pEncryptedDataRsp->encryptedPayload.length);
+
+ /* VOS message wrapper */
+ vosMsg.type = eWNI_SME_ENCRYPT_MSG_RSP;
+ vosMsg.bodyptr = (void *)pEncRspParams;
+ vosMsg.bodyval = 0;
+
+ if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, (vos_msg_t*)&vosMsg))
+ {
+ /* free the mem */
+ vos_mem_free((v_VOID_t *) pEncRspParams);
+ }
+
+error:
+
+ if (pWdaParams->wdaWdiApiMsgParam != NULL)
+ {
+ vos_mem_free(pWdaParams->wdaWdiApiMsgParam);
+ }
+ if (pWdaParams->wdaMsgParam != NULL)
+ {
+ vos_mem_free(pWdaParams->wdaMsgParam);
+ }
+ vos_mem_free(pWdaParams) ;
+
+ return;
+}
+/*==========================================================================
+ FUNCTION WDA_ProcessEncryptMsgReq
+
+ DESCRIPTION
+ API to send Encrypt message Request to WDI
+
+ PARAMETERS
+ pWDA: Pointer to WDA context
+ wdaRequest: Pointer to Encrypt_msg req parameters
+===========================================================================*/
+VOS_STATUS WDA_ProcessEncryptMsgReq(tWDA_CbContext *pWDA,
+ u8 *wdaRequest)
+{
+ WDI_Status status = WDI_STATUS_SUCCESS;
+ tWDA_ReqParams *pWdaParams;
+
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO,
+ FL("%s: "), __func__);
+ pWdaParams = (tWDA_ReqParams *)vos_mem_malloc(sizeof(tWDA_ReqParams));
+ if (NULL == pWdaParams)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("%s: VOS MEM Alloc Failure"), __func__);
+ VOS_ASSERT(0);
+ return VOS_STATUS_E_NOMEM;
+ }
+ pWdaParams->pWdaContext = pWDA;
+ pWdaParams->wdaMsgParam = wdaRequest;
+ pWdaParams->wdaWdiApiMsgParam = NULL;
+
+ status = WDI_EncryptMsgReq((void *)wdaRequest,
+ (WDI_EncryptMsgRspCb)WDA_EncryptMsgRspCallback,
+ (void *)pWdaParams);
+ if (IS_WDI_STATUS_FAILURE(status))
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ FL("Failure to request. Free all the memory " ));
+ vos_mem_free(pWdaParams->wdaMsgParam);
+ vos_mem_free(pWdaParams);
+ }
+ return CONVERT_WDI2VOS_STATUS(status);
+}
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index 1cd9fae..306d6e1 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -154,6 +154,7 @@
/* Periodic Tx pattern offload feature */
#define PERIODIC_TX_PTRN_MAX_SIZE 1536
#define MAXNUM_PERIODIC_TX_PTRNS 6
+#define WDI_DISA_MAX_PAYLOAD_SIZE 1600
/*============================================================================
* GENERIC STRUCTURES
@@ -5903,6 +5904,97 @@
wpt_uint32 reserved;
} WDI_SpoofMacAddrInfoType;
+//This is to force compiler to use the maximum of an int for enum
+#define SIR_MAX_ENUM_SIZE 0x7FFFFFFF
+// Enum to specify whether key is used
+// for TX only, RX only or both
+typedef enum
+{
+ eWDI_TX_ONLY,
+ eWDI_RX_ONLY,
+ eWDI_TX_RX,
+ eWDI_TX_DEFAULT,
+ eWDI_DONOT_USE_KEY_DIRECTION = SIR_MAX_ENUM_SIZE
+} tWDIKeyDirection;
+
+// MAX key length when ULA is used
+#define SIR_MAC_MAX_KEY_LENGTH 32
+/* Max key size including the WAPI and TKIP */
+#define WLAN_MAX_KEY_RSC_LEN 16
+// Definition for Encryption Keys
+typedef struct
+{
+ wpt_uint8 keyId;
+ wpt_uint8 unicast; // 0 for multicast
+ tWDIKeyDirection keyDirection;
+ wpt_uint8 keyRsc[WLAN_MAX_KEY_RSC_LEN]; // Usage is unknown
+ wpt_uint8 paeRole; // =1 for authenticator,
+ // =0 for supplicant
+ wpt_uint16 keyLength;
+ wpt_uint8 key[SIR_MAC_MAX_KEY_LENGTH];
+} tWDIKeys, *tpWDIKeys;
+
+typedef enum
+{
+ eWDI_WEP_STATIC,
+ eWDI_WEP_DYNAMIC,
+} tWDIWepType;
+
+// Encryption type enum used with peer
+typedef enum
+{
+ eWDI_ED_NONE,
+ eWDI_ED_WEP40,
+ eWDI_ED_WEP104,
+ eWDI_ED_TKIP,
+ eWDI_ED_CCMP,
+#if defined(FEATURE_WLAN_WAPI)
+ eWDI_ED_WPI,
+#endif
+ /* DPU HW treats encryption mode 4 plus RMF bit set in TX BD as BIP.
+ * Thus while setting BIP encryption mode in corresponding DPU Desc
+ * eSIR_ED_AES_128_CMAC should be set to eSIR_ED_CCMP
+ */
+ eWDI_ED_AES_128_CMAC,
+ eWDI_ED_NOT_IMPLEMENTED = SIR_MAX_ENUM_SIZE
+} tWDIEdType;
+#define SIR_WDI_MAX_NUM_OF_DEFAULT_KEYS 4
+/*
+ * This is used by PE to configure the key information on a given station.
+ * When the secType is WEP40 or WEP104, the defWEPIdx is used to locate
+ * a preconfigured key from a BSS the station assoicated with; otherwise
+ * a new key descriptor is created based on the key field.
+ */
+typedef struct
+{
+ wpt_uint16 staIdx;
+ tWDIEdType encType; // Encryption/Decryption type
+ tWDIWepType wepType; // valid only for WEP
+ wpt_uint8 defWEPIdx; // Default WEP key, valid only for static WEP, must between 0 and 3
+ tWDIKeys key[SIR_WDI_MAX_NUM_OF_DEFAULT_KEYS]; // valid only for non-static WEP encyrptions
+ wpt_uint8 singleTidRc; // 1=Single TID based Replay Count, 0=Per TID based RC
+ wpt_uint8 sessionId; // PE session id for PE<->HAL interface
+} tWDISetStaKeyParams, *tpWDISetStaKeyParams;
+
+typedef struct
+{
+ tWDISetStaKeyParams keyParams;
+ wpt_uint8 pn[6];
+}wpt_encConfigParams;
+
+typedef struct
+{
+ wpt_uint16 length;
+ wpt_uint8 data[WDI_DISA_MAX_PAYLOAD_SIZE];
+}wpt_payload;
+
+typedef struct
+{
+ wpt_80211Header macHeader;
+ wpt_encConfigParams encParams;
+ wpt_payload data;
+}wpt_pkt80211;
+
/*----------------------------------------------------------------------------
* WDI callback types
*--------------------------------------------------------------------------*/
@@ -7810,6 +7902,9 @@
typedef void (*WDI_SetSpoofMacAddrRspCb)(
WDI_SpoofMacAddrRspParamType* wdiRsp, void *pUserData);
+
+typedef void (*WDI_EncryptMsgRspCb)(wpt_uint8 status, void *pEventData, void* pUserData);
+
/*========================================================================
* Function Declarations and Documentation
==========================================================================*/
@@ -11173,6 +11268,11 @@
void* pUserData
);
+WDI_Status
+WDI_EncryptMsgReq(void* pwdiEncryptMsgParams,
+ WDI_EncryptMsgRspCb wdiEncryptMsgCbRsp,
+ void* pUserData
+ );
#ifdef __cplusplus
}
#endif
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
index 1e12357..6f1f685 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
@@ -465,6 +465,9 @@
WDI_SPOOF_MAC_ADDR_REQ = 101,
+ /* Send command to encrypt the given message */
+ WDI_ENCRYPT_MSG_REQ = 102,
+
WDI_MAX_REQ,
/*Send a suspend Indication down to HAL*/
@@ -790,6 +793,9 @@
WDI_EXTSCAN_RESET_SIGNF_RSSI_CHANGE_RSP = 100,
#endif
WDI_SPOOF_MAC_ADDR_RSP = 101,
+
+ /* Send command to encrypt the given message */
+ WDI_ENCRYPT_MSG_RSP = 102,
/*-------------------------------------------------------------------------
Indications
!! Keep these last in the enum if possible
@@ -6077,5 +6083,18 @@
WDI_EventInfoType* pEventData
);
+WDI_Status
+WDI_ProcessEncryptMsgReq
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+);
+
+WDI_Status
+WDI_ProcessEncryptMsgRsp
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+);
#endif /*WLAN_QCT_WDI_I_H*/
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 9f50dd8..1671709 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -191,8 +191,8 @@
,MAC_SPOOFED_SCAN //44
,FEATURE_NOT_SUPPORTED //45
- ,FEATURE_NOT_SUPPORTED //46
- ,FEATURE_NOT_SUPPORTED //47
+ ,DISA //46
+ ,FW_STATS //47
,WPS_PRBRSP_TMPL //48
,BCN_IE_FLT_DELTA //49
};
@@ -458,6 +458,8 @@
NULL,
#endif /* WLAN_FEATURE_EXTSCAN */
WDI_ProcessSpoofMacAddrReq, /* WDI_SPOOF_MAC_ADDR_REQ */
+ WDI_ProcessEncryptMsgReq, /* WDI_ENCRYPT_MSG_REQ*/
+
/*-------------------------------------------------------------------------
Indications
-------------------------------------------------------------------------*/
@@ -718,6 +720,8 @@
NULL,
#endif /* WLAN_FEATURE_EXTSCAN */
WDI_ProcessSpoofMacAddrRsp, /* WDI_SPOOF_MAC_ADDR_RSP */
+ WDI_ProcessEncryptMsgRsp, /* WDI_ENCRYPT_MSG_RSP*/
+
/*---------------------------------------------------------------------
Indications
---------------------------------------------------------------------*/
@@ -1136,6 +1140,7 @@
CASE_RETURN_STRING( WDI_EXTSCAN_RESET_SIGNF_RSSI_CHANGE_REQ);
#endif /* WLAN_FEATURE_EXTSCAN */
CASE_RETURN_STRING( WDI_SPOOF_MAC_ADDR_REQ);
+ CASE_RETURN_STRING( WDI_ENCRYPT_MSG_REQ);
default:
return "Unknown WDI MessageId";
}
@@ -1267,6 +1272,7 @@
CASE_RETURN_STRING( WDI_HAL_EXTSCAN_SIG_RSSI_RESULT_IND);
#endif /* WLAN_FEATURE_EXTSCAN */
+ CASE_RETURN_STRING( WDI_ENCRYPT_MSG_RSP);
default:
return "Unknown WDI MessageId";
}
@@ -1410,6 +1416,10 @@
pCapStr += strlen("BMU_ERROR_GENERIC_RECOVERY");
break;
+ case DISA: snprintf(pCapStr, sizeof("DISA"), "%s", "DISA");
+ pCapStr += strlen("DISA");
+ break;
+
}
*pCapStr++ = ',';
*pCapStr++ = ' ';
@@ -23876,6 +23886,8 @@
#endif /* WLAN_FEATURE_EXTSCAN */
case WDI_SPOOF_MAC_ADDR_REQ:
return WLAN_HAL_MAC_SPOOFED_SCAN_REQ;
+ case WDI_ENCRYPT_MSG_REQ:
+ return WLAN_HAL_ENCRYPT_DATA_REQ;
default:
return WLAN_HAL_MSG_MAX;
}
@@ -24189,6 +24201,8 @@
#endif /* WLAN_FEATURE_EXTSCAN */
case WLAN_HAL_MAC_SPOOFED_SCAN_RSP:
return WDI_SPOOF_MAC_ADDR_RSP;
+ case WLAN_HAL_ENCRYPT_DATA_RSP:
+ return WDI_ENCRYPT_MSG_RSP;
default:
return eDRIVER_TYPE_MAX;
@@ -33488,3 +33502,166 @@
return WDI_STATUS_SUCCESS;
}
+
+/**
+ @brief WDI_EncryptMsgReq
+
+ @param pwdiEncryptMsgParams: Req parameter for the FW
+ wdiEncryptMsgCbRsp: callback for passing back the response
+ of the Req operation received from the device
+ pUserData: user data will be passed back with the callback
+
+ @return SUCCESS or FAIL
+*/
+WDI_Status
+WDI_EncryptMsgReq(void* pwdiEncryptMsgParams,
+ WDI_EncryptMsgRspCb wdiEncryptMsgCbRsp,
+ void* pUserData)
+{
+ WDI_EventInfoType wdiEventData;
+
+ VOS_TRACE( VOS_MODULE_ID_WDI, VOS_TRACE_LEVEL_INFO,
+ "%s: %d Enter" ,__func__, __LINE__);
+ /*------------------------------------------------------------------------
+ Sanity Check
+ ------------------------------------------------------------------------*/
+ if ( eWLAN_PAL_FALSE == gWDIInitialized )
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDI, VOS_TRACE_LEVEL_ERROR,
+ "WDI API call before module is initialized - Fail request");
+
+ return WDI_STATUS_E_NOT_ALLOWED;
+ }
+
+ wdiEventData.wdiRequest = WDI_ENCRYPT_MSG_REQ;
+ wdiEventData.pEventData = pwdiEncryptMsgParams;
+ wdiEventData.uEventDataSize = sizeof(wpt_pkt80211);
+ wdiEventData.pCBfnc = wdiEncryptMsgCbRsp;
+ wdiEventData.pUserData = pUserData;
+
+ return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
+}
+
+/*
+ * FUNCTION: WDI_ProcessEncryptMsgReq
+ * Request to WDI to encrypt the given message.
+ *
+ * @param pWDICtx: pointer to the WLAN DAL context
+ * pEventData: pointer to the event information structure
+ *
+ * @return Result of the function call
+ */
+
+WDI_Status
+WDI_ProcessEncryptMsgReq
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+)
+{
+ wpt_uint8* pSendBuffer = NULL;
+ wpt_uint16 usDataOffset = 0;
+ wpt_uint16 usSendSize = 0;
+ WDI_EncryptMsgRspCb* wdiEncMsgCb;
+ tSetEncryptedDataParams *pHalEncryptDataReq;
+ wpt_pkt80211 *pkt = NULL;
+
+ /*-------------------------------------------------------------------------
+ Sanity check
+ -------------------------------------------------------------------------*/
+ if (( NULL == pEventData ) || ( NULL == pEventData->pEventData) ||
+ ( NULL == pEventData->pCBfnc ) )
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+ "%s: Invalid parameters", __func__);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+
+ wdiEncMsgCb = (WDI_EncryptMsgRspCb*)pEventData->pCBfnc;
+
+ /*-----------------------------------------------------------------------
+ Get message buffer
+ -----------------------------------------------------------------------*/
+ if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer(
+ pWDICtx, WDI_ENCRYPT_MSG_REQ,
+ sizeof(tSetEncryptedDataReqMsg),
+ &pSendBuffer, &usDataOffset, &usSendSize)) ||
+ ( usSendSize < (usDataOffset + sizeof(tSetEncryptedDataReqMsg))))
+ {
+ WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+ "Unable to get send buffer in get WDI_ENCRYPT_MSG_REQ %p",
+ pEventData);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+
+ pWDICtx->wdiReqStatusCB = NULL;
+ pWDICtx->pReqStatusUserData = pEventData->pUserData;
+ pkt = (wpt_pkt80211 *)pEventData->pEventData;
+
+ pHalEncryptDataReq = &((tSetEncryptedDataReqMsg *)(pSendBuffer))->encryptedDataParams;
+ wpalMemoryZero(pHalEncryptDataReq, sizeof(tSetEncryptedDataParams));
+
+ wpalMemoryCopy(&pHalEncryptDataReq->macHeader, &pkt->macHeader, 32);
+
+ pHalEncryptDataReq->encParams.keyParams.key[0].keyId =
+ pkt->encParams.keyParams.key[0].keyId;
+
+ wpalMemoryCopy(&pHalEncryptDataReq->encParams.keyParams.key[0].key[0],
+ &pkt->encParams.keyParams.key[0].key[0], 16);
+
+ wpalMemoryCopy(&pHalEncryptDataReq->encParams.pn, &pkt->encParams.pn, 6);
+
+ pHalEncryptDataReq->data.length = pkt->data.length;
+ wpalMemoryCopy(&pHalEncryptDataReq->data.data[0], &pkt->data.data[0], pkt->data.length);
+
+ /*-------------------------------------------------------------------------
+ Send Get STA Request to HAL
+ -------------------------------------------------------------------------*/
+ return WDI_SendMsg( pWDICtx, pSendBuffer, usSendSize, wdiEncMsgCb,
+ pEventData->pUserData, WDI_ENCRYPT_MSG_RSP);
+}
+
+/*
+ * FUNCTION: WDI_ProcessEncryptMsgRsp
+ * Receives the encrypted message from the firmware
+ * @param pWDICtx: pointer to the WLAN DAL context
+ * pEventData: pointer to the event information structure
+ *
+ * @return Result of the function call
+ */
+WDI_Status
+WDI_ProcessEncryptMsgRsp
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+)
+{
+ tpSetEncryptedDataRspParams pSetEncryptedDataRsp;
+ WDI_EncryptMsgRspCb wdiEncryptMsgRspCb;
+
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
+ "In %s",__func__);
+
+ /*-------------------------------------------------------------------------
+ Sanity check
+ -------------------------------------------------------------------------*/
+ if (( NULL == pWDICtx ) || ( NULL == pEventData ) ||
+ ( NULL == pEventData->pEventData))
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN,
+ "%s: Invalid parameters", __func__);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+
+ pSetEncryptedDataRsp = (tpSetEncryptedDataRspParams)pEventData->pEventData;
+
+ wdiEncryptMsgRspCb = (WDI_EncryptMsgRspCb)pWDICtx->pfncRspCB;
+
+ wdiEncryptMsgRspCb(WDI_STATUS_SUCCESS,
+ pEventData->pEventData,
+ pWDICtx->pRspCBUserData);
+ return WDI_STATUS_SUCCESS;
+}