summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2012-09-27 17:32:55 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2012-10-26 18:26:45 +0200
commitf7a5f6c532f33ba66a7ca19e81ed447a83dab2db (patch)
tree6ac75749971e6870a0a8fbbf059fcca2af9ee55b /net
parent7e2afc9d072b9f84b314b208a125c2b1ce36b685 (diff)
downloadlinux-f7a5f6c532f33ba66a7ca19e81ed447a83dab2db.tar.bz2
NFC: Pass hardware specific HCI event to driver
Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/nfc/hci/core.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index 5fbb6e40793e..8a9a811b558a 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;
}