Lines Matching refs:n_stats
745 rsp->info.n_stats = rc; in ethtool_get_drvinfo()
2038 int ret, n_stats; in ethtool_get_stats() local
2043 n_stats = ops->get_sset_count(dev, ETH_SS_STATS); in ethtool_get_stats()
2044 if (n_stats < 0) in ethtool_get_stats()
2045 return n_stats; in ethtool_get_stats()
2046 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_get_stats()
2048 WARN_ON_ONCE(!n_stats); in ethtool_get_stats()
2052 stats.n_stats = n_stats; in ethtool_get_stats()
2054 if (n_stats) { in ethtool_get_stats()
2055 data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_get_stats()
2067 if (n_stats && copy_to_user(useraddr, data, array_size(n_stats, sizeof(u64)))) in ethtool_get_stats()
2083 int ret, n_stats; in ethtool_get_phy_stats() local
2090 n_stats = phy_ops->get_sset_count(phydev); in ethtool_get_phy_stats()
2092 n_stats = ops->get_sset_count(dev, ETH_SS_PHY_STATS); in ethtool_get_phy_stats()
2093 if (n_stats < 0) in ethtool_get_phy_stats()
2094 return n_stats; in ethtool_get_phy_stats()
2095 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_get_phy_stats()
2097 if (WARN_ON_ONCE(!n_stats)) in ethtool_get_phy_stats()
2103 stats.n_stats = n_stats; in ethtool_get_phy_stats()
2105 if (n_stats) { in ethtool_get_phy_stats()
2106 data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_get_phy_stats()
2126 if (n_stats && copy_to_user(useraddr, data, array_size(n_stats, sizeof(u64)))) in ethtool_get_phy_stats()