NFC: Add a DEP link control netlink command

NFC-DEP (Data Exchange Protocol) is an NFC MAC layer.
This command allows to enable and disable the DEP link on to which e.g.
LLCP can run.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Samuel Ortiz
2011-12-14 16:43:09 +01:00
committed by John W. Linville
parent db81a62451
commit 1ed28f6106
5 changed files with 255 additions and 0 deletions

View File

@ -52,6 +52,9 @@ struct nfc_ops {
int (*dev_down)(struct nfc_dev *dev);
int (*start_poll)(struct nfc_dev *dev, u32 protocols);
void (*stop_poll)(struct nfc_dev *dev);
int (*dep_link_up)(struct nfc_dev *dev, int target_idx,
u8 comm_mode, u8 rf_mode);
int (*dep_link_down)(struct nfc_dev *dev);
int (*activate_target)(struct nfc_dev *dev, u32 target_idx,
u32 protocol);
void (*deactivate_target)(struct nfc_dev *dev, u32 target_idx);
@ -60,6 +63,9 @@ struct nfc_ops {
void *cb_context);
};
#define NFC_TARGET_IDX_ANY -1
#define NFC_MAX_GT_LEN 48
struct nfc_target {
u32 idx;
u32 supported_protocols;
@ -83,6 +89,8 @@ struct nfc_dev {
bool dev_up;
bool polling;
bool remote_activated;
bool dep_link_up;
u32 dep_rf_mode;
struct nfc_genl_data genl_data;
u32 supported_protocols;
@ -165,4 +173,7 @@ struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp);
int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets,
int ntargets);
int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
u8 comm_mode, u8 rf_mode);
#endif /* __NET_NFC_H */