Commit | Line | Data |
---|---|---|
2025cf9e | 1 | // SPDX-License-Identifier: GPL-2.0-only |
7cbe0ff3 TE |
2 | /* |
3 | * NFC hardware simulation driver | |
4 | * Copyright (c) 2013, Intel Corporation. | |
7cbe0ff3 TE |
5 | */ |
6 | ||
7 | #include <linux/device.h> | |
8 | #include <linux/kernel.h> | |
9 | #include <linux/module.h> | |
f9ac6273 TE |
10 | #include <linux/ctype.h> |
11 | #include <linux/debugfs.h> | |
7cbe0ff3 TE |
12 | #include <linux/nfc.h> |
13 | #include <net/nfc/nfc.h> | |
204bddcb | 14 | #include <net/nfc/digital.h> |
7cbe0ff3 | 15 | |
204bddcb TE |
16 | #define NFCSIM_ERR(d, fmt, args...) nfc_err(&d->nfc_digital_dev->nfc_dev->dev, \ |
17 | "%s: " fmt, __func__, ## args) | |
7cbe0ff3 | 18 | |
204bddcb TE |
19 | #define NFCSIM_DBG(d, fmt, args...) dev_dbg(&d->nfc_digital_dev->nfc_dev->dev, \ |
20 | "%s: " fmt, __func__, ## args) | |
7cbe0ff3 | 21 | |
204bddcb | 22 | #define NFCSIM_VERSION "0.2" |
7cbe0ff3 | 23 | |
204bddcb TE |
24 | #define NFCSIM_MODE_NONE 0 |
25 | #define NFCSIM_MODE_INITIATOR 1 | |
26 | #define NFCSIM_MODE_TARGET 2 | |
7cbe0ff3 | 27 | |
204bddcb TE |
28 | #define NFCSIM_CAPABILITIES (NFC_DIGITAL_DRV_CAPS_IN_CRC | \ |
29 | NFC_DIGITAL_DRV_CAPS_TG_CRC) | |
a440f1aa | 30 | |
7cbe0ff3 | 31 | struct nfcsim { |
204bddcb | 32 | struct nfc_digital_dev *nfc_digital_dev; |
7cbe0ff3 | 33 | |
204bddcb TE |
34 | struct work_struct recv_work; |
35 | struct delayed_work send_work; | |
7cbe0ff3 | 36 | |
204bddcb TE |
37 | struct nfcsim_link *link_in; |
38 | struct nfcsim_link *link_out; | |
7cbe0ff3 | 39 | |
204bddcb TE |
40 | bool up; |
41 | u8 mode; | |
42 | u8 rf_tech; | |
7cbe0ff3 | 43 | |
204bddcb | 44 | u16 recv_timeout; |
7cbe0ff3 | 45 | |
204bddcb TE |
46 | nfc_digital_cmd_complete_t cb; |
47 | void *arg; | |
2a0fe4fe TE |
48 | |
49 | u8 dropframe; | |
204bddcb | 50 | }; |
7cbe0ff3 | 51 | |
204bddcb TE |
52 | struct nfcsim_link { |
53 | struct mutex lock; | |
7cbe0ff3 | 54 | |
204bddcb TE |
55 | u8 rf_tech; |
56 | u8 mode; | |
a440f1aa | 57 | |
204bddcb | 58 | u8 shutdown; |
7cbe0ff3 | 59 | |
204bddcb TE |
60 | struct sk_buff *skb; |
61 | wait_queue_head_t recv_wait; | |
62 | u8 cond; | |
7cbe0ff3 TE |
63 | }; |
64 | ||
204bddcb | 65 | static struct nfcsim_link *nfcsim_link_new(void) |
7cbe0ff3 | 66 | { |
204bddcb | 67 | struct nfcsim_link *link; |
7cbe0ff3 | 68 | |
204bddcb TE |
69 | link = kzalloc(sizeof(struct nfcsim_link), GFP_KERNEL); |
70 | if (!link) | |
71 | return NULL; | |
7cbe0ff3 | 72 | |
204bddcb TE |
73 | mutex_init(&link->lock); |
74 | init_waitqueue_head(&link->recv_wait); | |
7cbe0ff3 | 75 | |
204bddcb | 76 | return link; |
7cbe0ff3 TE |
77 | } |
78 | ||
204bddcb | 79 | static void nfcsim_link_free(struct nfcsim_link *link) |
7cbe0ff3 | 80 | { |
204bddcb TE |
81 | dev_kfree_skb(link->skb); |
82 | kfree(link); | |
83 | } | |
7cbe0ff3 | 84 | |
204bddcb TE |
85 | static void nfcsim_link_recv_wake(struct nfcsim_link *link) |
86 | { | |
87 | link->cond = 1; | |
88 | wake_up_interruptible(&link->recv_wait); | |
89 | } | |
7cbe0ff3 | 90 | |
204bddcb TE |
91 | static void nfcsim_link_set_skb(struct nfcsim_link *link, struct sk_buff *skb, |
92 | u8 rf_tech, u8 mode) | |
93 | { | |
94 | mutex_lock(&link->lock); | |
7cbe0ff3 | 95 | |
204bddcb TE |
96 | dev_kfree_skb(link->skb); |
97 | link->skb = skb; | |
98 | link->rf_tech = rf_tech; | |
99 | link->mode = mode; | |
7cbe0ff3 | 100 | |
204bddcb | 101 | mutex_unlock(&link->lock); |
7cbe0ff3 TE |
102 | } |
103 | ||
204bddcb | 104 | static void nfcsim_link_recv_cancel(struct nfcsim_link *link) |
7cbe0ff3 | 105 | { |
204bddcb | 106 | mutex_lock(&link->lock); |
7cbe0ff3 | 107 | |
204bddcb | 108 | link->mode = NFCSIM_MODE_NONE; |
7cbe0ff3 | 109 | |
204bddcb | 110 | mutex_unlock(&link->lock); |
7cbe0ff3 | 111 | |
204bddcb | 112 | nfcsim_link_recv_wake(link); |
7cbe0ff3 TE |
113 | } |
114 | ||
204bddcb | 115 | static void nfcsim_link_shutdown(struct nfcsim_link *link) |
7cbe0ff3 | 116 | { |
204bddcb | 117 | mutex_lock(&link->lock); |
7cbe0ff3 | 118 | |
204bddcb TE |
119 | link->shutdown = 1; |
120 | link->mode = NFCSIM_MODE_NONE; | |
7cbe0ff3 | 121 | |
204bddcb | 122 | mutex_unlock(&link->lock); |
7cbe0ff3 | 123 | |
204bddcb | 124 | nfcsim_link_recv_wake(link); |
7cbe0ff3 TE |
125 | } |
126 | ||
204bddcb TE |
127 | static struct sk_buff *nfcsim_link_recv_skb(struct nfcsim_link *link, |
128 | int timeout, u8 rf_tech, u8 mode) | |
7cbe0ff3 TE |
129 | { |
130 | int rc; | |
204bddcb | 131 | struct sk_buff *skb; |
7cbe0ff3 | 132 | |
204bddcb TE |
133 | rc = wait_event_interruptible_timeout(link->recv_wait, |
134 | link->cond, | |
135 | msecs_to_jiffies(timeout)); | |
7cbe0ff3 | 136 | |
204bddcb | 137 | mutex_lock(&link->lock); |
7cbe0ff3 | 138 | |
204bddcb TE |
139 | skb = link->skb; |
140 | link->skb = NULL; | |
7cbe0ff3 | 141 | |
204bddcb TE |
142 | if (!rc) { |
143 | rc = -ETIMEDOUT; | |
144 | goto done; | |
145 | } | |
7cbe0ff3 | 146 | |
204bddcb TE |
147 | if (!skb || link->rf_tech != rf_tech || link->mode == mode) { |
148 | rc = -EINVAL; | |
149 | goto done; | |
7cbe0ff3 TE |
150 | } |
151 | ||
204bddcb TE |
152 | if (link->shutdown) { |
153 | rc = -ENODEV; | |
154 | goto done; | |
155 | } | |
7cbe0ff3 | 156 | |
204bddcb TE |
157 | done: |
158 | mutex_unlock(&link->lock); | |
7cbe0ff3 | 159 | |
204bddcb TE |
160 | if (rc < 0) { |
161 | dev_kfree_skb(skb); | |
162 | skb = ERR_PTR(rc); | |
7cbe0ff3 TE |
163 | } |
164 | ||
204bddcb | 165 | link->cond = 0; |
7cbe0ff3 | 166 | |
204bddcb | 167 | return skb; |
7cbe0ff3 TE |
168 | } |
169 | ||
204bddcb | 170 | static void nfcsim_send_wq(struct work_struct *work) |
7cbe0ff3 | 171 | { |
204bddcb | 172 | struct nfcsim *dev = container_of(work, struct nfcsim, send_work.work); |
7cbe0ff3 | 173 | |
204bddcb TE |
174 | /* |
175 | * To effectively send data, the device just wake up its link_out which | |
176 | * is the link_in of the peer device. The exchanged skb has already been | |
177 | * stored in the dev->link_out through nfcsim_link_set_skb(). | |
178 | */ | |
179 | nfcsim_link_recv_wake(dev->link_out); | |
7cbe0ff3 TE |
180 | } |
181 | ||
204bddcb | 182 | static void nfcsim_recv_wq(struct work_struct *work) |
7cbe0ff3 | 183 | { |
204bddcb TE |
184 | struct nfcsim *dev = container_of(work, struct nfcsim, recv_work); |
185 | struct sk_buff *skb; | |
7cbe0ff3 | 186 | |
204bddcb TE |
187 | skb = nfcsim_link_recv_skb(dev->link_in, dev->recv_timeout, |
188 | dev->rf_tech, dev->mode); | |
7cbe0ff3 | 189 | |
204bddcb TE |
190 | if (!dev->up) { |
191 | NFCSIM_ERR(dev, "Device is down\n"); | |
7cbe0ff3 | 192 | |
204bddcb TE |
193 | if (!IS_ERR(skb)) |
194 | dev_kfree_skb(skb); | |
5e7b30d2 | 195 | return; |
7cbe0ff3 TE |
196 | } |
197 | ||
204bddcb | 198 | dev->cb(dev->nfc_digital_dev, dev->arg, skb); |
7cbe0ff3 TE |
199 | } |
200 | ||
204bddcb TE |
201 | static int nfcsim_send(struct nfc_digital_dev *ddev, struct sk_buff *skb, |
202 | u16 timeout, nfc_digital_cmd_complete_t cb, void *arg) | |
7cbe0ff3 | 203 | { |
204bddcb TE |
204 | struct nfcsim *dev = nfc_digital_get_drvdata(ddev); |
205 | u8 delay; | |
7cbe0ff3 | 206 | |
204bddcb TE |
207 | if (!dev->up) { |
208 | NFCSIM_ERR(dev, "Device is down\n"); | |
209 | return -ENODEV; | |
210 | } | |
211 | ||
212 | dev->recv_timeout = timeout; | |
213 | dev->cb = cb; | |
214 | dev->arg = arg; | |
7cbe0ff3 | 215 | |
204bddcb | 216 | schedule_work(&dev->recv_work); |
7cbe0ff3 | 217 | |
2a0fe4fe TE |
218 | if (dev->dropframe) { |
219 | NFCSIM_DBG(dev, "dropping frame (out of %d)\n", dev->dropframe); | |
220 | dev_kfree_skb(skb); | |
221 | dev->dropframe--; | |
222 | ||
223 | return 0; | |
224 | } | |
225 | ||
204bddcb TE |
226 | if (skb) { |
227 | nfcsim_link_set_skb(dev->link_out, skb, dev->rf_tech, | |
228 | dev->mode); | |
7cbe0ff3 | 229 | |
204bddcb TE |
230 | /* Add random delay (between 3 and 10 ms) before sending data */ |
231 | get_random_bytes(&delay, 1); | |
232 | delay = 3 + (delay & 0x07); | |
7cbe0ff3 | 233 | |
204bddcb TE |
234 | schedule_delayed_work(&dev->send_work, msecs_to_jiffies(delay)); |
235 | } | |
236 | ||
237 | return 0; | |
7cbe0ff3 TE |
238 | } |
239 | ||
204bddcb | 240 | static void nfcsim_abort_cmd(struct nfc_digital_dev *ddev) |
7cbe0ff3 | 241 | { |
582fdc98 | 242 | const struct nfcsim *dev = nfc_digital_get_drvdata(ddev); |
7cbe0ff3 | 243 | |
204bddcb | 244 | nfcsim_link_recv_cancel(dev->link_in); |
7cbe0ff3 TE |
245 | } |
246 | ||
204bddcb | 247 | static int nfcsim_switch_rf(struct nfc_digital_dev *ddev, bool on) |
7cbe0ff3 | 248 | { |
204bddcb | 249 | struct nfcsim *dev = nfc_digital_get_drvdata(ddev); |
7cbe0ff3 | 250 | |
204bddcb TE |
251 | dev->up = on; |
252 | ||
253 | return 0; | |
7cbe0ff3 TE |
254 | } |
255 | ||
204bddcb TE |
256 | static int nfcsim_in_configure_hw(struct nfc_digital_dev *ddev, |
257 | int type, int param) | |
7cbe0ff3 | 258 | { |
204bddcb | 259 | struct nfcsim *dev = nfc_digital_get_drvdata(ddev); |
7cbe0ff3 | 260 | |
204bddcb TE |
261 | switch (type) { |
262 | case NFC_DIGITAL_CONFIG_RF_TECH: | |
263 | dev->up = true; | |
264 | dev->mode = NFCSIM_MODE_INITIATOR; | |
265 | dev->rf_tech = param; | |
266 | break; | |
7cbe0ff3 | 267 | |
204bddcb TE |
268 | case NFC_DIGITAL_CONFIG_FRAMING: |
269 | break; | |
7cbe0ff3 | 270 | |
204bddcb TE |
271 | default: |
272 | NFCSIM_ERR(dev, "Invalid configuration type: %d\n", type); | |
273 | return -EINVAL; | |
7cbe0ff3 TE |
274 | } |
275 | ||
204bddcb | 276 | return 0; |
7cbe0ff3 TE |
277 | } |
278 | ||
204bddcb TE |
279 | static int nfcsim_in_send_cmd(struct nfc_digital_dev *ddev, |
280 | struct sk_buff *skb, u16 timeout, | |
281 | nfc_digital_cmd_complete_t cb, void *arg) | |
7cbe0ff3 | 282 | { |
204bddcb TE |
283 | return nfcsim_send(ddev, skb, timeout, cb, arg); |
284 | } | |
7cbe0ff3 | 285 | |
204bddcb TE |
286 | static int nfcsim_tg_configure_hw(struct nfc_digital_dev *ddev, |
287 | int type, int param) | |
288 | { | |
289 | struct nfcsim *dev = nfc_digital_get_drvdata(ddev); | |
7cbe0ff3 | 290 | |
204bddcb TE |
291 | switch (type) { |
292 | case NFC_DIGITAL_CONFIG_RF_TECH: | |
293 | dev->up = true; | |
294 | dev->mode = NFCSIM_MODE_TARGET; | |
295 | dev->rf_tech = param; | |
296 | break; | |
7cbe0ff3 | 297 | |
204bddcb TE |
298 | case NFC_DIGITAL_CONFIG_FRAMING: |
299 | break; | |
7cbe0ff3 | 300 | |
204bddcb TE |
301 | default: |
302 | NFCSIM_ERR(dev, "Invalid configuration type: %d\n", type); | |
303 | return -EINVAL; | |
7cbe0ff3 TE |
304 | } |
305 | ||
204bddcb | 306 | return 0; |
7cbe0ff3 TE |
307 | } |
308 | ||
204bddcb TE |
309 | static int nfcsim_tg_send_cmd(struct nfc_digital_dev *ddev, |
310 | struct sk_buff *skb, u16 timeout, | |
311 | nfc_digital_cmd_complete_t cb, void *arg) | |
7cbe0ff3 | 312 | { |
204bddcb | 313 | return nfcsim_send(ddev, skb, timeout, cb, arg); |
7cbe0ff3 TE |
314 | } |
315 | ||
204bddcb TE |
316 | static int nfcsim_tg_listen(struct nfc_digital_dev *ddev, u16 timeout, |
317 | nfc_digital_cmd_complete_t cb, void *arg) | |
7cbe0ff3 | 318 | { |
204bddcb | 319 | return nfcsim_send(ddev, NULL, timeout, cb, arg); |
7cbe0ff3 TE |
320 | } |
321 | ||
7186aac9 | 322 | static const struct nfc_digital_ops nfcsim_digital_ops = { |
204bddcb TE |
323 | .in_configure_hw = nfcsim_in_configure_hw, |
324 | .in_send_cmd = nfcsim_in_send_cmd, | |
7cbe0ff3 | 325 | |
204bddcb TE |
326 | .tg_listen = nfcsim_tg_listen, |
327 | .tg_configure_hw = nfcsim_tg_configure_hw, | |
328 | .tg_send_cmd = nfcsim_tg_send_cmd, | |
7cbe0ff3 | 329 | |
204bddcb TE |
330 | .abort_cmd = nfcsim_abort_cmd, |
331 | .switch_rf = nfcsim_switch_rf, | |
332 | }; | |
7cbe0ff3 | 333 | |
f9ac6273 TE |
334 | static struct dentry *nfcsim_debugfs_root; |
335 | ||
336 | static void nfcsim_debugfs_init(void) | |
337 | { | |
338 | nfcsim_debugfs_root = debugfs_create_dir("nfcsim", NULL); | |
f9ac6273 TE |
339 | } |
340 | ||
341 | static void nfcsim_debugfs_remove(void) | |
342 | { | |
343 | debugfs_remove_recursive(nfcsim_debugfs_root); | |
344 | } | |
345 | ||
346 | static void nfcsim_debugfs_init_dev(struct nfcsim *dev) | |
347 | { | |
348 | struct dentry *dev_dir; | |
349 | char devname[5]; /* nfcX\0 */ | |
350 | u32 idx; | |
351 | int n; | |
352 | ||
353 | if (!nfcsim_debugfs_root) { | |
354 | NFCSIM_ERR(dev, "nfcsim debugfs not initialized\n"); | |
355 | return; | |
356 | } | |
357 | ||
358 | idx = dev->nfc_digital_dev->nfc_dev->idx; | |
359 | n = snprintf(devname, sizeof(devname), "nfc%d", idx); | |
360 | if (n >= sizeof(devname)) { | |
361 | NFCSIM_ERR(dev, "Could not compute dev name for dev %d\n", idx); | |
362 | return; | |
363 | } | |
364 | ||
365 | dev_dir = debugfs_create_dir(devname, nfcsim_debugfs_root); | |
2a0fe4fe TE |
366 | |
367 | debugfs_create_u8("dropframe", 0664, dev_dir, &dev->dropframe); | |
f9ac6273 TE |
368 | } |
369 | ||
204bddcb TE |
370 | static struct nfcsim *nfcsim_device_new(struct nfcsim_link *link_in, |
371 | struct nfcsim_link *link_out) | |
7cbe0ff3 | 372 | { |
204bddcb TE |
373 | struct nfcsim *dev; |
374 | int rc; | |
7cbe0ff3 | 375 | |
204bddcb TE |
376 | dev = kzalloc(sizeof(struct nfcsim), GFP_KERNEL); |
377 | if (!dev) | |
378 | return ERR_PTR(-ENOMEM); | |
7cbe0ff3 | 379 | |
204bddcb TE |
380 | INIT_DELAYED_WORK(&dev->send_work, nfcsim_send_wq); |
381 | INIT_WORK(&dev->recv_work, nfcsim_recv_wq); | |
7cbe0ff3 | 382 | |
204bddcb TE |
383 | dev->nfc_digital_dev = |
384 | nfc_digital_allocate_device(&nfcsim_digital_ops, | |
385 | NFC_PROTO_NFC_DEP_MASK, | |
386 | NFCSIM_CAPABILITIES, | |
387 | 0, 0); | |
388 | if (!dev->nfc_digital_dev) { | |
389 | kfree(dev); | |
390 | return ERR_PTR(-ENOMEM); | |
7cbe0ff3 TE |
391 | } |
392 | ||
204bddcb | 393 | nfc_digital_set_drvdata(dev->nfc_digital_dev, dev); |
7cbe0ff3 | 394 | |
204bddcb TE |
395 | dev->link_in = link_in; |
396 | dev->link_out = link_out; | |
7cbe0ff3 | 397 | |
204bddcb TE |
398 | rc = nfc_digital_register_device(dev->nfc_digital_dev); |
399 | if (rc) { | |
400 | pr_err("Could not register digital device (%d)\n", rc); | |
401 | nfc_digital_free_device(dev->nfc_digital_dev); | |
402 | kfree(dev); | |
7cbe0ff3 | 403 | |
204bddcb | 404 | return ERR_PTR(rc); |
7cbe0ff3 TE |
405 | } |
406 | ||
f9ac6273 TE |
407 | nfcsim_debugfs_init_dev(dev); |
408 | ||
204bddcb | 409 | return dev; |
7cbe0ff3 TE |
410 | } |
411 | ||
204bddcb | 412 | static void nfcsim_device_free(struct nfcsim *dev) |
7cbe0ff3 | 413 | { |
204bddcb | 414 | nfc_digital_unregister_device(dev->nfc_digital_dev); |
7cbe0ff3 | 415 | |
204bddcb | 416 | dev->up = false; |
7cbe0ff3 | 417 | |
204bddcb | 418 | nfcsim_link_shutdown(dev->link_in); |
7cbe0ff3 | 419 | |
204bddcb TE |
420 | cancel_delayed_work_sync(&dev->send_work); |
421 | cancel_work_sync(&dev->recv_work); | |
7cbe0ff3 | 422 | |
204bddcb | 423 | nfc_digital_free_device(dev->nfc_digital_dev); |
7cbe0ff3 | 424 | |
7cbe0ff3 | 425 | kfree(dev); |
7cbe0ff3 TE |
426 | } |
427 | ||
204bddcb TE |
428 | static struct nfcsim *dev0; |
429 | static struct nfcsim *dev1; | |
7cbe0ff3 | 430 | |
40dac370 | 431 | static int __init nfcsim_init(void) |
7cbe0ff3 | 432 | { |
204bddcb | 433 | struct nfcsim_link *link0, *link1; |
7cbe0ff3 TE |
434 | int rc; |
435 | ||
204bddcb TE |
436 | link0 = nfcsim_link_new(); |
437 | link1 = nfcsim_link_new(); | |
438 | if (!link0 || !link1) { | |
7cbe0ff3 | 439 | rc = -ENOMEM; |
204bddcb | 440 | goto exit_err; |
7cbe0ff3 TE |
441 | } |
442 | ||
f9ac6273 TE |
443 | nfcsim_debugfs_init(); |
444 | ||
204bddcb | 445 | dev0 = nfcsim_device_new(link0, link1); |
7cbe0ff3 TE |
446 | if (IS_ERR(dev0)) { |
447 | rc = PTR_ERR(dev0); | |
204bddcb | 448 | goto exit_err; |
7cbe0ff3 TE |
449 | } |
450 | ||
204bddcb | 451 | dev1 = nfcsim_device_new(link1, link0); |
7cbe0ff3 | 452 | if (IS_ERR(dev1)) { |
204bddcb | 453 | nfcsim_device_free(dev0); |
7cbe0ff3 TE |
454 | |
455 | rc = PTR_ERR(dev1); | |
204bddcb | 456 | goto exit_err; |
7cbe0ff3 TE |
457 | } |
458 | ||
204bddcb | 459 | pr_info("nfcsim " NFCSIM_VERSION " initialized\n"); |
7cbe0ff3 | 460 | |
204bddcb TE |
461 | return 0; |
462 | ||
463 | exit_err: | |
464 | pr_err("Failed to initialize nfcsim driver (%d)\n", rc); | |
7cbe0ff3 | 465 | |
6f874baf GS |
466 | if (link0) |
467 | nfcsim_link_free(link0); | |
468 | if (link1) | |
469 | nfcsim_link_free(link1); | |
7cbe0ff3 TE |
470 | |
471 | return rc; | |
472 | } | |
473 | ||
40dac370 | 474 | static void __exit nfcsim_exit(void) |
7cbe0ff3 | 475 | { |
204bddcb TE |
476 | struct nfcsim_link *link0, *link1; |
477 | ||
478 | link0 = dev0->link_in; | |
479 | link1 = dev0->link_out; | |
7cbe0ff3 | 480 | |
204bddcb TE |
481 | nfcsim_device_free(dev0); |
482 | nfcsim_device_free(dev1); | |
7cbe0ff3 | 483 | |
204bddcb TE |
484 | nfcsim_link_free(link0); |
485 | nfcsim_link_free(link1); | |
f9ac6273 TE |
486 | |
487 | nfcsim_debugfs_remove(); | |
7cbe0ff3 TE |
488 | } |
489 | ||
490 | module_init(nfcsim_init); | |
491 | module_exit(nfcsim_exit); | |
492 | ||
493 | MODULE_DESCRIPTION("NFCSim driver ver " NFCSIM_VERSION); | |
494 | MODULE_VERSION(NFCSIM_VERSION); | |
495 | MODULE_LICENSE("GPL"); |