summaryrefslogtreecommitdiffstats
path: root/include/net/caif/caif_dev.h
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2011-11-30 10:22:47 +0100
committerDavid S. Miller <davem@davemloft.net>2011-12-01 05:30:48 +0100
commit7c18d2205ea76eef9674e59e1ecae4f332a53e9e (patch)
tree2d6ed4be50e52408b8806ca67f0bd6fb15362efa /include/net/caif/caif_dev.h
parentcaif: Allow cfpkt_extr_head to process empty message (diff)
downloadlinux-7c18d2205ea76eef9674e59e1ecae4f332a53e9e.tar.xz
linux-7c18d2205ea76eef9674e59e1ecae4f332a53e9e.zip
caif: Restructure how link caif link layer enroll
Enrolling CAIF link layers are refactored. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/caif/caif_dev.h')
-rw-r--r--include/net/caif/caif_dev.h21
1 files changed, 21 insertions, 0 deletions
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 <net/caif/caif_layer.h>
#include <net/caif/cfcnfg.h>
+#include <net/caif/caif_device.h>
#include <linux/caif/caif_socket.h>
#include <linux/if.h>
#include <linux/net.h>
@@ -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_ */