提交 57ee508f 编写于 作者: G Guangbin Huang 提交者: Zheng Zengkai

net: hns3: add header file hns3_ethtoo.h

mainline inclusion
from mainline-master
commit edb40bbc
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I46N7D
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edb40bbc17eb589beb3cbd672d341e1505d6cdb1

----------------------------------------------------------------------

Add a new file hns3_ethtool.h, and move struct type definitions from
hns3_ethtool.c to hns3_ethtool.h.
Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 6fc91a52
...@@ -7,21 +7,7 @@ ...@@ -7,21 +7,7 @@
#include <linux/sfp.h> #include <linux/sfp.h>
#include "hns3_enet.h" #include "hns3_enet.h"
#include "hns3_ethtool.h"
struct hns3_stats {
char stats_string[ETH_GSTRING_LEN];
int stats_offset;
};
struct hns3_sfp_type {
u8 type;
u8 ext_type;
};
struct hns3_pflag_desc {
char name[ETH_GSTRING_LEN];
void (*handler)(struct net_device *netdev, bool enable);
};
/* tqp related stats */ /* tqp related stats */
#define HNS3_TQP_STAT(_string, _member) { \ #define HNS3_TQP_STAT(_string, _member) { \
......
/* SPDX-License-Identifier: GPL-2.0+ */
// Copyright (c) 2021 Hisilicon Limited.
#ifndef __HNS3_ETHTOOL_H
#define __HNS3_ETHTOOL_H
#include <linux/ethtool.h>
#include <linux/netdevice.h>
struct hns3_stats {
char stats_string[ETH_GSTRING_LEN];
int stats_offset;
};
struct hns3_sfp_type {
u8 type;
u8 ext_type;
};
struct hns3_pflag_desc {
char name[ETH_GSTRING_LEN];
void (*handler)(struct net_device *netdev, bool enable);
};
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册