diff options
author | Lauro Ramos Venancio | 2011-07-01 19:31:34 -0300 |
---|---|---|
committer | John W. Linville | 2011-07-05 15:26:57 -0400 |
commit | 4d12b8b129f170d0fc3188de1e51a2a1b0f87730 (patch) | |
tree | e37bbec5da917fee80706516c56fb41fcd03a1b5 /include/net | |
parent | 3e256b8f8dfa309a80b5dece388d85d9a9801a29 (diff) |
NFC: add nfc generic netlink interface
The NFC generic netlink interface exports the NFC control operations
to the user space.
Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/nfc.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/nfc.h b/include/net/nfc.h index c57b579c8301..cc0130312f70 100644 --- a/include/net/nfc.h +++ b/include/net/nfc.h @@ -58,10 +58,28 @@ struct nfc_ops { void *cb_context); }; +struct nfc_target { + u32 idx; + u32 supported_protocols; + u16 sens_res; + u8 sel_res; +}; + +struct nfc_genl_data { + u32 poll_req_pid; + struct mutex genl_data_mutex; +}; + struct nfc_dev { unsigned idx; + unsigned target_idx; + struct nfc_target *targets; + int n_targets; + int targets_generation; + spinlock_t targets_lock; struct device dev; bool polling; + struct nfc_genl_data genl_data; u32 supported_protocols; struct nfc_ops *ops; @@ -132,4 +150,7 @@ static inline const char *nfc_device_name(struct nfc_dev *dev) struct sk_buff *nfc_alloc_skb(unsigned int size, gfp_t gfp); +int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, + int ntargets); + #endif /* __NET_NFC_H */ |