Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
nfc.h File Reference
#include <net/nfc/nfc.h>
#include <net/sock.h>

Go to the source code of this file.

Data Structures

struct  nfc_protocol
 
struct  nfc_rawsock
 

Macros

#define nfc_rawsock(sk)   ((struct nfc_rawsock *) sk)
 
#define to_rawsock_sk(_tx_work)   ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work))
 

Functions

int __init rawsock_init (void)
 
void rawsock_exit (void)
 
int __init af_nfc_init (void)
 
void af_nfc_exit (void)
 
int nfc_proto_register (const struct nfc_protocol *nfc_proto)
 
void nfc_proto_unregister (const struct nfc_protocol *nfc_proto)
 
int __init nfc_genl_init (void)
 
void nfc_genl_exit (void)
 
void nfc_genl_data_init (struct nfc_genl_data *genl_data)
 
void nfc_genl_data_exit (struct nfc_genl_data *genl_data)
 
int nfc_genl_targets_found (struct nfc_dev *dev)
 
int nfc_genl_target_lost (struct nfc_dev *dev, u32 target_idx)
 
int nfc_genl_device_added (struct nfc_dev *dev)
 
int nfc_genl_device_removed (struct nfc_dev *dev)
 
int nfc_genl_dep_link_up_event (struct nfc_dev *dev, u32 target_idx, u8 comm_mode, u8 rf_mode)
 
int nfc_genl_dep_link_down_event (struct nfc_dev *dev)
 
int nfc_genl_tm_activated (struct nfc_dev *dev, u32 protocol)
 
int nfc_genl_tm_deactivated (struct nfc_dev *dev)
 
struct nfc_devnfc_get_device (unsigned int idx)
 
int nfc_dev_up (struct nfc_dev *dev)
 
int nfc_dev_down (struct nfc_dev *dev)
 
int nfc_start_poll (struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols)
 
int nfc_stop_poll (struct nfc_dev *dev)
 
int nfc_dep_link_up (struct nfc_dev *dev, int target_idx, u8 comm_mode)
 
int nfc_dep_link_down (struct nfc_dev *dev)
 
int nfc_activate_target (struct nfc_dev *dev, u32 target_idx, u32 protocol)
 
int nfc_deactivate_target (struct nfc_dev *dev, u32 target_idx)
 
int nfc_data_exchange (struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context)
 

Variables

int nfc_devlist_generation
 
struct mutex nfc_devlist_mutex
 

Macro Definition Documentation

#define nfc_rawsock (   sk)    ((struct nfc_rawsock *) sk)

Definition at line 45 of file nfc.h.

#define to_rawsock_sk (   _tx_work)    ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work))

Definition at line 46 of file nfc.h.

Function Documentation

void af_nfc_exit ( void  )

Definition at line 96 of file af_nfc.c.

int __init af_nfc_init ( void  )

Definition at line 91 of file af_nfc.c.

int nfc_activate_target ( struct nfc_dev dev,
u32  target_idx,
u32  protocol 
)

Definition at line 304 of file core.c.

int nfc_data_exchange ( struct nfc_dev dev,
u32  target_idx,
struct sk_buff skb,
data_exchange_cb_t  cb,
void cb_context 
)

nfc_data_exchange - transceive data

: The nfc device that found the target : index of the target : data to be sent : callback called when the response is received : parameter for the callback function

The user must wait for the callback before calling this function again.

Definition at line 397 of file core.c.

int nfc_deactivate_target ( struct nfc_dev dev,
u32  target_idx 
)

nfc_deactivate_target - deactivate a nfc target

: The nfc device that found the target : index of the target that must be deactivated

Definition at line 351 of file core.c.

int nfc_dep_link_down ( struct nfc_dev dev)

Definition at line 252 of file core.c.

int nfc_dep_link_up ( struct nfc_dev dev,
int  target_idx,
u8  comm_mode 
)

Definition at line 205 of file core.c.

int nfc_dev_down ( struct nfc_dev dev)

nfc_dev_down - turn off the NFC device

: The nfc device to be turned off

Definition at line 84 of file core.c.

int nfc_dev_up ( struct nfc_dev dev)

nfc_dev_up - turn on the NFC device

: The nfc device to be turned on

The device remains up until the nfc_dev_down function is called.

Definition at line 50 of file core.c.

void nfc_genl_data_exit ( struct nfc_genl_data genl_data)

Definition at line 831 of file netlink.c.

void nfc_genl_data_init ( struct nfc_genl_data genl_data)

Definition at line 825 of file netlink.c.

int nfc_genl_dep_link_down_event ( struct nfc_dev dev)

Definition at line 469 of file netlink.c.

int nfc_genl_dep_link_up_event ( struct nfc_dev dev,
u32  target_idx,
u8  comm_mode,
u8  rf_mode 
)

Definition at line 429 of file netlink.c.

int nfc_genl_device_added ( struct nfc_dev dev)

Definition at line 286 of file netlink.c.

int nfc_genl_device_removed ( struct nfc_dev dev)

Definition at line 319 of file netlink.c.

void nfc_genl_exit ( void  )

nfc_genl_exit() - Deinitialize netlink interface

This exit function unregisters the nfc netlink family.

Definition at line 866 of file netlink.c.

int __init nfc_genl_init ( void  )

nfc_genl_init() - Initialize netlink interface

This initialization function registers the nfc netlink family.

Definition at line 845 of file netlink.c.

int nfc_genl_target_lost ( struct nfc_dev dev,
u32  target_idx 
)

Definition at line 193 of file netlink.c.

int nfc_genl_targets_found ( struct nfc_dev dev)

Definition at line 163 of file netlink.c.

int nfc_genl_tm_activated ( struct nfc_dev dev,
u32  protocol 
)

Definition at line 224 of file netlink.c.

int nfc_genl_tm_deactivated ( struct nfc_dev dev)

Definition at line 256 of file netlink.c.

struct nfc_dev* nfc_get_device ( unsigned int  idx)
read

Definition at line 735 of file core.c.

int nfc_proto_register ( const struct nfc_protocol nfc_proto)

Definition at line 59 of file af_nfc.c.

void nfc_proto_unregister ( const struct nfc_protocol nfc_proto)

Definition at line 81 of file af_nfc.c.

int nfc_start_poll ( struct nfc_dev dev,
u32  im_protocols,
u32  tm_protocols 
)

nfc_start_poll - start polling for nfc targets

: The nfc device that must start polling : bitset of nfc protocols that must be used for polling

The device remains polling for targets until a target is found or the nfc_stop_poll function is called.

Definition at line 126 of file core.c.

int nfc_stop_poll ( struct nfc_dev dev)

nfc_stop_poll - stop polling for nfc targets

: The nfc device that must stop polling

Definition at line 164 of file core.c.

void rawsock_exit ( void  )

Definition at line 347 of file rawsock.c.

int __init rawsock_init ( void  )

Definition at line 338 of file rawsock.c.

Variable Documentation

int nfc_devlist_generation

Definition at line 40 of file core.c.

struct mutex nfc_devlist_mutex