Merge tag 'nfc-next-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next
Samuel Ortiz <sameo@linux.intel.com> says: "NFC: 3.19 pull request This is the NFC pull request for 3.19. With this one we get: - NFC digital improvements for DEP support: Chaining, NACK and ATN support added. - NCI improvements: Support for p2p target, SE IO operand addition, SE operands extensions to support proprietary implementations, and a few fixes. - NFC HCI improvements: OPEN_PIPE and NOTIFY_ALL_CLEARED support, and SE IO operand addition. - A bunch of minor improvements and fixes for STMicro st21nfcb and st21nfca" Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -225,6 +225,19 @@ struct nfc_digital_dev {
|
||||
u8 curr_protocol;
|
||||
u8 curr_rf_tech;
|
||||
u8 curr_nfc_dep_pni;
|
||||
u8 did;
|
||||
|
||||
u8 local_payload_max;
|
||||
u8 remote_payload_max;
|
||||
|
||||
struct sk_buff *chaining_skb;
|
||||
struct digital_data_exch *data_exch;
|
||||
|
||||
int atn_count;
|
||||
int nack_count;
|
||||
|
||||
struct sk_buff *saved_skb;
|
||||
unsigned int saved_skb_len;
|
||||
|
||||
u16 target_fsc;
|
||||
|
||||
|
||||
@@ -57,10 +57,14 @@ struct nfc_hci_ops {
|
||||
int (*discover_se)(struct nfc_hci_dev *dev);
|
||||
int (*enable_se)(struct nfc_hci_dev *dev, u32 se_idx);
|
||||
int (*disable_se)(struct nfc_hci_dev *dev, u32 se_idx);
|
||||
int (*se_io)(struct nfc_hci_dev *dev, u32 se_idx,
|
||||
u8 *apdu, size_t apdu_length,
|
||||
se_io_cb_t cb, void *cb_context);
|
||||
};
|
||||
|
||||
/* Pipes */
|
||||
#define NFC_HCI_INVALID_PIPE 0x80
|
||||
#define NFC_HCI_DO_NOT_CREATE_PIPE 0x81
|
||||
#define NFC_HCI_LINK_MGMT_PIPE 0x00
|
||||
#define NFC_HCI_ADMIN_PIPE 0x01
|
||||
|
||||
|
||||
+32
-5
@@ -28,6 +28,8 @@
|
||||
#ifndef __NCI_H
|
||||
#define __NCI_H
|
||||
|
||||
#include <net/nfc/nfc.h>
|
||||
|
||||
/* NCI constants */
|
||||
#define NCI_MAX_NUM_MAPPING_CONFIGS 10
|
||||
#define NCI_MAX_NUM_RF_CONFIGS 10
|
||||
@@ -73,6 +75,8 @@
|
||||
#define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83
|
||||
#define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85
|
||||
|
||||
#define NCI_RF_TECH_MODE_LISTEN_MASK 0x80
|
||||
|
||||
/* NCI RF Technologies */
|
||||
#define NCI_NFC_RF_TECHNOLOGY_A 0x00
|
||||
#define NCI_NFC_RF_TECHNOLOGY_B 0x01
|
||||
@@ -106,6 +110,17 @@
|
||||
|
||||
/* NCI Configuration Parameter Tags */
|
||||
#define NCI_PN_ATR_REQ_GEN_BYTES 0x29
|
||||
#define NCI_LN_ATR_RES_GEN_BYTES 0x61
|
||||
#define NCI_LA_SEL_INFO 0x32
|
||||
#define NCI_LF_PROTOCOL_TYPE 0x50
|
||||
#define NCI_LF_CON_BITR_F 0x54
|
||||
|
||||
/* NCI Configuration Parameters masks */
|
||||
#define NCI_LA_SEL_INFO_ISO_DEP_MASK 0x20
|
||||
#define NCI_LA_SEL_INFO_NFC_DEP_MASK 0x40
|
||||
#define NCI_LF_PROTOCOL_TYPE_NFC_DEP_MASK 0x02
|
||||
#define NCI_LF_CON_BITR_F_212 0x02
|
||||
#define NCI_LF_CON_BITR_F_424 0x04
|
||||
|
||||
/* NCI Reset types */
|
||||
#define NCI_RESET_TYPE_KEEP_CONFIG 0x00
|
||||
@@ -314,26 +329,31 @@ struct nci_core_intf_error_ntf {
|
||||
struct rf_tech_specific_params_nfca_poll {
|
||||
__u16 sens_res;
|
||||
__u8 nfcid1_len; /* 0, 4, 7, or 10 Bytes */
|
||||
__u8 nfcid1[10];
|
||||
__u8 nfcid1[NFC_NFCID1_MAXSIZE];
|
||||
__u8 sel_res_len; /* 0 or 1 Bytes */
|
||||
__u8 sel_res;
|
||||
} __packed;
|
||||
|
||||
struct rf_tech_specific_params_nfcb_poll {
|
||||
__u8 sensb_res_len;
|
||||
__u8 sensb_res[12]; /* 11 or 12 Bytes */
|
||||
__u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; /* 11 or 12 Bytes */
|
||||
} __packed;
|
||||
|
||||
struct rf_tech_specific_params_nfcf_poll {
|
||||
__u8 bit_rate;
|
||||
__u8 sensf_res_len;
|
||||
__u8 sensf_res[18]; /* 16 or 18 Bytes */
|
||||
__u8 sensf_res[NFC_SENSF_RES_MAXSIZE]; /* 16 or 18 Bytes */
|
||||
} __packed;
|
||||
|
||||
struct rf_tech_specific_params_nfcv_poll {
|
||||
__u8 res_flags;
|
||||
__u8 dsfid;
|
||||
__u8 uid[8]; /* 8 Bytes */
|
||||
__u8 uid[NFC_ISO15693_UID_MAXSIZE]; /* 8 Bytes */
|
||||
} __packed;
|
||||
|
||||
struct rf_tech_specific_params_nfcf_listen {
|
||||
__u8 local_nfcid2_len;
|
||||
__u8 local_nfcid2[NFC_NFCID2_MAXSIZE]; /* 0 or 8 Bytes */
|
||||
} __packed;
|
||||
|
||||
struct nci_rf_discover_ntf {
|
||||
@@ -365,7 +385,12 @@ struct activation_params_nfcb_poll_iso_dep {
|
||||
|
||||
struct activation_params_poll_nfc_dep {
|
||||
__u8 atr_res_len;
|
||||
__u8 atr_res[63];
|
||||
__u8 atr_res[NFC_ATR_RES_MAXSIZE - 2]; /* ATR_RES from byte 3 */
|
||||
};
|
||||
|
||||
struct activation_params_listen_nfc_dep {
|
||||
__u8 atr_req_len;
|
||||
__u8 atr_req[NFC_ATR_REQ_MAXSIZE - 2]; /* ATR_REQ from byte 3 */
|
||||
};
|
||||
|
||||
struct nci_rf_intf_activated_ntf {
|
||||
@@ -382,6 +407,7 @@ struct nci_rf_intf_activated_ntf {
|
||||
struct rf_tech_specific_params_nfcb_poll nfcb_poll;
|
||||
struct rf_tech_specific_params_nfcf_poll nfcf_poll;
|
||||
struct rf_tech_specific_params_nfcv_poll nfcv_poll;
|
||||
struct rf_tech_specific_params_nfcf_listen nfcf_listen;
|
||||
} rf_tech_specific_params;
|
||||
|
||||
__u8 data_exch_rf_tech_and_mode;
|
||||
@@ -393,6 +419,7 @@ struct nci_rf_intf_activated_ntf {
|
||||
struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep;
|
||||
struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep;
|
||||
struct activation_params_poll_nfc_dep poll_nfc_dep;
|
||||
struct activation_params_listen_nfc_dep listen_nfc_dep;
|
||||
} activation_params;
|
||||
|
||||
} __packed;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments, Inc.
|
||||
* Copyright (C) 2013 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2014 Marvell International Ltd.
|
||||
*
|
||||
* Written by Ilan Elias <ilane@ti.com>
|
||||
*
|
||||
@@ -49,6 +50,8 @@ enum nci_state {
|
||||
NCI_W4_ALL_DISCOVERIES,
|
||||
NCI_W4_HOST_SELECT,
|
||||
NCI_POLL_ACTIVE,
|
||||
NCI_LISTEN_ACTIVE,
|
||||
NCI_LISTEN_SLEEP,
|
||||
};
|
||||
|
||||
/* NCI timeouts */
|
||||
@@ -69,6 +72,12 @@ struct nci_ops {
|
||||
int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
|
||||
int (*setup)(struct nci_dev *ndev);
|
||||
__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
|
||||
int (*discover_se)(struct nci_dev *ndev);
|
||||
int (*disable_se)(struct nci_dev *ndev, u32 se_idx);
|
||||
int (*enable_se)(struct nci_dev *ndev, u32 se_idx);
|
||||
int (*se_io)(struct nci_dev *ndev, u32 se_idx,
|
||||
u8 *apdu, size_t apdu_length,
|
||||
se_io_cb_t cb, void *cb_context);
|
||||
};
|
||||
|
||||
#define NCI_MAX_SUPPORTED_RF_INTERFACES 4
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Instituto Nokia de Tecnologia
|
||||
* Copyright (C) 2014 Marvell International Ltd.
|
||||
*
|
||||
* Authors:
|
||||
* Lauro Ramos Venancio <lauro.venancio@openbossa.org>
|
||||
@@ -87,6 +88,7 @@ struct nfc_ops {
|
||||
#define NFC_TARGET_IDX_ANY -1
|
||||
#define NFC_MAX_GT_LEN 48
|
||||
#define NFC_ATR_RES_GT_OFFSET 15
|
||||
#define NFC_ATR_REQ_GT_OFFSET 14
|
||||
|
||||
/**
|
||||
* struct nfc_target - NFC target descriptiom
|
||||
|
||||
Reference in New Issue
Block a user