diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-31 00:05:50 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-06-04 21:34:31 +0200 |
commit | 73167ced31d15c04e57b9e0885ac05675e9195a4 (patch) | |
tree | 165bc763ef1058ad8ec66ccd8adbb39c5af7e6f1 /net/nfc/llcp | |
parent | be9ae4ce4ee66e211815122ab4f41913efed4fec (diff) |
NFC: Introduce target mode rx data callback
This routine will be called by drivers whenever they receive data in target
mode. This should be unexpected events and as such should be handled by a
standalone API (i.e. not as a callback pointer from an existing API).
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/llcp')
-rw-r--r-- | net/nfc/llcp/llcp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c index 5f7aa3f632fb..5705e6dffb32 100644 --- a/net/nfc/llcp/llcp.c +++ b/net/nfc/llcp/llcp.c @@ -937,6 +937,21 @@ void nfc_llcp_recv(void *data, struct sk_buff *skb, int err) return; } +int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb) +{ + struct nfc_llcp_local *local; + + local = nfc_llcp_find_local(dev); + if (local == NULL) + return -ENODEV; + + local->rx_pending = skb_get(skb); + del_timer(&local->link_timer); + queue_work(local->rx_wq, &local->rx_work); + + return 0; +} + void nfc_llcp_mac_is_down(struct nfc_dev *dev) { struct nfc_llcp_local *local; |