Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cfcnfg.c File Reference
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/module.h>
#include <net/caif/caif_layer.h>
#include <net/caif/cfpkt.h>
#include <net/caif/cfcnfg.h>
#include <net/caif/cfctrl.h>
#include <net/caif/cfmuxl.h>
#include <net/caif/cffrml.h>
#include <net/caif/cfserl.h>
#include <net/caif/cfsrvl.h>
#include <net/caif/caif_dev.h>

Go to the source code of this file.

Data Structures

struct  cfcnfg_phyinfo
 
struct  cfcnfg
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ":%s(): " fmt, __func__
 
#define container_obj(layr)   container_of(layr, struct cfcnfg, layer)
 

Functions

struct cfcnfgcfcnfg_create (void)
 
void cfcnfg_remove (struct cfcnfg *cfg)
 
int caif_disconnect_client (struct net *net, struct cflayer *adap_layer)
 
 EXPORT_SYMBOL (caif_disconnect_client)
 
int caif_connect_client (struct net *net, struct caif_connect_request *conn_req, struct cflayer *adap_layer, int *ifindex, int *proto_head, int *proto_tail)
 
 EXPORT_SYMBOL (caif_connect_client)
 
void cfcnfg_add_phy_layer (struct cfcnfg *cnfg, struct net_device *dev, struct cflayer *phy_layer, enum cfcnfg_phy_preference pref, struct cflayer *link_support, bool fcs, int head_room)
 
 EXPORT_SYMBOL (cfcnfg_add_phy_layer)
 
int cfcnfg_set_phy_state (struct cfcnfg *cnfg, struct cflayer *phy_layer, bool up)
 
 EXPORT_SYMBOL (cfcnfg_set_phy_state)
 
int cfcnfg_del_phy_layer (struct cfcnfg *cnfg, struct cflayer *phy_layer)
 
 EXPORT_SYMBOL (cfcnfg_del_phy_layer)
 

Macro Definition Documentation

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

Definition at line 24 of file cfcnfg.c.

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

Definition at line 7 of file cfcnfg.c.

Function Documentation

int caif_connect_client ( struct net net,
struct caif_connect_request conn_req,
struct cflayer client_layer,
int ifindex,
int headroom,
int tailroom 
)

caif_connect_client - Connect a client to CAIF Core Stack. : Channel setup parameters, specifying what address to connect on the Modem. : User implementation of client layer. This layer MUST have receive and control callback functions implemented. : Link layer interface index used for this connection. : Head room needed by CAIF protocol. : Tail room needed by CAIF protocol.

This function connects a CAIF channel. The Client must implement the struct cflayer. This layer represents the Client layer and holds receive functions and control callback functions. Control callback function will receive information about connect/disconnect responses, flow control etc (see enum caif_control). E.g. CAIF Socket will call this function for each socket it connects and have one client_layer instance for each socket.

Definition at line 302 of file cfcnfg.c.

int caif_disconnect_client ( struct net net,
struct cflayer client_layer 
)

caif_disconnect_client - Disconnects a client from the CAIF stack.

: Client layer to be disconnected.

Definition at line 179 of file cfcnfg.c.

void cfcnfg_add_phy_layer ( struct cfcnfg cnfg,
struct net_device dev,
struct cflayer phy_layer,
enum cfcnfg_phy_preference  pref,
struct cflayer link_support,
bool  fcs,
int  head_room 
)

cfcnfg_add_phy_layer() - Adds a physical layer to the CAIF stack. : Pointer to a CAIF configuration object, created by cfcnfg_create(). : Pointer to link layer device : Specify the physical layer. The transmit function MUST be set in the structure. : The phy (link layer) preference. : Protocol implementation for link layer specific protocol. : Specify if checksum is used in CAIF Framing Layer. : Head space needed by link specific protocol.

Definition at line 460 of file cfcnfg.c.

struct cfcnfg* cfcnfg_create ( void  )
read

cfcnfg_create() - Create the CAIF configuration object.

Definition at line 72 of file cfcnfg.c.

int cfcnfg_del_phy_layer ( struct cfcnfg cnfg,
struct cflayer phy_layer 
)

cfcnfg_del_phy_layer - Deletes an phy layer from the CAIF stack.

: Pointer to a CAIF configuration object, created by cfcnfg_create(). : Adaptation layer to be removed.

Definition at line 560 of file cfcnfg.c.

void cfcnfg_remove ( struct cfcnfg cfg)

cfcnfg_remove() - Remove the CFCNFG object : config object

Definition at line 117 of file cfcnfg.c.

int cfcnfg_set_phy_state ( struct cfcnfg cnfg,
struct cflayer phy_layer,
bool  up 
)

cfcnfg_set_phy_state() - Set the state of the physical interface device. : Configuration object : Physical Layer representation : State of device

Definition at line 528 of file cfcnfg.c.

EXPORT_SYMBOL ( caif_disconnect_client  )
EXPORT_SYMBOL ( caif_connect_client  )
EXPORT_SYMBOL ( cfcnfg_add_phy_layer  )
EXPORT_SYMBOL ( cfcnfg_set_phy_state  )
EXPORT_SYMBOL ( cfcnfg_del_phy_layer  )