Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cfsrvl.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/pkt_sched.h>
#include <net/caif/caif_layer.h>
#include <net/caif/cfsrvl.h>
#include <net/caif/cfpkt.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ":%s(): " fmt, __func__
 
#define SRVL_CTRL_PKT_SIZE   1
 
#define SRVL_FLOW_OFF   0x81
 
#define SRVL_FLOW_ON   0x80
 
#define SRVL_SET_PIN   0x82
 
#define SRVL_CTRL_PKT_SIZE   1
 
#define container_obj(layr)   container_of(layr, struct cfsrvl, layer)
 

Functions

void cfsrvl_init (struct cfsrvl *service, u8 channel_id, struct dev_info *dev_info, bool supports_flowctrl)
 
bool cfsrvl_ready (struct cfsrvl *service, int *err)
 
u8 cfsrvl_getphyid (struct cflayer *layer)
 
bool cfsrvl_phyid_match (struct cflayer *layer, int phyid)
 
void caif_free_client (struct cflayer *adap_layer)
 
 EXPORT_SYMBOL (caif_free_client)
 
void caif_client_register_refcnt (struct cflayer *adapt_layer, void(*hold)(struct cflayer *lyr), void(*put)(struct cflayer *lyr))
 
 EXPORT_SYMBOL (caif_client_register_refcnt)
 

Macro Definition Documentation

#define container_obj (   layr)    container_of(layr, struct cfsrvl, layer)

Definition at line 25 of file cfsrvl.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ":%s(): " fmt, __func__

Definition at line 7 of file cfsrvl.c.

#define SRVL_CTRL_PKT_SIZE   1

Definition at line 23 of file cfsrvl.c.

#define SRVL_CTRL_PKT_SIZE   1

Definition at line 23 of file cfsrvl.c.

#define SRVL_FLOW_OFF   0x81

Definition at line 20 of file cfsrvl.c.

#define SRVL_FLOW_ON   0x80

Definition at line 21 of file cfsrvl.c.

#define SRVL_SET_PIN   0x82

Definition at line 22 of file cfsrvl.c.

Function Documentation

void caif_client_register_refcnt ( struct cflayer adapt_layer,
void(*)(struct cflayer *lyr)  hold,
void(*)(struct cflayer *lyr)  put 
)

caif_client_register_refcnt - register ref-count functions provided by client.

: Client layer using CAIF Stack. : Function provided by client layer increasing ref-count : Function provided by client layer decreasing ref-count

Client of the CAIF Stack must register functions for reference counting. These functions are called by the CAIF Stack for every upstream packet, and must therefore be implemented efficiently.

Client should call caif_free_client when reference count degrease to zero.

Definition at line 209 of file cfsrvl.c.

void caif_free_client ( struct cflayer adap_layer)

caif_free_client - Free memory used to manage the client in the CAIF Stack.

: Client layer to be removed.

This function must be called from client layer in order to free memory. Caller must guarantee that no packets are in flight upstream when calling this function.

Definition at line 199 of file cfsrvl.c.

u8 cfsrvl_getphyid ( struct cflayer layer)

Definition at line 187 of file cfsrvl.c.

void cfsrvl_init ( struct cfsrvl service,
u8  channel_id,
struct dev_info dev_info,
bool  supports_flowctrl 
)

Definition at line 160 of file cfsrvl.c.

bool cfsrvl_phyid_match ( struct cflayer layer,
int  phyid 
)

Definition at line 193 of file cfsrvl.c.

bool cfsrvl_ready ( struct cfsrvl service,
int err 
)

Definition at line 178 of file cfsrvl.c.

EXPORT_SYMBOL ( caif_free_client  )
EXPORT_SYMBOL ( caif_client_register_refcnt  )