aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index a076aca138a1..46f613028e9c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -361,15 +361,16 @@ static void xgbe_get_drvinfo(struct net_device *netdev,
361 struct ethtool_drvinfo *drvinfo) 361 struct ethtool_drvinfo *drvinfo)
362{ 362{
363 struct xgbe_prv_data *pdata = netdev_priv(netdev); 363 struct xgbe_prv_data *pdata = netdev_priv(netdev);
364 struct xgbe_hw_features *hw_feat = &pdata->hw_feat;
364 365
365 strlcpy(drvinfo->driver, XGBE_DRV_NAME, sizeof(drvinfo->driver)); 366 strlcpy(drvinfo->driver, XGBE_DRV_NAME, sizeof(drvinfo->driver));
366 strlcpy(drvinfo->version, XGBE_DRV_VERSION, sizeof(drvinfo->version)); 367 strlcpy(drvinfo->version, XGBE_DRV_VERSION, sizeof(drvinfo->version));
367 strlcpy(drvinfo->bus_info, dev_name(pdata->dev), 368 strlcpy(drvinfo->bus_info, dev_name(pdata->dev),
368 sizeof(drvinfo->bus_info)); 369 sizeof(drvinfo->bus_info));
369 snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d", 370 snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d",
370 XGMAC_IOREAD_BITS(pdata, MAC_VR, USERVER), 371 XGMAC_GET_BITS(hw_feat->version, MAC_VR, USERVER),
371 XGMAC_IOREAD_BITS(pdata, MAC_VR, DEVID), 372 XGMAC_GET_BITS(hw_feat->version, MAC_VR, DEVID),
372 XGMAC_IOREAD_BITS(pdata, MAC_VR, SNPSVER)); 373 XGMAC_GET_BITS(hw_feat->version, MAC_VR, SNPSVER));
373 drvinfo->n_stats = XGBE_STATS_COUNT; 374 drvinfo->n_stats = XGBE_STATS_COUNT;
374} 375}
375 376