• Home
  • Raw
  • Download

Lines Matching refs:LlcpMac

35 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Send(phFriNfc_LlcpMac_t               *LlcpMac,
41 static void phFriNfc_LlcpMac_Nfcip_TriggerRecvCb(phFriNfc_LlcpMac_t *LlcpMac, in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb() argument
47 if (LlcpMac->MacReceive_Cb != NULL) in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
50 pfReceiveCB = LlcpMac->MacReceive_Cb; in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
51 pReceiveContext = LlcpMac->MacReceive_Context; in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
54 LlcpMac->MacReceive_Cb = NULL; in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
55 LlcpMac->MacReceive_Context = NULL; in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
58 pfReceiveCB(pReceiveContext, status, LlcpMac->psReceiveBuffer); in phFriNfc_LlcpMac_Nfcip_TriggerRecvCb()
62 static void phFriNfc_LlcpMac_Nfcip_TriggerSendCb(phFriNfc_LlcpMac_t *LlcpMac, in phFriNfc_LlcpMac_Nfcip_TriggerSendCb() argument
68 if (LlcpMac->MacSend_Cb != NULL) in phFriNfc_LlcpMac_Nfcip_TriggerSendCb()
71 pfSendCB = LlcpMac->MacSend_Cb; in phFriNfc_LlcpMac_Nfcip_TriggerSendCb()
72 pSendContext = LlcpMac->MacSend_Context; in phFriNfc_LlcpMac_Nfcip_TriggerSendCb()
75 LlcpMac->MacSend_Cb = NULL; in phFriNfc_LlcpMac_Nfcip_TriggerSendCb()
76 LlcpMac->MacSend_Context = NULL; in phFriNfc_LlcpMac_Nfcip_TriggerSendCb()
83 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Chk(phFriNfc_LlcpMac_t *LlcpMac, in phFriNfc_LlcpMac_Nfcip_Chk() argument
90 if(NULL == LlcpMac || NULL == ChkLlcpMac_Cb || NULL == pContext) in phFriNfc_LlcpMac_Nfcip_Chk()
96 …status = (NFCSTATUS)memcmp(Llcp_Magic_Number,LlcpMac->psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.AT… in phFriNfc_LlcpMac_Nfcip_Chk()
99LlcpMac->sConfigParam.buffer = &LlcpMac->psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.ATRInfo[3] ; in phFriNfc_LlcpMac_Nfcip_Chk()
100LlcpMac->sConfigParam.length = (LlcpMac->psRemoteDevInfo->RemoteDevInfo.NfcIP_Info.ATRInfo_Length … in phFriNfc_LlcpMac_Nfcip_Chk()
113 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Activate (phFriNfc_LlcpMac_t *LlcpMac) in phFriNfc_LlcpMac_Nfcip_Activate() argument
117 if(LlcpMac == NULL) in phFriNfc_LlcpMac_Nfcip_Activate()
123 LlcpMac->LinkState = phFriNfc_LlcpMac_eLinkActivated; in phFriNfc_LlcpMac_Nfcip_Activate()
124 LlcpMac->LinkStatus_Cb(LlcpMac->LinkStatus_Context, in phFriNfc_LlcpMac_Nfcip_Activate()
125 LlcpMac->LinkState, in phFriNfc_LlcpMac_Nfcip_Activate()
126 &LlcpMac->sConfigParam, in phFriNfc_LlcpMac_Nfcip_Activate()
127 LlcpMac->PeerRemoteDevType); in phFriNfc_LlcpMac_Nfcip_Activate()
133 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Deactivate (phFriNfc_LlcpMac_t *LlcpMac) in phFriNfc_LlcpMac_Nfcip_Deactivate() argument
137 if(NULL == LlcpMac) in phFriNfc_LlcpMac_Nfcip_Deactivate()
144 LlcpMac->LinkState = phFriNfc_LlcpMac_eLinkDeactivated; in phFriNfc_LlcpMac_Nfcip_Deactivate()
146 if (LlcpMac->SendPending) in phFriNfc_LlcpMac_Nfcip_Deactivate()
149 LlcpMac->SendPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Deactivate()
150 phFriNfc_LlcpMac_Nfcip_TriggerSendCb(LlcpMac, NFCSTATUS_FAILED); in phFriNfc_LlcpMac_Nfcip_Deactivate()
153 if (LlcpMac->RecvPending) in phFriNfc_LlcpMac_Nfcip_Deactivate()
156 LlcpMac->RecvPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Deactivate()
157 phFriNfc_LlcpMac_Nfcip_TriggerRecvCb(LlcpMac, NFCSTATUS_FAILED); in phFriNfc_LlcpMac_Nfcip_Deactivate()
160 LlcpMac->LinkStatus_Cb(LlcpMac->LinkStatus_Context, in phFriNfc_LlcpMac_Nfcip_Deactivate()
161 LlcpMac->LinkState, in phFriNfc_LlcpMac_Nfcip_Deactivate()
163 LlcpMac->PeerRemoteDevType); in phFriNfc_LlcpMac_Nfcip_Deactivate()
172 phFriNfc_LlcpMac_t *LlcpMac = (phFriNfc_LlcpMac_t *)pContext; in phFriNfc_LlcpMac_Nfcip_Send_Cb() local
184 LlcpMac->SendPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Send_Cb()
185 LlcpMac->RecvPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Send_Cb()
187 phFriNfc_LlcpMac_Nfcip_TriggerSendCb(LlcpMac, Status); in phFriNfc_LlcpMac_Nfcip_Send_Cb()
194 phFriNfc_LlcpMac_t *LlcpMac = (phFriNfc_LlcpMac_t *)pContext; in phFriNfc_LlcpMac_Nfcip_Receive_Cb() local
211 pfSendCB = LlcpMac->MacSend_Cb; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
212 pSendContext = LlcpMac->MacSend_Context; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
215 LlcpMac->MacSend_Cb = NULL; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
216 LlcpMac->MacSend_Context = NULL; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
219 LlcpMac->SendPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
220 LlcpMac->RecvPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
225 phFriNfc_LlcpMac_Nfcip_TriggerRecvCb(LlcpMac, Status); in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
231 if ((LlcpMac->SendPending) && (NULL != pfSendCB)) in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
241 if(LlcpMac->SendPending) in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
243 …Status = phFriNfc_LlcpMac_Nfcip_Send(LlcpMac,LlcpMac->psSendBuffer,LlcpMac->MacSend_Cb,LlcpMac->Ma… in phFriNfc_LlcpMac_Nfcip_Receive_Cb()
251 phFriNfc_LlcpMac_t *LlcpMac = (phFriNfc_LlcpMac_t *)pContext; in phFriNfc_LlcpMac_Nfcip_Transceive_Cb() local
263 LlcpMac->SendPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Transceive_Cb()
264 LlcpMac->RecvPending = FALSE; in phFriNfc_LlcpMac_Nfcip_Transceive_Cb()
267 phFriNfc_LlcpMac_Nfcip_TriggerSendCb(LlcpMac, Status); in phFriNfc_LlcpMac_Nfcip_Transceive_Cb()
268 phFriNfc_LlcpMac_Nfcip_TriggerRecvCb(LlcpMac, Status); in phFriNfc_LlcpMac_Nfcip_Transceive_Cb()
271 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Send(phFriNfc_LlcpMac_t *LlcpMac, in phFriNfc_LlcpMac_Nfcip_Send() argument
278 if(NULL == LlcpMac || NULL == psData || NULL == LlcpMacSend_Cb || NULL == pContext) in phFriNfc_LlcpMac_Nfcip_Send()
282 …else if(LlcpMac->MacSend_Cb != NULL && LlcpMac->PeerRemoteDevType == phFriNfc_LlcpMac_ePeerTypeIni… in phFriNfc_LlcpMac_Nfcip_Send()
290 LlcpMac->MacSend_Cb = LlcpMacSend_Cb; in phFriNfc_LlcpMac_Nfcip_Send()
291 LlcpMac->MacSend_Context = pContext; in phFriNfc_LlcpMac_Nfcip_Send()
293 switch(LlcpMac->PeerRemoteDevType) in phFriNfc_LlcpMac_Nfcip_Send()
297 if(LlcpMac->RecvPending) in phFriNfc_LlcpMac_Nfcip_Send()
300 LlcpMac->MacCompletionInfo.CompletionRoutine = phFriNfc_LlcpMac_Nfcip_Transceive_Cb; in phFriNfc_LlcpMac_Nfcip_Send()
301 LlcpMac->MacCompletionInfo.Context = LlcpMac; in phFriNfc_LlcpMac_Nfcip_Send()
304 LlcpMac->Cmd.NfcIP1Cmd = phHal_eNfcIP1_Raw; in phFriNfc_LlcpMac_Nfcip_Send()
307 LlcpMac->psDepAdditionalInfo.DepFlags.MetaChaining = 0; in phFriNfc_LlcpMac_Nfcip_Send()
308 LlcpMac->psDepAdditionalInfo.DepFlags.NADPresent = 0; in phFriNfc_LlcpMac_Nfcip_Send()
309 LlcpMac->SendPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Send()
311 status = phFriNfc_OvrHal_Transceive(LlcpMac->LowerDevice, in phFriNfc_LlcpMac_Nfcip_Send()
312 &LlcpMac->MacCompletionInfo, in phFriNfc_LlcpMac_Nfcip_Send()
313 LlcpMac->psRemoteDevInfo, in phFriNfc_LlcpMac_Nfcip_Send()
314 LlcpMac->Cmd, in phFriNfc_LlcpMac_Nfcip_Send()
315 &LlcpMac->psDepAdditionalInfo, in phFriNfc_LlcpMac_Nfcip_Send()
318 LlcpMac->psReceiveBuffer->buffer, in phFriNfc_LlcpMac_Nfcip_Send()
319 (uint16_t*)&LlcpMac->psReceiveBuffer->length); in phFriNfc_LlcpMac_Nfcip_Send()
323 LlcpMac->SendPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Send()
324 LlcpMac->psSendBuffer = psData; in phFriNfc_LlcpMac_Nfcip_Send()
330 if(!LlcpMac->RecvPending) in phFriNfc_LlcpMac_Nfcip_Send()
332 LlcpMac->SendPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Send()
333 LlcpMac->psSendBuffer = psData; in phFriNfc_LlcpMac_Nfcip_Send()
339 LlcpMac->MacCompletionInfo.CompletionRoutine = phFriNfc_LlcpMac_Nfcip_Send_Cb; in phFriNfc_LlcpMac_Nfcip_Send()
340 LlcpMac->MacCompletionInfo.Context = LlcpMac; in phFriNfc_LlcpMac_Nfcip_Send()
341 status = phFriNfc_OvrHal_Send(LlcpMac->LowerDevice, in phFriNfc_LlcpMac_Nfcip_Send()
342 &LlcpMac->MacCompletionInfo, in phFriNfc_LlcpMac_Nfcip_Send()
343 LlcpMac->psRemoteDevInfo, in phFriNfc_LlcpMac_Nfcip_Send()
357 static NFCSTATUS phFriNfc_LlcpMac_Nfcip_Receive(phFriNfc_LlcpMac_t *LlcpMac, in phFriNfc_LlcpMac_Nfcip_Receive() argument
363 if(NULL == LlcpMac || NULL==psData || NULL == LlcpMacReceive_Cb || NULL == pContext) in phFriNfc_LlcpMac_Nfcip_Receive()
367 else if(LlcpMac->MacReceive_Cb != NULL) in phFriNfc_LlcpMac_Nfcip_Receive()
375 LlcpMac->MacReceive_Cb = LlcpMacReceive_Cb; in phFriNfc_LlcpMac_Nfcip_Receive()
376 LlcpMac->MacReceive_Context = pContext; in phFriNfc_LlcpMac_Nfcip_Receive()
379 LlcpMac->psReceiveBuffer= psData; in phFriNfc_LlcpMac_Nfcip_Receive()
381 switch(LlcpMac->PeerRemoteDevType) in phFriNfc_LlcpMac_Nfcip_Receive()
385 if(LlcpMac->SendPending) in phFriNfc_LlcpMac_Nfcip_Receive()
388 LlcpMac->MacCompletionInfo.CompletionRoutine = phFriNfc_LlcpMac_Nfcip_Transceive_Cb; in phFriNfc_LlcpMac_Nfcip_Receive()
389 LlcpMac->MacCompletionInfo.Context = LlcpMac; in phFriNfc_LlcpMac_Nfcip_Receive()
391 LlcpMac->Cmd.NfcIP1Cmd = phHal_eNfcIP1_Raw; in phFriNfc_LlcpMac_Nfcip_Receive()
393 LlcpMac->psDepAdditionalInfo.DepFlags.MetaChaining = 0; in phFriNfc_LlcpMac_Nfcip_Receive()
394 LlcpMac->psDepAdditionalInfo.DepFlags.NADPresent = 0; in phFriNfc_LlcpMac_Nfcip_Receive()
395 LlcpMac->RecvPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Receive()
397 status = phFriNfc_OvrHal_Transceive(LlcpMac->LowerDevice, in phFriNfc_LlcpMac_Nfcip_Receive()
398 &LlcpMac->MacCompletionInfo, in phFriNfc_LlcpMac_Nfcip_Receive()
399 LlcpMac->psRemoteDevInfo, in phFriNfc_LlcpMac_Nfcip_Receive()
400 LlcpMac->Cmd, in phFriNfc_LlcpMac_Nfcip_Receive()
401 &LlcpMac->psDepAdditionalInfo, in phFriNfc_LlcpMac_Nfcip_Receive()
402 LlcpMac->psSendBuffer->buffer, in phFriNfc_LlcpMac_Nfcip_Receive()
403 (uint16_t)LlcpMac->psSendBuffer->length, in phFriNfc_LlcpMac_Nfcip_Receive()
409 LlcpMac->RecvPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Receive()
416 LlcpMac->MacCompletionInfo.CompletionRoutine = phFriNfc_LlcpMac_Nfcip_Receive_Cb; in phFriNfc_LlcpMac_Nfcip_Receive()
418 LlcpMac->MacCompletionInfo.Context = LlcpMac; in phFriNfc_LlcpMac_Nfcip_Receive()
419 LlcpMac->RecvPending = TRUE; in phFriNfc_LlcpMac_Nfcip_Receive()
421 status = phFriNfc_OvrHal_Receive(LlcpMac->LowerDevice, in phFriNfc_LlcpMac_Nfcip_Receive()
422 &LlcpMac->MacCompletionInfo, in phFriNfc_LlcpMac_Nfcip_Receive()
423 LlcpMac->psRemoteDevInfo, in phFriNfc_LlcpMac_Nfcip_Receive()
424 LlcpMac->psReceiveBuffer->buffer, in phFriNfc_LlcpMac_Nfcip_Receive()
425 (uint16_t*)&LlcpMac->psReceiveBuffer->length); in phFriNfc_LlcpMac_Nfcip_Receive()
437 NFCSTATUS phFriNfc_LlcpMac_Nfcip_Register (phFriNfc_LlcpMac_t *LlcpMac) in phFriNfc_LlcpMac_Nfcip_Register() argument
441 if(NULL != LlcpMac) in phFriNfc_LlcpMac_Nfcip_Register()
443 LlcpMac->LlcpMacInterface.chk = phFriNfc_LlcpMac_Nfcip_Chk; in phFriNfc_LlcpMac_Nfcip_Register()
444 LlcpMac->LlcpMacInterface.activate = phFriNfc_LlcpMac_Nfcip_Activate; in phFriNfc_LlcpMac_Nfcip_Register()
445 LlcpMac->LlcpMacInterface.deactivate = phFriNfc_LlcpMac_Nfcip_Deactivate; in phFriNfc_LlcpMac_Nfcip_Register()
446 LlcpMac->LlcpMacInterface.send = phFriNfc_LlcpMac_Nfcip_Send; in phFriNfc_LlcpMac_Nfcip_Register()
447 LlcpMac->LlcpMacInterface.receive = phFriNfc_LlcpMac_Nfcip_Receive; in phFriNfc_LlcpMac_Nfcip_Register()