Lines Matching refs:psLocalLlcpSocket
50 phFriNfc_LlcpTransport_Socket_t *psLocalLlcpSocket = NULL; in phFriNfc_LlcpTransport_ConnectionOriented_SendLlcp_CB() local
473 phFriNfc_LlcpTransport_Socket_t *psLocalLlcpSocket = NULL; in Handle_ConnectionFrame() local
519 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ConnectionFrame()
522 dsap = psLocalLlcpSocket->socket_sSap; in Handle_ConnectionFrame()
524 pListen_Cb = psLocalLlcpSocket->pfSocketListen_Cb; in Handle_ConnectionFrame()
525 pListenContext = psLocalLlcpSocket->pListenContext; in Handle_ConnectionFrame()
541 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ConnectionFrame()
544 pListen_Cb = psLocalLlcpSocket->pfSocketListen_Cb; in Handle_ConnectionFrame()
545 pListenContext = psLocalLlcpSocket->pListenContext; in Handle_ConnectionFrame()
648 phFriNfc_LlcpTransport_Socket_t* psLocalLlcpSocket = NULL; in Handle_ConnectionCompleteFrame() local
689 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ConnectionCompleteFrame()
697 psLocalLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketConnected; in Handle_ConnectionCompleteFrame()
700 psLocalLlcpSocket->socket_VR = 0; in Handle_ConnectionCompleteFrame()
701 psLocalLlcpSocket->socket_VRA = 0; in Handle_ConnectionCompleteFrame()
702 psLocalLlcpSocket->socket_VS = 0; in Handle_ConnectionCompleteFrame()
703 psLocalLlcpSocket->socket_VSA = 0; in Handle_ConnectionCompleteFrame()
706 psLocalLlcpSocket->remoteMIU = remoteMIU; in Handle_ConnectionCompleteFrame()
707 psLocalLlcpSocket->remoteRW = remoteRW; in Handle_ConnectionCompleteFrame()
710 … psLocalLlcpSocket->pfSocketConnect_Cb(psLocalLlcpSocket->pConnectContext,0x00,NFCSTATUS_SUCCESS); in Handle_ConnectionCompleteFrame()
711 psLocalLlcpSocket->pfSocketConnect_Cb = NULL; in Handle_ConnectionCompleteFrame()
712 psLocalLlcpSocket->pConnectContext = NULL; in Handle_ConnectionCompleteFrame()
730 phFriNfc_LlcpTransport_Socket_t* psLocalLlcpSocket = NULL; in Handle_DisconnectFrame() local
743 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_DisconnectFrame()
752 …if((psLocalLlcpSocket->bSocketSendPending == TRUE) || (psLocalLlcpSocket->bSocketRecvPending == TR… in Handle_DisconnectFrame()
755 … if (psLocalLlcpSocket->pfSocketSend_Cb != NULL && psLocalLlcpSocket->bSocketSendPending == TRUE) in Handle_DisconnectFrame()
758 pphFriNfc_LlcpTransportSocketSendCb_t pfSendCb = psLocalLlcpSocket->pfSocketSend_Cb; in Handle_DisconnectFrame()
759 void* pSendContext = psLocalLlcpSocket->pSendContext; in Handle_DisconnectFrame()
761 psLocalLlcpSocket->pfSocketSend_Cb = NULL; in Handle_DisconnectFrame()
762 psLocalLlcpSocket->pSendContext = NULL; in Handle_DisconnectFrame()
767 … if (psLocalLlcpSocket->pfSocketRecv_Cb != NULL && psLocalLlcpSocket->bSocketRecvPending == TRUE) in Handle_DisconnectFrame()
770 pphFriNfc_LlcpTransportSocketRecvCb_t pfRecvCb = psLocalLlcpSocket->pfSocketRecv_Cb; in Handle_DisconnectFrame()
771 void* pRecvContext = psLocalLlcpSocket->pRecvContext; in Handle_DisconnectFrame()
773 psLocalLlcpSocket->pfSocketRecv_Cb = NULL; in Handle_DisconnectFrame()
774 psLocalLlcpSocket->pRecvContext = NULL; in Handle_DisconnectFrame()
778 psLocalLlcpSocket->bSocketRecvPending = FALSE; in Handle_DisconnectFrame()
779 psLocalLlcpSocket->bSocketSendPending = FALSE; in Handle_DisconnectFrame()
783 psLocalLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDisconnecting; in Handle_DisconnectFrame()
812 phFriNfc_LlcpTransport_Socket_t *psLocalLlcpSocket = NULL; in Handle_DisconnetModeFrame() local
846 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_DisconnetModeFrame()
862 psLocalLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketCreated; in Handle_DisconnetModeFrame()
865 if (psLocalLlcpSocket->pfSocketDisconnect_Cb != NULL) in Handle_DisconnetModeFrame()
867 … psLocalLlcpSocket->pfSocketDisconnect_Cb(psLocalLlcpSocket->pDisconnectContext,NFCSTATUS_SUCCESS); in Handle_DisconnetModeFrame()
868 psLocalLlcpSocket->pfSocketDisconnect_Cb = NULL; in Handle_DisconnetModeFrame()
880 psLocalLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketCreated; in Handle_DisconnetModeFrame()
881 if(psLocalLlcpSocket->pfSocketConnect_Cb != NULL) in Handle_DisconnetModeFrame()
884 …psLocalLlcpSocket->pfSocketConnect_Cb(psLocalLlcpSocket->pConnectContext,dmOpCode,NFCSTATUS_FAILED… in Handle_DisconnetModeFrame()
885 psLocalLlcpSocket->pfSocketConnect_Cb = NULL; in Handle_DisconnetModeFrame()
901 phFriNfc_LlcpTransport_Socket_t* psLocalLlcpSocket = NULL; in Handle_Receive_IFrame() local
939 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_Receive_IFrame()
954 if(sLlcpLocalSequence.ns >= psLocalLlcpSocket->socket_VRA) in Handle_Receive_IFrame()
956 rw_offset = sLlcpLocalSequence.ns - psLocalLlcpSocket->socket_VRA; in Handle_Receive_IFrame()
960 rw_offset = 16 - (psLocalLlcpSocket->socket_VRA - sLlcpLocalSequence.ns); in Handle_Receive_IFrame()
962 if(rw_offset >= psLocalLlcpSocket->localRW) in Handle_Receive_IFrame()
969 if(psData->length > (uint32_t)(psLocalLlcpSocket->localMIUX + PHFRINFC_LLCP_MIU_DEFAULT)) in Handle_Receive_IFrame()
979 if(nr_val == psLocalLlcpSocket->socket_VS) in Handle_Receive_IFrame()
986 if(nr_val == psLocalLlcpSocket->socket_VSA) in Handle_Receive_IFrame()
1007 psLocalLlcpSocket->socket_VS, in Handle_Receive_IFrame()
1008 psLocalLlcpSocket->socket_VSA, in Handle_Receive_IFrame()
1009 psLocalLlcpSocket->socket_VR, in Handle_Receive_IFrame()
1010 psLocalLlcpSocket->socket_VRA); in Handle_Receive_IFrame()
1016 psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; in Handle_Receive_IFrame()
1019 if(psLocalLlcpSocket->bufferLinearLength == 0) in Handle_Receive_IFrame()
1022 …if(psLocalLlcpSocket->bSocketRecvPending == TRUE && (psLocalLlcpSocket->indexRwWrite == psLocalLlc… in Handle_Receive_IFrame()
1025 psLocalLlcpSocket->bSocketRecvPending = FALSE; in Handle_Receive_IFrame()
1028 memcpy(psLocalLlcpSocket->sSocketRecvBuffer->buffer,psData->buffer,psData->length); in Handle_Receive_IFrame()
1029 psLocalLlcpSocket->sSocketRecvBuffer->length = psData->length; in Handle_Receive_IFrame()
1032 psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; in Handle_Receive_IFrame()
1035 … psLocalLlcpSocket->pfSocketRecv_Cb(psLocalLlcpSocket->pRecvContext, NFCSTATUS_SUCCESS); in Handle_Receive_IFrame()
1036 psLocalLlcpSocket->pfSocketRecv_Cb = NULL; in Handle_Receive_IFrame()
1039 if(psLocalLlcpSocket->bSocketSendPending == TRUE && CHECK_SEND_RW(psLocalLlcpSocket)) in Handle_Receive_IFrame()
1042 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport)) in Handle_Receive_IFrame()
1044 status = static_performSendInfo(psLocalLlcpSocket); in Handle_Receive_IFrame()
1053 status = phFriNfc_Llcp_Send_ReceiveReady_Frame(psLocalLlcpSocket); in Handle_Receive_IFrame()
1059 … if((psLocalLlcpSocket->indexRwWrite - psLocalLlcpSocket->indexRwRead)<psLocalLlcpSocket->localRW) in Handle_Receive_IFrame()
1061 …if(psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->loc… in Handle_Receive_IFrame()
1064 …memcpy(psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket-… in Handle_Receive_IFrame()
1065 …psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localR… in Handle_Receive_IFrame()
1067 if(psLocalLlcpSocket->ReceiverBusyCondition != TRUE) in Handle_Receive_IFrame()
1070 psLocalLlcpSocket->ReceiverBusyCondition = TRUE; in Handle_Receive_IFrame()
1073 status = phFriNfc_Llcp_Send_ReceiveNotReady_Frame(psLocalLlcpSocket); in Handle_Receive_IFrame()
1076 psLocalLlcpSocket->indexRwWrite++; in Handle_Receive_IFrame()
1084 …memcpy(psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket-… in Handle_Receive_IFrame()
1087 …psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localR… in Handle_Receive_IFrame()
1090 … dataLengthAvailable = phFriNfc_Llcp_CyclicFifoAvailable(&psLocalLlcpSocket->sCyclicFifoBuffer); in Handle_Receive_IFrame()
1092 …if(dataLengthAvailable >= psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite… in Handle_Receive_IFrame()
1095 dataLengthWrite = phFriNfc_Llcp_CyclicFifoWrite(&psLocalLlcpSocket->sCyclicFifoBuffer, in Handle_Receive_IFrame()
1096 …psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localR… in Handle_Receive_IFrame()
1097 …psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localR… in Handle_Receive_IFrame()
1100 psLocalLlcpSocket->socket_VR = (psLocalLlcpSocket->socket_VR+1)%16; in Handle_Receive_IFrame()
1103 …psLocalLlcpSocket->sSocketRwBufferTable[(psLocalLlcpSocket->indexRwWrite%psLocalLlcpSocket->localR… in Handle_Receive_IFrame()
1106 if(psLocalLlcpSocket->bSocketRecvPending == TRUE) in Handle_Receive_IFrame()
1109 psLocalLlcpSocket->bSocketRecvPending = FALSE; in Handle_Receive_IFrame()
1111 phFriNfc_LlcpTransport_ConnectionOriented_Recv(psLocalLlcpSocket, in Handle_Receive_IFrame()
1112 … psLocalLlcpSocket->sSocketRecvBuffer, in Handle_Receive_IFrame()
1113 psLocalLlcpSocket->pfSocketRecv_Cb, in Handle_Receive_IFrame()
1114 psLocalLlcpSocket->pRecvContext); in Handle_Receive_IFrame()
1118 … if((psLocalLlcpSocket->bSocketSendPending == TRUE) && CHECK_SEND_RW(psLocalLlcpSocket)) in Handle_Receive_IFrame()
1121 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport)) in Handle_Receive_IFrame()
1123 status = static_performSendInfo(psLocalLlcpSocket); in Handle_Receive_IFrame()
1132 status = phFriNfc_Llcp_Send_ReceiveReady_Frame(psLocalLlcpSocket); in Handle_Receive_IFrame()
1137 if(psLocalLlcpSocket->ReceiverBusyCondition != TRUE) in Handle_Receive_IFrame()
1140 psLocalLlcpSocket->ReceiverBusyCondition = TRUE; in Handle_Receive_IFrame()
1143 status = phFriNfc_Llcp_Send_ReceiveNotReady_Frame(psLocalLlcpSocket); in Handle_Receive_IFrame()
1147 psLocalLlcpSocket->indexRwWrite++; in Handle_Receive_IFrame()
1174 phFriNfc_LlcpTransport_Socket_t* psLocalLlcpSocket = NULL; in Handle_ReceiveReady_Frame() local
1192 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ReceiveReady_Frame()
1193 psLocalLlcpSocket->index = psTransport->pSocketTable[index].index; in Handle_ReceiveReady_Frame()
1205 if(nr_val == psLocalLlcpSocket->socket_VS) in Handle_ReceiveReady_Frame()
1212 if(nr_val == psLocalLlcpSocket->socket_VSA) in Handle_ReceiveReady_Frame()
1235 psLocalLlcpSocket->socket_VS, in Handle_ReceiveReady_Frame()
1236 psLocalLlcpSocket->socket_VSA, in Handle_ReceiveReady_Frame()
1237 psLocalLlcpSocket->socket_VR, in Handle_ReceiveReady_Frame()
1238 psLocalLlcpSocket->socket_VRA); in Handle_ReceiveReady_Frame()
1243 if(psLocalLlcpSocket->RemoteBusyConditionInfo == TRUE) in Handle_ReceiveReady_Frame()
1246 … psLocalLlcpSocket->pSocketErrCb(psLocalLlcpSocket->pContext,PHFRINFC_LLCP_ERR_NOT_BUSY_CONDITION); in Handle_ReceiveReady_Frame()
1247 psLocalLlcpSocket->RemoteBusyConditionInfo = FALSE; in Handle_ReceiveReady_Frame()
1250 psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; in Handle_ReceiveReady_Frame()
1253 if(psLocalLlcpSocket->bSocketSendPending == TRUE) in Handle_ReceiveReady_Frame()
1256 if(CHECK_SEND_RW(psLocalLlcpSocket)) in Handle_ReceiveReady_Frame()
1259 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport)) in Handle_ReceiveReady_Frame()
1261 status = static_performSendInfo(psLocalLlcpSocket); in Handle_ReceiveReady_Frame()
1292 phFriNfc_LlcpTransport_Socket_t* psLocalLlcpSocket = NULL; in Handle_ReceiveNotReady_Frame() local
1310 psLocalLlcpSocket = &psTransport->pSocketTable[index]; in Handle_ReceiveNotReady_Frame()
1323 if(nr_val == psLocalLlcpSocket->socket_VS) in Handle_ReceiveNotReady_Frame()
1330 if(nr_val == psLocalLlcpSocket->socket_VSA) in Handle_ReceiveNotReady_Frame()
1353 psLocalLlcpSocket->socket_VS, in Handle_ReceiveNotReady_Frame()
1354 psLocalLlcpSocket->socket_VSA, in Handle_ReceiveNotReady_Frame()
1355 psLocalLlcpSocket->socket_VR, in Handle_ReceiveNotReady_Frame()
1356 psLocalLlcpSocket->socket_VRA); in Handle_ReceiveNotReady_Frame()
1361 …psLocalLlcpSocket->pSocketErrCb(psTransport->pSocketTable[index].pContext,PHFRINFC_LLCP_ERR_BUSY_C… in Handle_ReceiveNotReady_Frame()
1362 psLocalLlcpSocket->RemoteBusyConditionInfo = TRUE; in Handle_ReceiveNotReady_Frame()
1365 psLocalLlcpSocket->socket_VSA = (uint8_t)sLlcpLocalSequence.nr; in Handle_ReceiveNotReady_Frame()
1368 if(psLocalLlcpSocket->bSocketSendPending == TRUE && CHECK_SEND_RW(psLocalLlcpSocket)) in Handle_ReceiveNotReady_Frame()
1371 if(!testAndSetSendPending(psLocalLlcpSocket->psTransport)) in Handle_ReceiveNotReady_Frame()
1373 status = static_performSendInfo(psLocalLlcpSocket); in Handle_ReceiveNotReady_Frame()