From 7c18d2205ea76eef9674e59e1ecae4f332a53e9e Mon Sep 17 00:00:00 2001 From: "sjur.brandeland@stericsson.com" Date: Wed, 30 Nov 2011 09:22:47 +0000 Subject: caif: Restructure how link caif link layer enroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enrolling CAIF link layers are refactored. Signed-off-by: Sjur Brændeland Signed-off-by: David S. Miller --- include/net/caif/caif_dev.h | 21 +++++++++++++++++++++ include/net/caif/cfcnfg.h | 9 +++++---- 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h index c011281d92c0..ef2dd9438bb1 100644 --- a/include/net/caif/caif_dev.h +++ b/include/net/caif/caif_dev.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -104,4 +105,24 @@ void caif_client_register_refcnt(struct cflayer *adapt_layer, */ void caif_free_client(struct cflayer *adap_layer); +/** + * struct caif_enroll_dev - Enroll a net-device as a CAIF Link layer + * @dev: Network device to enroll. + * @caifdev: Configuration information from CAIF Link Layer + * @link_support: Link layer support layer + * @head_room: Head room needed by link support layer + * @layer: Lowest layer in CAIF stack + * @rcv_fun: Receive function for CAIF stack. + * + * This function enroll a CAIF link layer into CAIF Stack and + * expects the interface to be able to handle CAIF payload. + * The link_support layer is used to add any Link Layer specific + * framing. + */ +void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, + struct cflayer *link_support, int head_room, + struct cflayer **layer, int (**rcv_func)( + struct sk_buff *, struct net_device *, + struct packet_type *, struct net_device *)); + #endif /* CAIF_DEV_H_ */ diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index 3e93a4a4b677..a421723e986f 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h @@ -72,15 +72,16 @@ void cfcnfg_remove(struct cfcnfg *cfg); * @phy_layer: Specify the physical layer. The transmit function * MUST be set in the structure. * @pref: The phy (link layer) preference. + * @link_support: Protocol implementation for link layer specific protocol. * @fcs: Specify if checksum is used in CAIF Framing Layer. - * @stx: Specify if Start Of Frame eXtention is used. + * @head_room: Head space needed by link specific protocol. */ - void -cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, +cfcnfg_add_phy_layer(struct cfcnfg *cnfg, struct net_device *dev, struct cflayer *phy_layer, enum cfcnfg_phy_preference pref, - bool fcs, bool stx); + struct cflayer *link_support, + bool fcs, int head_room); /** * cfcnfg_del_phy_layer - Deletes an phy layer from the CAIF stack. -- cgit v1.2.3