Wlan: Correct ext IE in Assoc req

qcacld-2.0 to prima propagation

Add the changes to add ext IEs in assoc req based on extended IEs
host is getting from framework.

CRs-Fixed: 977188
Change-Id: Idacfa287d17a2409f054421229d04ff087aa28d8
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index ab8e86c..b5a926d 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -2310,22 +2310,9 @@
      */
     else
     {
-        if (extractedExtCap.interworkingService ||
-                         extractedExtCap.bssTransition)
-        {
+        if (extractedExtCap.interworkingService)
             extractedExtCap.qosMap = 1;
-        }
-        /* No need to merge the EXT Cap from Supplicant
-         * if interworkingService or bsstransition is not set,
-         * as currently driver is only interested in interworkingService
-         * and bsstransition capability from supplicant. if in
-         * future any other EXT Cap info is required from
-         * supplicant it needs to be handled here.
-         */
-        else
-        {
-            extractedExtCapFlag = eANI_BOOLEAN_FALSE;
-        }
+        extractedExtCapFlag = lim_is_ext_cap_ie_present(&extractedExtCap);
     }
 
     caps = pMlmAssocReq->capabilityInfo;
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 62905ed..73670f2 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -8553,3 +8553,24 @@
    }
    return false;
 }
+
+/**
+ * lim_is_ext_cap_ie_present - checks if ext ie is present
+ * @ext_cap: extended IEs structure
+ *
+ * Return: true if ext IEs are present else false
+ */
+bool lim_is_ext_cap_ie_present (tDot11fIEExtCap *ext_cap)
+{
+    int i, size;
+    uint8_t *tmp_buf;
+
+    tmp_buf = (uint8_t *) ext_cap;
+    size = sizeof(*ext_cap);
+
+    for (i = 0; i < size; i++)
+        if (tmp_buf[i])
+            return true;
+
+    return false;
+}
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index dbe09c0..602f040 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -574,5 +574,6 @@
 
 eHalStatus limTxBdComplete(tpAniSirGlobal pMac, void *pData);
 bool lim_is_robust_mgmt_action_frame(uint8 action_catagory);
+bool lim_is_ext_cap_ie_present (tDot11fIEExtCap *ext_cap);
 
 #endif /* __LIM_UTILS_H */