wlan: Fix check for whether PMF (802.11w) is enabled

Fixed a problem in WDI_FillTxBd where, in the case of
transmitting a Robust Management Frame, the code
was checking the self-station to see if the link had PMF
enabled.  Fixed the code so it checks the peer-station.

CRs-Fixed: 522310, 522312

Change-Id: I5530cd37aea199137f2992395e83c1cb102d3cea
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi_dp.c b/CORE/WDI/CP/src/wlan_qct_wdi_dp.c
index f6ebfe1..bb1eac2 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi_dp.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi_dp.c
@@ -672,7 +672,8 @@
         /* Mark the BD could not be reused */
         uTxBdSignature = WDI_TXBD_SIG_MGMT_MAGIC; 
 #endif
-        if(ucTxFlag & WDI_USE_SELF_STA_REQUESTED_MASK)
+        if((ucTxFlag & WDI_USE_SELF_STA_REQUESTED_MASK) &&
+            !(ucIsRMF && ucProtMgmtFrame))
         {
 #ifdef HAL_SELF_STA_PER_BSS
             // Get the (self) station index from ADDR2, which should be the self MAC addr
@@ -849,25 +850,7 @@
                 if(!ucUnicastDst)
                     pBd->dpuDescIdx = pSta->bcastMgmtDpuIndex; /* IGTK */
                 else
-                {
-                    wpt_uint8 peerStaId;
-
-                    //We need to find the peer's station's DPU index to send this
-                    //frame using PTK
-                    wdiStatus = WDI_STATableFindStaidByAddr( pWDICtx,
-                                        *(wpt_macAddr*)pDestMacAddr, &peerStaId );
-                    if (WDI_STATUS_SUCCESS != wdiStatus)
-                    {
-                        WPAL_TRACE(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_ERROR,
-                           "%s failed to find peer sta %02X-%02X-%02X-%02X-%02X-%02X",
-                           __FUNCTION__, ((wpt_uint8 *)pDestMacAddr)[0],
-                           ((wpt_uint8 *)pDestMacAddr)[1], ((wpt_uint8 *)pDestMacAddr)[5],
-                           ((wpt_uint8 *)pDestMacAddr)[3], ((wpt_uint8 *)pDestMacAddr)[4],
-                           ((wpt_uint8 *)pDestMacAddr)[5]);
-                        return WDI_STATUS_E_FAILURE;
-                    }
-                    pBd->dpuDescIdx = ((WDI_StaStruct*)pWDICtx->staTable)[peerStaId].dpuIndex; /* PTK */
-                }
+                    pBd->dpuDescIdx = pSta->dpuIndex; /* PTK */
             }
             else
             {