ethtool: check if there is at least one channel for TX/RX in the core
authorJakub Kicinski <kuba@kernel.org>
Fri, 15 May 2020 19:49:00 +0000 (12:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 May 2020 20:56:30 +0000 (13:56 -0700)
commit7be92514b99c15b89def6d72bbc84c354f89a025
tree7a3f34fe230881653b8bf6a7cd18cbcdc32dd7a2
parenta0c1d0eafd1ef1ada3b588ea205e5bc37ae0d8d9
ethtool: check if there is at least one channel for TX/RX in the core

Having a channel config with no ability to RX or TX traffic is
clearly wrong. Check for this in the core so the drivers don't
have to.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/channels.c
net/ethtool/ioctl.c