diff options
author | Robert Dolca <robert.dolca@intel.com> | 2015-10-22 12:11:38 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-10-25 19:12:57 +0100 |
commit | 0a97a3cba298fd989802bf34541c94b6488c3834 (patch) | |
tree | c9f980a8390536964381099a45f73e604a59ee74 /include/net/nfc | |
parent | 7bc4824ed5cf9feb0173b90a6bec28f694a5f7ce (diff) | |
download | linux-0a97a3cba298fd989802bf34541c94b6488c3834.tar.bz2 |
NFC: nci: Allow the driver to set handler for core nci ops
The driver may be required to act when some responses or
notifications arrive. For example the NCI core does not have a
handler for NCI_OP_CORE_GET_CONFIG_RSP. The NFCC can send a
config response that has to be read by the driver and the packet
may contain vendor specific data.
The Fields Peak driver needs to take certain actions when a reset
notification arrives (packet also not handled by the nfc core).
The driver handlers do not interfere with the core and they are
called after the core processes the packet.
Signed-off-by: Robert Dolca <robert.dolca@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r-- | include/net/nfc/nci_core.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 4ca1b6d1684b..d5a1caae9fd9 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h @@ -96,6 +96,9 @@ struct nci_ops { struct nci_prop_ops *prop_ops; size_t n_prop_ops; + + struct nci_prop_ops *core_ops; + size_t n_core_ops; }; #define NCI_MAX_SUPPORTED_RF_INTERFACES 4 @@ -345,9 +348,13 @@ static inline int nci_set_vendor_cmds(struct nci_dev *ndev, void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb); void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb); -int nci_prop_rsp_packet(struct nci_dev *ndev, __u16 opcode, +inline int nci_prop_rsp_packet(struct nci_dev *ndev, __u16 opcode, + struct sk_buff *skb); +inline int nci_prop_ntf_packet(struct nci_dev *ndev, __u16 opcode, + struct sk_buff *skb); +inline int nci_core_rsp_packet(struct nci_dev *ndev, __u16 opcode, struct sk_buff *skb); -int nci_prop_ntf_packet(struct nci_dev *ndev, __u16 opcode, +inline int nci_core_ntf_packet(struct nci_dev *ndev, __u16 opcode, struct sk_buff *skb); void nci_rx_data_packet(struct nci_dev *ndev, struct sk_buff *skb); int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload); |