Lines Matching refs:n_stats

745 			rsp->info.n_stats = rc;  in ethtool_get_drvinfo()
2043 int ret, n_stats; in ethtool_get_stats() local
2048 n_stats = ops->get_sset_count(dev, ETH_SS_STATS); in ethtool_get_stats()
2049 if (n_stats < 0) in ethtool_get_stats()
2050 return n_stats; in ethtool_get_stats()
2051 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_get_stats()
2053 WARN_ON_ONCE(!n_stats); in ethtool_get_stats()
2057 stats.n_stats = n_stats; in ethtool_get_stats()
2059 if (n_stats) { in ethtool_get_stats()
2060 data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_get_stats()
2072 if (n_stats && copy_to_user(useraddr, data, array_size(n_stats, sizeof(u64)))) in ethtool_get_stats()
2081 static int ethtool_vzalloc_stats_array(int n_stats, u64 **data) in ethtool_vzalloc_stats_array() argument
2083 if (n_stats < 0) in ethtool_vzalloc_stats_array()
2084 return n_stats; in ethtool_vzalloc_stats_array()
2085 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_vzalloc_stats_array()
2087 if (WARN_ON_ONCE(!n_stats)) in ethtool_vzalloc_stats_array()
2090 *data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_vzalloc_stats_array()
2102 int n_stats, ret; in ethtool_get_phy_stats_phydev() local
2107 n_stats = phy_ops->get_sset_count(phydev); in ethtool_get_phy_stats_phydev()
2109 ret = ethtool_vzalloc_stats_array(n_stats, data); in ethtool_get_phy_stats_phydev()
2113 stats->n_stats = n_stats; in ethtool_get_phy_stats_phydev()
2122 int n_stats, ret; in ethtool_get_phy_stats_ethtool() local
2127 n_stats = ops->get_sset_count(dev, ETH_SS_PHY_STATS); in ethtool_get_phy_stats_ethtool()
2129 ret = ethtool_vzalloc_stats_array(n_stats, data); in ethtool_get_phy_stats_ethtool()
2133 stats->n_stats = n_stats; in ethtool_get_phy_stats_ethtool()
2164 if (copy_to_user(useraddr, data, array_size(stats.n_stats, sizeof(u64)))) in ethtool_get_phy_stats()