提交 122c1958 编写于 作者: J Julien Lefrique 提交者: Samuel Ortiz

NFC: NCI: Forward data received in Target mode to nfc core

Signed-off-by: NJulien Lefrique <lefrique@marvell.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 485f442f
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* NFC Controller (NFCC) and a Device Host (DH). * NFC Controller (NFCC) and a Device Host (DH).
* *
* Copyright (C) 2011 Texas Instruments, Inc. * Copyright (C) 2011 Texas Instruments, Inc.
* Copyright (C) 2014 Marvell International Ltd.
* *
* Written by Ilan Elias <ilane@ti.com> * Written by Ilan Elias <ilane@ti.com>
* *
...@@ -223,7 +224,17 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev, ...@@ -223,7 +224,17 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,
} }
exit: exit:
nci_data_exchange_complete(ndev, skb, err); if (ndev->nfc_dev->rf_mode == NFC_RF_INITIATOR) {
nci_data_exchange_complete(ndev, skb, err);
} else if (ndev->nfc_dev->rf_mode == NFC_RF_TARGET) {
/* Data received in Target mode, forward to nfc core */
err = nfc_tm_data_received(ndev->nfc_dev, skb);
if (err)
pr_err("unable to handle received data\n");
} else {
pr_err("rf mode unknown\n");
kfree_skb(skb);
}
} }
/* Rx Data packet */ /* Rx Data packet */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册