aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn544_hci.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/nfc/pn544_hci.c b/drivers/nfc/pn544_hci.c
index 69df6fecb847..c67b55e224e0 100644
--- a/drivers/nfc/pn544_hci.c
+++ b/drivers/nfc/pn544_hci.c
@@ -108,16 +108,22 @@ enum pn544_state {
108 108
109#define PN544_NFC_WI_MGMT_GATE 0xA1 109#define PN544_NFC_WI_MGMT_GATE 0xA1
110 110
111static u8 pn544_custom_gates[] = { 111static struct nfc_hci_gate pn544_gates[] = {
112 PN544_SYS_MGMT_GATE, 112 {NFC_HCI_ADMIN_GATE, NFC_HCI_INVALID_PIPE},
113 PN544_SWP_MGMT_GATE, 113 {NFC_HCI_LOOPBACK_GATE, NFC_HCI_INVALID_PIPE},
114 PN544_POLLING_LOOP_MGMT_GATE, 114 {NFC_HCI_ID_MGMT_GATE, NFC_HCI_INVALID_PIPE},
115 PN544_NFC_WI_MGMT_GATE, 115 {NFC_HCI_LINK_MGMT_GATE, NFC_HCI_INVALID_PIPE},
116 PN544_RF_READER_F_GATE, 116 {NFC_HCI_RF_READER_B_GATE, NFC_HCI_INVALID_PIPE},
117 PN544_RF_READER_JEWEL_GATE, 117 {NFC_HCI_RF_READER_A_GATE, NFC_HCI_INVALID_PIPE},
118 PN544_RF_READER_ISO15693_GATE, 118 {PN544_SYS_MGMT_GATE, NFC_HCI_INVALID_PIPE},
119 PN544_RF_READER_NFCIP1_INITIATOR_GATE, 119 {PN544_SWP_MGMT_GATE, NFC_HCI_INVALID_PIPE},
120 PN544_RF_READER_NFCIP1_TARGET_GATE 120 {PN544_POLLING_LOOP_MGMT_GATE, NFC_HCI_INVALID_PIPE},
121 {PN544_NFC_WI_MGMT_GATE, NFC_HCI_INVALID_PIPE},
122 {PN544_RF_READER_F_GATE, NFC_HCI_INVALID_PIPE},
123 {PN544_RF_READER_JEWEL_GATE, NFC_HCI_INVALID_PIPE},
124 {PN544_RF_READER_ISO15693_GATE, NFC_HCI_INVALID_PIPE},
125 {PN544_RF_READER_NFCIP1_INITIATOR_GATE, NFC_HCI_INVALID_PIPE},
126 {PN544_RF_READER_NFCIP1_TARGET_GATE, NFC_HCI_INVALID_PIPE}
121}; 127};
122 128
123/* Largest headroom needed for outgoing custom commands */ 129/* Largest headroom needed for outgoing custom commands */
@@ -849,10 +855,9 @@ static int __devinit pn544_hci_probe(struct i2c_client *client,
849 goto err_rti; 855 goto err_rti;
850 } 856 }
851 857
852 init_data.gate_count = ARRAY_SIZE(pn544_custom_gates); 858 init_data.gate_count = ARRAY_SIZE(pn544_gates);
853 859
854 memcpy(init_data.gates, pn544_custom_gates, 860 memcpy(init_data.gates, pn544_gates, sizeof(pn544_gates));
855 ARRAY_SIZE(pn544_custom_gates));
856 861
857 /* 862 /*
858 * TODO: Session id must include the driver name + some bus addr 863 * TODO: Session id must include the driver name + some bus addr