18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (C) 2006-2008 Chelsio Communications.  All rights reserved.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two
58c2ecf20Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
68c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
78c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the
88c2ecf20Sopenharmony_ci * OpenIB.org BSD license below:
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci *     Redistribution and use in source and binary forms, with or
118c2ecf20Sopenharmony_ci *     without modification, are permitted provided that the following
128c2ecf20Sopenharmony_ci *     conditions are met:
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci *      - Redistributions of source code must retain the above
158c2ecf20Sopenharmony_ci *        copyright notice, this list of conditions and the following
168c2ecf20Sopenharmony_ci *        disclaimer.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci *      - Redistributions in binary form must reproduce the above
198c2ecf20Sopenharmony_ci *        copyright notice, this list of conditions and the following
208c2ecf20Sopenharmony_ci *        disclaimer in the documentation and/or other materials
218c2ecf20Sopenharmony_ci *        provided with the distribution.
228c2ecf20Sopenharmony_ci *
238c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
248c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
258c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
268c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
278c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
288c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
298c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
308c2ecf20Sopenharmony_ci * SOFTWARE.
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ci#ifndef _T3CDEV_H_
338c2ecf20Sopenharmony_ci#define _T3CDEV_H_
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#include <linux/list.h>
368c2ecf20Sopenharmony_ci#include <linux/atomic.h>
378c2ecf20Sopenharmony_ci#include <linux/netdevice.h>
388c2ecf20Sopenharmony_ci#include <linux/proc_fs.h>
398c2ecf20Sopenharmony_ci#include <linux/skbuff.h>
408c2ecf20Sopenharmony_ci#include <net/neighbour.h>
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#define T3CNAMSIZ 16
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cistruct cxgb3_client;
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_cienum t3ctype {
478c2ecf20Sopenharmony_ci	T3A = 0,
488c2ecf20Sopenharmony_ci	T3B,
498c2ecf20Sopenharmony_ci	T3C,
508c2ecf20Sopenharmony_ci};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_cistruct t3cdev {
538c2ecf20Sopenharmony_ci	char name[T3CNAMSIZ];	/* T3C device name */
548c2ecf20Sopenharmony_ci	enum t3ctype type;
558c2ecf20Sopenharmony_ci	struct list_head ofld_dev_list;	/* for list linking */
568c2ecf20Sopenharmony_ci	struct net_device *lldev;	/* LL dev associated with T3C messages */
578c2ecf20Sopenharmony_ci	struct proc_dir_entry *proc_dir;	/* root of proc dir for this T3C */
588c2ecf20Sopenharmony_ci	int (*send)(struct t3cdev *dev, struct sk_buff *skb);
598c2ecf20Sopenharmony_ci	int (*recv)(struct t3cdev *dev, struct sk_buff **skb, int n);
608c2ecf20Sopenharmony_ci	int (*ctl)(struct t3cdev *dev, unsigned int req, void *data);
618c2ecf20Sopenharmony_ci	void (*neigh_update)(struct t3cdev *dev, struct neighbour *neigh);
628c2ecf20Sopenharmony_ci	void *priv;		/* driver private data */
638c2ecf20Sopenharmony_ci	void __rcu *l2opt;	/* optional layer 2 data */
648c2ecf20Sopenharmony_ci	void *l3opt;		/* optional layer 3 data */
658c2ecf20Sopenharmony_ci	void *l4opt;		/* optional layer 4 data */
668c2ecf20Sopenharmony_ci	void *ulp;		/* ulp stuff */
678c2ecf20Sopenharmony_ci	void *ulp_iscsi;	/* ulp iscsi */
688c2ecf20Sopenharmony_ci};
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci#endif				/* _T3CDEV_H_ */
71