Patchwork [net-next-2.6,04/13] net-caif: add CAIF header files

login
register
mail settings
Submitter sjur.brandeland@stericsson.com
Date Jan. 20, 2010, 10:55 p.m.
Message ID <1264028130-14364-5-git-send-email-sjur.brandeland@stericsson.com>
Download mbox | patch
Permalink /patch/43385/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

sjur.brandeland@stericsson.com - Jan. 20, 2010, 10:55 p.m.
From: Sjur Braendeland <sjur.brandeland@stericsson.com>

Header files for CAIF Socket, Net Device,
and link-layer registration.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
---
 include/net/caif/caif_dev.h    |   29 +++++++++++++++++++++++++++++
 include/net/caif/caif_device.h |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 0 deletions(-)

Patch

diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h
new file mode 100644
index 0000000..eee7f3a
--- /dev/null
+++ b/include/net/caif/caif_dev.h
@@ -0,0 +1,29 @@ 
+/*
+ * Copyright (C) ST-Ericsson AB 2010
+ * Author:	Sjur Brendeland/ sjur.brandeland@stericsson.com
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#ifndef CAIF_DEV_H_
+#define CAIF_DEV_H_
+
+#include <net/caif/generic/caif_layer.h>
+#include <net/caif/generic/cfcnfg.h>
+#include <linux/caif/caif_config.h>
+#include <linux/if.h>
+
+struct caif_service_config;
+int caifdev_adapt_register(struct caif_channel_config *config,
+			   struct layer *adap_layer);
+int caifdev_adapt_unregister(struct layer *adap_layer);
+struct cfcnfg *get_caif_conf(void);
+void caif_register_ioctl(int (*ioctl)(unsigned int cmd,
+				      unsigned long arg,
+				      bool));
+int caif_ioctl(unsigned int cmd, unsigned long arg, bool from_use_land);
+void caif_unregister_netdev(void);
+int channel_config_2_link_param(struct cfcnfg *cnfg,
+				struct caif_channel_config *s,
+				struct cfctrl_link_param *l);
+
+#endif /* CAIF_DEV_H_ */
diff --git a/include/net/caif/caif_device.h b/include/net/caif/caif_device.h
new file mode 100644
index 0000000..6752bb7
--- /dev/null
+++ b/include/net/caif/caif_device.h
@@ -0,0 +1,34 @@ 
+/*
+ * Copyright (C) ST-Ericsson AB 2010
+ * Author:	Sjur Brendeland/ sjur.brandeland@stericsson.com
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#ifndef CAIF_DEVICE_H_
+#define CAIF_DEVICE_H_
+#include <linux/kernel.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/caif/caif_socket.h>
+#include <net/caif/caif_device.h>
+
+/**
+ * struct caif_dev_common - shared between CAIF drivers and stack .
+ * @flowctrl:		Flow Control callback function.
+ * @link_select:	Indicate bandwidth and latency of device.
+ * @use_frag:		CAIF Frames may be framented.
+ * @use_fcs:		Indicate if Frame CheckSum (fcs) is used.
+ * @use_stx:		Indicate STart of frame eXtension (stx) in use.
+ *
+ * This structure is shared between the CAIF drivers and the CAIF stack.
+ */
+struct caif_dev_common {
+	void (*flowctrl)(struct net_device *net, int on);
+	enum caif_link_selector link_select;
+	int use_frag;
+	int use_fcs;
+	int use_stx;
+};
+
+#endif	/* CAIF_DEVICE_H_ */
+