Debian Codegraph @

drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.h

raw
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Copyright (c) 2024 Hisilicon Limited. */
3
4 #ifndef __HBG_ETHTOOL_H
5 #define __HBG_ETHTOOL_H
6
7 #include <linux/netdevice.h>
8
9 #define HBG_STATS_FIELD_OFF(f) (offsetof(struct hbg_stats, f))
10 #define HBG_STATS_R(p, offset) (*(u64 *)((u8 *)(p) + (offset)))
11 #define HBG_STATS_U(p, offset, val) (HBG_STATS_R(p, offset) += (val))
12
13 void hbg_ethtool_set_ops(struct net_device *netdev);
14 void hbg_update_stats(struct hbg_priv *priv);
15
16 #endif