wlan: Don't change STAId in middle of fetching tx packets.

Changing STAid in middle of fetch packet callback causes
issues leading to crash. AC mask and packet pending is
set for another STA, and we are fetching packet for
another. This leads to packets getting stuck at wmm queue
only leading to timeout crashes.

Change-Id: Id29a481cd1388be375a9b843dc1280ae4e0b05a5
CRs-Fixed: 779469
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 5b056ba..b364dc4 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -1592,23 +1592,6 @@
       vos_pkt_return_packet(pVosPacket);
       return VOS_STATUS_E_FAILURE;
    }
-   /* In IBSS the staID can change and hdd uses the same queue for all staid.
-    * Due to this the fetch may be called for staID x, but data might be of
-    * staID y. So better get the staId again from SKB and use this to process
-    * the packet further.
-    */
-   if (WLAN_HDD_IBSS == pAdapter->device_mode)
-   {
-      *pStaId = *(v_U8_t *)(((v_U8_t *)(skb->data)) - 1);
-
-      /* If HDD_WLAN_INVALID_STA_ID no need to check the destination,
-       * just make the staID 0. As if HDD_WLAN_INVALID_STA_ID and
-       * destination is not BC of MC, the packet is already dropped in
-       * hdd_hard_start_xmit.
-       */
-      if (*pStaId == HDD_WLAN_INVALID_STA_ID)
-         *pStaId = IBSS_BROADCAST_STAID;
-   }
    //Attach skb to VOS packet.
    status = vos_pkt_set_os_packet( pVosPacket, skb );
    if (status != VOS_STATUS_SUCCESS)
diff --git a/CORE/TL/src/wlan_qct_tl.c b/CORE/TL/src/wlan_qct_tl.c
index e8408e8..bf5b07a 100644
--- a/CORE/TL/src/wlan_qct_tl.c
+++ b/CORE/TL/src/wlan_qct_tl.c
@@ -7672,7 +7672,6 @@
    v_U8_t                ucWDSEnabled = 0;
    v_U32_t               ucTxFlag   = 0;
    v_U8_t                ucACMask, i;
-   v_U8_t                prevStaId;
   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
 
   /*------------------------------------------------------------------------
@@ -7764,9 +7763,6 @@
     pStaClient->ucNoMoreData = 1;
   }
 
-  if (WLAN_STA_IBSS == pStaClient->wSTADesc.wSTAType)
-     prevStaId = ucSTAId;
-
   vosStatus = pStaClient->pfnSTAFetchPkt( pvosGCtx, 
                                &ucSTAId,
                                ucAC,
@@ -7792,32 +7788,6 @@
     return vosStatus;
   }
 
-  /* In IBSS only one queue is used for all staID and the fetched packet's
-   * staID might be different from the staID for  which data was pending.
-   * So update the pStaClient and do sanity checks for the new pStaClient.
-   */
-  if ((WLAN_STA_IBSS == pStaClient->wSTADesc.wSTAType) && (prevStaId != ucSTAId))
-  {
-     pStaClient = pTLCb->atlSTAClients[ucSTAId];
-     if (NULL == pStaClient)
-     {
-        VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,
-                 "WLAN TL:Station is null ");
-        vos_pkt_return_packet(vosDataBuff);
-        *pvosDataBuff = NULL;
-        return VOS_STATUS_E_FAILURE;
-     }
-     if ((0 == pStaClient->ucExists) ||
-                  (WLANTL_STA_AUTHENTICATED != pStaClient->tlState))
-     {
-        VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,
-               "WLAN TL:Station not registered or connected state = %d",
-                                                     pStaClient->tlState);
-        vos_pkt_return_packet(vosDataBuff);
-        *pvosDataBuff = NULL;
-        return VOS_STATUS_E_EXISTS;
-     }
-  }
   WLANTL_StatHandleTXFrame(pvosGCtx, ucSTAId, vosDataBuff, NULL, &tlMetaInfo);
 
   /*There are still packets in HDD - set back the pending packets and