• Thierry Escande's avatar
    NFC: nfcsim: Make use of the Digital layer · 204bddcb
    Thierry Escande authored
    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: default avatarThierry Escande <thierry.escande@collabora.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    204bddcb
nfcsim.c 9.06 KB