wlan: Sessionization of PMC/PMM module messages

Sessionization of  PMC/PMM module messages for:
UAPSD, WOWL, HostOffload, Set packet filter, Clear packet filter
Host changes to support SLM SESSIONIZATION

Change-Id: Ie4f5554a9fd78df7641e8c9496444d40f6eddd31
CR-Fixed: 382845, 400362, 402982, 402585
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index 918407a..76bd1c2 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -3075,6 +3075,19 @@
 }WDI_EnterBmpsReqParamsType;
 
 /*---------------------------------------------------------------------------
+  WDI_EnterBmpsReqParamsType
+  Enter BMPS parameters passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct
+{
+   /*Status of the response*/
+  WDI_Status    wdiStatus;
+
+  /*BssIDX of the session*/
+   wpt_uint8    bssIdx;
+}WDI_EnterBmpsRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_ExitBmpsReqinfoType
   Exit BMPS parameters passed to WDA from UMAC
 ---------------------------------------------------------------------------*/
@@ -3102,6 +3115,19 @@
 }WDI_ExitBmpsReqParamsType;
 
 /*---------------------------------------------------------------------------
+  WDI_ExitBmpsReqParamsType
+  Exit BMPS parameters passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct
+{
+   /*Status of the response*/
+  WDI_Status    wdiStatus;
+
+  /*BssIDX of the session*/
+   wpt_uint8    bssIdx;
+}WDI_ExitBmpsRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_EnterUapsdReqinfoType
   Enter UAPSD parameters passed to WDA from UMAC
 ---------------------------------------------------------------------------*/
@@ -3119,6 +3145,19 @@
 }WDI_EnterUapsdReqinfoType;
 
 /*---------------------------------------------------------------------------
+  WDI_EnterUapsdRspParamsType
+  Enter UAPSD parameters passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct
+{
+   /*Status of the response*/
+  WDI_Status    wdiStatus;
+
+  /*BssIDX of the session*/
+   wpt_uint8    bssIdx;
+}WDI_EnterUapsdRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_EnterUapsdReqinfoType
   Enter UAPSD parameters passed to WDI from WDA
 ---------------------------------------------------------------------------*/
@@ -3147,6 +3186,45 @@
 }WDI_UpdateUapsdReqinfoType;
 
 /*---------------------------------------------------------------------------
+  WDI_ExitUapsdReqinfoType
+  Exit UAPSD parameters passed to WDA from UMAC
+---------------------------------------------------------------------------*/
+typedef struct
+{
+   wpt_uint8     bssIdx;
+}WDI_ExitUapsdReqinfoType;
+
+/*---------------------------------------------------------------------------
+  WDI_ExitUapsdReqParamsType
+  Exit UAPSD parameters passed to WDI from WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+   /*Exit UAPSD Info Type, same as tUapsdParams */ 
+   WDI_ExitUapsdReqinfoType wdiExitUapsdInfo; 
+   /*Request status callback offered by UMAC - it is called if the current req
+   has returned PENDING as status; it delivers the status of sending the message
+   over the BUS */ 
+   WDI_ReqStatusCb         wdiReqStatusCB; 
+   /*The user data passed in by UMAC, it will be sent back when the above
+   function pointer will be called */ 
+   void*                   pUserData; 
+}WDI_ExitUapsdReqParamsType;
+
+/*---------------------------------------------------------------------------
+  WDI_ExitUapsdRspParamsType
+  Exit UAPSD parameters passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct
+{
+   /*Status of the response*/
+  WDI_Status    wdiStatus;
+
+  /*BssIDX of the session*/
+   wpt_uint8    bssIdx;
+}WDI_ExitUapsdRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_UpdateUapsdReqParamsType
   Update UAPSD parameters passed to WDI form WDA
 ---------------------------------------------------------------------------*/
@@ -3300,7 +3378,6 @@
    wpt_uint8 srcIPv6AddrValid : 1;
    wpt_uint8 targetIPv6Addr1Valid : 1;
    wpt_uint8 targetIPv6Addr2Valid : 1;
-   wpt_uint8 bssIdx;
 } WDI_NSOffloadParams;
 #endif //WLAN_NS_OFFLOAD
 
@@ -3308,7 +3385,7 @@
 {
    wpt_uint8 ucOffloadType;
    wpt_uint8 ucEnableOrDisable;
-   wpt_uint8 bssIdx;
+   wpt_macAddr bssId;
    union
    {
        wpt_uint8 aHostIpv4Addr [4];
@@ -3347,7 +3424,7 @@
     wpt_uint8  aHostIpv4Addr[4];
     wpt_uint8  aDestIpv4Addr[4];
     wpt_uint8  aDestMacAddr[6];
-    wpt_uint8  bssIdx;
+    wpt_macAddr bssId;
 } WDI_KeepAliveReqType;
 
 /*---------------------------------------------------------------------------
@@ -3383,7 +3460,7 @@
    wpt_uint8  ucPatternMask[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern mask
    wpt_uint8  ucPatternExt[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern
    wpt_uint8  ucPatternMaskExt[WDI_WOWL_BCAST_PATTERN_MAX_SIZE]; // Extra pattern mask
-   wpt_uint8  bssIdx;
+   wpt_macAddr bssId;
 } WDI_WowlAddBcPtrnInfoType;
 
 /*---------------------------------------------------------------------------
@@ -3404,13 +3481,26 @@
 }WDI_WowlAddBcPtrnReqParamsType;
 
 /*---------------------------------------------------------------------------
+  WDI_WowlAddBcPtrnRspParamsType
+  Wowl add ptrn info passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+     /*Status of the response*/
+    WDI_Status    wdiStatus;
+    /*BssIDX of the session*/
+     wpt_uint8    bssIdx;
+}WDI_WowlAddBcPtrnRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_WowlDelBcPtrnInfoType
   Wowl add ptrn info passed to WDA form UMAC
 ---------------------------------------------------------------------------*/
 typedef struct
 {
    /* Pattern ID of the wakeup pattern to be deleted */
-   wpt_uint8  ucPatternId;
+   wpt_uint8   ucPatternId;
+   wpt_macAddr bssId;
 } WDI_WowlDelBcPtrnInfoType;
 
 /*---------------------------------------------------------------------------
@@ -3431,6 +3521,18 @@
 }WDI_WowlDelBcPtrnReqParamsType;
 
 /*---------------------------------------------------------------------------
+  WDI_WowlDelBcPtrnRspParamsType
+  Wowl Del ptrn info passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+     /*Status of the response*/
+    WDI_Status    wdiStatus;
+    /*BssIDX of the session*/
+     wpt_uint8    bssIdx;
+}WDI_WowlDelBcPtrnRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_WowlEnterInfoType
   Wowl enter info passed to WDA form UMAC
 ---------------------------------------------------------------------------*/
@@ -3513,6 +3615,10 @@
      */
     wpt_uint8   ucWoWBSSConnLoss;
 #endif // WLAN_WAKEUP_EVENTS
+
+    /* BSSIDX used to find the current session
+       */
+    wpt_uint8  bssIdx;
 } WDI_WowlEnterInfoType;
 
 /*---------------------------------------------------------------------------
@@ -3533,6 +3639,62 @@
 }WDI_WowlEnterReqParamsType;
 
 /*---------------------------------------------------------------------------
+  WDI_WowlEnterRsqParamsType
+  Wowl enter info passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+    /*Status of the response message*/
+    WDI_Status  status;
+
+    /* BSSIDX used to find the current session
+       */
+    wpt_uint8  bssIdx;
+}WDI_WowlEnterRspParamsType;
+
+/*---------------------------------------------------------------------------
+      WDI_WowlExitInfoType
+      Wowl exit info passed to WDA form UMAC
+    ---------------------------------------------------------------------------*/
+typedef struct
+{
+    /* BSSIDX used to find the current session
+       */
+    wpt_uint8  bssIdx;
+} WDI_WowlExitInfoType;
+
+/*---------------------------------------------------------------------------
+  WDI_WowlExitReqParamsType
+  Wowl exit info passed to WDI form WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+   /*Wowl delete ptrn Info Type, same as WDI_SmeWowlEnterParams */ 
+   WDI_WowlExitInfoType     wdiWowlExitInfo; 
+   /*Request status callback offered by UMAC - it is called if the current req
+   has returned PENDING as status; it delivers the status of sending the message
+   over the BUS */ 
+   WDI_ReqStatusCb            wdiReqStatusCB; 
+   /*The user data passed in by UMAC, it will be sent back when the above
+   function pointer will be called */ 
+   void*                      pUserData; 
+}WDI_WowlExitReqParamsType;
+
+/*---------------------------------------------------------------------------
+  WDI_WowlExitRspParamsType
+  Wowl exit info passed from WDI to WDA
+---------------------------------------------------------------------------*/
+typedef struct 
+{ 
+    /*Status of the response message*/
+    WDI_Status  status;
+
+    /* BSSIDX used to find the current session
+       */
+    wpt_uint8  bssIdx;
+}WDI_WowlExitRspParamsType;
+
+/*---------------------------------------------------------------------------
   WDI_ConfigureAppsCpuWakeupStateReqParamsType
   Apps Cpu Wakeup State parameters passed to WDI form WDA
 ---------------------------------------------------------------------------*/
@@ -3788,6 +3950,7 @@
   wpt_uint8      aKCK[16];            /* Key confirmation key */ 
   wpt_uint8      aKEK[16];            /* key encryption key */
   wpt_uint64     ullKeyReplayCounter; /* replay counter */
+  wpt_macAddr    bssId;
 } WDI_GtkOffloadReqParams;
 
 typedef struct
@@ -3811,6 +3974,8 @@
 {
     /* success or failure */
     wpt_uint32   ulStatus;
+    /*BssIdx of the response */
+    wpt_uint8   bssIdx;
 } WDI_GtkOffloadRspParams;
 
 typedef struct
@@ -3831,9 +3996,16 @@
 /*---------------------------------------------------------------------------
 * WDI_GTK_OFFLOAD_GETINFO_REQ
 *--------------------------------------------------------------------------*/
+typedef struct
+{
+  /*BssIdx of the response */
+  wpt_macAddr bssId;
+} WDI_GtkOffloadGetInfoReqParams;
 
 typedef struct
 {
+
+   WDI_GtkOffloadGetInfoReqParams WDI_GtkOffloadGetInfoReqParams;
    /*Request status callback offered by UMAC - it is called if the current
     req has returned PENDING as status; it delivers the status of sending
     the message over the BUS */
@@ -3854,6 +4026,7 @@
    wpt_uint32   ulTotalRekeyCount;    /* total rekey attempts */
    wpt_uint32   ulGTKRekeyCount;      /* successful GTK rekeys */
    wpt_uint32   ulIGTKRekeyCount;     /* successful iGTK rekeys */
+   wpt_uint8    bssIdx;
 } WDI_GtkOffloadGetInfoRspParams;
 
 typedef struct
@@ -4265,9 +4438,10 @@
   wpt_uint8                       filterType;
   wpt_uint32                      numFieldParams;
   wpt_uint32                      coalesceTime;
-  WDI_RcvPktFilterFieldParams     paramsData[1];
   wpt_macAddr                     selfMacAddr;
   wpt_macAddr                     bssId;
+  WDI_RcvPktFilterFieldParams     paramsData[1];
+
 }WDI_RcvPktFilterCfgType;
 
 typedef struct 
@@ -4285,6 +4459,15 @@
   WDI_RcvPktFilterCfgType wdiPktFilterCfg;
 } WDI_SetRcvPktFilterReqParamsType;
 
+typedef struct 
+{
+    /*Result of the operation*/
+    WDI_Status       wdiStatus;
+    /* BSSIDX of the Set Receive Filter 
+      */
+    wpt_uint8   bssIdx;
+} WDI_SetRcvPktFilterRspParamsType;
+
 //
 // Filter Packet Match Count Parameters
 //
@@ -4298,6 +4481,10 @@
   /*The user data passed in by UMAC, it will be sent back when the above
     function pointer will be called */
   void*             pUserData;
+
+  /* BSSID of the Match count 
+    */
+  wpt_macAddr      bssId;
 } WDI_RcvFltPktMatchCntReqParamsType;
 
 typedef struct
@@ -4308,34 +4495,15 @@
 
 typedef struct
 {
-  /* Success or Failure */
-  wpt_uint32                 status;
-  WDI_RcvFltPktMatchCnt    filterMatchCnt[WDI_MAX_NUM_FILTERS];
-  
-  /*Request status callback offered by UMAC - it is called if the current
-    req has returned PENDING as status; it delivers the status of sending
-    the message over the BUS */
-  WDI_ReqStatusCb   wdiReqStatusCB; 
-    
-  /*The user data passed in by UMAC, it will be sent back when the above
-    function pointer will be called */
-  void*             pUserData;
-} WDI_RcvFltPktMatchRspParams;
+    /*Result of the operation*/
+    WDI_Status       wdiStatus;
 
-typedef struct
-{
-  WDI_RcvFltPktMatchRspParams fltPktMatchRspParams;
-  /*Request status callback offered by UMAC - it is called if the current
-    req has returned PENDING as status; it delivers the status of sending
-    the message over the BUS */
-  WDI_ReqStatusCb   wdiReqStatusCB; 
-    
-  /*The user data passed in by UMAC, it will be sent back when the above
-    function pointer will be called */
-  void*             pUserData;
+    /* BSSIDX of the Match count response 
+        */
+    wpt_uint8   bssIdx;
+
 } WDI_RcvFltPktMatchCntRspParamsType;
 
-
 //
 // Receive Filter Clear Parameters
 //
@@ -4360,6 +4528,16 @@
   void*             pUserData;
 } WDI_RcvFltPktClearReqParamsType;
 
+typedef struct
+{
+    /*Result of the operation*/
+    WDI_Status       wdiStatus;
+    /* BSSIDX of the Match count response 
+        */
+    wpt_uint8   bssIdx;
+
+} WDI_RcvFltPktClearRspParamsType;
+
 //
 // Multicast Address List Parameters
 //
@@ -4383,6 +4561,16 @@
     function pointer will be called */
   void*             pUserData;
 } WDI_RcvFltPktSetMcListReqParamsType;
+
+typedef struct
+{
+    /*Result of the operation*/
+    WDI_Status       wdiStatus;
+    /* BSSIDX of the Match count response 
+        */
+    wpt_uint8   bssIdx;
+} WDI_RcvFltPktSetMcListRspParamsType;
+
 #endif // WLAN_FEATURE_PACKET_FILTERING
 
 /*---------------------------------------------------------------------------
@@ -5308,7 +5496,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_EnterBmpsRspCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_EnterBmpsRspCb)(WDI_EnterBmpsRspParamsType *pwdiEnterBmpsRsp,
                                     void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5330,7 +5518,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_ExitBmpsRspCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_ExitBmpsRspCb)( WDI_ExitBmpsRspParamsType  *pwdiExitBmpsRspParams,
                                     void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5352,7 +5540,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_EnterUapsdRspCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_EnterUapsdRspCb)(  WDI_EnterUapsdRspParamsType *pwdiEnterUapsdRspParam,
                                     void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5374,7 +5562,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_ExitUapsdRspCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_ExitUapsdRspCb)(WDI_ExitUapsdRspParamsType *pwidExitUapsdRsp,
                                     void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5550,7 +5738,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_WowlAddBcPtrnCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_WowlAddBcPtrnCb)(  WDI_WowlAddBcPtrnRspParamsType *pwdiWowlAddBcPtrnParams,
                                      void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5572,7 +5760,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_WowlDelBcPtrnCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_WowlDelBcPtrnCb)( WDI_WowlDelBcPtrnRspParamsType *pwdiWowlDelBcstPtrRsp,
                                      void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5594,8 +5782,8 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_WowlEnterReqCb)(WDI_Status   wdiStatus,
-                                    void*        pUserData);
+typedef void  (*WDI_WowlEnterReqCb)( WDI_WowlEnterRspParamsType *pwdiwowlEnterRsp,
+                                        void*        pUserData);
 
 /*---------------------------------------------------------------------------
    WDI_WowlExitReqCb
@@ -5616,7 +5804,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_WowlExitReqCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_WowlExitReqCb)(   WDI_WowlExitRspParamsType *pwdiWowlExitRsp,
                                    void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -5957,8 +6145,9 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_8023MulticastListCb)(WDI_Status   wdiStatus,
-                                         void*        pUserData);
+typedef void  (*WDI_8023MulticastListCb)( 
+                WDI_RcvFltPktSetMcListRspParamsType  *pwdiRcvFltPktSetMcListRspInfo,
+                void*        pUserData);
 
 /*---------------------------------------------------------------------------
    WDI_ReceiveFilterSetFilterCb
@@ -5979,8 +6168,9 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_ReceiveFilterSetFilterCb)(WDI_Status   wdiStatus,
-                                              void*        pUserData);
+typedef void  (*WDI_ReceiveFilterSetFilterCb)( 
+                            WDI_SetRcvPktFilterRspParamsType *pwdiSetRcvPktFilterRspInfo,
+                            void*        pUserData);
 
 /*---------------------------------------------------------------------------
    WDI_FilterMatchCountCb
@@ -6001,8 +6191,9 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_FilterMatchCountCb)(WDI_Status   wdiStatus,
-                                        void*        pUserData);
+typedef void  (*WDI_FilterMatchCountCb)(
+            WDI_RcvFltPktMatchCntRspParamsType *pwdiRcvFltPktMatchRspParams,
+            void*        pUserData);
 
 /*---------------------------------------------------------------------------
    WDI_ReceiveFilterClearFilterCb
@@ -6023,8 +6214,9 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_ReceiveFilterClearFilterCb)(WDI_Status   wdiStatus,
-                                                void*        pUserData);
+typedef void  (*WDI_ReceiveFilterClearFilterCb)( 
+                            WDI_RcvFltPktClearRspParamsType *pwdiRcvFltPktClearRspParamsType,
+                            void*        pUserData);
 #endif // WLAN_FEATURE_PACKET_FILTERING
 
 /*---------------------------------------------------------------------------
@@ -6092,7 +6284,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_GtkOffloadCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_GtkOffloadCb)( WDI_GtkOffloadRspParams  *pwdiGtkOffloadRsparams,
                                   void*        pUserData);
 
 /*---------------------------------------------------------------------------
@@ -6114,7 +6306,7 @@
   RETURN VALUE 
     The result code associated with performing the operation
 ---------------------------------------------------------------------------*/
-typedef void  (*WDI_GtkOffloadGetInfoCb)(WDI_Status   wdiStatus,
+typedef void  (*WDI_GtkOffloadGetInfoCb)( WDI_GtkOffloadGetInfoRspParams *pwdiGtkOffloadGetInfoRsparams,
                                          void*        pUserData);
 #endif // WLAN_FEATURE_GTK_OFFLOAD
 
@@ -7428,6 +7620,7 @@
 WDI_Status 
 WDI_ExitUapsdReq
 (
+   WDI_ExitUapsdReqParamsType *pwdiExitUapsdReqParams,
    WDI_ExitUapsdRspCb  wdiExitUapsdRspCb,
    void*                   pUserData
 );
@@ -7826,6 +8019,7 @@
 WDI_Status 
 WDI_WowlExitReq
 (
+  WDI_WowlExitReqParamsType*    pwdiWowlExitParams,
   WDI_WowlExitReqCb              wdiWowlExitCb,
   void*                          pUserData
 );