aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/niu.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-09-14 05:13:08 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-15 17:42:13 -0400
commite0de7c93b950b9e784894efc4b529c6958cb747a (patch)
tree49a86ecc91a43e7d86fab75b3c36753d340c11d2 /drivers/net/niu.c
parente035587305011432ee07f69f9738b3c7ef7f3684 (diff)
ethtool: Remove unimplemented flow specification types
struct ethtool_rawip4_spec and struct ethtool_ether_spec are neither commented nor used by any driver, so remove them. Adjust padding in the user-visible unions that included these structures. Fix references to struct ethtool_rawip4_spec in ethtool_get_rx_ntuple(), which should use struct ethtool_usrip4_spec. struct ethtool_usrip4_spec cannot hold IPv6 host addresses and there is no separate structure that can, so remove ETH_RX_NFC_IP6 and the reference to it in niu. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r--drivers/net/niu.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 8e1859c801a4..e36a83845a1c 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -7462,10 +7462,12 @@ static int niu_add_ethtool_tcam_entry(struct niu *np,
7462 if (fsp->flow_type == IP_USER_FLOW) { 7462 if (fsp->flow_type == IP_USER_FLOW) {
7463 int i; 7463 int i;
7464 int add_usr_cls = 0; 7464 int add_usr_cls = 0;
7465 int ipv6 = 0;
7466 struct ethtool_usrip4_spec *uspec = &fsp->h_u.usr_ip4_spec; 7465 struct ethtool_usrip4_spec *uspec = &fsp->h_u.usr_ip4_spec;
7467 struct ethtool_usrip4_spec *umask = &fsp->m_u.usr_ip4_spec; 7466 struct ethtool_usrip4_spec *umask = &fsp->m_u.usr_ip4_spec;
7468 7467
7468 if (uspec->ip_ver != ETH_RX_NFC_IP4)
7469 return -EINVAL;
7470
7469 niu_lock_parent(np, flags); 7471 niu_lock_parent(np, flags);
7470 7472
7471 for (i = 0; i < NIU_L3_PROG_CLS; i++) { 7473 for (i = 0; i < NIU_L3_PROG_CLS; i++) {
@@ -7494,9 +7496,7 @@ static int niu_add_ethtool_tcam_entry(struct niu *np,
7494 default: 7496 default:
7495 break; 7497 break;
7496 } 7498 }
7497 if (uspec->ip_ver == ETH_RX_NFC_IP6) 7499 ret = tcam_user_ip_class_set(np, class, 0,
7498 ipv6 = 1;
7499 ret = tcam_user_ip_class_set(np, class, ipv6,
7500 uspec->proto, 7500 uspec->proto,
7501 uspec->tos, 7501 uspec->tos,
7502 umask->tos); 7502 umask->tos);
@@ -7553,16 +7553,7 @@ static int niu_add_ethtool_tcam_entry(struct niu *np,
7553 ret = -EINVAL; 7553 ret = -EINVAL;
7554 goto out; 7554 goto out;
7555 case IP_USER_FLOW: 7555 case IP_USER_FLOW:
7556 if (fsp->h_u.usr_ip4_spec.ip_ver == ETH_RX_NFC_IP4) { 7556 niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table, class);
7557 niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table,
7558 class);
7559 } else {
7560 /* Not yet implemented */
7561 netdev_info(np->dev, "niu%d: In %s(): usr flow for IPv6 not implemented\n",
7562 parent->index, __func__);
7563 ret = -EINVAL;
7564 goto out;
7565 }
7566 break; 7557 break;
7567 default: 7558 default:
7568 netdev_info(np->dev, "niu%d: In %s(): Unknown flow type %d\n", 7559 netdev_info(np->dev, "niu%d: In %s(): Unknown flow type %d\n",