lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 5/6] net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
On Tue, 12 Oct 2021 14:35:54 +0200 Alvin Šipraga wrote:
> + { 0, 4, 2, "dot3StatsFCSErrors" },
> + { 0, 6, 2, "dot3StatsSymbolErrors" },
> + { 0, 8, 2, "dot3InPauseFrames" },
> + { 0, 10, 2, "dot3ControlInUnknownOpcodes" },
...

You must expose counters via existing standard APIs.

You should implement these ethtool ops:

void (*get_eth_phy_stats)(struct net_device *dev,
struct ethtool_eth_phy_stats *phy_stats);
void (*get_eth_mac_stats)(struct net_device *dev,
struct ethtool_eth_mac_stats *mac_stats);
void (*get_eth_ctrl_stats)(struct net_device *dev,
struct ethtool_eth_ctrl_stats *ctrl_stats);
void (*get_rmon_stats)(struct net_device *dev,
struct ethtool_rmon_stats *rmon_stats,
const struct ethtool_rmon_hist_range **ranges);

> +static int rtl8365mb_setup(struct dsa_switch *ds)
> +{
> + struct realtek_smi *smi = ds->priv;
> + struct rtl8365mb *mb;
> + int ret;
> + int i;
> +
> + mb = smi->chip_data;

drivers/net/dsa/rtl8365mb.c:1428:20: warning: variable ‘mb’ set but not used [-Wunused-but-set-variable]
1428 | struct rtl8365mb *mb;
| ^~

\
 
 \ /
  Last update: 2021-10-12 17:27    [W:0.202 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site