aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2011-11-09 05:09:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 12:32:50 -0500
commitee4c64fb984e652c0d49d41d19d1b8e4576c3203 (patch)
tree5d5acb2fc248c030130eb298830787c9203b1f98 /net/nfc
parente8c0dacd9836dc2dcb28d236c9cc3cfaa9965a20 (diff)
NFC: Removal of unused operations for NCI spec 1.0 d18
Remove unused NCI operations, e.g. create static rf connection. Signed-off-by: Ilan Elias <ilane@ti.com> Acked-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/nci/core.c6
-rw-r--r--net/nfc/nci/ntf.c15
-rw-r--r--net/nfc/nci/rsp.c25
3 files changed, 3 insertions, 43 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 557fe92d29c7..9d0b5305c36e 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -138,17 +138,11 @@ static void nci_init_req(struct nci_dev *ndev, unsigned long opt)
138 138
139static void nci_init_complete_req(struct nci_dev *ndev, unsigned long opt) 139static void nci_init_complete_req(struct nci_dev *ndev, unsigned long opt)
140{ 140{
141 struct nci_core_conn_create_cmd conn_cmd;
142 struct nci_rf_disc_map_cmd cmd; 141 struct nci_rf_disc_map_cmd cmd;
143 struct disc_map_config *cfg = cmd.mapping_configs; 142 struct disc_map_config *cfg = cmd.mapping_configs;
144 __u8 *num = &cmd.num_mapping_configs; 143 __u8 *num = &cmd.num_mapping_configs;
145 int i; 144 int i;
146 145
147 /* create static rf connection */
148 conn_cmd.target_handle = 0;
149 conn_cmd.num_target_specific_params = 0;
150 nci_send_cmd(ndev, NCI_OP_CORE_CONN_CREATE_CMD, 2, &conn_cmd);
151
152 /* set rf mapping configurations */ 146 /* set rf mapping configurations */
153 *num = 0; 147 *num = 0;
154 148
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index 6789f4828c0b..c1bf54172c25 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -66,14 +66,6 @@ static void nci_core_conn_credits_ntf_packet(struct nci_dev *ndev,
66 queue_work(ndev->tx_wq, &ndev->tx_work); 66 queue_work(ndev->tx_wq, &ndev->tx_work);
67} 67}
68 68
69static void nci_rf_field_info_ntf_packet(struct nci_dev *ndev,
70 struct sk_buff *skb)
71{
72 struct nci_rf_field_info_ntf *ntf = (void *) skb->data;
73
74 nfc_dbg("entry, rf_field_status %d", ntf->rf_field_status);
75}
76
77static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev, 69static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
78 struct nci_rf_intf_activated_ntf *ntf, __u8 *data) 70 struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
79{ 71{
@@ -251,6 +243,9 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev,
251 ndev->rx_data_reassembly = 0; 243 ndev->rx_data_reassembly = 0;
252 } 244 }
253 245
246 /* set the available credits to initial value */
247 atomic_set(&ndev->credits_cnt, ndev->initial_num_credits);
248
254 /* complete the data exchange transaction, if exists */ 249 /* complete the data exchange transaction, if exists */
255 if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags)) 250 if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
256 nci_data_exchange_complete(ndev, NULL, -EIO); 251 nci_data_exchange_complete(ndev, NULL, -EIO);
@@ -274,10 +269,6 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
274 nci_core_conn_credits_ntf_packet(ndev, skb); 269 nci_core_conn_credits_ntf_packet(ndev, skb);
275 break; 270 break;
276 271
277 case NCI_OP_RF_FIELD_INFO_NTF:
278 nci_rf_field_info_ntf_packet(ndev, skb);
279 break;
280
281 case NCI_OP_RF_INTF_ACTIVATED_NTF: 272 case NCI_OP_RF_INTF_ACTIVATED_NTF:
282 nci_rf_intf_activated_ntf_packet(ndev, skb); 273 nci_rf_intf_activated_ntf_packet(ndev, skb);
283 break; 274 break;
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index 64fc58a6e28b..0591f5aff89f 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -128,27 +128,6 @@ exit:
128 nci_req_complete(ndev, rsp_1->status); 128 nci_req_complete(ndev, rsp_1->status);
129} 129}
130 130
131static void nci_core_conn_create_rsp_packet(struct nci_dev *ndev,
132 struct sk_buff *skb)
133{
134 struct nci_core_conn_create_rsp *rsp = (void *) skb->data;
135
136 nfc_dbg("entry, status 0x%x", rsp->status);
137
138 if (rsp->status != NCI_STATUS_OK)
139 return;
140
141 ndev->max_pkt_payload_size = rsp->max_pkt_payload_size;
142 ndev->initial_num_credits = rsp->initial_num_credits;
143 ndev->conn_id = rsp->conn_id;
144
145 atomic_set(&ndev->credits_cnt, ndev->initial_num_credits);
146
147 nfc_dbg("max_pkt_payload_size %d", ndev->max_pkt_payload_size);
148 nfc_dbg("initial_num_credits %d", ndev->initial_num_credits);
149 nfc_dbg("conn_id %d", ndev->conn_id);
150}
151
152static void nci_rf_disc_map_rsp_packet(struct nci_dev *ndev, 131static void nci_rf_disc_map_rsp_packet(struct nci_dev *ndev,
153 struct sk_buff *skb) 132 struct sk_buff *skb)
154{ 133{
@@ -208,10 +187,6 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
208 nci_core_init_rsp_packet(ndev, skb); 187 nci_core_init_rsp_packet(ndev, skb);
209 break; 188 break;
210 189
211 case NCI_OP_CORE_CONN_CREATE_RSP:
212 nci_core_conn_create_rsp_packet(ndev, skb);
213 break;
214
215 case NCI_OP_RF_DISCOVER_MAP_RSP: 190 case NCI_OP_RF_DISCOVER_MAP_RSP:
216 nci_rf_disc_map_rsp_packet(ndev, skb); 191 nci_rf_disc_map_rsp_packet(ndev, skb);
217 break; 192 break;