From f7a5f6c532f33ba66a7ca19e81ed447a83dab2db Mon Sep 17 00:00:00 2001 From: Arron Wang Date: Thu, 27 Sep 2012 17:32:55 +0800 Subject: NFC: Pass hardware specific HCI event to driver Signed-off-by: Arron Wang Signed-off-by: Samuel Ortiz --- net/nfc/hci/core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'net/nfc/hci') diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index 5fbb6e40793..8a9a811b558 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -182,7 +182,7 @@ static u32 nfc_hci_sak_to_protocol(u8 sak) } } -static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate) +int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate) { struct nfc_target *targets; struct sk_buff *atqa_skb = NULL; @@ -275,6 +275,7 @@ exit: return r; } +EXPORT_SYMBOL(nfc_hci_target_discovered); void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event, struct sk_buff *skb) @@ -307,8 +308,13 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event, nfc_hci_pipe2gate(hdev, pipe)); break; default: - /* TODO: Unknown events are hardware specific - * pass them to the driver (needs a new hci_ops) */ + if (hdev->ops->event_received) { + hdev->ops->event_received(hdev, + nfc_hci_pipe2gate(hdev, pipe), + event, skb); + return; + } + break; } -- cgit v1.2.3-70-g09d2