TDLS: Copy IEs passed by the supplicant at the end of the frame

Copy additional IEs passed by the supplicant in TDLS discovery
response frame at the end of the frame without populating the same
internally.

Change-Id: I5236ca36caff5a06a8d10b412e531299df2ee2d2
CRs-Fixed: 728696
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index 594faf3..53e66e0 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -532,11 +532,6 @@
 PopulateDot11fExtSuppRates(tpAniSirGlobal      pMac,
                            tANI_U8  nChannelNum, tDot11fIEExtSuppRates *pDot11f,
                            tpPESession psessionEntry);
-void PopulateDot11fRsnIEs(tpAniSirGlobal pMac,  tDot11fIERSN *pDot11f,
-                          tANI_U8 *addIe, tANI_U16 addIeLen);
-void PopulateDot11fTimeoutIEs(tpAniSirGlobal pMac,
-                              tDot11fIETimeoutInterval *pDot11f,
-                              tANI_U8 *addIe, tANI_U16 addIeLen);
 
 #if defined WLAN_FEATURE_VOWIFI
 tSirRetStatus 
diff --git a/CORE/MAC/src/pe/lim/limProcessTdls.c b/CORE/MAC/src/pe/lim/limProcessTdls.c
index ff9bb9e..6a7c3f3 100644
--- a/CORE/MAC/src/pe/lim/limProcessTdls.c
+++ b/CORE/MAC/src/pe/lim/limProcessTdls.c
@@ -1100,12 +1100,6 @@
     /* Populate extended supported rates */
     PopulateDot11fExtSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
                                 &tdlsDisRsp.ExtSuppRates, psessionEntry );
-    /* Populate RSN Information element */
-    PopulateDot11fRsnIEs(pMac, &tdlsDisRsp.RSN, addIe, addIeLen);
-
-    /* Populate Timeout interval IE */
-    PopulateDot11fTimeoutIEs(pMac, &tdlsDisRsp.TimeoutInterval,
-                             (&addIe[22]), (addIeLen - 22));
 
     /* Populate extended supported rates */
     PopulateDot11fTdlsExtCapability( pMac, &tdlsDisRsp.ExtCap );
@@ -1145,7 +1139,7 @@
      */ 
 
 
-    nBytes = nPayload + sizeof( tSirMacMgmtHdr ) ;
+    nBytes = nPayload + sizeof( tSirMacMgmtHdr ) + addIeLen;
 
     /* Ok-- try to allocate memory from MGMT PKT pool */
 
@@ -1226,6 +1220,13 @@
         }
     }
 #endif
+    if (0 != addIeLen)
+    {
+        LIM_LOG_TDLS(VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR,
+                     ("Copy Additional Ie Len = %d"), addIeLen ));
+        vos_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, addIe,
+                                                              addIeLen);
+    }
     VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO, 
                  ("transmitting Discovery response on direct link")) ;
 
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index da2e830..b8bba76 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -477,36 +477,6 @@
     return eSIR_SUCCESS;
 } // End PopulateDot11fERPInfo.
 
-void PopulateDot11fTimeoutIEs(tpAniSirGlobal pMac,
-                              tDot11fIETimeoutInterval *pDot11f,
-                              tANI_U8 *addIe, tANI_U16 addIeLen)
-{
-    if (0 == addIeLen || NULL == addIe)
-    {
-        return;
-    }
-    pDot11f->present = 1;
-    pDot11f->timeoutType = addIe[2];
-    vos_mem_copy(&pDot11f->timeoutValue, &addIe[3], 4);
-}
-
-void PopulateDot11fRsnIEs(tpAniSirGlobal pMac,  tDot11fIERSN *pDot11f,
-                          tANI_U8 *addIe, tANI_U16 addIeLen)
-{
-    if (0 == addIeLen || NULL == addIe)
-    {
-        return;
-    }
-    pDot11f->present = 1;
-    pDot11f->version = *(short int *)&addIe[2];
-    vos_mem_copy(pDot11f->gp_cipher_suite, &addIe[4], 4);
-    pDot11f->pwise_cipher_suite_count = *(short int *)&addIe[8];
-    vos_mem_copy(pDot11f->pwise_cipher_suites, &addIe[10], 4);
-    pDot11f->akm_suite_count = *(short int *)&addIe[14];
-    vos_mem_copy(pDot11f->akm_suites, &addIe[16], 4);
-    vos_mem_copy(pDot11f->RSN_Cap, &addIe[21], 2);
-}
-
 tSirRetStatus
 PopulateDot11fExtSuppRates(tpAniSirGlobal pMac, tANI_U8 nChannelNum,
                            tDot11fIEExtSuppRates *pDot11f,