]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
NFC: Removal of unused operations for NCI spec 1.0 d18
authorIlan Elias <ilane@ti.com>
Wed, 9 Nov 2011 10:09:15 +0000 (12:09 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 11 Nov 2011 17:32:50 +0000 (12:32 -0500)
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>
include/net/nfc/nci.h
include/net/nfc/nci_core.h
net/nfc/nci/core.c
net/nfc/nci/ntf.c
net/nfc/nci/rsp.c

index 0ebf842b5946c7d9439d2fbaa5d7861d96d3bd97..0b34fde9b130b0162e6321b47dd799baed43af0d 100644 (file)
@@ -193,16 +193,6 @@ struct nci_core_reset_cmd {
 
 #define NCI_OP_CORE_INIT_CMD           nci_opcode_pack(NCI_GID_CORE, 0x01)
 
-#define NCI_OP_CORE_SET_CONFIG_CMD     nci_opcode_pack(NCI_GID_CORE, 0x02)
-
-#define NCI_OP_CORE_CONN_CREATE_CMD    nci_opcode_pack(NCI_GID_CORE, 0x04)
-struct nci_core_conn_create_cmd {
-       __u8    target_handle;
-       __u8    num_target_specific_params;
-} __packed;
-
-#define NCI_OP_CORE_CONN_CLOSE_CMD     nci_opcode_pack(NCI_GID_CORE, 0x06)
-
 #define NCI_OP_RF_DISCOVER_MAP_CMD     nci_opcode_pack(NCI_GID_RF_MGMT, 0x00)
 struct disc_map_config {
        __u8    rf_protocol;
@@ -262,18 +252,6 @@ struct nci_core_init_rsp_2 {
        __le32  manufact_specific_info;
 } __packed;
 
-#define NCI_OP_CORE_SET_CONFIG_RSP     nci_opcode_pack(NCI_GID_CORE, 0x02)
-
-#define NCI_OP_CORE_CONN_CREATE_RSP    nci_opcode_pack(NCI_GID_CORE, 0x04)
-struct nci_core_conn_create_rsp {
-       __u8    status;
-       __u8    max_pkt_payload_size;
-       __u8    initial_num_credits;
-       __u8    conn_id;
-} __packed;
-
-#define NCI_OP_CORE_CONN_CLOSE_RSP     nci_opcode_pack(NCI_GID_CORE, 0x06)
-
 #define NCI_OP_RF_DISCOVER_MAP_RSP     nci_opcode_pack(NCI_GID_RF_MGMT, 0x00)
 
 #define NCI_OP_RF_DISCOVER_RSP         nci_opcode_pack(NCI_GID_RF_MGMT, 0x03)
@@ -294,11 +272,6 @@ struct nci_core_conn_credit_ntf {
        struct conn_credit_entry        conn_entries[NCI_MAX_NUM_CONN];
 } __packed;
 
-#define NCI_OP_RF_FIELD_INFO_NTF       nci_opcode_pack(NCI_GID_CORE, 0x08)
-struct nci_rf_field_info_ntf {
-       __u8    rf_field_status;
-} __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;
index 6e6a7be485c14964a27f9e2f37eb125f224a3234..c92b69d7e0c2a821e77a0019b28bed558caa1a4a 100644 (file)
@@ -116,10 +116,6 @@ struct nci_dev {
        __u8                    manufact_id;
        __u32                   manufact_specific_info;
 
-       /* received during NCI_OP_CORE_CONN_CREATE_RSP for static conn 0 */
-       __u8                    max_pkt_payload_size;
-       __u8                    conn_id;
-
        /* stored during nci_data_exchange */
        data_exchange_cb_t      data_exchange_cb;
        void                    *data_exchange_cb_context;
index 557fe92d29c7ee55619de8ddbf14da18f270de78..9d0b5305c36e8111688ca8dd0ea1f7b0313d7aa3 100644 (file)
@@ -138,17 +138,11 @@ static void nci_init_req(struct nci_dev *ndev, unsigned long opt)
 
 static void nci_init_complete_req(struct nci_dev *ndev, unsigned long opt)
 {
-       struct nci_core_conn_create_cmd conn_cmd;
        struct nci_rf_disc_map_cmd cmd;
        struct disc_map_config *cfg = cmd.mapping_configs;
        __u8 *num = &cmd.num_mapping_configs;
        int i;
 
-       /* create static rf connection */
-       conn_cmd.target_handle = 0;
-       conn_cmd.num_target_specific_params = 0;
-       nci_send_cmd(ndev, NCI_OP_CORE_CONN_CREATE_CMD, 2, &conn_cmd);
-
        /* set rf mapping configurations */
        *num = 0;
 
index 6789f4828c0b17481376c7ee233d4d563b451969..c1bf54172c25bbc606ea385a7251ed6d878c9cd0 100644 (file)
@@ -66,14 +66,6 @@ static void nci_core_conn_credits_ntf_packet(struct nci_dev *ndev,
                queue_work(ndev->tx_wq, &ndev->tx_work);
 }
 
-static void nci_rf_field_info_ntf_packet(struct nci_dev *ndev,
-                                       struct sk_buff *skb)
-{
-       struct nci_rf_field_info_ntf *ntf = (void *) skb->data;
-
-       nfc_dbg("entry, rf_field_status %d", ntf->rf_field_status);
-}
-
 static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
                        struct nci_rf_intf_activated_ntf *ntf, __u8 *data)
 {
@@ -251,6 +243,9 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev,
                ndev->rx_data_reassembly = 0;
        }
 
+       /* set the available credits to initial value */
+       atomic_set(&ndev->credits_cnt, ndev->initial_num_credits);
+
        /* complete the data exchange transaction, if exists */
        if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
                nci_data_exchange_complete(ndev, NULL, -EIO);
@@ -274,10 +269,6 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
                nci_core_conn_credits_ntf_packet(ndev, skb);
                break;
 
-       case NCI_OP_RF_FIELD_INFO_NTF:
-               nci_rf_field_info_ntf_packet(ndev, skb);
-               break;
-
        case NCI_OP_RF_INTF_ACTIVATED_NTF:
                nci_rf_intf_activated_ntf_packet(ndev, skb);
                break;
index 64fc58a6e28bbc1dafc12bf3c98db4e6a1487fc9..0591f5aff89fbc8c721bcc0e39bf43c3778e2625 100644 (file)
@@ -128,27 +128,6 @@ exit:
        nci_req_complete(ndev, rsp_1->status);
 }
 
-static void nci_core_conn_create_rsp_packet(struct nci_dev *ndev,
-                                               struct sk_buff *skb)
-{
-       struct nci_core_conn_create_rsp *rsp = (void *) skb->data;
-
-       nfc_dbg("entry, status 0x%x", rsp->status);
-
-       if (rsp->status != NCI_STATUS_OK)
-               return;
-
-       ndev->max_pkt_payload_size = rsp->max_pkt_payload_size;
-       ndev->initial_num_credits = rsp->initial_num_credits;
-       ndev->conn_id = rsp->conn_id;
-
-       atomic_set(&ndev->credits_cnt, ndev->initial_num_credits);
-
-       nfc_dbg("max_pkt_payload_size %d", ndev->max_pkt_payload_size);
-       nfc_dbg("initial_num_credits %d", ndev->initial_num_credits);
-       nfc_dbg("conn_id %d", ndev->conn_id);
-}
-
 static void nci_rf_disc_map_rsp_packet(struct nci_dev *ndev,
                                        struct sk_buff *skb)
 {
@@ -208,10 +187,6 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
                nci_core_init_rsp_packet(ndev, skb);
                break;
 
-       case NCI_OP_CORE_CONN_CREATE_RSP:
-               nci_core_conn_create_rsp_packet(ndev, skb);
-               break;
-
        case NCI_OP_RF_DISCOVER_MAP_RSP:
                nci_rf_disc_map_rsp_packet(ndev, skb);
                break;