]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: nfcsim: Make use of the Digital layer
authorThierry Escande <thierry.escande@collabora.com>
Thu, 23 Jun 2016 09:20:26 +0000 (11:20 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 4 Jul 2016 10:36:30 +0000 (12:36 +0200)
commit4ca55262350c234e90a0fbb767972d722c6c36b3
tree6d52eb415618a4e44331326c52e7837b15e29f38
parent5449951c21a9a7119dc04af3ffe19eef4e667c86
NFC: nfcsim: Make use of the Digital layer

With this complete rewrite, the loopback nfcsim driver now relies on the
Digital layer of the nfc stack. As with the previous version, 2 nfc
devices are declared when the driver is initialized. The driver supports
the NFC_DEP protocol in NFC-A and NFC-F technologies.

The 2 devices are using a pair of virtual links for sk_buff exchange.
The out-link of one device is the in-link of the other and conversely.

To receive data, a device calls nfcsim_link_recv_skb() on its in-link
and waits for incoming data on a wait queue. To send data, a device
calls nfcsim_link_send_skb() on its out-link which stores the passed skb
and signals its wait queue. If the peer device was in the
nfcsim_link_recv_skb() call, it will be signaled and will be able to
pass the received sk_buff up to the Digital layer.

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/nfcsim.c