net: ethernet: ti: cpsw: add ethtool channels support
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Mon, 22 Aug 2016 18:18:28 +0000 (21:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Aug 2016 07:13:11 +0000 (00:13 -0700)
commitce52c744574bbe31e5c30788f69d19f20d328225
treef8bb6ff440b2fc6841cdcfd78021cc0976fb6139
parent925d65e6d8a4c84c54fbad060f32385b57e210ed
net: ethernet: ti: cpsw: add ethtool channels support

These ops allow to control number of channels driver is allowed to
work with at cpdma level. The maximum number of channels is 8 for
rx and 8 for tx. In dual_emac mode the h/w channels are shared
between two interfaces and changing number on one interface changes
number of channels on another.

How many channels are supported and enabled:
$ ethtool -l ethX

Change number of channels (up to 8)
$ ethtool -L ethX rx 6 tx 6

Per-channel statistic:
$ ethtool -S ethX

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c