summaryrefslogtreecommitdiffstats
path: root/net/nfc/core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-05-31 00:05:50 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-06-04 21:34:31 +0200
commit73167ced31d15c04e57b9e0885ac05675e9195a4 (patch)
tree165bc763ef1058ad8ec66ccd8adbb39c5af7e6f1 /net/nfc/core.c
parentbe9ae4ce4ee66e211815122ab4f41913efed4fec (diff)
downloadlinux-73167ced31d15c04e57b9e0885ac05675e9195a4.tar.bz2
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/core.c')
-rw-r--r--net/nfc/core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 76c1e207d297..6a3799eebc30 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -462,6 +462,18 @@ u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, size_t *gb_len)
}
EXPORT_SYMBOL(nfc_get_local_general_bytes);
+int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb)
+{
+ /* Only LLCP target mode for now */
+ if (dev->dep_link_up == false) {
+ kfree_skb(skb);
+ return -ENOLINK;
+ }
+
+ return nfc_llcp_data_received(dev, skb);
+}
+EXPORT_SYMBOL(nfc_tm_data_received);
+
int nfc_tm_activated(struct nfc_dev *dev, u32 protocol, u8 comm_mode,
u8 *gb, size_t gb_len)
{