aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_ethtool.c
diff options
context:
space:
mode:
authorMalli Chilakala <mallikarjuna.chilakala@intel.com>2005-08-11 16:58:40 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-11 17:09:19 -0400
commit8908c6cd1d6889850148aeb50bb14301959adaa7 (patch)
treef2d35f3f9dbad26caa665cdaef261ba42dac15fb /drivers/net/ixgb/ixgb_ethtool.c
parent51b54b512cd26c4477ccd57b8d3736b99ccef7a0 (diff)
[PATCH] ixgb: Use netdev_priv() instead of netdev->priv
Use netdev_priv() instead of netdev->priv Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/ixgb/ixgb_ethtool.c')
-rw-r--r--drivers/net/ixgb/ixgb_ethtool.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index 94bc3d41cfa3..c80fa0007904 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -98,7 +98,7 @@ static struct ixgb_stats ixgb_gstrings_stats[] = {
98static int 98static int
99ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 99ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
100{ 100{
101 struct ixgb_adapter *adapter = netdev->priv; 101 struct ixgb_adapter *adapter = netdev_priv(netdev);
102 102
103 ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); 103 ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
104 ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); 104 ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
@@ -120,7 +120,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
120static int 120static int
121ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 121ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
122{ 122{
123 struct ixgb_adapter *adapter = netdev->priv; 123 struct ixgb_adapter *adapter = netdev_priv(netdev);
124 124
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)
@@ -146,7 +146,7 @@ static void
146ixgb_get_pauseparam(struct net_device *netdev, 146ixgb_get_pauseparam(struct net_device *netdev,
147 struct ethtool_pauseparam *pause) 147 struct ethtool_pauseparam *pause)
148{ 148{
149 struct ixgb_adapter *adapter = netdev->priv; 149 struct ixgb_adapter *adapter = netdev_priv(netdev);
150 struct ixgb_hw *hw = &adapter->hw; 150 struct ixgb_hw *hw = &adapter->hw;
151 151
152 pause->autoneg = AUTONEG_DISABLE; 152 pause->autoneg = AUTONEG_DISABLE;
@@ -165,7 +165,7 @@ static int
165ixgb_set_pauseparam(struct net_device *netdev, 165ixgb_set_pauseparam(struct net_device *netdev,
166 struct ethtool_pauseparam *pause) 166 struct ethtool_pauseparam *pause)
167{ 167{
168 struct ixgb_adapter *adapter = netdev->priv; 168 struct ixgb_adapter *adapter = netdev_priv(netdev);
169 struct ixgb_hw *hw = &adapter->hw; 169 struct ixgb_hw *hw = &adapter->hw;
170 170
171 if(pause->autoneg == AUTONEG_ENABLE) 171 if(pause->autoneg == AUTONEG_ENABLE)
@@ -197,14 +197,16 @@ ixgb_set_pauseparam(struct net_device *netdev,
197static uint32_t 197static uint32_t
198ixgb_get_rx_csum(struct net_device *netdev) 198ixgb_get_rx_csum(struct net_device *netdev)
199{ 199{
200 struct ixgb_adapter *adapter = netdev->priv; 200 struct ixgb_adapter *adapter = netdev_priv(netdev);
201
201 return adapter->rx_csum; 202 return adapter->rx_csum;
202} 203}
203 204
204static int 205static int
205ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) 206ixgb_set_rx_csum(struct net_device *netdev, uint32_t data)
206{ 207{
207 struct ixgb_adapter *adapter = netdev->priv; 208 struct ixgb_adapter *adapter = netdev_priv(netdev);
209
208 adapter->rx_csum = data; 210 adapter->rx_csum = data;
209 211
210 if(netif_running(netdev)) { 212 if(netif_running(netdev)) {
@@ -262,7 +264,7 @@ static void
262ixgb_get_regs(struct net_device *netdev, 264ixgb_get_regs(struct net_device *netdev,
263 struct ethtool_regs *regs, void *p) 265 struct ethtool_regs *regs, void *p)
264{ 266{
265 struct ixgb_adapter *adapter = netdev->priv; 267 struct ixgb_adapter *adapter = netdev_priv(netdev);
266 struct ixgb_hw *hw = &adapter->hw; 268 struct ixgb_hw *hw = &adapter->hw;
267 uint32_t *reg = p; 269 uint32_t *reg = p;
268 uint32_t *reg_start = reg; 270 uint32_t *reg_start = reg;
@@ -407,7 +409,7 @@ static int
407ixgb_get_eeprom(struct net_device *netdev, 409ixgb_get_eeprom(struct net_device *netdev,
408 struct ethtool_eeprom *eeprom, uint8_t *bytes) 410 struct ethtool_eeprom *eeprom, uint8_t *bytes)
409{ 411{
410 struct ixgb_adapter *adapter = netdev->priv; 412 struct ixgb_adapter *adapter = netdev_priv(netdev);
411 struct ixgb_hw *hw = &adapter->hw; 413 struct ixgb_hw *hw = &adapter->hw;
412 uint16_t *eeprom_buff; 414 uint16_t *eeprom_buff;
413 int i, max_len, first_word, last_word; 415 int i, max_len, first_word, last_word;
@@ -455,7 +457,7 @@ static int
455ixgb_set_eeprom(struct net_device *netdev, 457ixgb_set_eeprom(struct net_device *netdev,
456 struct ethtool_eeprom *eeprom, uint8_t *bytes) 458 struct ethtool_eeprom *eeprom, uint8_t *bytes)
457{ 459{
458 struct ixgb_adapter *adapter = netdev->priv; 460 struct ixgb_adapter *adapter = netdev_priv(netdev);
459 struct ixgb_hw *hw = &adapter->hw; 461 struct ixgb_hw *hw = &adapter->hw;
460 uint16_t *eeprom_buff; 462 uint16_t *eeprom_buff;
461 void *ptr; 463 void *ptr;
@@ -513,7 +515,7 @@ static void
513ixgb_get_drvinfo(struct net_device *netdev, 515ixgb_get_drvinfo(struct net_device *netdev,
514 struct ethtool_drvinfo *drvinfo) 516 struct ethtool_drvinfo *drvinfo)
515{ 517{
516 struct ixgb_adapter *adapter = netdev->priv; 518 struct ixgb_adapter *adapter = netdev_priv(netdev);
517 519
518 strncpy(drvinfo->driver, ixgb_driver_name, 32); 520 strncpy(drvinfo->driver, ixgb_driver_name, 32);
519 strncpy(drvinfo->version, ixgb_driver_version, 32); 521 strncpy(drvinfo->version, ixgb_driver_version, 32);
@@ -528,7 +530,7 @@ static void
528ixgb_get_ringparam(struct net_device *netdev, 530ixgb_get_ringparam(struct net_device *netdev,
529 struct ethtool_ringparam *ring) 531 struct ethtool_ringparam *ring)
530{ 532{
531 struct ixgb_adapter *adapter = netdev->priv; 533 struct ixgb_adapter *adapter = netdev_priv(netdev);
532 struct ixgb_desc_ring *txdr = &adapter->tx_ring; 534 struct ixgb_desc_ring *txdr = &adapter->tx_ring;
533 struct ixgb_desc_ring *rxdr = &adapter->rx_ring; 535 struct ixgb_desc_ring *rxdr = &adapter->rx_ring;
534 536
@@ -546,7 +548,7 @@ static int
546ixgb_set_ringparam(struct net_device *netdev, 548ixgb_set_ringparam(struct net_device *netdev,
547 struct ethtool_ringparam *ring) 549 struct ethtool_ringparam *ring)
548{ 550{
549 struct ixgb_adapter *adapter = netdev->priv; 551 struct ixgb_adapter *adapter = netdev_priv(netdev);
550 struct ixgb_desc_ring *txdr = &adapter->tx_ring; 552 struct ixgb_desc_ring *txdr = &adapter->tx_ring;
551 struct ixgb_desc_ring *rxdr = &adapter->rx_ring; 553 struct ixgb_desc_ring *rxdr = &adapter->rx_ring;
552 struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new; 554 struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new;
@@ -628,7 +630,7 @@ ixgb_led_blink_callback(unsigned long data)
628static int 630static int
629ixgb_phys_id(struct net_device *netdev, uint32_t data) 631ixgb_phys_id(struct net_device *netdev, uint32_t data)
630{ 632{
631 struct ixgb_adapter *adapter = netdev->priv; 633 struct ixgb_adapter *adapter = netdev_priv(netdev);
632 634
633 if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) 635 if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ))
634 data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); 636 data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ);
@@ -664,7 +666,7 @@ static void
664ixgb_get_ethtool_stats(struct net_device *netdev, 666ixgb_get_ethtool_stats(struct net_device *netdev,
665 struct ethtool_stats *stats, uint64_t *data) 667 struct ethtool_stats *stats, uint64_t *data)
666{ 668{
667 struct ixgb_adapter *adapter = netdev->priv; 669 struct ixgb_adapter *adapter = netdev_priv(netdev);
668 int i; 670 int i;
669 671
670 ixgb_update_stats(adapter); 672 ixgb_update_stats(adapter);