summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Dolca <robert.dolca@intel.com>2015-10-22 05:11:39 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-25 15:28:59 -0400
commit22e4bd09c401905671f3787a8392d269a0ebfa0d (patch)
tree017209d05d64f6c910fa78afe601ab34a461126f
parent0a97a3cba298fd989802bf34541c94b6488c3834 (diff)
NFC: nci: rename nci_prop_ops to nci_driver_ops
Initially it was used to create hooks in the driver for proprietary operations. Currently it is being used for hooks for both proprietary and generic operations. Signed-off-by: Robert Dolca <robert.dolca@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/nfc/s3fwrn5/nci.c4
-rw-r--r--drivers/nfc/s3fwrn5/nci.h2
-rw-r--r--drivers/nfc/st-nci/core.c2
-rw-r--r--include/net/nfc/nci_core.h6
-rw-r--r--net/nfc/nci/core.c16
5 files changed, 15 insertions, 15 deletions
diff --git a/drivers/nfc/s3fwrn5/nci.c b/drivers/nfc/s3fwrn5/nci.c
index ace0071c5339..075e4e877b33 100644
--- a/drivers/nfc/s3fwrn5/nci.c
+++ b/drivers/nfc/s3fwrn5/nci.c
@@ -31,7 +31,7 @@ static int s3fwrn5_nci_prop_rsp(struct nci_dev *ndev, struct sk_buff *skb)
31 return 0; 31 return 0;
32} 32}
33 33
34static struct nci_prop_ops s3fwrn5_nci_prop_ops[] = { 34static struct nci_driver_ops s3fwrn5_nci_prop_ops[] = {
35 { 35 {
36 .opcode = nci_opcode_pack(NCI_GID_PROPRIETARY, 36 .opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
37 NCI_PROP_AGAIN), 37 NCI_PROP_AGAIN),
@@ -79,7 +79,7 @@ static struct nci_prop_ops s3fwrn5_nci_prop_ops[] = {
79 }, 79 },
80}; 80};
81 81
82void s3fwrn5_nci_get_prop_ops(struct nci_prop_ops **ops, size_t *n) 82void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n)
83{ 83{
84 *ops = s3fwrn5_nci_prop_ops; 84 *ops = s3fwrn5_nci_prop_ops;
85 *n = ARRAY_SIZE(s3fwrn5_nci_prop_ops); 85 *n = ARRAY_SIZE(s3fwrn5_nci_prop_ops);
diff --git a/drivers/nfc/s3fwrn5/nci.h b/drivers/nfc/s3fwrn5/nci.h
index 0e68d439dde6..60c7fb575b66 100644
--- a/drivers/nfc/s3fwrn5/nci.h
+++ b/drivers/nfc/s3fwrn5/nci.h
@@ -83,7 +83,7 @@ struct nci_prop_fw_cfg_rsp {
83 83
84#define NCI_PROP_WR_RESET 0x2f 84#define NCI_PROP_WR_RESET 0x2f
85 85
86void s3fwrn5_nci_get_prop_ops(struct nci_prop_ops **ops, size_t *n); 86void s3fwrn5_nci_get_prop_ops(struct nci_driver_ops **ops, size_t *n);
87int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name); 87int s3fwrn5_nci_rf_configure(struct s3fwrn5_info *info, const char *fw_name);
88 88
89#endif /* __LOCAL_S3FWRN5_NCI_H_ */ 89#endif /* __LOCAL_S3FWRN5_NCI_H_ */
diff --git a/drivers/nfc/st-nci/core.c b/drivers/nfc/st-nci/core.c
index 8d1fdd2ee498..5443caa0d55e 100644
--- a/drivers/nfc/st-nci/core.c
+++ b/drivers/nfc/st-nci/core.c
@@ -98,7 +98,7 @@ static int st_nci_prop_rsp_packet(struct nci_dev *ndev,
98 return 0; 98 return 0;
99} 99}
100 100
101static struct nci_prop_ops st_nci_prop_ops[] = { 101static struct nci_driver_ops st_nci_prop_ops[] = {
102 { 102 {
103 .opcode = nci_opcode_pack(NCI_GID_PROPRIETARY, 103 .opcode = nci_opcode_pack(NCI_GID_PROPRIETARY,
104 ST_NCI_CORE_PROP), 104 ST_NCI_CORE_PROP),
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index d5a1caae9fd9..5daf0042261e 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -67,7 +67,7 @@ enum nci_state {
67 67
68struct nci_dev; 68struct nci_dev;
69 69
70struct nci_prop_ops { 70struct nci_driver_ops {
71 __u16 opcode; 71 __u16 opcode;
72 int (*rsp)(struct nci_dev *dev, struct sk_buff *skb); 72 int (*rsp)(struct nci_dev *dev, struct sk_buff *skb);
73 int (*ntf)(struct nci_dev *dev, struct sk_buff *skb); 73 int (*ntf)(struct nci_dev *dev, struct sk_buff *skb);
@@ -94,10 +94,10 @@ struct nci_ops {
94 void (*hci_cmd_received)(struct nci_dev *ndev, u8 pipe, u8 cmd, 94 void (*hci_cmd_received)(struct nci_dev *ndev, u8 pipe, u8 cmd,
95 struct sk_buff *skb); 95 struct sk_buff *skb);
96 96
97 struct nci_prop_ops *prop_ops; 97 struct nci_driver_ops *prop_ops;
98 size_t n_prop_ops; 98 size_t n_prop_ops;
99 99
100 struct nci_prop_ops *core_ops; 100 struct nci_driver_ops *core_ops;
101 size_t n_core_ops; 101 size_t n_core_ops;
102}; 102};
103 103
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 30c270862884..f66a5da85ddb 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -1242,12 +1242,12 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload)
1242} 1242}
1243 1243
1244/* Proprietary commands API */ 1244/* Proprietary commands API */
1245static struct nci_prop_ops *ops_cmd_lookup(struct nci_prop_ops *ops, 1245static struct nci_driver_ops *ops_cmd_lookup(struct nci_driver_ops *ops,
1246 size_t n_ops, 1246 size_t n_ops,
1247 __u16 opcode) 1247 __u16 opcode)
1248{ 1248{
1249 size_t i; 1249 size_t i;
1250 struct nci_prop_ops *op; 1250 struct nci_driver_ops *op;
1251 1251
1252 if (!ops || !n_ops) 1252 if (!ops || !n_ops)
1253 return NULL; 1253 return NULL;
@@ -1262,10 +1262,10 @@ static struct nci_prop_ops *ops_cmd_lookup(struct nci_prop_ops *ops,
1262} 1262}
1263 1263
1264static int nci_op_rsp_packet(struct nci_dev *ndev, __u16 rsp_opcode, 1264static int nci_op_rsp_packet(struct nci_dev *ndev, __u16 rsp_opcode,
1265 struct sk_buff *skb, struct nci_prop_ops *ops, 1265 struct sk_buff *skb, struct nci_driver_ops *ops,
1266 size_t n_ops) 1266 size_t n_ops)
1267{ 1267{
1268 struct nci_prop_ops *op; 1268 struct nci_driver_ops *op;
1269 1269
1270 op = ops_cmd_lookup(ops, n_ops, rsp_opcode); 1270 op = ops_cmd_lookup(ops, n_ops, rsp_opcode);
1271 if (!op || !op->rsp) 1271 if (!op || !op->rsp)
@@ -1275,10 +1275,10 @@ static int nci_op_rsp_packet(struct nci_dev *ndev, __u16 rsp_opcode,
1275} 1275}
1276 1276
1277static int nci_op_ntf_packet(struct nci_dev *ndev, __u16 ntf_opcode, 1277static int nci_op_ntf_packet(struct nci_dev *ndev, __u16 ntf_opcode,
1278 struct sk_buff *skb, struct nci_prop_ops *ops, 1278 struct sk_buff *skb, struct nci_driver_ops *ops,
1279 size_t n_ops) 1279 size_t n_ops)
1280{ 1280{
1281 struct nci_prop_ops *op; 1281 struct nci_driver_ops *op;
1282 1282
1283 op = ops_cmd_lookup(ops, n_ops, ntf_opcode); 1283 op = ops_cmd_lookup(ops, n_ops, ntf_opcode);
1284 if (!op || !op->ntf) 1284 if (!op || !op->ntf)