Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279427
b: refs/heads/master
c: 004161c
h: refs/heads/master
i:
  279425: 9333a96
  279423: e443e60
v: v3
  • Loading branch information
Ilan Elias authored and John W. Linville committed Jan 4, 2012
1 parent 0455943 commit c0d4588
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 637d85a7cdfe4240a56da7d70cf95cca65ea21d3
refs/heads/master: 004161cb52ac49bc17f6528543c1cecbd728f750
6 changes: 6 additions & 0 deletions trunk/include/net/nfc/nci.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ struct nci_core_conn_credit_ntf {
struct conn_credit_entry conn_entries[NCI_MAX_NUM_CONN];
} __packed;

#define NCI_OP_CORE_INTF_ERROR_NTF nci_opcode_pack(NCI_GID_CORE, 0x08)
struct nci_core_intf_error_ntf {
__u8 status;
__u8 conn_id;
} __packed;

#define NCI_OP_RF_INTF_ACTIVATED_NTF nci_opcode_pack(NCI_GID_RF_MGMT, 0x05)
struct rf_tech_specific_params_nfca_poll {
__u16 sens_res;
Expand Down
18 changes: 18 additions & 0 deletions trunk/net/nfc/nci/ntf.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ static void nci_core_conn_credits_ntf_packet(struct nci_dev *ndev,
queue_work(ndev->tx_wq, &ndev->tx_work);
}

static void nci_core_conn_intf_error_ntf_packet(struct nci_dev *ndev,
struct sk_buff *skb)
{
struct nci_core_intf_error_ntf *ntf = (void *) skb->data;

ntf->conn_id = nci_conn_id(&ntf->conn_id);

pr_debug("status 0x%x, conn_id %d\n", ntf->status, ntf->conn_id);

/* complete the data exchange transaction, if exists */
if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
nci_data_exchange_complete(ndev, NULL, -EIO);
}

static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
{
Expand Down Expand Up @@ -280,6 +294,10 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
nci_core_conn_credits_ntf_packet(ndev, skb);
break;

case NCI_OP_CORE_INTF_ERROR_NTF:
nci_core_conn_intf_error_ntf_packet(ndev, skb);
break;

case NCI_OP_RF_INTF_ACTIVATED_NTF:
nci_rf_intf_activated_ntf_packet(ndev, skb);
break;
Expand Down

0 comments on commit c0d4588

Please sign in to comment.