1. 20 7月, 2016 2 次提交
    • T
      NFC: nfcsim: Simulate lost frames through debugfs entry · 2a0fe4fe
      Thierry Escande 提交于
      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: NThierry Escande <thierry.escande@collabora.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2a0fe4fe
    • T
      NFC: nfcsim: Add support for sysfs control entry · f9ac6273
      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: NThierry Escande <thierry.escande@collabora.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      f9ac6273
  2. 04 7月, 2016 1 次提交
    • T
      NFC: nfcsim: Make use of the Digital layer · 204bddcb
      Thierry Escande 提交于
      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: NThierry Escande <thierry.escande@collabora.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      204bddcb
  3. 21 12月, 2015 1 次提交
  4. 27 10月, 2015 1 次提交
  5. 25 9月, 2013 2 次提交
  6. 14 8月, 2013 1 次提交
  7. 14 6月, 2013 1 次提交