wlan: DISA support for WDA/WDI layers

1. Sends command to the firmware and waits for the response.
2. Accepts the DISA response and calls the WDA callback
   with the data obtained from firmware.
3. Adds feature flag support for DISA

Change-Id: I39fc5a41e33faf12cac9b1096ce8a46a76c43f55
CRs-Fixed: 765234
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index f7656ef..a0d1423 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 
@@ -5904,6 +5905,98 @@
    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 sSirKeys
+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
  *--------------------------------------------------------------------------*/
@@ -7811,8 +7904,11 @@
 
 typedef void  (*WDI_SetSpoofMacAddrRspCb)(
                         WDI_SpoofMacAddrRspParamType* wdiRsp, void *pUserData);
+
 typedef void  (*WDI_FWStatsGetRspCb)(WDI_Status status,void *fwStatsResp,
                                          void *pUserData);
+
+typedef void  (*WDI_EncryptMsgRspCb)(wpt_uint8 status, void *pEventData, void* pUserData);
 /*========================================================================
  *     Function Declarations and Documentation
  ==========================================================================*/
@@ -11182,6 +11278,11 @@
   void*                          pUserData
 );
 
+WDI_Status
+WDI_EncryptMsgReq(void* pwdiEncryptMsgParams,
+        WDI_EncryptMsgRspCb wdiEncryptMsgCbRsp,
+        void*                   pUserData
+        );
 #ifdef __cplusplus
  }
 #endif