Lines Matching refs:n_stats

746 			rsp->info.n_stats = rc;  in ethtool_get_drvinfo()
2056 int ret, n_stats; in ethtool_get_stats() local
2061 n_stats = ops->get_sset_count(dev, ETH_SS_STATS); in ethtool_get_stats()
2062 if (n_stats < 0) in ethtool_get_stats()
2063 return n_stats; in ethtool_get_stats()
2064 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_get_stats()
2066 WARN_ON_ONCE(!n_stats); in ethtool_get_stats()
2070 stats.n_stats = n_stats; in ethtool_get_stats()
2072 if (n_stats) { in ethtool_get_stats()
2073 data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_get_stats()
2085 if (n_stats && copy_to_user(useraddr, data, array_size(n_stats, sizeof(u64)))) in ethtool_get_stats()
2094 static int ethtool_vzalloc_stats_array(int n_stats, u64 **data) in ethtool_vzalloc_stats_array() argument
2096 if (n_stats < 0) in ethtool_vzalloc_stats_array()
2097 return n_stats; in ethtool_vzalloc_stats_array()
2098 if (n_stats > S32_MAX / sizeof(u64)) in ethtool_vzalloc_stats_array()
2100 if (WARN_ON_ONCE(!n_stats)) in ethtool_vzalloc_stats_array()
2103 *data = vzalloc(array_size(n_stats, sizeof(u64))); in ethtool_vzalloc_stats_array()
2115 int n_stats, ret; in ethtool_get_phy_stats_phydev() local
2120 n_stats = phy_ops->get_sset_count(phydev); in ethtool_get_phy_stats_phydev()
2122 ret = ethtool_vzalloc_stats_array(n_stats, data); in ethtool_get_phy_stats_phydev()
2126 stats->n_stats = n_stats; in ethtool_get_phy_stats_phydev()
2135 int n_stats, ret; in ethtool_get_phy_stats_ethtool() local
2140 n_stats = ops->get_sset_count(dev, ETH_SS_PHY_STATS); in ethtool_get_phy_stats_ethtool()
2142 ret = ethtool_vzalloc_stats_array(n_stats, data); in ethtool_get_phy_stats_ethtool()
2146 stats->n_stats = n_stats; in ethtool_get_phy_stats_ethtool()
2177 if (copy_to_user(useraddr, data, array_size(stats.n_stats, sizeof(u64)))) in ethtool_get_phy_stats()