summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-01-05 10:12:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-05 10:13:24 -0500
commit1032c736e81cdf490ae62f86da7efe67c3c3e61d (patch)
treea0c3919849f97dbbc5ea7c6a9ac1d7a639e44a73 /include
parent117ff42fd43e92d24c6aa6f3e4f0f1e1edada140 (diff)
parentcb00ec382b57d35b955c085198cd54a0c1fcdc94 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/b43legacy/dma.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfc.h2
-rw-r--r--include/net/nfc/nci.h49
-rw-r--r--include/net/nfc/nci_core.h6
-rw-r--r--include/net/nfc/nfc.h3
4 files changed, 30 insertions, 30 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 89fee4ab190..01d4e5d6032 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -88,6 +88,7 @@ enum nfc_commands {
* @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID
* @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the
* target is not NFC-Forum compliant)
+ * @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes
* @NFC_ATTR_COMM_MODE: Passive or active mode
* @NFC_ATTR_RF_MODE: Initiator or target
*/
@@ -99,6 +100,7 @@ enum nfc_attrs {
NFC_ATTR_TARGET_INDEX,
NFC_ATTR_TARGET_SENS_RES,
NFC_ATTR_TARGET_SEL_RES,
+ NFC_ATTR_TARGET_NFCID1,
NFC_ATTR_COMM_MODE,
NFC_ATTR_RF_MODE,
/* private: internal use only */
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h
index b61eb6c9df1..2be95e2626c 100644
--- a/include/net/nfc/nci.h
+++ b/include/net/nfc/nci.h
@@ -54,11 +54,10 @@
#define NCI_STATUS_RF_PROTOCOL_ERROR 0xb1
#define NCI_STATUS_RF_TIMEOUT_ERROR 0xb2
/* NFCEE Interface Specific Status Codes */
-#define NCI_STATUS_MAX_ACTIVE_NFCEE_INTERFACES_REACHED 0xc0
-#define NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED 0xc1
-#define NCI_STATUS_NFCEE_TRANSMISSION_ERROR 0xc2
-#define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc3
-#define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc4
+#define NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED 0xc0
+#define NCI_STATUS_NFCEE_TRANSMISSION_ERROR 0xc1
+#define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc2
+#define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc3
/* NCI RF Technology and Mode */
#define NCI_NFC_A_PASSIVE_POLL_MODE 0x00
@@ -66,11 +65,13 @@
#define NCI_NFC_F_PASSIVE_POLL_MODE 0x02
#define NCI_NFC_A_ACTIVE_POLL_MODE 0x03
#define NCI_NFC_F_ACTIVE_POLL_MODE 0x05
+#define NCI_NFC_15693_PASSIVE_POLL_MODE 0x06
#define NCI_NFC_A_PASSIVE_LISTEN_MODE 0x80
#define NCI_NFC_B_PASSIVE_LISTEN_MODE 0x81
#define NCI_NFC_F_PASSIVE_LISTEN_MODE 0x82
#define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83
#define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85
+#define NCI_NFC_15693_PASSIVE_LISTEN_MODE 0x86
/* NCI RF Technologies */
#define NCI_NFC_RF_TECHNOLOGY_A 0x00
@@ -83,9 +84,9 @@
#define NCI_NFC_BIT_RATE_212 0x01
#define NCI_NFC_BIT_RATE_424 0x02
#define NCI_NFC_BIT_RATE_848 0x03
-#define NCI_NFC_BIT_RATE_1696 0x04
-#define NCI_NFC_BIT_RATE_3392 0x05
-#define NCI_NFC_BIT_RATE_6784 0x06
+#define NCI_NFC_BIT_RATE_1695 0x04
+#define NCI_NFC_BIT_RATE_3390 0x05
+#define NCI_NFC_BIT_RATE_6780 0x06
/* NCI RF Protocols */
#define NCI_RF_PROTOCOL_UNKNOWN 0x00
@@ -114,20 +115,6 @@
/* NCI RF_DISCOVER_MAP_CMD modes */
#define NCI_DISC_MAP_MODE_POLL 0x01
#define NCI_DISC_MAP_MODE_LISTEN 0x02
-#define NCI_DISC_MAP_MODE_BOTH 0x03
-
-/* NCI Discovery Types */
-#define NCI_DISCOVERY_TYPE_POLL_A_PASSIVE 0x00
-#define NCI_DISCOVERY_TYPE_POLL_B_PASSIVE 0x01
-#define NCI_DISCOVERY_TYPE_POLL_F_PASSIVE 0x02
-#define NCI_DISCOVERY_TYPE_POLL_A_ACTIVE 0x03
-#define NCI_DISCOVERY_TYPE_POLL_F_ACTIVE 0x05
-#define NCI_DISCOVERY_TYPE_WAKEUP_A_ACTIVE 0x09
-#define NCI_DISCOVERY_TYPE_LISTEN_A_PASSIVE 0x80
-#define NCI_DISCOVERY_TYPE_LISTEN_B_PASSIVE 0x81
-#define NCI_DISCOVERY_TYPE_LISTEN_F_PASSIVE 0x82
-#define NCI_DISCOVERY_TYPE_LISTEN_A_ACTIVE 0x83
-#define NCI_DISCOVERY_TYPE_LISTEN_F_ACTIVE 0x85
/* NCI Deactivation Type */
#define NCI_DEACTIVATE_TYPE_IDLE_MODE 0x00
@@ -200,7 +187,7 @@ struct nci_core_reset_cmd {
struct disc_map_config {
__u8 rf_protocol;
__u8 mode;
- __u8 rf_interface_type;
+ __u8 rf_interface;
} __packed;
struct nci_rf_disc_map_cmd {
@@ -211,7 +198,7 @@ struct nci_rf_disc_map_cmd {
#define NCI_OP_RF_DISCOVER_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x03)
struct disc_config {
- __u8 type;
+ __u8 rf_tech_and_mode;
__u8 frequency;
} __packed;
@@ -249,8 +236,6 @@ struct nci_core_init_rsp_2 {
__le16 max_routing_table_size;
__u8 max_ctrl_pkt_payload_len;
__le16 max_size_for_large_params;
- __u8 max_data_pkt_payload_size;
- __u8 initial_num_credits;
__u8 manufact_id;
__le32 manufact_specific_info;
} __packed;
@@ -264,7 +249,7 @@ struct nci_core_init_rsp_2 {
/* --------------------------- */
/* ---- NCI Notifications ---- */
/* --------------------------- */
-#define NCI_OP_CORE_CONN_CREDITS_NTF nci_opcode_pack(NCI_GID_CORE, 0x07)
+#define NCI_OP_CORE_CONN_CREDITS_NTF nci_opcode_pack(NCI_GID_CORE, 0x06)
struct conn_credit_entry {
__u8 conn_id;
__u8 credits;
@@ -275,6 +260,12 @@ struct nci_core_conn_credit_ntf {
struct conn_credit_entry conn_entries[NCI_MAX_NUM_CONN];
} __packed;
+#define NCI_OP_CORE_INTF_ERROR_NTF nci_opcode_pack(NCI_GID_CORE, 0x08)
+struct nci_core_intf_error_ntf {
+ __u8 status;
+ __u8 conn_id;
+} __packed;
+
#define NCI_OP_RF_INTF_ACTIVATED_NTF nci_opcode_pack(NCI_GID_RF_MGMT, 0x05)
struct rf_tech_specific_params_nfca_poll {
__u16 sens_res;
@@ -291,9 +282,11 @@ struct activation_params_nfca_poll_iso_dep {
struct nci_rf_intf_activated_ntf {
__u8 rf_discovery_id;
- __u8 rf_interface_type;
+ __u8 rf_interface;
__u8 rf_protocol;
__u8 activation_rf_tech_and_mode;
+ __u8 max_data_pkt_payload_size;
+ __u8 initial_num_credits;
__u8 rf_tech_specific_params_len;
union {
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index c92b69d7e0c..bccd89e9d4c 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -111,11 +111,13 @@ struct nci_dev {
__u16 max_routing_table_size;
__u8 max_ctrl_pkt_payload_len;
__u16 max_size_for_large_params;
- __u8 max_data_pkt_payload_size;
- __u8 initial_num_credits;
__u8 manufact_id;
__u32 manufact_specific_info;
+ /* received during NCI_OP_RF_INTF_ACTIVATED_NTF */
+ __u8 max_data_pkt_payload_size;
+ __u8 initial_num_credits;
+
/* stored during nci_data_exchange */
data_exchange_cb_t data_exchange_cb;
void *data_exchange_cb_context;
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index ccfe757a94e..8696b773a69 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -65,12 +65,15 @@ struct nfc_ops {
#define NFC_TARGET_IDX_ANY -1
#define NFC_MAX_GT_LEN 48
+#define NFC_MAX_NFCID1_LEN 10
struct nfc_target {
u32 idx;
u32 supported_protocols;
u16 sens_res;
u8 sel_res;
+ u8 nfcid1_len;
+ u8 nfcid1[NFC_MAX_NFCID1_LEN];
};
struct nfc_genl_data {