aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/nfc/hci.h
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2012-09-20 02:59:10 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-24 18:17:27 -0400
commit96e324024b421b3753eb142d5d92fbe4ac5e7519 (patch)
treec05ff22fb3bda8511ec18ffc997c31e074e1d0c3 /include/net/nfc/hci.h
parent5adf54de97270256f6ec0e368ddde68ac516b692 (diff)
NFC: xmit from hci ops must return 0 or negative
xmit callback provided by a driver encapsulates upper layers data and sends it to the hardware. So, HCI does not know the exact amount of data being sent and thus can't handle partially sent frames properly. Therefore, the driver must return 0 for completely sent frame or negative for failure. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Acked-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r--include/net/nfc/hci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 9b5ed2d94d60..e900072950cb 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -30,6 +30,11 @@ struct nfc_hci_ops {
30 int (*open) (struct nfc_hci_dev *hdev); 30 int (*open) (struct nfc_hci_dev *hdev);
31 void (*close) (struct nfc_hci_dev *hdev); 31 void (*close) (struct nfc_hci_dev *hdev);
32 int (*hci_ready) (struct nfc_hci_dev *hdev); 32 int (*hci_ready) (struct nfc_hci_dev *hdev);
33 /*
34 * xmit must always send the complete buffer before
35 * returning. Returned result must be 0 for success
36 * or negative for failure.
37 */
33 int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); 38 int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
34 int (*start_poll) (struct nfc_hci_dev *hdev, 39 int (*start_poll) (struct nfc_hci_dev *hdev,
35 u32 im_protocols, u32 tm_protocols); 40 u32 im_protocols, u32 tm_protocols);