2 * Copyright (C) 2010 NXP Semiconductors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * =========================================================================== *
21 * \file phHciNfc_IDMgmt.c *
22 * \brief HCI Identity Management Gate Routines. *
25 * Project: NFC-FRI-1.1 *
27 * $Date: Fri Jun 11 11:19:25 2010 $ *
28 * $Author: ing04880 $ *
30 * $Aliases: NFC_FRI1.1_WK1023_R35_1 $
32 * =========================================================================== *
36 ***************************** Header File Inclusion ****************************
38 #include <phNfcCompId.h>
39 #include <phHciNfc_Pipe.h>
40 #include <phHciNfc_IDMgmt.h>
41 #include <phOsalNfc.h>
44 ****************************** Macro Definitions *******************************
47 #define FW_VERSION_INDEX 0x01U
48 #define HCI_VERSION_INDEX 0x02U
49 #define HW_VERSION_INDEX 0x03U
50 #define VENDOR_NAME_INDEX 0x04U
51 #define MODEL_ID_INDEX 0x05U
52 #define GATES_LIST_INDEX 0x06U
53 #define FULL_VERSION_INDEX 0x10U
55 #define VERSION_LEN 0x03U
56 #define GATES_LIST_LEN 0x20U
59 *************************** Structure and Enumeration ***************************
63 /** \defgroup grp_hci_nfc HCI Identity Management Component
68 typedef enum phHciNfc_IDMgmt_Seq{
69 IDMGMT_PIPE_OPEN = 0x00U,
70 IDMGMT_GET_FULL_VERSION,
71 IDMGMT_GET_FW_VERSION,
72 IDMGMT_GET_HW_VERSION,
73 IDMGMT_GET_HCI_VERSION,
74 IDMGMT_GET_VENDOR_NAME,
76 IDMGMT_GET_GATES_LIST,
78 } phHciNfc_IDMgmt_Seq_t;
80 typedef struct phHciNfc_IDMgmt_Info{
81 phHciNfc_IDMgmt_Seq_t id_cur_seq;
82 phHciNfc_IDMgmt_Seq_t id_next_seq;
83 phHciNfc_Pipe_Info_t *p_pipe_info;
87 utf8_t vendor_name[VENDOR_NAME_LEN];
90 uint8_t gates_list[GATES_LIST_LEN];
91 uint8_t full_version[NXP_FULL_VERSION_LEN];
92 } phHciNfc_IDMgmt_Info_t;
95 *************************** Static Function Declaration **************************
100 phHciNfc_IDMgmt_InfoUpdate(
101 phHciNfc_sContext_t *psHciContext,
102 phHal_sHwReference_t *pHwRef,
110 phHciNfc_Recv_IDMgmt_Response(
123 *************************** Function Definitions ***************************
127 * \brief Allocates the resources of Identity Managment Gate.
129 * This function Allocates the resources of the Identity Management
130 * gate Information Structure.
135 phHciNfc_IDMgmt_Init_Resources(
136 phHciNfc_sContext_t *psHciContext
139 NFCSTATUS status = NFCSTATUS_SUCCESS;
140 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
141 if( NULL == psHciContext )
143 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
147 if( ( NULL == psHciContext->p_identity_info )
148 && (phHciNfc_Allocate_Resource((void **)(&p_identity_info),
149 sizeof(phHciNfc_IDMgmt_Info_t))== NFCSTATUS_SUCCESS)
152 psHciContext->p_identity_info = p_identity_info;
153 p_identity_info->id_cur_seq = IDMGMT_PIPE_OPEN;
154 p_identity_info->id_next_seq = IDMGMT_PIPE_OPEN;
155 p_identity_info->pipe_id = (uint8_t)HCI_UNKNOWN_PIPE_ID;
159 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INSUFFICIENT_RESOURCES);
166 * \brief Get the pipe_id of Identity Managment Gate.
168 * This function Get the pipe_id of Identity Managment Gate.
174 phHciNfc_IDMgmt_Get_PipeID(
175 phHciNfc_sContext_t *psHciContext,
179 NFCSTATUS status = NFCSTATUS_SUCCESS;
180 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
181 if( (NULL != psHciContext)
182 && ( NULL != ppipe_id )
183 && ( NULL != psHciContext->p_identity_info )
186 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
187 psHciContext->p_identity_info ;
188 *ppipe_id = p_identity_info->pipe_id ;
192 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
198 phHciNfc_IDMgmt_Update_Sequence(
199 phHciNfc_sContext_t *psHciContext,
200 phHciNfc_eSeqType_t reader_seq
203 NFCSTATUS status = NFCSTATUS_SUCCESS;
204 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
205 if( NULL == psHciContext )
207 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
211 if( NULL == psHciContext->p_identity_info )
213 status = PHNFCSTVAL(CID_NFC_HCI,
214 NFCSTATUS_INVALID_HCI_INFORMATION);
218 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
219 psHciContext->p_identity_info ;
225 p_identity_info->id_cur_seq = IDMGMT_PIPE_OPEN;
226 p_identity_info->id_next_seq = IDMGMT_PIPE_OPEN;
231 p_identity_info->id_cur_seq =
232 p_identity_info->id_next_seq;
237 p_identity_info->id_cur_seq = IDMGMT_GET_FW_VERSION;
238 p_identity_info->id_next_seq = IDMGMT_GET_FW_VERSION;
243 p_identity_info->id_cur_seq = IDMGMT_PIPE_CLOSE;
244 p_identity_info->id_next_seq = IDMGMT_PIPE_CLOSE;
262 * \brief Initialisation of Identity Managment Gate.
264 * This function initialses the Identity Management gate and
265 * populates the Identity Management Information Structure
270 phHciNfc_IDMgmt_Initialise(
271 phHciNfc_sContext_t *psHciContext,
275 NFCSTATUS status = NFCSTATUS_SUCCESS;
276 phHciNfc_Pipe_Info_t *p_pipe_info = NULL;
277 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
278 #ifndef ESTABLISH_SESSION
279 uint8_t id_pipe_id = (uint8_t)HCI_UNKNOWN_PIPE_ID;
282 if( NULL == psHciContext )
284 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
289 if( NULL == psHciContext->p_identity_info )
291 status = PHNFCSTVAL(CID_NFC_HCI,
292 NFCSTATUS_INVALID_HCI_INFORMATION);
296 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
297 psHciContext->p_identity_info ;
298 p_pipe_info = p_identity_info->p_pipe_info;
299 if(NULL == p_pipe_info )
301 status = PHNFCSTVAL(CID_NFC_HCI,
302 NFCSTATUS_NOT_ALLOWED);
306 switch(p_identity_info->id_cur_seq )
308 /* Identity Mgmt pipe open sequence */
309 case IDMGMT_PIPE_OPEN:
311 status = phHciNfc_Open_Pipe( psHciContext,
312 pHwRef, p_pipe_info );
313 if(status == NFCSTATUS_SUCCESS)
315 p_identity_info->id_next_seq = IDMGMT_GET_FW_VERSION;
316 #ifndef ESTABLISH_SESSION
317 status = NFCSTATUS_PENDING;
322 #ifndef ESTABLISH_SESSION
323 case IDMGMT_GET_FW_VERSION:
325 p_pipe_info->reg_index = FW_VERSION_INDEX;
326 id_pipe_id = p_identity_info->pipe_id ;
328 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
329 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
330 if(NFCSTATUS_PENDING == status )
332 p_identity_info->id_next_seq = IDMGMT_GET_HW_VERSION;
333 /* status = NFCSTATUS_SUCCESS; */
337 case IDMGMT_GET_HW_VERSION:
339 p_pipe_info->reg_index = HW_VERSION_INDEX;
340 id_pipe_id = p_identity_info->pipe_id ;
342 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
343 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
344 if(NFCSTATUS_PENDING == status )
346 p_identity_info->id_next_seq = IDMGMT_GET_HCI_VERSION;
347 /* status = NFCSTATUS_SUCCESS; */
351 case IDMGMT_GET_HCI_VERSION:
353 p_pipe_info->reg_index = HCI_VERSION_INDEX;
354 id_pipe_id = p_identity_info->pipe_id ;
356 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
357 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
358 if(NFCSTATUS_PENDING == status )
360 p_identity_info->id_next_seq = IDMGMT_GET_VENDOR_NAME;
361 /* status = NFCSTATUS_SUCCESS; */
365 case IDMGMT_GET_VENDOR_NAME:
367 p_pipe_info->reg_index = VENDOR_NAME_INDEX;
368 id_pipe_id = p_identity_info->pipe_id ;
370 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
371 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
372 if(NFCSTATUS_PENDING == status )
374 p_identity_info->id_next_seq = IDMGMT_GET_MODEL_ID;
375 /* status = NFCSTATUS_SUCCESS; */
379 case IDMGMT_GET_MODEL_ID:
381 p_pipe_info->reg_index = MODEL_ID_INDEX;
382 id_pipe_id = p_identity_info->pipe_id ;
384 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
385 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
386 if(NFCSTATUS_PENDING == status )
388 p_identity_info->id_next_seq = IDMGMT_GET_GATES_LIST;
389 /* status = NFCSTATUS_SUCCESS; */
393 case IDMGMT_GET_GATES_LIST:
395 p_pipe_info->reg_index = GATES_LIST_INDEX;
396 id_pipe_id = p_identity_info->pipe_id ;
398 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
399 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
400 if(NFCSTATUS_PENDING == status )
402 p_identity_info->id_next_seq = IDMGMT_GET_FULL_VERSION;
403 /* status = NFCSTATUS_SUCCESS; */
407 case IDMGMT_GET_FULL_VERSION:
409 p_pipe_info->reg_index = FULL_VERSION_INDEX;
410 id_pipe_id = p_identity_info->pipe_id ;
412 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
413 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
414 if(NFCSTATUS_PENDING == status )
416 p_identity_info->id_next_seq = IDMGMT_PIPE_CLOSE;
417 status = NFCSTATUS_SUCCESS;
424 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_SEQUENCE);
428 }/* End of the Sequence Switch */
429 }/* End of Pipe Info Memory Check */
431 }/* End of the Identity Info Memory Check */
433 } /* End of Null Context Check */
441 * \brief Initialisation of Identity Managment Gate.
443 * This function initialses the Identity Management gate and
444 * populates the Identity Management Information Structure
449 phHciNfc_IDMgmt_Info_Sequence(
450 phHciNfc_sContext_t *psHciContext,
454 NFCSTATUS status = NFCSTATUS_SUCCESS;
455 phHciNfc_Pipe_Info_t *p_pipe_info = NULL;
456 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
457 uint8_t id_pipe_id = (uint8_t)HCI_UNKNOWN_PIPE_ID;
459 if( NULL == psHciContext )
461 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
466 if( NULL == psHciContext->p_identity_info )
468 status = PHNFCSTVAL(CID_NFC_HCI,
469 NFCSTATUS_INVALID_HCI_INFORMATION);
473 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
474 psHciContext->p_identity_info ;
475 p_pipe_info = p_identity_info->p_pipe_info;
476 if(NULL == p_pipe_info )
478 status = PHNFCSTVAL(CID_NFC_HCI,
479 NFCSTATUS_NOT_ALLOWED);
483 switch(p_identity_info->id_cur_seq )
485 case IDMGMT_GET_FW_VERSION:
487 p_pipe_info->reg_index = FW_VERSION_INDEX;
488 id_pipe_id = p_identity_info->pipe_id ;
490 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
491 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
492 if(NFCSTATUS_PENDING == status )
494 p_identity_info->id_next_seq = IDMGMT_GET_HW_VERSION;
495 /* status = NFCSTATUS_SUCCESS; */
499 case IDMGMT_GET_HW_VERSION:
501 p_pipe_info->reg_index = HW_VERSION_INDEX;
502 id_pipe_id = p_identity_info->pipe_id ;
504 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
505 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
506 if(NFCSTATUS_PENDING == status )
508 p_identity_info->id_next_seq = IDMGMT_GET_HCI_VERSION;
509 /* status = NFCSTATUS_SUCCESS; */
513 case IDMGMT_GET_HCI_VERSION:
515 p_pipe_info->reg_index = HCI_VERSION_INDEX;
516 id_pipe_id = p_identity_info->pipe_id ;
518 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
519 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
520 if(NFCSTATUS_PENDING == status )
522 p_identity_info->id_next_seq = IDMGMT_GET_VENDOR_NAME;
523 /* status = NFCSTATUS_SUCCESS; */
527 case IDMGMT_GET_VENDOR_NAME:
529 p_pipe_info->reg_index = VENDOR_NAME_INDEX;
530 id_pipe_id = p_identity_info->pipe_id ;
532 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
533 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
534 if(NFCSTATUS_PENDING == status )
536 p_identity_info->id_next_seq = IDMGMT_GET_MODEL_ID;
537 /* status = NFCSTATUS_SUCCESS; */
541 case IDMGMT_GET_MODEL_ID:
543 p_pipe_info->reg_index = MODEL_ID_INDEX;
544 id_pipe_id = p_identity_info->pipe_id ;
546 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
547 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
548 if(NFCSTATUS_PENDING == status )
550 p_identity_info->id_next_seq = IDMGMT_GET_GATES_LIST;
551 /* status = NFCSTATUS_SUCCESS; */
555 case IDMGMT_GET_GATES_LIST:
557 p_pipe_info->reg_index = GATES_LIST_INDEX;
558 id_pipe_id = p_identity_info->pipe_id ;
560 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
561 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
562 if(NFCSTATUS_PENDING == status )
564 p_identity_info->id_next_seq = IDMGMT_GET_FULL_VERSION;
565 /* status = NFCSTATUS_SUCCESS; */
569 case IDMGMT_GET_FULL_VERSION:
571 p_pipe_info->reg_index = FULL_VERSION_INDEX;
572 id_pipe_id = p_identity_info->pipe_id ;
574 phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
575 id_pipe_id, (uint8_t)ANY_GET_PARAMETER );
576 if(NFCSTATUS_PENDING == status )
578 p_identity_info->id_next_seq = IDMGMT_PIPE_CLOSE;
579 status = NFCSTATUS_SUCCESS;
585 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_SEQUENCE);
589 }/* End of the Sequence Switch */
590 }/* End of Pipe Info Memory Check */
592 }/* End of the Identity Info Memory Check */
594 } /* End of Null Context Check */
600 * \brief Releases the resources allocated the Identity Management.
602 * This function Releases the resources allocated the Identity Management.
606 phHciNfc_IDMgmt_Release(
607 phHciNfc_sContext_t *psHciContext,
611 NFCSTATUS status = NFCSTATUS_SUCCESS;
612 phHciNfc_Pipe_Info_t *p_pipe_info = NULL;
613 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
614 /* static phHciNfc_IDMgmt_Seq_t identity_init_seq = IDMGMT_PIPE_CREATE; */
616 if( (NULL == psHciContext) || (NULL == pHwRef) )
618 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
622 if( NULL != psHciContext->p_identity_info )
624 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
625 psHciContext->p_identity_info ;
626 p_pipe_info = p_identity_info->p_pipe_info;
628 status = phHciNfc_Close_Pipe( psHciContext,
629 pHwRef, p_pipe_info );
633 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_NOT_ALLOWED);
635 }/* End of the Identity Info Memory Check */
637 } /* End of Null Context Check */
644 * \brief Receives the HCI Response from the corresponding peripheral device.
646 * This function receives the HCI Command Response from the connected NFC
647 * Pheripheral device.
651 phHciNfc_Recv_IDMgmt_Response(
662 phHciNfc_sContext_t *psHciContext =
663 (phHciNfc_sContext_t *)psContext ;
664 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
665 NFCSTATUS status = NFCSTATUS_SUCCESS;
666 uint8_t prev_cmd = ANY_GET_PARAMETER;
668 if( (NULL == psHciContext) || (NULL == pHwRef) )
670 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
672 else if( NULL == psHciContext->p_identity_info )
674 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_FEATURE_NOT_SUPPORTED);
678 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
679 psHciContext->p_identity_info ;
680 if( NULL != p_identity_info->p_pipe_info)
682 prev_cmd = p_identity_info->p_pipe_info->prev_msg ;
685 case ANY_GET_PARAMETER:
687 status = phHciNfc_IDMgmt_InfoUpdate(psHciContext,
688 (phHal_sHwReference_t *)pHwRef,
689 p_identity_info->p_pipe_info->reg_index,
690 &pResponse[HCP_HEADER_LEN],
691 (uint8_t)(length - HCP_HEADER_LEN));
694 case ANY_SET_PARAMETER:
696 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_FEATURE_NOT_SUPPORTED);
709 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_RESPONSE);
713 if( NFCSTATUS_SUCCESS == status )
715 p_identity_info->p_pipe_info->prev_status = NFCSTATUS_SUCCESS;
716 p_identity_info->id_cur_seq = p_identity_info->id_next_seq;
723 /* Function to Update the Pipe Information */
725 phHciNfc_IDMgmt_Update_PipeInfo(
726 phHciNfc_sContext_t *psHciContext,
728 phHciNfc_Pipe_Info_t *pPipeInfo
731 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
732 NFCSTATUS status = NFCSTATUS_SUCCESS;
734 if( NULL == psHciContext )
736 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
738 else if ( NULL == psHciContext->p_identity_info )
740 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_INFORMATION);
744 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
745 psHciContext->p_identity_info ;
746 /* Update the pipe_id of the ID Mgmt Gate obtained from the HCI Response */
747 p_identity_info->pipe_id = pipe_id;
748 p_identity_info->p_pipe_info = pPipeInfo;
749 if ( NULL != pPipeInfo)
751 /* Update the Response Receive routine of the IDMgmt Gate */
752 pPipeInfo->recv_resp = &phHciNfc_Recv_IDMgmt_Response;
761 phHciNfc_IDMgmt_InfoUpdate(
762 phHciNfc_sContext_t *psHciContext,
763 phHal_sHwReference_t *pHwRef,
769 phHciNfc_IDMgmt_Info_t *p_identity_info=NULL;
770 NFCSTATUS status = NFCSTATUS_SUCCESS;
772 if( (NULL == psHciContext)
773 || (NULL == reg_value)
777 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_PARAMETER);
779 else if ( NULL == psHciContext->p_identity_info )
781 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_INFORMATION);
785 p_identity_info = (phHciNfc_IDMgmt_Info_t *)
786 psHciContext->p_identity_info ;
790 case FW_VERSION_INDEX :
792 HCI_PRINT_BUFFER("\tFW Version:",reg_value,reg_length);
793 for(i=0 ;(reg_length == VERSION_LEN)&&(i < reg_length); i++)
795 p_identity_info->fw_version |=
796 (uint32_t)(reg_value[VERSION_LEN - i - 1] << (BYTE_SIZE * i));
798 pHwRef->device_info.fw_version = p_identity_info->fw_version ;
801 case HW_VERSION_INDEX :
803 HCI_PRINT_BUFFER("\tHW Version:",reg_value,reg_length);
804 for(i=0 ;(reg_length == VERSION_LEN)&&(i < reg_length); i++)
806 p_identity_info->hw_version |=
807 (uint32_t)(reg_value[VERSION_LEN - i - 1] << (BYTE_SIZE * i));
809 pHwRef->device_info.hw_version = p_identity_info->hw_version ;
812 case VENDOR_NAME_INDEX :
814 for(i=0 ;(reg_length <= VENDOR_NAME_LEN)&&(i < reg_length); i++)
816 p_identity_info->vendor_name[i] = reg_value[i];
817 pHwRef->device_info.vendor_name[i]= reg_value[i];
819 HCI_DEBUG("\tVendor Name:%s",p_identity_info->vendor_name);
822 case MODEL_ID_INDEX :
824 HCI_PRINT_BUFFER("\tModel ID:",reg_value,reg_length);
825 p_identity_info->model_id = reg_value[i] ;
826 pHwRef->device_info.model_id = p_identity_info->model_id ;
827 #ifndef NXP_HAL_ENABLE_SMX
828 if( NFC_HW_PN65N == pHwRef->device_info.model_id)
831 pHwRef->smx_connected = TRUE;
835 case HCI_VERSION_INDEX :
837 HCI_PRINT_BUFFER("\tHCI Version:",reg_value,reg_length);
838 p_identity_info->hci_version = reg_value[i] ;
839 pHwRef->device_info.hci_version = p_identity_info->hci_version ;
842 case GATES_LIST_INDEX :
844 HCI_PRINT_BUFFER("\tGates List:",reg_value,reg_length);
845 for(i=0 ;(reg_length <= GATES_LIST_LEN)&&(i < reg_length); i++)
847 p_identity_info->gates_list[i] = reg_value[i];
851 case FULL_VERSION_INDEX :
853 HCI_PRINT_BUFFER("\tVERSION INFO:",reg_value,reg_length);
854 for(i=0 ;(reg_length <= NXP_FULL_VERSION_LEN)&&(i < reg_length); i++)
856 p_identity_info->full_version[i] = reg_value[i];
857 pHwRef->device_info.full_version[i]= reg_value[i];
863 status = PHNFCSTVAL(CID_NFC_HCI, NFCSTATUS_INVALID_HCI_INFORMATION);
865 } /*End of the default Switch Case */
867 } /*End of the Index Switch */
869 } /* End of Context and the Identity information validity check */