Lines Matching refs:listen_info_idx
179 UINT8 listen_info_idx;
185 for (listen_info_idx=0; listen_info_idx<NFA_CE_LISTEN_INFO_IDX_INVALID; listen_info_idx++)
187 if ((p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE) &&
188 (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_T4T_AID) &&
189 (p_cb->listen_info[listen_info_idx].t4t_aid_handle == p_ce_data->raw_frame.aid_handle))
191 p_cb->idx_cur_active = listen_info_idx;
199 if (listen_info_idx != NFA_CE_LISTEN_INFO_IDX_INVALID)
367 UINT8 listen_info_idx;
400 for (listen_info_idx=0; listen_info_idx<NFA_CE_LISTEN_INFO_IDX_INVALID; listen_info_idx++)
403 if ( (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE)
404 &&(p_cb->listen_info[listen_info_idx].rf_disc_handle == NFA_HANDLE_INVALID))
406 if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_FELICA)
418 p_cb->listen_info[listen_info_idx].rf_disc_handle = disc_handle;
420 else if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_T4T_AID)
429 p_cb->listen_info[listen_info_idx].rf_disc_handle = disc_handle;
432 else if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_UICC)
435 if (nfa_ee_is_active (p_cb->listen_info[listen_info_idx].ee_handle))
437 if (p_cb->listen_info[listen_info_idx].tech_mask & NFA_TECHNOLOGY_MASK_A)
441 if (p_cb->listen_info[listen_info_idx].tech_mask & NFA_TECHNOLOGY_MASK_B)
445 if (p_cb->listen_info[listen_info_idx].tech_mask & NFA_TECHNOLOGY_MASK_F)
449 if (p_cb->listen_info[listen_info_idx].tech_mask & NFA_TECHNOLOGY_MASK_B_PRIME)
460 (tNFA_DM_DISC_HOST_ID) (p_cb->listen_info[listen_info_idx].ee_handle &0x00FF),
467 p_cb->listen_info[listen_info_idx].rf_disc_handle = disc_handle;
468 p_cb->listen_info[listen_info_idx].tech_proto_mask = listen_mask;
474 p_cb->listen_info[listen_info_idx].ee_handle);
497 UINT8 listen_info_idx;
500 for (listen_info_idx=0; listen_info_idx<NFA_CE_LISTEN_INFO_MAX; listen_info_idx++)
502 if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE)
507 if (listen_info_idx != NFA_CE_LISTEN_INFO_IDX_INVALID)
531 void nfa_ce_remove_listen_info_entry (UINT8 listen_info_idx, BOOLEAN notify_app)
536 NFA_TRACE_DEBUG1 ("NFA_CE: removing listen_info entry %i", listen_info_idx);
542 if (listen_info_idx == NFA_CE_LISTEN_INFO_IDX_NDEF)
545 (*p_cb->listen_info[listen_info_idx].p_conn_cback) (NFA_CE_LOCAL_TAG_CONFIGURED_EVT, &conn_evt);
548 else if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_UICC)
551 (*p_cb->listen_info[listen_info_idx].p_conn_cback) (NFA_CE_UICC_LISTEN_CONFIGURED_EVT, &conn_evt);
556 conn_evt.ce_deregistered.handle = NFA_HANDLE_GROUP_CE | listen_info_idx;
557 (*p_cb->listen_info[listen_info_idx].p_conn_cback) (NFA_CE_DEREGISTERED_EVT, &conn_evt);
563 if (listen_info_idx == NFA_CE_LISTEN_INFO_IDX_NDEF)
569 if (p_cb->listen_info[listen_info_idx].protocol_mask & NFA_PROTOCOL_MASK_T3T)
571 p_cb->listen_info[listen_info_idx].protocol_mask = 0;
581 else if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_FELICA)
583 p_cb->listen_info[listen_info_idx].protocol_mask = 0;
589 else if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_T4T_AID)
592 CE_T4tDeregisterAID (p_cb->listen_info[listen_info_idx].t4t_aid_handle);
595 if (p_cb->listen_info[listen_info_idx].rf_disc_handle != NFA_HANDLE_INVALID )
597 nfa_dm_delete_rf_discover (p_cb->listen_info[listen_info_idx].rf_disc_handle);
598 p_cb->listen_info[listen_info_idx].rf_disc_handle = NFA_HANDLE_INVALID;
602 p_cb->listen_info[listen_info_idx].flags = 0;
753 UINT8 listen_info_idx = NFA_CE_LISTEN_INFO_IDX_INVALID;
770 for (listen_info_idx=0; listen_info_idx<NFA_CE_LISTEN_INFO_IDX_INVALID; listen_info_idx++)
773 if (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE)
775 if (p_cb->listen_info[listen_info_idx].protocol_mask & NFA_PROTOCOL_MASK_T3T)
778 p_nfcid2 = p_cb->listen_info[listen_info_idx].t3t_nfcid2;
779 t3t_system_code = p_cb->listen_info[listen_info_idx].t3t_system_code;
791 if ((p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_UICC) &&
792 (p_cb->listen_info[listen_info_idx].tech_mask & NFA_TECHNOLOGY_MASK_F))
821 listen_info_idx = NFA_CE_LISTEN_INFO_IDX_NDEF;
837 listen_info_idx = i;
845 if (t4t_activate_pending && (listen_info_idx == NFA_CE_LISTEN_INFO_IDX_INVALID))
859 listen_info_idx = i;
866 if ( (listen_info_idx == NFA_CE_LISTEN_INFO_IDX_INVALID)
867 ||((listen_info_idx == NFA_CE_LISTEN_INFO_IDX_NDEF) && !(p_cb->listen_info[NFA_CE_LISTEN_INFO_IDX_NDEF].flags & NFA_CE_LISTEN_INFO_IN_USE)))
869 NFA_TRACE_DEBUG1 ("No listen_info found for this activation. listen_info_idx=%d", listen_info_idx);
873 p_cb->listen_info[listen_info_idx].flags &= ~NFA_CE_LISTEN_INFO_T4T_ACTIVATE_PND;
876 p_cb->p_active_conn_cback = p_cb->listen_info[listen_info_idx].p_conn_cback;
877 p_cb->idx_cur_active = listen_info_idx;
1157 UINT8 listen_info_idx = NFA_CE_LISTEN_INFO_IDX_INVALID;
1179 &&(listen_info_idx == NFA_CE_LISTEN_INFO_IDX_INVALID) )
1181 listen_info_idx = i;
1186 if (listen_info_idx == NFA_CE_LISTEN_INFO_IDX_INVALID)
1206 NFA_TRACE_DEBUG1 ("NFA_CE: adding listen_info entry %i", listen_info_idx);
1211 p_cb->listen_info[listen_info_idx].flags = NFA_CE_LISTEN_INFO_IN_USE | NFA_CE_LISTEN_INFO_START_NTF_PND;
1212 p_cb->listen_info[listen_info_idx].rf_disc_handle = NFA_HANDLE_INVALID;
1213 p_cb->listen_info[listen_info_idx].protocol_mask = 0;
1219 p_cb->listen_info[listen_info_idx].protocol_mask = NFA_PROTOCOL_MASK_ISO_DEP;
1220 p_cb->listen_info[listen_info_idx].flags |= NFA_CE_LISTEN_INFO_T4T_AID;
1221 p_cb->listen_info[listen_info_idx].p_conn_cback =p_ce_msg->reg_listen.p_conn_cback;
1224 if ((p_cb->listen_info[listen_info_idx].t4t_aid_handle = CE_T4tRegisterAID (p_ce_msg->reg_listen.aid_len,
1229 p_cb->listen_info[listen_info_idx].flags = 0;
1241 p_cb->listen_info[listen_info_idx].protocol_mask = NFA_PROTOCOL_MASK_T3T;
1242 p_cb->listen_info[listen_info_idx].flags |= NFA_CE_LISTEN_INFO_FELICA;
1243 p_cb->listen_info[listen_info_idx].p_conn_cback = p_ce_msg->reg_listen.p_conn_cback;
1246 p_cb->listen_info[listen_info_idx].t3t_system_code = p_ce_msg->reg_listen.system_code;
1247 memcpy (p_cb->listen_info[listen_info_idx].t3t_nfcid2, p_ce_msg->reg_listen.nfcid2, NCI_RF_F_UID_LEN);
1252 p_cb->listen_info[listen_info_idx].flags |= NFA_CE_LISTEN_INFO_UICC;
1253 p_cb->listen_info[listen_info_idx].p_conn_cback = &nfa_dm_conn_cback_event_notify;
1256 p_cb->listen_info[listen_info_idx].ee_handle = p_ce_msg->reg_listen.ee_handle;
1257 p_cb->listen_info[listen_info_idx].tech_mask = p_ce_msg->reg_listen.tech_mask;
1267 p_cb->listen_info[listen_info_idx].flags = 0;
1273 (*p_cb->listen_info[listen_info_idx].p_conn_cback) (NFA_CE_UICC_LISTEN_CONFIGURED_EVT, &conn_evt);
1277 conn_evt.ce_registered.handle = NFA_HANDLE_GROUP_CE | listen_info_idx;
1279 (*p_cb->listen_info[listen_info_idx].p_conn_cback) (NFA_CE_REGISTERED_EVT, &conn_evt);
1297 UINT8 listen_info_idx;
1305 for (listen_info_idx = 0; listen_info_idx < NFA_CE_LISTEN_INFO_MAX; listen_info_idx++)
1307 if ( (p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE)
1308 &&(p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_UICC)
1309 &&(p_cb->listen_info[listen_info_idx].ee_handle == p_ce_msg->dereg_listen.handle) )
1313 &&(p_cb->idx_cur_active == listen_info_idx) )
1322 if (p_cb->listen_info[listen_info_idx].rf_disc_handle != NFA_HANDLE_INVALID)
1324 nfa_dm_delete_rf_discover (p_cb->listen_info[listen_info_idx].rf_disc_handle);
1325 p_cb->listen_info[listen_info_idx].rf_disc_handle = NFA_HANDLE_INVALID;
1329 nfa_ce_remove_listen_info_entry (listen_info_idx, TRUE);
1335 if (listen_info_idx == NFA_CE_LISTEN_INFO_MAX)
1346 listen_info_idx = p_ce_msg->dereg_listen.handle & NFA_HANDLE_MASK;
1348 if ( (listen_info_idx < NFA_CE_LISTEN_INFO_MAX)
1349 &&(p_cb->listen_info[listen_info_idx].flags & NFA_CE_LISTEN_INFO_IN_USE))
1353 &&(p_cb->idx_cur_active == listen_info_idx) )
1362 if (p_cb->listen_info[listen_info_idx].rf_disc_handle != NFA_HANDLE_INVALID)
1364 nfa_dm_delete_rf_discover (p_cb->listen_info[listen_info_idx].rf_disc_handle);
1365 p_cb->listen_info[listen_info_idx].rf_disc_handle = NFA_HANDLE_INVALID;
1369 nfa_ce_remove_listen_info_entry (listen_info_idx, TRUE);