File Index
Files and directories
Sign in
FILE

hbg_ethtool.h

File preview with syntax highlighting.

linux-6.19.14/drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.h C
 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
13void hbg_ethtool_set_ops(struct net_device *netdev);
14void hbg_update_stats(struct hbg_priv *priv);
15
16#endif
~/ Read-only file preview.