wlan: Set Tid to zero for RX packets with Tid more than 8

Currently Host driver drops the RX packets with Tid value more than
8. In some cases AP uses Tid greater than 8 for EAPOL packet and the
host driver drops the packet which leads to connection failure with
the AP.

In this change reset the Tid for the received packets to zero whose
Tid is greater than 8.

Change-Id: Ice1140fd39a883be43c7430c302c6c2f7986a3a8
CRs-Fixed: 1010434
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index 9b56815..d169c7f 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -6044,17 +6044,25 @@
         }
       }/*if bcast*/
 
-      if ((WLANTL_STA_ID_INVALID(ucSTAId)) || (WLANTL_TID_INVALID(ucTid)))
+      if (WLANTL_STA_ID_INVALID(ucSTAId))
       {
         TLLOGW(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_WARN,
-                   "WLAN TL:STAId %d, Tid %d. Invalid STA ID/TID- dropping pkt",
-                   ucSTAId, ucTid));
+                   "WLAN TL:STAId %d. Invalid STA ID dropping pkt",
+                   ucSTAId));
         /* Drop packet */
         vos_pkt_return_packet(vosTempBuff);
         vosTempBuff = vosDataBuff;
         continue;
       }
 
+      if (WLANTL_TID_INVALID( ucTid)) {
+         /* There is a possibility AP uses wrong TID. In that case to avoid
+            dropping EAPOL packet in the driver use TID to zero.*/
+         VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,
+             "WLAN TL:Invalid Tid: %d Frame type: %d", ucTid, ucFrmType);
+         ucTid = 0;
+      }
+
 #ifdef WLAN_FEATURE_LINK_LAYER_STATS
       ac = WLANTL_TID_2_AC[ucTid];
 #endif
diff --git a/CORE/TL/src/wlan_qct_tl_hosupport.c b/CORE/TL/src/wlan_qct_tl_hosupport.c
index c4f8df6..950f3f0 100644
--- a/CORE/TL/src/wlan_qct_tl_hosupport.c
+++ b/CORE/TL/src/wlan_qct_tl_hosupport.c
@@ -1313,6 +1313,15 @@
       (WLANTL_MGMT_FRAME_TYPE != frameType))
    {
       tid = WDA_GET_RX_TID( pBDHeader );
+
+      /* If AP uses TID greater than 8 for EAPOL packet connection will not
+         be established. To ensure no connection fail use TID as zero.*/
+      if (WLANTL_TID_INVALID(tid)) {
+         VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,
+             "WLAN TL:Invalid Tid: %d", tid);
+         tid = 0;
+      }
+
       ac = WLANTL_HO_TID_2_AC[(v_U8_t)tid];
 
       /* Only Voice traffic is handled as real time traffic */