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 | |
| parent | 3b4797bce0050570e84bedd10e1b14e9320a3551 (diff) | |
| parent | 9ebea3829fac7505e0cd2642fbd13cfa9c038831 (diff) | |
Merge remote-tracking branch 'wireless-next/master' into HEAD
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bcma/bcma_driver_mips.h | 4 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_pci.h | 2 | ||||
| -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 | ||||
| -rw-r--r-- | include/uapi/linux/nfc.h | 37 |
6 files changed, 57 insertions, 17 deletions
diff --git a/include/linux/bcma/bcma_driver_mips.h b/include/linux/bcma/bcma_driver_mips.h index 0baf8a56b794..0d1ea297851a 100644 --- a/include/linux/bcma/bcma_driver_mips.h +++ b/include/linux/bcma/bcma_driver_mips.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define BCMA_MIPS_MIPS74K_GPIOEN 0x0048 | 28 | #define BCMA_MIPS_MIPS74K_GPIOEN 0x0048 |
| 29 | #define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0 | 29 | #define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0 |
| 30 | 30 | ||
| 31 | #define BCMA_MIPS_OOBSELINA74 0x004 | ||
| 31 | #define BCMA_MIPS_OOBSELOUTA30 0x100 | 32 | #define BCMA_MIPS_OOBSELOUTA30 0x100 |
| 32 | 33 | ||
| 33 | struct bcma_device; | 34 | struct bcma_device; |
| @@ -36,7 +37,6 @@ struct bcma_drv_mips { | |||
| 36 | struct bcma_device *core; | 37 | struct bcma_device *core; |
| 37 | u8 setup_done:1; | 38 | u8 setup_done:1; |
| 38 | u8 early_setup_done:1; | 39 | u8 early_setup_done:1; |
| 39 | unsigned int assigned_irqs; | ||
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | #ifdef CONFIG_BCMA_DRIVER_MIPS | 42 | #ifdef CONFIG_BCMA_DRIVER_MIPS |
| @@ -49,6 +49,6 @@ static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { } | |||
| 49 | 49 | ||
| 50 | extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); | 50 | extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); |
| 51 | 51 | ||
| 52 | extern unsigned int bcma_core_mips_irq(struct bcma_device *dev); | 52 | extern unsigned int bcma_core_irq(struct bcma_device *core); |
| 53 | 53 | ||
| 54 | #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */ | 54 | #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */ |
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h index 41da581e1612..31232247a1ee 100644 --- a/include/linux/bcma/bcma_driver_pci.h +++ b/include/linux/bcma/bcma_driver_pci.h | |||
| @@ -179,6 +179,8 @@ struct pci_dev; | |||
| 179 | #define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ | 179 | #define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ |
| 180 | #define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ | 180 | #define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ |
| 181 | 181 | ||
| 182 | #define BCMA_CORE_PCI_CFG_DEVCTRL 0xd8 | ||
| 183 | |||
| 182 | /* PCIE Root Capability Register bits (Host mode only) */ | 184 | /* PCIE Root Capability Register bits (Host mode only) */ |
| 183 | #define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001 | 185 | #define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001 |
| 184 | 186 | ||
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 | ||
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 0e63cee8d810..7969f46f1bb3 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
| @@ -5,20 +5,17 @@ | |||
| 5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> | 5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> |
| 6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> | 6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * Permission to use, copy, modify, and/or distribute this software for any |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * purpose with or without fee is hereby granted, provided that the above |
| 10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * copyright notice and this permission notice appear in all copies. |
| 11 | * (at your option) any later version. | ||
| 12 | * | 11 | * |
| 13 | * This program is distributed in the hope that it will be useful, | 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 16 | * GNU General Public License for more details. | 15 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 17 | * | 16 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 18 | * You should have received a copy of the GNU General Public License | 17 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 19 | * along with this program; if not, write to the | 18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 20 | * Free Software Foundation, Inc., | ||
| 21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 22 | */ | 19 | */ |
| 23 | 20 | ||
| 24 | #ifndef __LINUX_NFC_H | 21 | #ifndef __LINUX_NFC_H |
| @@ -67,6 +64,11 @@ | |||
| 67 | * subsequent CONNECT and CC messages. | 64 | * subsequent CONNECT and CC messages. |
| 68 | * If one of the passed parameters is wrong none is set and -EINVAL is | 65 | * If one of the passed parameters is wrong none is set and -EINVAL is |
| 69 | * returned. | 66 | * returned. |
| 67 | * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element. | ||
| 68 | * Once enabled a secure element will handle card emulation mode, i.e. | ||
| 69 | * starting a poll from a device which has a secure element enabled means | ||
| 70 | * we want to do SE based card emulation. | ||
| 71 | * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element. | ||
| 70 | */ | 72 | */ |
| 71 | enum nfc_commands { | 73 | enum nfc_commands { |
| 72 | NFC_CMD_UNSPEC, | 74 | NFC_CMD_UNSPEC, |
| @@ -86,6 +88,8 @@ enum nfc_commands { | |||
| 86 | NFC_EVENT_TM_DEACTIVATED, | 88 | NFC_EVENT_TM_DEACTIVATED, |
| 87 | NFC_CMD_LLC_GET_PARAMS, | 89 | NFC_CMD_LLC_GET_PARAMS, |
| 88 | NFC_CMD_LLC_SET_PARAMS, | 90 | NFC_CMD_LLC_SET_PARAMS, |
| 91 | NFC_CMD_ENABLE_SE, | ||
| 92 | NFC_CMD_DISABLE_SE, | ||
| 89 | /* private: internal use only */ | 93 | /* private: internal use only */ |
| 90 | __NFC_CMD_AFTER_LAST | 94 | __NFC_CMD_AFTER_LAST |
| 91 | }; | 95 | }; |
| @@ -114,6 +118,7 @@ enum nfc_commands { | |||
| 114 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter | 118 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter |
| 115 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter | 119 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter |
| 116 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter | 120 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter |
| 121 | * @NFC_ATTR_SE: Available Secure Elements | ||
| 117 | */ | 122 | */ |
| 118 | enum nfc_attrs { | 123 | enum nfc_attrs { |
| 119 | NFC_ATTR_UNSPEC, | 124 | NFC_ATTR_UNSPEC, |
| @@ -134,6 +139,7 @@ enum nfc_attrs { | |||
| 134 | NFC_ATTR_LLC_PARAM_LTO, | 139 | NFC_ATTR_LLC_PARAM_LTO, |
| 135 | NFC_ATTR_LLC_PARAM_RW, | 140 | NFC_ATTR_LLC_PARAM_RW, |
| 136 | NFC_ATTR_LLC_PARAM_MIUX, | 141 | NFC_ATTR_LLC_PARAM_MIUX, |
| 142 | NFC_ATTR_SE, | ||
| 137 | /* private: internal use only */ | 143 | /* private: internal use only */ |
| 138 | __NFC_ATTR_AFTER_LAST | 144 | __NFC_ATTR_AFTER_LAST |
| 139 | }; | 145 | }; |
| @@ -172,6 +178,11 @@ enum nfc_attrs { | |||
| 172 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) | 178 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) |
| 173 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | 179 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) |
| 174 | 180 | ||
| 181 | /* NFC Secure Elements */ | ||
| 182 | #define NFC_SE_NONE 0x0 | ||
| 183 | #define NFC_SE_UICC 0x1 | ||
| 184 | #define NFC_SE_EMBEDDED 0x2 | ||
| 185 | |||
| 175 | struct sockaddr_nfc { | 186 | struct sockaddr_nfc { |
| 176 | sa_family_t sa_family; | 187 | sa_family_t sa_family; |
| 177 | __u32 dev_idx; | 188 | __u32 dev_idx; |
