1f7917c00SJeff Kirsher /*
2f7917c00SJeff Kirsher  * Copyright (C) 2006-2008 Chelsio Communications.  All rights reserved.
3f7917c00SJeff Kirsher  *
4f7917c00SJeff Kirsher  * This software is available to you under a choice of one of two
5f7917c00SJeff Kirsher  * licenses.  You may choose to be licensed under the terms of the GNU
6f7917c00SJeff Kirsher  * General Public License (GPL) Version 2, available from the file
7f7917c00SJeff Kirsher  * COPYING in the main directory of this source tree, or the
8f7917c00SJeff Kirsher  * OpenIB.org BSD license below:
9f7917c00SJeff Kirsher  *
10f7917c00SJeff Kirsher  *     Redistribution and use in source and binary forms, with or
11f7917c00SJeff Kirsher  *     without modification, are permitted provided that the following
12f7917c00SJeff Kirsher  *     conditions are met:
13f7917c00SJeff Kirsher  *
14f7917c00SJeff Kirsher  *      - Redistributions of source code must retain the above
15f7917c00SJeff Kirsher  *        copyright notice, this list of conditions and the following
16f7917c00SJeff Kirsher  *        disclaimer.
17f7917c00SJeff Kirsher  *
18f7917c00SJeff Kirsher  *      - Redistributions in binary form must reproduce the above
19f7917c00SJeff Kirsher  *        copyright notice, this list of conditions and the following
20f7917c00SJeff Kirsher  *        disclaimer in the documentation and/or other materials
21f7917c00SJeff Kirsher  *        provided with the distribution.
22f7917c00SJeff Kirsher  *
23f7917c00SJeff Kirsher  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24f7917c00SJeff Kirsher  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25f7917c00SJeff Kirsher  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26f7917c00SJeff Kirsher  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27f7917c00SJeff Kirsher  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28f7917c00SJeff Kirsher  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29f7917c00SJeff Kirsher  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30f7917c00SJeff Kirsher  * SOFTWARE.
31f7917c00SJeff Kirsher  */
32f7917c00SJeff Kirsher #ifndef _T3CDEV_H_
33f7917c00SJeff Kirsher #define _T3CDEV_H_
34f7917c00SJeff Kirsher 
35f7917c00SJeff Kirsher #include <linux/list.h>
36f7917c00SJeff Kirsher #include <linux/atomic.h>
37f7917c00SJeff Kirsher #include <linux/netdevice.h>
38f7917c00SJeff Kirsher #include <linux/proc_fs.h>
39f7917c00SJeff Kirsher #include <linux/skbuff.h>
40f7917c00SJeff Kirsher #include <net/neighbour.h>
41f7917c00SJeff Kirsher 
42f7917c00SJeff Kirsher #define T3CNAMSIZ 16
43f7917c00SJeff Kirsher 
44f7917c00SJeff Kirsher struct cxgb3_client;
45f7917c00SJeff Kirsher 
46f7917c00SJeff Kirsher enum t3ctype {
47f7917c00SJeff Kirsher 	T3A = 0,
48f7917c00SJeff Kirsher 	T3B,
49f7917c00SJeff Kirsher 	T3C,
50f7917c00SJeff Kirsher };
51f7917c00SJeff Kirsher 
52f7917c00SJeff Kirsher struct t3cdev {
53f7917c00SJeff Kirsher 	char name[T3CNAMSIZ];	/* T3C device name */
54f7917c00SJeff Kirsher 	enum t3ctype type;
55f7917c00SJeff Kirsher 	struct list_head ofld_dev_list;	/* for list linking */
56f7917c00SJeff Kirsher 	struct net_device *lldev;	/* LL dev associated with T3C messages */
57f7917c00SJeff Kirsher 	struct proc_dir_entry *proc_dir;	/* root of proc dir for this T3C */
58f7917c00SJeff Kirsher 	int (*send)(struct t3cdev *dev, struct sk_buff *skb);
59f7917c00SJeff Kirsher 	int (*recv)(struct t3cdev *dev, struct sk_buff **skb, int n);
60f7917c00SJeff Kirsher 	int (*ctl)(struct t3cdev *dev, unsigned int req, void *data);
61f7917c00SJeff Kirsher 	void (*neigh_update)(struct t3cdev *dev, struct neighbour *neigh);
62f7917c00SJeff Kirsher 	void *priv;		/* driver private data */
6390a6b76bSBart Van Assche 	void __rcu *l2opt;	/* optional layer 2 data */
64f7917c00SJeff Kirsher 	void *l3opt;		/* optional layer 3 data */
65f7917c00SJeff Kirsher 	void *l4opt;		/* optional layer 4 data */
66f7917c00SJeff Kirsher 	void *ulp;		/* ulp stuff */
67f7917c00SJeff Kirsher 	void *ulp_iscsi;	/* ulp iscsi */
68f7917c00SJeff Kirsher };
69f7917c00SJeff Kirsher 
70f7917c00SJeff Kirsher #endif				/* _T3CDEV_H_ */
71