Lines Matching refs:ntf

33 	struct nci_core_conn_credit_ntf *ntf = (void *) skb->data;  in nci_core_conn_credits_ntf_packet()  local
37 pr_debug("num_entries %d\n", ntf->num_entries); in nci_core_conn_credits_ntf_packet()
39 if (ntf->num_entries > NCI_MAX_NUM_CONN) in nci_core_conn_credits_ntf_packet()
40 ntf->num_entries = NCI_MAX_NUM_CONN; in nci_core_conn_credits_ntf_packet()
43 for (i = 0; i < ntf->num_entries; i++) { in nci_core_conn_credits_ntf_packet()
44 ntf->conn_entries[i].conn_id = in nci_core_conn_credits_ntf_packet()
45 nci_conn_id(&ntf->conn_entries[i].conn_id); in nci_core_conn_credits_ntf_packet()
48 i, ntf->conn_entries[i].conn_id, in nci_core_conn_credits_ntf_packet()
49 ntf->conn_entries[i].credits); in nci_core_conn_credits_ntf_packet()
52 ntf->conn_entries[i].conn_id); in nci_core_conn_credits_ntf_packet()
56 atomic_add(ntf->conn_entries[i].credits, in nci_core_conn_credits_ntf_packet()
82 struct nci_core_intf_error_ntf *ntf = (void *) skb->data; in nci_core_conn_intf_error_ntf_packet() local
84 ntf->conn_id = nci_conn_id(&ntf->conn_id); in nci_core_conn_intf_error_ntf_packet()
86 pr_debug("status 0x%x, conn_id %d\n", ntf->status, ntf->conn_id); in nci_core_conn_intf_error_ntf_packet()
90 nci_data_exchange_complete(ndev, NULL, ntf->conn_id, -EIO); in nci_core_conn_intf_error_ntf_packet()
260 struct nci_rf_discover_ntf *ntf) in nci_add_new_target() argument
267 if (target->logical_idx == ntf->rf_discovery_id) { in nci_add_new_target()
269 nci_add_new_protocol(ndev, target, ntf->rf_protocol, in nci_add_new_target()
270 ntf->rf_tech_and_mode, in nci_add_new_target()
271 &ntf->rf_tech_specific_params); in nci_add_new_target()
284 rc = nci_add_new_protocol(ndev, target, ntf->rf_protocol, in nci_add_new_target()
285 ntf->rf_tech_and_mode, in nci_add_new_target()
286 &ntf->rf_tech_specific_params); in nci_add_new_target()
288 target->logical_idx = ntf->rf_discovery_id; in nci_add_new_target()
307 struct nci_rf_discover_ntf ntf; in nci_rf_discover_ntf_packet() local
311 ntf.rf_discovery_id = *data++; in nci_rf_discover_ntf_packet()
312 ntf.rf_protocol = *data++; in nci_rf_discover_ntf_packet()
313 ntf.rf_tech_and_mode = *data++; in nci_rf_discover_ntf_packet()
314 ntf.rf_tech_specific_params_len = *data++; in nci_rf_discover_ntf_packet()
316 pr_debug("rf_discovery_id %d\n", ntf.rf_discovery_id); in nci_rf_discover_ntf_packet()
317 pr_debug("rf_protocol 0x%x\n", ntf.rf_protocol); in nci_rf_discover_ntf_packet()
318 pr_debug("rf_tech_and_mode 0x%x\n", ntf.rf_tech_and_mode); in nci_rf_discover_ntf_packet()
320 ntf.rf_tech_specific_params_len); in nci_rf_discover_ntf_packet()
322 if (ntf.rf_tech_specific_params_len > 0) { in nci_rf_discover_ntf_packet()
323 switch (ntf.rf_tech_and_mode) { in nci_rf_discover_ntf_packet()
326 &(ntf.rf_tech_specific_params.nfca_poll), data); in nci_rf_discover_ntf_packet()
331 &(ntf.rf_tech_specific_params.nfcb_poll), data); in nci_rf_discover_ntf_packet()
336 &(ntf.rf_tech_specific_params.nfcf_poll), data); in nci_rf_discover_ntf_packet()
341 &(ntf.rf_tech_specific_params.nfcv_poll), data); in nci_rf_discover_ntf_packet()
346 ntf.rf_tech_and_mode); in nci_rf_discover_ntf_packet()
347 data += ntf.rf_tech_specific_params_len; in nci_rf_discover_ntf_packet()
352 ntf.ntf_type = *data++; in nci_rf_discover_ntf_packet()
353 pr_debug("ntf_type %d\n", ntf.ntf_type); in nci_rf_discover_ntf_packet()
356 nci_add_new_target(ndev, &ntf); in nci_rf_discover_ntf_packet()
358 if (ntf.ntf_type == NCI_DISCOVER_NTF_TYPE_MORE) { in nci_rf_discover_ntf_packet()
368 struct nci_rf_intf_activated_ntf *ntf, __u8 *data) in nci_extract_activation_params_iso_dep() argument
373 switch (ntf->activation_rf_tech_and_mode) { in nci_extract_activation_params_iso_dep()
375 nfca_poll = &ntf->activation_params.nfca_poll_iso_dep; in nci_extract_activation_params_iso_dep()
385 nfcb_poll = &ntf->activation_params.nfcb_poll_iso_dep; in nci_extract_activation_params_iso_dep()
396 ntf->activation_rf_tech_and_mode); in nci_extract_activation_params_iso_dep()
404 struct nci_rf_intf_activated_ntf *ntf, __u8 *data) in nci_extract_activation_params_nfc_dep() argument
409 switch (ntf->activation_rf_tech_and_mode) { in nci_extract_activation_params_nfc_dep()
412 poll = &ntf->activation_params.poll_nfc_dep; in nci_extract_activation_params_nfc_dep()
422 listen = &ntf->activation_params.listen_nfc_dep; in nci_extract_activation_params_nfc_dep()
432 ntf->activation_rf_tech_and_mode); in nci_extract_activation_params_nfc_dep()
440 struct nci_rf_intf_activated_ntf *ntf) in nci_target_auto_activated() argument
447 rc = nci_add_new_protocol(ndev, target, ntf->rf_protocol, in nci_target_auto_activated()
448 ntf->activation_rf_tech_and_mode, in nci_target_auto_activated()
449 &ntf->rf_tech_specific_params); in nci_target_auto_activated()
453 target->logical_idx = ntf->rf_discovery_id; in nci_target_auto_activated()
463 struct nci_rf_intf_activated_ntf *ntf) in nci_store_general_bytes_nfc_dep() argument
467 if (ntf->activation_params_len <= 0) in nci_store_general_bytes_nfc_dep()
470 switch (ntf->activation_rf_tech_and_mode) { in nci_store_general_bytes_nfc_dep()
474 (ntf->activation_params.poll_nfc_dep.atr_res_len in nci_store_general_bytes_nfc_dep()
478 (ntf->activation_params.poll_nfc_dep.atr_res in nci_store_general_bytes_nfc_dep()
486 (ntf->activation_params.listen_nfc_dep.atr_req_len in nci_store_general_bytes_nfc_dep()
490 (ntf->activation_params.listen_nfc_dep.atr_req in nci_store_general_bytes_nfc_dep()
497 ntf->activation_rf_tech_and_mode); in nci_store_general_bytes_nfc_dep()
508 struct nci_rf_intf_activated_ntf ntf; in nci_rf_intf_activated_ntf_packet() local
512 ntf.rf_discovery_id = *data++; in nci_rf_intf_activated_ntf_packet()
513 ntf.rf_interface = *data++; in nci_rf_intf_activated_ntf_packet()
514 ntf.rf_protocol = *data++; in nci_rf_intf_activated_ntf_packet()
515 ntf.activation_rf_tech_and_mode = *data++; in nci_rf_intf_activated_ntf_packet()
516 ntf.max_data_pkt_payload_size = *data++; in nci_rf_intf_activated_ntf_packet()
517 ntf.initial_num_credits = *data++; in nci_rf_intf_activated_ntf_packet()
518 ntf.rf_tech_specific_params_len = *data++; in nci_rf_intf_activated_ntf_packet()
520 pr_debug("rf_discovery_id %d\n", ntf.rf_discovery_id); in nci_rf_intf_activated_ntf_packet()
521 pr_debug("rf_interface 0x%x\n", ntf.rf_interface); in nci_rf_intf_activated_ntf_packet()
522 pr_debug("rf_protocol 0x%x\n", ntf.rf_protocol); in nci_rf_intf_activated_ntf_packet()
524 ntf.activation_rf_tech_and_mode); in nci_rf_intf_activated_ntf_packet()
526 ntf.max_data_pkt_payload_size); in nci_rf_intf_activated_ntf_packet()
528 ntf.initial_num_credits); in nci_rf_intf_activated_ntf_packet()
530 ntf.rf_tech_specific_params_len); in nci_rf_intf_activated_ntf_packet()
536 if (ntf.rf_interface == NCI_RF_INTERFACE_NFCEE_DIRECT) in nci_rf_intf_activated_ntf_packet()
539 if (ntf.rf_tech_specific_params_len > 0) { in nci_rf_intf_activated_ntf_packet()
540 switch (ntf.activation_rf_tech_and_mode) { in nci_rf_intf_activated_ntf_packet()
543 &(ntf.rf_tech_specific_params.nfca_poll), data); in nci_rf_intf_activated_ntf_packet()
548 &(ntf.rf_tech_specific_params.nfcb_poll), data); in nci_rf_intf_activated_ntf_packet()
553 &(ntf.rf_tech_specific_params.nfcf_poll), data); in nci_rf_intf_activated_ntf_packet()
558 &(ntf.rf_tech_specific_params.nfcv_poll), data); in nci_rf_intf_activated_ntf_packet()
567 &(ntf.rf_tech_specific_params.nfcf_listen), in nci_rf_intf_activated_ntf_packet()
573 ntf.activation_rf_tech_and_mode); in nci_rf_intf_activated_ntf_packet()
579 ntf.data_exch_rf_tech_and_mode = *data++; in nci_rf_intf_activated_ntf_packet()
580 ntf.data_exch_tx_bit_rate = *data++; in nci_rf_intf_activated_ntf_packet()
581 ntf.data_exch_rx_bit_rate = *data++; in nci_rf_intf_activated_ntf_packet()
582 ntf.activation_params_len = *data++; in nci_rf_intf_activated_ntf_packet()
585 ntf.data_exch_rf_tech_and_mode); in nci_rf_intf_activated_ntf_packet()
586 pr_debug("data_exch_tx_bit_rate 0x%x\n", ntf.data_exch_tx_bit_rate); in nci_rf_intf_activated_ntf_packet()
587 pr_debug("data_exch_rx_bit_rate 0x%x\n", ntf.data_exch_rx_bit_rate); in nci_rf_intf_activated_ntf_packet()
588 pr_debug("activation_params_len %d\n", ntf.activation_params_len); in nci_rf_intf_activated_ntf_packet()
590 if (ntf.activation_params_len > 0) { in nci_rf_intf_activated_ntf_packet()
591 switch (ntf.rf_interface) { in nci_rf_intf_activated_ntf_packet()
594 &ntf, data); in nci_rf_intf_activated_ntf_packet()
599 &ntf, data); in nci_rf_intf_activated_ntf_packet()
608 ntf.rf_interface); in nci_rf_intf_activated_ntf_packet()
620 conn_info->max_pkt_payload_len = ntf.max_data_pkt_payload_size; in nci_rf_intf_activated_ntf_packet()
621 conn_info->initial_num_credits = ntf.initial_num_credits; in nci_rf_intf_activated_ntf_packet()
628 if (ntf.rf_interface == NCI_RF_INTERFACE_NFC_DEP) { in nci_rf_intf_activated_ntf_packet()
629 err = nci_store_general_bytes_nfc_dep(ndev, &ntf); in nci_rf_intf_activated_ntf_packet()
635 if (!(ntf.activation_rf_tech_and_mode & NCI_RF_TECH_MODE_LISTEN_MASK)) { in nci_rf_intf_activated_ntf_packet()
642 nci_target_auto_activated(ndev, &ntf); in nci_rf_intf_activated_ntf_packet()
654 ntf.rf_protocol == NCI_RF_PROTOCOL_NFC_DEP) { in nci_rf_intf_activated_ntf_packet()
670 struct nci_rf_deactivate_ntf *ntf = (void *) skb->data; in nci_rf_deactivate_ntf_packet() local
672 pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason); in nci_rf_deactivate_ntf_packet()
692 switch (ntf->type) { in nci_rf_deactivate_ntf_packet()