aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb/ixgb_ethtool.c')
-rw-r--r--drivers/net/ixgb/ixgb_ethtool.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index 7c9b35c677f0..5b354e3122c4 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -125,7 +125,7 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
125 if (ecmd->autoneg == AUTONEG_ENABLE || 125 if (ecmd->autoneg == AUTONEG_ENABLE ||
126 ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) 126 ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL)
127 return -EINVAL; 127 return -EINVAL;
128 128
129 if (netif_running(adapter->netdev)) { 129 if (netif_running(adapter->netdev)) {
130 ixgb_down(adapter, true); 130 ixgb_down(adapter, true);
131 ixgb_reset(adapter); 131 ixgb_reset(adapter);
@@ -143,9 +143,9 @@ ixgb_get_pauseparam(struct net_device *netdev,
143{ 143{
144 struct ixgb_adapter *adapter = netdev_priv(netdev); 144 struct ixgb_adapter *adapter = netdev_priv(netdev);
145 struct ixgb_hw *hw = &adapter->hw; 145 struct ixgb_hw *hw = &adapter->hw;
146 146
147 pause->autoneg = AUTONEG_DISABLE; 147 pause->autoneg = AUTONEG_DISABLE;
148 148
149 if (hw->fc.type == ixgb_fc_rx_pause) 149 if (hw->fc.type == ixgb_fc_rx_pause)
150 pause->rx_pause = 1; 150 pause->rx_pause = 1;
151 else if (hw->fc.type == ixgb_fc_tx_pause) 151 else if (hw->fc.type == ixgb_fc_tx_pause)
@@ -162,7 +162,7 @@ ixgb_set_pauseparam(struct net_device *netdev,
162{ 162{
163 struct ixgb_adapter *adapter = netdev_priv(netdev); 163 struct ixgb_adapter *adapter = netdev_priv(netdev);
164 struct ixgb_hw *hw = &adapter->hw; 164 struct ixgb_hw *hw = &adapter->hw;
165 165
166 if (pause->autoneg == AUTONEG_ENABLE) 166 if (pause->autoneg == AUTONEG_ENABLE)
167 return -EINVAL; 167 return -EINVAL;
168 168
@@ -181,7 +181,7 @@ ixgb_set_pauseparam(struct net_device *netdev,
181 ixgb_set_speed_duplex(netdev); 181 ixgb_set_speed_duplex(netdev);
182 } else 182 } else
183 ixgb_reset(adapter); 183 ixgb_reset(adapter);
184 184
185 return 0; 185 return 0;
186} 186}
187 187
@@ -208,7 +208,7 @@ ixgb_set_rx_csum(struct net_device *netdev, u32 data)
208 ixgb_reset(adapter); 208 ixgb_reset(adapter);
209 return 0; 209 return 0;
210} 210}
211 211
212static u32 212static u32
213ixgb_get_tx_csum(struct net_device *netdev) 213ixgb_get_tx_csum(struct net_device *netdev)
214{ 214{
@@ -234,7 +234,7 @@ ixgb_set_tso(struct net_device *netdev, u32 data)
234 else 234 else
235 netdev->features &= ~NETIF_F_TSO; 235 netdev->features &= ~NETIF_F_TSO;
236 return 0; 236 return 0;
237} 237}
238 238
239static u32 239static u32
240ixgb_get_msglevel(struct net_device *netdev) 240ixgb_get_msglevel(struct net_device *netdev)
@@ -251,7 +251,7 @@ ixgb_set_msglevel(struct net_device *netdev, u32 data)
251} 251}
252#define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_ 252#define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_
253 253
254static int 254static int
255ixgb_get_regs_len(struct net_device *netdev) 255ixgb_get_regs_len(struct net_device *netdev)
256{ 256{
257#define IXGB_REG_DUMP_LEN 136*sizeof(u32) 257#define IXGB_REG_DUMP_LEN 136*sizeof(u32)
@@ -495,7 +495,7 @@ ixgb_set_eeprom(struct net_device *netdev,
495 if ((eeprom->offset + eeprom->len) & 1) { 495 if ((eeprom->offset + eeprom->len) & 1) {
496 /* need read/modify/write of last changed EEPROM word */ 496 /* need read/modify/write of last changed EEPROM word */
497 /* only the first byte of the word is being modified */ 497 /* only the first byte of the word is being modified */
498 eeprom_buff[last_word - first_word] 498 eeprom_buff[last_word - first_word]
499 = ixgb_read_eeprom(hw, last_word); 499 = ixgb_read_eeprom(hw, last_word);
500 } 500 }
501 501
@@ -534,7 +534,7 @@ ixgb_get_ringparam(struct net_device *netdev,
534 struct ixgb_desc_ring *txdr = &adapter->tx_ring; 534 struct ixgb_desc_ring *txdr = &adapter->tx_ring;
535 struct ixgb_desc_ring *rxdr = &adapter->rx_ring; 535 struct ixgb_desc_ring *rxdr = &adapter->rx_ring;
536 536
537 ring->rx_max_pending = MAX_RXD; 537 ring->rx_max_pending = MAX_RXD;
538 ring->tx_max_pending = MAX_TXD; 538 ring->tx_max_pending = MAX_TXD;
539 ring->rx_mini_max_pending = 0; 539 ring->rx_mini_max_pending = 0;
540 ring->rx_jumbo_max_pending = 0; 540 ring->rx_jumbo_max_pending = 0;
@@ -544,7 +544,7 @@ ixgb_get_ringparam(struct net_device *netdev,
544 ring->rx_jumbo_pending = 0; 544 ring->rx_jumbo_pending = 0;
545} 545}
546 546
547static int 547static int
548ixgb_set_ringparam(struct net_device *netdev, 548ixgb_set_ringparam(struct net_device *netdev,
549 struct ethtool_ringparam *ring) 549 struct ethtool_ringparam *ring)
550{ 550{
@@ -647,7 +647,7 @@ ixgb_phys_id(struct net_device *netdev, u32 data)
647 return 0; 647 return 0;
648} 648}
649 649
650static int 650static int
651ixgb_get_sset_count(struct net_device *netdev, int sset) 651ixgb_get_sset_count(struct net_device *netdev, int sset)
652{ 652{
653 switch (sset) { 653 switch (sset) {
@@ -658,8 +658,8 @@ ixgb_get_sset_count(struct net_device *netdev, int sset)
658 } 658 }
659} 659}
660 660
661static void 661static void
662ixgb_get_ethtool_stats(struct net_device *netdev, 662ixgb_get_ethtool_stats(struct net_device *netdev,
663 struct ethtool_stats *stats, u64 *data) 663 struct ethtool_stats *stats, u64 *data)
664{ 664{
665 struct ixgb_adapter *adapter = netdev_priv(netdev); 665 struct ixgb_adapter *adapter = netdev_priv(netdev);
@@ -667,13 +667,13 @@ ixgb_get_ethtool_stats(struct net_device *netdev,
667 667
668 ixgb_update_stats(adapter); 668 ixgb_update_stats(adapter);
669 for(i = 0; i < IXGB_STATS_LEN; i++) { 669 for(i = 0; i < IXGB_STATS_LEN; i++) {
670 char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; 670 char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset;
671 data[i] = (ixgb_gstrings_stats[i].sizeof_stat == 671 data[i] = (ixgb_gstrings_stats[i].sizeof_stat ==
672 sizeof(u64)) ? *(u64 *)p : *(u32 *)p; 672 sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
673 } 673 }
674} 674}
675 675
676static void 676static void
677ixgb_get_strings(struct net_device *netdev, u32 stringset, u8 *data) 677ixgb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
678{ 678{
679 int i; 679 int i;
@@ -681,7 +681,7 @@ ixgb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
681 switch(stringset) { 681 switch(stringset) {
682 case ETH_SS_STATS: 682 case ETH_SS_STATS:
683 for(i=0; i < IXGB_STATS_LEN; i++) { 683 for(i=0; i < IXGB_STATS_LEN; i++) {
684 memcpy(data + i * ETH_GSTRING_LEN, 684 memcpy(data + i * ETH_GSTRING_LEN,
685 ixgb_gstrings_stats[i].stat_string, 685 ixgb_gstrings_stats[i].stat_string,
686 ETH_GSTRING_LEN); 686 ETH_GSTRING_LEN);
687 } 687 }