aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/qed/qed_eth_if.h
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2015-10-26 11:02:26 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-27 19:34:43 -0700
commit25c089d78f3833edf614fc377e75e9cf848562f5 (patch)
treeed73f3a4673381189931261c9aec24e8c3d0cf76 /include/linux/qed/qed_eth_if.h
parentqed: Add module with basic common support (diff)
downloadwireguard-linux-25c089d78f3833edf614fc377e75e9cf848562f5.tar.xz
wireguard-linux-25c089d78f3833edf614fc377e75e9cf848562f5.zip
qed: Add basic L2 interface
This patch adds a public API for a network driver to work on top of QED. The interface itself is very minimal - it's mostly infrastructure, as the only content it has after this patch is a query for HW-based information required for the creation of a network interface [I.e., no actual protocol-specific configurations are supported]. Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/qed/qed_eth_if.h')
-rw-r--r--include/linux/qed/qed_eth_if.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/qed/qed_eth_if.h b/include/linux/qed/qed_eth_if.h
new file mode 100644
index 000000000000..fbd8700f0b31
--- /dev/null
+++ b/include/linux/qed/qed_eth_if.h
@@ -0,0 +1,38 @@
+/* QLogic qed NIC Driver
+ * Copyright (c) 2015 QLogic Corporation
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#ifndef _QED_ETH_IF_H
+#define _QED_ETH_IF_H
+
+#include <linux/list.h>
+#include <linux/if_link.h>
+#include <linux/qed/eth_common.h>
+#include <linux/qed/qed_if.h>
+
+struct qed_dev_eth_info {
+ struct qed_dev_info common;
+
+ u8 num_queues;
+ u8 num_tc;
+
+ u8 port_mac[ETH_ALEN];
+ u8 num_vlan_filters;
+};
+
+struct qed_eth_ops {
+ const struct qed_common_ops *common;
+
+ int (*fill_dev_info)(struct qed_dev *cdev,
+ struct qed_dev_eth_info *info);
+
+};
+
+const struct qed_eth_ops *qed_get_eth_ops(u32 version);
+void qed_put_eth_ops(void);
+
+#endif