20 Jul, 2016

2 commits

  • This patch allows to simulate the lost of frames exchanged between the 2
    nfcsim devices through a control entry in the debugfs and is used as
    follow:

    echo n > /sys/kernel/debug/nfcsim/nfcX/dropframe

    Where n specifies the number of frames to be dropped between 0 and 255
    and nfcX is either nfc0 or nfc1, one of the two nfcsim devices.

    In the following example, the next frame that should be sent by the nfc0
    device will be dropped and thus not received by the nfc1 device:

    echo 1 > /sys/kernel/debug/nfcsim/nfc0/dropframe

    The value of 0 can be used to reset the dropframe counter.

    Signed-off-by: Thierry Escande
    Signed-off-by: Samuel Ortiz

    Thierry Escande
     
  • The idea is to have a way to control and/or modify the behavior of the
    nfcsim virtual devices.

    This patch creates a folder tree in the debug filesystem. The debugfs is
    usually mounted into /sys/kernel/debug and the nfcsim entries are
    located in DEBUGFS/nfcsim/nfcX/ where X is either 0 or 1 depending on
    the device you want to address.

    These folders are empty for now and control entries will be added by
    upcoming commits.

    Signed-off-by: Thierry Escande
    Signed-off-by: Samuel Ortiz

    Thierry Escande
     

04 Jul, 2016

1 commit

  • 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
    Signed-off-by: Samuel Ortiz

    Thierry Escande
     

21 Dec, 2015

1 commit


27 Oct, 2015

1 commit


25 Sep, 2013

2 commits


14 Aug, 2013

1 commit

  • This patch fixes 3 sparse warnings:
    nfcsim.c:63:25: sparse: symbol 'wq' was not declared.
    nfcsim.c:484:12: sparse: symbol 'nfcsim_init' was not declared.
    nfcsim.c:525:13: sparse: symbol 'nfcsim_exit' was not declared.

    Reported-by: Fengguang Wu
    Signed-off-by: Thierry Escande
    Signed-off-by: Samuel Ortiz

    Thierry Escande
     

14 Jun, 2013

1 commit

  • This driver declares two virtual NFC devices supporting NFC-DEP protocol.
    An LLCP connection can be established between them and all packets sent
    from one device is sent back to the other, acting as loopback devices.

    Once established, the LLCP link can be disconnected by disabling the target
    device (with rfkill, nfctool, or neard disable-adapter test script).

    Signed-off-by: Thierry Escande
    Signed-off-by: Samuel Ortiz

    Thierry Escande