diff options
Diffstat (limited to 'net/nfc/digital.h')
-rw-r--r-- | net/nfc/digital.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/net/nfc/digital.h b/net/nfc/digital.h index 5254a872522b..586075a3feed 100644 --- a/net/nfc/digital.h +++ b/net/nfc/digital.h | |||
@@ -56,8 +56,9 @@ struct sk_buff *digital_skb_alloc(struct nfc_digital_dev *ddev, | |||
56 | unsigned int len); | 56 | unsigned int len); |
57 | 57 | ||
58 | int digital_send_cmd(struct nfc_digital_dev *ddev, u8 cmd_type, | 58 | int digital_send_cmd(struct nfc_digital_dev *ddev, u8 cmd_type, |
59 | struct sk_buff *skb, u16 timeout, | 59 | struct sk_buff *skb, struct digital_tg_mdaa_params *params, |
60 | nfc_digital_cmd_complete_t cmd_cb, void *cb_context); | 60 | u16 timeout, nfc_digital_cmd_complete_t cmd_cb, |
61 | void *cb_context); | ||
61 | 62 | ||
62 | int digital_in_configure_hw(struct nfc_digital_dev *ddev, int type, int param); | 63 | int digital_in_configure_hw(struct nfc_digital_dev *ddev, int type, int param); |
63 | static inline int digital_in_send_cmd(struct nfc_digital_dev *ddev, | 64 | static inline int digital_in_send_cmd(struct nfc_digital_dev *ddev, |
@@ -65,8 +66,8 @@ static inline int digital_in_send_cmd(struct nfc_digital_dev *ddev, | |||
65 | nfc_digital_cmd_complete_t cmd_cb, | 66 | nfc_digital_cmd_complete_t cmd_cb, |
66 | void *cb_context) | 67 | void *cb_context) |
67 | { | 68 | { |
68 | return digital_send_cmd(ddev, DIGITAL_CMD_IN_SEND, skb, timeout, cmd_cb, | 69 | return digital_send_cmd(ddev, DIGITAL_CMD_IN_SEND, skb, NULL, timeout, |
69 | cb_context); | 70 | cmd_cb, cb_context); |
70 | } | 71 | } |
71 | 72 | ||
72 | void digital_poll_next_tech(struct nfc_digital_dev *ddev); | 73 | void digital_poll_next_tech(struct nfc_digital_dev *ddev); |
@@ -86,6 +87,36 @@ int digital_in_send_dep_req(struct nfc_digital_dev *ddev, | |||
86 | struct nfc_target *target, struct sk_buff *skb, | 87 | struct nfc_target *target, struct sk_buff *skb, |
87 | struct digital_data_exch *data_exch); | 88 | struct digital_data_exch *data_exch); |
88 | 89 | ||
90 | int digital_tg_configure_hw(struct nfc_digital_dev *ddev, int type, int param); | ||
91 | static inline int digital_tg_send_cmd(struct nfc_digital_dev *ddev, | ||
92 | struct sk_buff *skb, u16 timeout, | ||
93 | nfc_digital_cmd_complete_t cmd_cb, void *cb_context) | ||
94 | { | ||
95 | return digital_send_cmd(ddev, DIGITAL_CMD_TG_SEND, skb, NULL, timeout, | ||
96 | cmd_cb, cb_context); | ||
97 | } | ||
98 | |||
99 | void digital_tg_recv_sens_req(struct nfc_digital_dev *ddev, void *arg, | ||
100 | struct sk_buff *resp); | ||
101 | |||
102 | void digital_tg_recv_sensf_req(struct nfc_digital_dev *ddev, void *arg, | ||
103 | struct sk_buff *resp); | ||
104 | |||
105 | static inline int digital_tg_listen(struct nfc_digital_dev *ddev, u16 timeout, | ||
106 | nfc_digital_cmd_complete_t cb, void *arg) | ||
107 | { | ||
108 | return digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN, NULL, NULL, | ||
109 | timeout, cb, arg); | ||
110 | } | ||
111 | |||
112 | void digital_tg_recv_atr_req(struct nfc_digital_dev *ddev, void *arg, | ||
113 | struct sk_buff *resp); | ||
114 | |||
115 | int digital_tg_send_dep_res(struct nfc_digital_dev *ddev, struct sk_buff *skb); | ||
116 | |||
117 | int digital_tg_listen_nfca(struct nfc_digital_dev *ddev, u8 rf_tech); | ||
118 | int digital_tg_listen_nfcf(struct nfc_digital_dev *ddev, u8 rf_tech); | ||
119 | |||
89 | typedef u16 (*crc_func_t)(u16, const u8 *, size_t); | 120 | typedef u16 (*crc_func_t)(u16, const u8 *, size_t); |
90 | 121 | ||
91 | #define CRC_A_INIT 0x6363 | 122 | #define CRC_A_INIT 0x6363 |