diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-01-29 06:16:22 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-29 06:16:22 -0500 |
commit | 448cd55c37dc3ea30705c4826ac3e7dbbcb74aa2 (patch) | |
tree | ac1b09f416944e50119b31165d6c8bca47e6ca77 /include/net | |
parent | 3b4797bce0050570e84bedd10e1b14e9320a3551 (diff) | |
parent | 9ebea3829fac7505e0cd2642fbd13cfa9c038831 (diff) |
Merge remote-tracking branch 'wireless-next/master' into HEAD
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/nfc/hci.h | 22 | ||||
-rw-r--r-- | include/net/nfc/nci_core.h | 1 | ||||
-rw-r--r-- | include/net/nfc/nfc.h | 8 |
3 files changed, 29 insertions, 2 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index 671953e11575..b87a1692b086 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -57,8 +57,10 @@ struct nfc_hci_ops { | |||
57 | int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb); | 57 | int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb); |
58 | int (*check_presence)(struct nfc_hci_dev *hdev, | 58 | int (*check_presence)(struct nfc_hci_dev *hdev, |
59 | struct nfc_target *target); | 59 | struct nfc_target *target); |
60 | void (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
61 | struct sk_buff *skb); | 61 | struct sk_buff *skb); |
62 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | ||
63 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | /* Pipes */ | 66 | /* Pipes */ |
@@ -82,11 +84,23 @@ typedef int (*xmit) (struct sk_buff *skb, void *cb_data); | |||
82 | 84 | ||
83 | #define NFC_HCI_MAX_GATES 256 | 85 | #define NFC_HCI_MAX_GATES 256 |
84 | 86 | ||
87 | /* | ||
88 | * These values can be specified by a driver to indicate it requires some | ||
89 | * adaptation of the HCI standard. | ||
90 | * | ||
91 | * NFC_HCI_QUIRK_SHORT_CLEAR - send HCI_ADM_CLEAR_ALL_PIPE cmd with no params | ||
92 | */ | ||
93 | enum { | ||
94 | NFC_HCI_QUIRK_SHORT_CLEAR = 0, | ||
95 | }; | ||
96 | |||
85 | struct nfc_hci_dev { | 97 | struct nfc_hci_dev { |
86 | struct nfc_dev *ndev; | 98 | struct nfc_dev *ndev; |
87 | 99 | ||
88 | u32 max_data_link_payload; | 100 | u32 max_data_link_payload; |
89 | 101 | ||
102 | bool shutting_down; | ||
103 | |||
90 | struct mutex msg_tx_mutex; | 104 | struct mutex msg_tx_mutex; |
91 | 105 | ||
92 | struct list_head msg_tx_queue; | 106 | struct list_head msg_tx_queue; |
@@ -129,12 +143,16 @@ struct nfc_hci_dev { | |||
129 | 143 | ||
130 | u8 *gb; | 144 | u8 *gb; |
131 | size_t gb_len; | 145 | size_t gb_len; |
146 | |||
147 | unsigned long quirks; | ||
132 | }; | 148 | }; |
133 | 149 | ||
134 | /* hci device allocation */ | 150 | /* hci device allocation */ |
135 | struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, | 151 | struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, |
136 | struct nfc_hci_init_data *init_data, | 152 | struct nfc_hci_init_data *init_data, |
153 | unsigned long quirks, | ||
137 | u32 protocols, | 154 | u32 protocols, |
155 | u32 supported_se, | ||
138 | const char *llc_name, | 156 | const char *llc_name, |
139 | int tx_headroom, | 157 | int tx_headroom, |
140 | int tx_tailroom, | 158 | int tx_tailroom, |
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index d705d8674949..5bc0c460edc0 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -147,6 +147,7 @@ struct nci_dev { | |||
147 | /* ----- NCI Devices ----- */ | 147 | /* ----- NCI Devices ----- */ |
148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, | 148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, |
149 | __u32 supported_protocols, | 149 | __u32 supported_protocols, |
150 | __u32 supported_se, | ||
150 | int tx_headroom, | 151 | int tx_headroom, |
151 | int tx_tailroom); | 152 | int tx_tailroom); |
152 | void nci_free_device(struct nci_dev *ndev); | 153 | void nci_free_device(struct nci_dev *ndev); |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index fce80b2f9be7..87a6417fc934 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
@@ -68,6 +68,8 @@ struct nfc_ops { | |||
68 | void *cb_context); | 68 | void *cb_context); |
69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); | 69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); |
70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); | 70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); |
71 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | ||
72 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | #define NFC_TARGET_IDX_ANY -1 | 75 | #define NFC_TARGET_IDX_ANY -1 |
@@ -109,12 +111,17 @@ struct nfc_dev { | |||
109 | struct nfc_genl_data genl_data; | 111 | struct nfc_genl_data genl_data; |
110 | u32 supported_protocols; | 112 | u32 supported_protocols; |
111 | 113 | ||
114 | u32 supported_se; | ||
115 | u32 active_se; | ||
116 | |||
112 | int tx_headroom; | 117 | int tx_headroom; |
113 | int tx_tailroom; | 118 | int tx_tailroom; |
114 | 119 | ||
115 | struct timer_list check_pres_timer; | 120 | struct timer_list check_pres_timer; |
116 | struct work_struct check_pres_work; | 121 | struct work_struct check_pres_work; |
117 | 122 | ||
123 | bool shutting_down; | ||
124 | |||
118 | struct nfc_ops *ops; | 125 | struct nfc_ops *ops; |
119 | }; | 126 | }; |
120 | #define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev) | 127 | #define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev) |
@@ -123,6 +130,7 @@ extern struct class nfc_class; | |||
123 | 130 | ||
124 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | 131 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, |
125 | u32 supported_protocols, | 132 | u32 supported_protocols, |
133 | u32 supported_se, | ||
126 | int tx_headroom, | 134 | int tx_headroom, |
127 | int tx_tailroom); | 135 | int tx_tailroom); |
128 | 136 | ||