static void gem_get_ethtool_strings(struct net_device *dev, u32 sset, u8 *p)
{
- char stat_string[ETH_GSTRING_LEN];
struct macb *bp = netdev_priv(dev);
struct macb_queue *queue;
unsigned int i;
ETH_GSTRING_LEN);
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
- for (i = 0; i < QUEUE_STATS_LEN; i++, p += ETH_GSTRING_LEN) {
- snprintf(stat_string, ETH_GSTRING_LEN, "q%d_%s",
- q, queue_statistics[i].stat_string);
- memcpy(p, stat_string, ETH_GSTRING_LEN);
- }
+ for (i = 0; i < QUEUE_STATS_LEN; i++)
+ ethtool_sprintf(&p, "q%u_%s", q, queue_statistics[i].stat_string);
}
break;
}