aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/netxen/netxen_nic_ethtool.c')
-rw-r--r--drivers/net/netxen/netxen_nic_ethtool.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index 78e42316e70..cfb847b0cae 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -516,17 +516,17 @@ netxen_nic_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
516 ring->rx_jumbo_pending = 0; 516 ring->rx_jumbo_pending = 0;
517 for (i = 0; i < MAX_RCV_CTX; ++i) { 517 for (i = 0; i < MAX_RCV_CTX; ++i) {
518 ring->rx_pending += adapter->recv_ctx[i]. 518 ring->rx_pending += adapter->recv_ctx[i].
519 rcv_desc[RCV_DESC_NORMAL_CTXID].rcv_pending; 519 rcv_desc[RCV_DESC_NORMAL_CTXID].max_rx_desc_count;
520 ring->rx_jumbo_pending += adapter->recv_ctx[i]. 520 ring->rx_jumbo_pending += adapter->recv_ctx[i].
521 rcv_desc[RCV_DESC_JUMBO_CTXID].rcv_pending; 521 rcv_desc[RCV_DESC_JUMBO_CTXID].max_rx_desc_count;
522 } 522 }
523 ring->tx_pending = adapter->max_tx_desc_count;
523 524
524 ring->rx_max_pending = adapter->max_rx_desc_count; 525 ring->rx_max_pending = MAX_RCV_DESCRIPTORS;
525 ring->tx_max_pending = adapter->max_tx_desc_count; 526 ring->tx_max_pending = MAX_CMD_DESCRIPTORS_HOST;
526 ring->rx_jumbo_max_pending = adapter->max_jumbo_rx_desc_count; 527 ring->rx_jumbo_max_pending = MAX_JUMBO_RCV_DESCRIPTORS;
527 ring->rx_mini_max_pending = 0; 528 ring->rx_mini_max_pending = 0;
528 ring->rx_mini_pending = 0; 529 ring->rx_mini_pending = 0;
529 ring->rx_jumbo_pending = 0;
530} 530}
531 531
532static void 532static void
@@ -731,6 +731,19 @@ netxen_nic_get_ethtool_stats(struct net_device *dev,
731 } 731 }
732} 732}
733 733
734static u32 netxen_nic_get_rx_csum(struct net_device *dev)
735{
736 struct netxen_adapter *adapter = netdev_priv(dev);
737 return adapter->rx_csum;
738}
739
740static int netxen_nic_set_rx_csum(struct net_device *dev, u32 data)
741{
742 struct netxen_adapter *adapter = netdev_priv(dev);
743 adapter->rx_csum = !!data;
744 return 0;
745}
746
734struct ethtool_ops netxen_nic_ethtool_ops = { 747struct ethtool_ops netxen_nic_ethtool_ops = {
735 .get_settings = netxen_nic_get_settings, 748 .get_settings = netxen_nic_get_settings,
736 .set_settings = netxen_nic_set_settings, 749 .set_settings = netxen_nic_set_settings,
@@ -751,4 +764,6 @@ struct ethtool_ops netxen_nic_ethtool_ops = {
751 .get_strings = netxen_nic_get_strings, 764 .get_strings = netxen_nic_get_strings,
752 .get_ethtool_stats = netxen_nic_get_ethtool_stats, 765 .get_ethtool_stats = netxen_nic_get_ethtool_stats,
753 .get_sset_count = netxen_get_sset_count, 766 .get_sset_count = netxen_get_sset_count,
767 .get_rx_csum = netxen_nic_get_rx_csum,
768 .set_rx_csum = netxen_nic_set_rx_csum,
754}; 769};