aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/st21nfcb/st21nfcb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nfc/st21nfcb/st21nfcb.c')
-rw-r--r--drivers/nfc/st21nfcb/st21nfcb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfcb/st21nfcb.c b/drivers/nfc/st21nfcb/st21nfcb.c
index 90d37156169e..e72dae816e72 100644
--- a/drivers/nfc/st21nfcb/st21nfcb.c
+++ b/drivers/nfc/st21nfcb/st21nfcb.c
@@ -25,6 +25,8 @@
25 25
26#define DRIVER_DESC "NCI NFC driver for ST21NFCB" 26#define DRIVER_DESC "NCI NFC driver for ST21NFCB"
27 27
28#define ST21NFCB_NCI1_X_PROPRIETARY_ISO15693 0x83
29
28static int st21nfcb_nci_open(struct nci_dev *ndev) 30static int st21nfcb_nci_open(struct nci_dev *ndev)
29{ 31{
30 struct st21nfcb_nci_info *info = nci_get_drvdata(ndev); 32 struct st21nfcb_nci_info *info = nci_get_drvdata(ndev);
@@ -64,10 +66,18 @@ static int st21nfcb_nci_send(struct nci_dev *ndev, struct sk_buff *skb)
64 return ndlc_send(info->ndlc, skb); 66 return ndlc_send(info->ndlc, skb);
65} 67}
66 68
69static __u32 st21nfcb_nci_get_rfprotocol(struct nci_dev *ndev,
70 __u8 rf_protocol)
71{
72 return rf_protocol == ST21NFCB_NCI1_X_PROPRIETARY_ISO15693 ?
73 NFC_PROTO_ISO15693_MASK : 0;
74}
75
67static struct nci_ops st21nfcb_nci_ops = { 76static struct nci_ops st21nfcb_nci_ops = {
68 .open = st21nfcb_nci_open, 77 .open = st21nfcb_nci_open,
69 .close = st21nfcb_nci_close, 78 .close = st21nfcb_nci_close,
70 .send = st21nfcb_nci_send, 79 .send = st21nfcb_nci_send,
80 .get_rfprotocol = st21nfcb_nci_get_rfprotocol,
71}; 81};
72 82
73int st21nfcb_nci_probe(struct llt_ndlc *ndlc, int phy_headroom, 83int st21nfcb_nci_probe(struct llt_ndlc *ndlc, int phy_headroom,