static
NFCSTATUS
phFriNfc_LlcpMac_Nfcip_Deactivate(
    _Inout_ phFriNfc_LlcpMac_t *LlcpMac
    )
{
   NFCSTATUS status  = NFCSTATUS_SUCCESS;

   PH_LOG_LLCP_FUNC_ENTRY();
   if(NULL == LlcpMac)
   {
      status = PHNFCSTVAL(CID_FRI_NFC_LLCP_MAC, NFCSTATUS_INVALID_PARAMETER);
   }
   else
   {
      /* Set the flag of LinkStatus to deactivate */
      LlcpMac->LinkState = phFriNfc_LlcpMac_eLinkDeactivated;

      if (LlcpMac->SendPending)
      {
         /* Reset Flag */
         LlcpMac->SendPending = FALSE;
         phFriNfc_LlcpMac_Nfcip_TriggerSendCb(LlcpMac, NFCSTATUS_FAILED);
      }

      if (LlcpMac->RecvPending)
      {
         /* Reset Flag */
         LlcpMac->RecvPending = FALSE;
         phFriNfc_LlcpMac_Nfcip_TriggerRecvCb(LlcpMac, NFCSTATUS_FAILED);
      }

      LlcpMac->LinkStatus_Cb(LlcpMac->LinkStatus_Context,
                             LlcpMac->LinkState,
                             NULL,
                             LlcpMac->PeerRemoteDevType);
   }

   PH_LOG_LLCP_FUNC_EXIT();
   return status;
}
static void phFriNfc_LlcpMac_Nfcip_Send_Cb(void       *pContext,
                                           NFCSTATUS   Status)
{
   phFriNfc_LlcpMac_t            *LlcpMac = (phFriNfc_LlcpMac_t *)pContext;

#ifdef LLCP_CHANGES
   if(gpphLibContext->LibNfcState.next_state
                               == eLibNfcHalStateShutdown)
   {
      phLibNfc_Pending_Shutdown();
      Status = NFCSTATUS_SHUTDOWN;
   }
#endif /* #ifdef LLCP_CHANGES */

   /* Reset Send and Receive Flag */
   LlcpMac->SendPending = FALSE;
   LlcpMac->RecvPending = FALSE;

   phFriNfc_LlcpMac_Nfcip_TriggerSendCb(LlcpMac, Status);

}