diff options
author | Hiren Tandel <hirent@marvell.com> | 2014-05-05 06:43:31 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-05-19 18:06:04 -0400 |
commit | 57be1f3f3ec1ccab6432615ca161c4c9ece2a2aa (patch) | |
tree | bb0021acf67dcb66957f0482cb89f894d8fa77f0 /net/nfc/nfc.h | |
parent | c79d9f9ef86683824c195b093106222ff0611c10 (diff) |
NFC: Add RAW socket type support for SOCKPROTO_RAW
This allows for a more generic NFC sniffing by using SOCKPROTO_RAW
SOCK_RAW to read RAW NFC frames. This is for sniffing anything but LLCP
(HCI, NCI, etc...).
Signed-off-by: Hiren Tandel <hirent@marvell.com>
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/nfc.h')
-rw-r--r-- | net/nfc/nfc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h index 9d6e74f7e6b3..88d60064890e 100644 --- a/net/nfc/nfc.h +++ b/net/nfc/nfc.h | |||
@@ -40,6 +40,12 @@ struct nfc_rawsock { | |||
40 | struct work_struct tx_work; | 40 | struct work_struct tx_work; |
41 | bool tx_work_scheduled; | 41 | bool tx_work_scheduled; |
42 | }; | 42 | }; |
43 | |||
44 | struct nfc_sock_list { | ||
45 | struct hlist_head head; | ||
46 | rwlock_t lock; | ||
47 | }; | ||
48 | |||
43 | #define nfc_rawsock(sk) ((struct nfc_rawsock *) sk) | 49 | #define nfc_rawsock(sk) ((struct nfc_rawsock *) sk) |
44 | #define to_rawsock_sk(_tx_work) \ | 50 | #define to_rawsock_sk(_tx_work) \ |
45 | ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work)) | 51 | ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work)) |