Home | History | Annotate | Download | only in int
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2010-2014 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  This is the private interface file for the NFA EE.
     22  *
     23  ******************************************************************************/
     24 #ifndef NFA_EE_INT_H
     25 #define NFA_EE_INT_H
     26 #include "nfa_ee_api.h"
     27 #include "nfa_sys.h"
     28 #include "nfc_api.h"
     29 
     30 /*****************************************************************************
     31 **  Constants and data types
     32 *****************************************************************************/
     33 #define NFA_EE_DEBUG BT_TRACE_VERBOSE
     34 /* the number of tNFA_EE_ECBs (for NFCEEs and DH) */
     35 #define NFA_EE_NUM_ECBS (NFA_EE_MAX_EE_SUPPORTED + 1)
     36 /* The index for DH in nfa_ee_cb.ee_cb[] */
     37 #define NFA_EE_CB_4_DH NFA_EE_MAX_EE_SUPPORTED
     38 #define NFA_EE_INVALID 0xFF
     39 /* only A, B, F, Bprime are supported by UICC now */
     40 #define NFA_EE_MAX_TECH_ROUTE 4
     41 
     42 #ifndef NFA_EE_AID_CFG_TAG_NAME
     43 /* AID                             */
     44 #define NFA_EE_AID_CFG_TAG_NAME 0x4F
     45 #endif
     46 
     47 /* NFA EE events */
     48 enum {
     49   NFA_EE_API_DISCOVER_EVT = NFA_SYS_EVT_START(NFA_ID_EE),
     50   NFA_EE_API_REGISTER_EVT,
     51   NFA_EE_API_DEREGISTER_EVT,
     52   NFA_EE_API_MODE_SET_EVT,
     53   NFA_EE_API_SET_TECH_CFG_EVT,
     54   NFA_EE_API_SET_PROTO_CFG_EVT,
     55   NFA_EE_API_ADD_AID_EVT,
     56   NFA_EE_API_REMOVE_AID_EVT,
     57   NFA_EE_API_LMRT_SIZE_EVT,
     58   NFA_EE_API_UPDATE_NOW_EVT,
     59   NFA_EE_API_CONNECT_EVT,
     60   NFA_EE_API_SEND_DATA_EVT,
     61   NFA_EE_API_DISCONNECT_EVT,
     62 
     63   NFA_EE_NCI_DISC_RSP_EVT,
     64   NFA_EE_NCI_DISC_NTF_EVT,
     65   NFA_EE_NCI_MODE_SET_RSP_EVT,
     66   NFA_EE_NCI_CONN_EVT,
     67   NFA_EE_NCI_DATA_EVT,
     68   NFA_EE_NCI_ACTION_NTF_EVT,
     69   NFA_EE_NCI_DISC_REQ_NTF_EVT,
     70   NFA_EE_NCI_WAIT_RSP_EVT,
     71 
     72   NFA_EE_ROUT_TIMEOUT_EVT,
     73   NFA_EE_DISCV_TIMEOUT_EVT,
     74   NFA_EE_CFG_TO_NFCC_EVT,
     75   NFA_EE_MAX_EVT
     76 
     77 };
     78 
     79 typedef uint16_t tNFA_EE_INT_EVT;
     80 /* for listen mode routing table*/
     81 #define NFA_EE_AE_ROUTE 0x80
     82 #define NFA_EE_AE_VS 0x40
     83 
     84 /* NFA EE Management state */
     85 enum {
     86   NFA_EE_EM_STATE_INIT = 0,
     87   NFA_EE_EM_STATE_INIT_DONE,
     88   NFA_EE_EM_STATE_RESTORING,
     89   NFA_EE_EM_STATE_DISABLING,
     90   NFA_EE_EM_STATE_DISABLED,
     91 
     92   NFA_EE_EM_STATE_MAX
     93 };
     94 typedef uint8_t tNFA_EE_EM_STATE;
     95 
     96 /* NFA EE connection status */
     97 enum {
     98   NFA_EE_CONN_ST_NONE, /* not connected */
     99   NFA_EE_CONN_ST_WAIT, /* connection is initiated; waiting for ack */
    100   NFA_EE_CONN_ST_CONN, /* connected; can send/receive data */
    101   NFA_EE_CONN_ST_DISC, /* disconnecting; waiting for ack */
    102   NFA_EE_CONN_ST_MAX
    103 };
    104 typedef uint8_t tNFA_EE_CONN_ST;
    105 
    106 #define NFA_EE_MAX_AID_CFG_LEN (510)
    107 #define NFA_EE_7816_STATUS_LEN (2)
    108 
    109 /* NFA EE control block flags:
    110  * use to indicate an API function has changed the configuration of the
    111  * associated NFCEE
    112  * The flags are cleared when the routing table/VS is updated */
    113 /* technology routing changed         */
    114 #define NFA_EE_ECB_FLAGS_TECH 0x02
    115 /* protocol routing changed           */
    116 #define NFA_EE_ECB_FLAGS_PROTO 0x04
    117 /* AID routing changed                */
    118 #define NFA_EE_ECB_FLAGS_AID 0x08
    119 /* VS changed                         */
    120 #define NFA_EE_ECB_FLAGS_VS 0x10
    121 /* Restore related                    */
    122 #define NFA_EE_ECB_FLAGS_RESTORE 0x20
    123 /* routing flags changed              */
    124 #define NFA_EE_ECB_FLAGS_ROUTING 0x0E
    125 /* NFCEE Discover Request NTF is set  */
    126 #define NFA_EE_ECB_FLAGS_DISC_REQ 0x40
    127 /* DISC_REQ N reported before DISC N  */
    128 #define NFA_EE_ECB_FLAGS_ORDER 0x80
    129 typedef uint8_t tNFA_EE_ECB_FLAGS;
    130 
    131 /* part of tNFA_EE_STATUS; for internal use only  */
    132 /* waiting for restore to full power mode to complete */
    133 #define NFA_EE_STATUS_RESTORING 0x20
    134 /* this bit is in ee_status for internal use only */
    135 #define NFA_EE_STATUS_INT_MASK 0x20
    136 
    137 /* NFA-EE information for a particular NFCEE Entity (including DH) */
    138 typedef struct {
    139   tNFA_TECHNOLOGY_MASK
    140       tech_switch_on; /* default routing - technologies switch_on  */
    141   tNFA_TECHNOLOGY_MASK
    142       tech_switch_off; /* default routing - technologies switch_off */
    143   tNFA_TECHNOLOGY_MASK
    144       tech_battery_off; /* default routing - technologies battery_off*/
    145   tNFA_PROTOCOL_MASK
    146       proto_switch_on; /* default routing - protocols switch_on     */
    147   tNFA_PROTOCOL_MASK
    148       proto_switch_off; /* default routing - protocols switch_off    */
    149   tNFA_PROTOCOL_MASK
    150       proto_battery_off;     /* default routing - protocols battery_off   */
    151   tNFA_EE_CONN_ST conn_st;   /* connection status */
    152   uint8_t conn_id;           /* connection id */
    153   tNFA_EE_CBACK* p_ee_cback; /* the callback function */
    154 
    155   /* Each AID entry has an ssociated aid_len, aid_pwr_cfg, aid_rt_info.
    156    * aid_cfg[] contains AID and maybe some other VS information in TLV format
    157    * The first T is always NFA_EE_AID_CFG_TAG_NAME, the L is the actual AID
    158    * length
    159    * the aid_len is the total length of all the TLVs associated with this AID
    160    * entry
    161    */
    162   uint8_t aid_len[NFA_EE_MAX_AID_ENTRIES]; /* the actual lengths in aid_cfg */
    163   uint8_t aid_pwr_cfg[NFA_EE_MAX_AID_ENTRIES]; /* power configuration of this
    164                                                   AID entry */
    165   uint8_t aid_rt_info[NFA_EE_MAX_AID_ENTRIES]; /* route/vs info for this AID
    166                                                   entry */
    167   uint8_t aid_cfg[NFA_EE_MAX_AID_CFG_LEN]; /* routing entries based on AID */
    168   uint8_t aid_entries;   /* The number of AID entries in aid_cfg */
    169   uint8_t nfcee_id;      /* ID for this NFCEE */
    170   uint8_t ee_status;     /* The NFCEE status */
    171   uint8_t ee_old_status; /* The NFCEE status before going to low power mode */
    172   tNFA_EE_INTERFACE
    173       ee_interface[NFC_MAX_EE_INTERFACE]; /* NFCEE supported interface */
    174   tNFA_EE_TLV ee_tlv[NFC_MAX_EE_TLVS];    /* the TLV */
    175   uint8_t num_interface;                  /* number of Target interface */
    176   uint8_t num_tlvs;                       /* number of TLVs */
    177   tNFA_EE_ECB_FLAGS ecb_flags;            /* the flags of this control block */
    178   tNFA_EE_INTERFACE use_interface; /* NFCEE interface used for the connection */
    179   tNFA_NFC_PROTOCOL la_protocol;   /* Listen A protocol    */
    180   tNFA_NFC_PROTOCOL lb_protocol;   /* Listen B protocol    */
    181   tNFA_NFC_PROTOCOL lf_protocol;   /* Listen F protocol    */
    182   tNFA_NFC_PROTOCOL lbp_protocol;  /* Listen B' protocol   */
    183   uint8_t size_mask; /* the size for technology and protocol routing */
    184   uint16_t size_aid; /* the size for aid routing */
    185   uint8_t aid_info[NFA_EE_MAX_AID_ENTRIES]; /* Aid Info Prefix/Suffix/Exact */
    186 } tNFA_EE_ECB;
    187 
    188 /* data type for NFA_EE_API_DISCOVER_EVT */
    189 typedef struct {
    190   NFC_HDR hdr;
    191   tNFA_EE_CBACK* p_cback;
    192 } tNFA_EE_API_DISCOVER;
    193 
    194 /* data type for NFA_EE_API_REGISTER_EVT */
    195 typedef struct {
    196   NFC_HDR hdr;
    197   tNFA_EE_CBACK* p_cback;
    198 } tNFA_EE_API_REGISTER;
    199 
    200 /* data type for NFA_EE_API_DEREGISTER_EVT */
    201 typedef struct {
    202   NFC_HDR hdr;
    203   int index;
    204 } tNFA_EE_API_DEREGISTER;
    205 
    206 /* data type for NFA_EE_API_MODE_SET_EVT */
    207 typedef struct {
    208   NFC_HDR hdr;
    209   tNFA_EE_ECB* p_cb;
    210   uint8_t nfcee_id;
    211   uint8_t mode;
    212 } tNFA_EE_API_MODE_SET;
    213 
    214 /* data type for NFA_EE_API_SET_TECH_CFG_EVT */
    215 typedef struct {
    216   NFC_HDR hdr;
    217   tNFA_EE_ECB* p_cb;
    218   uint8_t nfcee_id;
    219   tNFA_TECHNOLOGY_MASK technologies_switch_on;
    220   tNFA_TECHNOLOGY_MASK technologies_switch_off;
    221   tNFA_TECHNOLOGY_MASK technologies_battery_off;
    222 } tNFA_EE_API_SET_TECH_CFG;
    223 
    224 /* data type for NFA_EE_API_SET_PROTO_CFG_EVT */
    225 typedef struct {
    226   NFC_HDR hdr;
    227   tNFA_EE_ECB* p_cb;
    228   uint8_t nfcee_id;
    229   tNFA_PROTOCOL_MASK protocols_switch_on;
    230   tNFA_PROTOCOL_MASK protocols_switch_off;
    231   tNFA_PROTOCOL_MASK protocols_battery_off;
    232 } tNFA_EE_API_SET_PROTO_CFG;
    233 
    234 /* data type for NFA_EE_API_ADD_AID_EVT */
    235 typedef struct {
    236   NFC_HDR hdr;
    237   tNFA_EE_ECB* p_cb;
    238   uint8_t nfcee_id;
    239   uint8_t aid_len;
    240   uint8_t* p_aid;
    241   tNFA_EE_PWR_STATE power_state;
    242   uint8_t aidInfo;
    243 } tNFA_EE_API_ADD_AID;
    244 
    245 /* data type for NFA_EE_API_REMOVE_AID_EVT */
    246 typedef struct {
    247   NFC_HDR hdr;
    248   uint8_t aid_len;
    249   uint8_t* p_aid;
    250 } tNFA_EE_API_REMOVE_AID;
    251 
    252 /* data type for NFA_EE_API_LMRT_SIZE_EVT */
    253 typedef NFC_HDR tNFA_EE_API_LMRT_SIZE;
    254 
    255 /* data type for NFA_EE_API_CONNECT_EVT */
    256 typedef struct {
    257   NFC_HDR hdr;
    258   tNFA_EE_ECB* p_cb;
    259   uint8_t nfcee_id;
    260   uint8_t ee_interface;
    261   tNFA_EE_CBACK* p_cback;
    262 } tNFA_EE_API_CONNECT;
    263 
    264 /* data type for NFA_EE_API_SEND_DATA_EVT */
    265 typedef struct {
    266   NFC_HDR hdr;
    267   tNFA_EE_ECB* p_cb;
    268   uint8_t nfcee_id;
    269   uint16_t data_len;
    270   uint8_t* p_data;
    271 } tNFA_EE_API_SEND_DATA;
    272 
    273 /* data type for NFA_EE_API_DISCONNECT_EVT */
    274 typedef struct {
    275   NFC_HDR hdr;
    276   tNFA_EE_ECB* p_cb;
    277   uint8_t nfcee_id;
    278 } tNFA_EE_API_DISCONNECT;
    279 
    280 typedef struct {
    281   NFC_HDR hdr;
    282   tNFC_STATUS status; /* The event status. */
    283 } tNFA_EE_MSG_STATUS;
    284 
    285 /* common data type for internal events with nfa_ee_use_cfg_cb[] as TRUE */
    286 typedef struct {
    287   NFC_HDR hdr;
    288   tNFA_EE_ECB* p_cb;
    289   uint8_t nfcee_id;
    290 } tNFA_EE_CFG_HDR;
    291 
    292 /* data type for tNFC_RESPONSE_EVT */
    293 typedef struct {
    294   NFC_HDR hdr;
    295   void* p_data;
    296 } tNFA_EE_NCI_RESPONSE;
    297 
    298 /* data type for NFA_EE_NCI_DISC_RSP_EVT */
    299 typedef struct {
    300   NFC_HDR hdr;
    301   tNFC_NFCEE_DISCOVER_REVT* p_data;
    302 } tNFA_EE_NCI_DISC_RSP;
    303 
    304 /* data type for NFA_EE_NCI_DISC_NTF_EVT */
    305 typedef struct {
    306   NFC_HDR hdr;
    307   tNFC_NFCEE_INFO_REVT* p_data;
    308 } tNFA_EE_NCI_DISC_NTF;
    309 
    310 /* data type for NFA_EE_NCI_MODE_SET_RSP_EVT */
    311 typedef struct {
    312   NFC_HDR hdr;
    313   tNFC_NFCEE_MODE_SET_REVT* p_data;
    314 } tNFA_EE_NCI_MODE_SET;
    315 
    316 /* data type for NFA_EE_NCI_WAIT_RSP_EVT */
    317 typedef struct {
    318   NFC_HDR hdr;
    319   void* p_data;
    320   uint8_t opcode;
    321 } tNFA_EE_NCI_WAIT_RSP;
    322 
    323 /* data type for NFA_EE_NCI_CONN_EVT and NFA_EE_NCI_DATA_EVT */
    324 typedef struct {
    325   NFC_HDR hdr;
    326   uint8_t conn_id;
    327   tNFC_CONN_EVT event;
    328   tNFC_CONN* p_data;
    329 } tNFA_EE_NCI_CONN;
    330 
    331 /* data type for NFA_EE_NCI_ACTION_NTF_EVT */
    332 typedef struct {
    333   NFC_HDR hdr;
    334   tNFC_EE_ACTION_REVT* p_data;
    335 } tNFA_EE_NCI_ACTION;
    336 
    337 /* data type for NFA_EE_NCI_DISC_REQ_NTF_EVT */
    338 typedef struct {
    339   NFC_HDR hdr;
    340   tNFC_EE_DISCOVER_REQ_REVT* p_data;
    341 } tNFA_EE_NCI_DISC_REQ;
    342 
    343 /* union of all event data types */
    344 typedef union {
    345   NFC_HDR hdr;
    346   tNFA_EE_CFG_HDR cfg_hdr;
    347   tNFA_EE_API_DISCOVER ee_discover;
    348   tNFA_EE_API_REGISTER ee_register;
    349   tNFA_EE_API_DEREGISTER deregister;
    350   tNFA_EE_API_MODE_SET mode_set;
    351   tNFA_EE_API_SET_TECH_CFG set_tech;
    352   tNFA_EE_API_SET_PROTO_CFG set_proto;
    353   tNFA_EE_API_ADD_AID add_aid;
    354   tNFA_EE_API_REMOVE_AID rm_aid;
    355   tNFA_EE_API_LMRT_SIZE lmrt_size;
    356   tNFA_EE_API_CONNECT connect;
    357   tNFA_EE_API_SEND_DATA send_data;
    358   tNFA_EE_API_DISCONNECT disconnect;
    359   tNFA_EE_NCI_DISC_RSP disc_rsp;
    360   tNFA_EE_NCI_DISC_NTF disc_ntf;
    361   tNFA_EE_NCI_MODE_SET mode_set_rsp;
    362   tNFA_EE_NCI_WAIT_RSP wait_rsp;
    363   tNFA_EE_NCI_CONN conn;
    364   tNFA_EE_NCI_ACTION act;
    365   tNFA_EE_NCI_DISC_REQ disc_req;
    366 } tNFA_EE_MSG;
    367 
    368 /* type for State Machine (SM) action functions */
    369 typedef void (*tNFA_EE_SM_ACT)(tNFA_EE_MSG* p_data);
    370 
    371 /*****************************************************************************
    372 **  control block
    373 *****************************************************************************/
    374 #define NFA_EE_CFGED_UPDATE_NOW 0x80
    375 /* either switch off or battery off is configured */
    376 #define NFA_EE_CFGED_OFF_ROUTING 0x40
    377 
    378 /* the following status are the definition used in ee_cfg_sts */
    379 #define NFA_EE_STS_CHANGED_ROUTING 0x01
    380 #define NFA_EE_STS_CHANGED_VS 0x02
    381 #define NFA_EE_STS_CHANGED 0x0f
    382 #define NFA_EE_STS_PREV_ROUTING 0x10
    383 #define NFA_EE_STS_PREV 0xf0
    384 
    385 /* need to report NFA_EE_UPDATED_EVT */
    386 #define NFA_EE_WAIT_UPDATE 0x10
    387 /* waiting for the rsp of set routing commands */
    388 #define NFA_EE_WAIT_UPDATE_RSP 0x20
    389 #define NFA_EE_WAIT_UPDATE_ALL 0xF0
    390 
    391 typedef uint8_t tNFA_EE_WAIT;
    392 
    393 /* set this bit when waiting for HCI to finish the initialization process in
    394  * NFA_EE_EM_STATE_RESTORING */
    395 #define NFA_EE_FLAG_WAIT_HCI 0x01
    396 /* set this bit when EE needs to notify the p_enable_cback at the end of NFCEE
    397  * discover process in NFA_EE_EM_STATE_RESTORING */
    398 #define NFA_EE_FLAG_NOTIFY_HCI 0x02
    399 /* set this bit when gracefully disable with outstanding NCI connections */
    400 #define NFA_EE_FLAG_WAIT_DISCONN 0x04
    401 typedef uint8_t tNFA_EE_FLAGS;
    402 
    403 /* NFCEE DISCOVER in progress       */
    404 #define NFA_EE_DISC_STS_ON 0x00
    405 /* disable NFCEE DISCOVER           */
    406 #define NFA_EE_DISC_STS_OFF 0x01
    407 /* received NFCEE DISCOVER REQ NTF  */
    408 #define NFA_EE_DISC_STS_REQ 0x02
    409 typedef uint8_t tNFA_EE_DISC_STS;
    410 
    411 typedef void(tNFA_EE_ENABLE_DONE_CBACK)(tNFA_EE_DISC_STS status);
    412 
    413 /* NFA EE Management control block */
    414 typedef struct {
    415   tNFA_EE_ECB ecb[NFA_EE_NUM_ECBS]; /* control block for DH and NFCEEs  */
    416   TIMER_LIST_ENT timer;             /* timer to send info to NFCC       */
    417   TIMER_LIST_ENT discv_timer;       /* timer to end NFCEE discovery     */
    418   tNFA_EE_CBACK* p_ee_cback[NFA_EE_MAX_CBACKS]; /* to report EE events       */
    419   tNFA_EE_CBACK* p_ee_disc_cback; /* to report EE discovery result    */
    420   tNFA_EE_ENABLE_DONE_CBACK*
    421       p_enable_cback;        /* callback to notify on enable done*/
    422   tNFA_EE_EM_STATE em_state; /* NFA-EE state initialized or not  */
    423   uint8_t wait_rsp;          /* num of NCI rsp expected (update) */
    424   uint8_t num_ee_expecting;  /* number of ee_info still expecting*/
    425   uint8_t cur_ee;            /* the number of ee_info in cb      */
    426   uint8_t ee_cfged;          /* the bit mask of configured ECBs  */
    427   uint8_t ee_cfg_sts;        /* configuration status             */
    428   tNFA_EE_WAIT ee_wait_evt;  /* Pending event(s) to be reported  */
    429   tNFA_EE_FLAGS ee_flags;    /* flags                            */
    430   uint8_t route_block_control; /* controls route block feature   */
    431 } tNFA_EE_CB;
    432 
    433 /* Order of Routing entries in Routing Table */
    434 #define NCI_ROUTE_ORDER_AID 0x01        /* AID routing order */
    435 #define NCI_ROUTE_ORDER_PATTERN 0x02    /* Pattern routing order*/
    436 #define NCI_ROUTE_ORDER_SYS_CODE 0x03   /* System Code routing order*/
    437 #define NCI_ROUTE_ORDER_PROTOCOL 0x04   /* Protocol routing order*/
    438 #define NCI_ROUTE_ORDER_TECHNOLOGY 0x05 /* Technology routing order*/
    439 
    440 /*****************************************************************************
    441 **  External variables
    442 *****************************************************************************/
    443 
    444 /* NFA EE control block */
    445 extern tNFA_EE_CB nfa_ee_cb;
    446 
    447 /*****************************************************************************
    448 **  External functions
    449 *****************************************************************************/
    450 /* function prototypes - exported from nfa_ee_main.c */
    451 void nfa_ee_sys_enable(void);
    452 void nfa_ee_sys_disable(void);
    453 
    454 /* event handler function type */
    455 bool nfa_ee_evt_hdlr(NFC_HDR* p_msg);
    456 void nfa_ee_proc_nfcc_power_mode(uint8_t nfcc_power_mode);
    457 #if (NFC_NFCEE_INCLUDED == TRUE)
    458 void nfa_ee_get_tech_route(uint8_t power_state, uint8_t* p_handles);
    459 #endif
    460 void nfa_ee_proc_evt(tNFC_RESPONSE_EVT event, void* p_data);
    461 tNFA_EE_ECB* nfa_ee_find_ecb(uint8_t nfcee_id);
    462 tNFA_EE_ECB* nfa_ee_find_ecb_by_conn_id(uint8_t conn_id);
    463 uint8_t nfa_ee_ecb_to_mask(tNFA_EE_ECB* p_cb);
    464 void nfa_ee_restore_one_ecb(tNFA_EE_ECB* p_cb);
    465 bool nfa_ee_is_active(tNFA_HANDLE nfcee_id);
    466 
    467 /* Action function prototypes - nfa_ee_act.c */
    468 void nfa_ee_api_discover(tNFA_EE_MSG* p_data);
    469 void nfa_ee_api_register(tNFA_EE_MSG* p_data);
    470 void nfa_ee_api_deregister(tNFA_EE_MSG* p_data);
    471 void nfa_ee_api_mode_set(tNFA_EE_MSG* p_data);
    472 void nfa_ee_api_set_tech_cfg(tNFA_EE_MSG* p_data);
    473 void nfa_ee_api_set_proto_cfg(tNFA_EE_MSG* p_data);
    474 void nfa_ee_api_add_aid(tNFA_EE_MSG* p_data);
    475 void nfa_ee_api_remove_aid(tNFA_EE_MSG* p_data);
    476 void nfa_ee_api_lmrt_size(tNFA_EE_MSG* p_data);
    477 void nfa_ee_api_update_now(tNFA_EE_MSG* p_data);
    478 void nfa_ee_api_connect(tNFA_EE_MSG* p_data);
    479 void nfa_ee_api_send_data(tNFA_EE_MSG* p_data);
    480 void nfa_ee_api_disconnect(tNFA_EE_MSG* p_data);
    481 void nfa_ee_report_disc_done(bool notify_sys);
    482 void nfa_ee_nci_disc_rsp(tNFA_EE_MSG* p_data);
    483 void nfa_ee_nci_disc_ntf(tNFA_EE_MSG* p_data);
    484 void nfa_ee_nci_mode_set_rsp(tNFA_EE_MSG* p_data);
    485 void nfa_ee_nci_wait_rsp(tNFA_EE_MSG* p_data);
    486 void nfa_ee_nci_conn(tNFA_EE_MSG* p_data);
    487 void nfa_ee_nci_action_ntf(tNFA_EE_MSG* p_data);
    488 void nfa_ee_nci_disc_req_ntf(tNFA_EE_MSG* p_data);
    489 void nfa_ee_rout_timeout(tNFA_EE_MSG* p_data);
    490 void nfa_ee_discv_timeout(tNFA_EE_MSG* p_data);
    491 void nfa_ee_lmrt_to_nfcc(tNFA_EE_MSG* p_data);
    492 void nfa_ee_update_rout(void);
    493 void nfa_ee_report_event(tNFA_EE_CBACK* p_cback, tNFA_EE_EVT event,
    494                          tNFA_EE_CBACK_DATA* p_data);
    495 tNFA_EE_ECB* nfa_ee_find_aid_offset(uint8_t aid_len, uint8_t* p_aid,
    496                                     int* p_offset, int* p_entry);
    497 void nfa_ee_remove_labels(void);
    498 int nfa_ee_find_total_aid_len(tNFA_EE_ECB* p_cb, int start_entry);
    499 void nfa_ee_start_timer(void);
    500 void nfa_ee_reg_cback_enable_done(tNFA_EE_ENABLE_DONE_CBACK* p_cback);
    501 void nfa_ee_report_update_evt(void);
    502 
    503 extern void nfa_ee_proc_hci_info_cback(void);
    504 void nfa_ee_check_disable(void);
    505 bool nfa_ee_restore_ntf_done(void);
    506 void nfa_ee_check_restore_complete(void);
    507 
    508 #endif /* NFA_P2P_INT_H */
    509