aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r--drivers/net/sfc/ethtool.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index e2c75d10161..8a15be6548d 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -183,7 +183,7 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {
183/* Identify device by flashing LEDs */ 183/* Identify device by flashing LEDs */
184static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds) 184static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds)
185{ 185{
186 struct efx_nic *efx = net_dev->priv; 186 struct efx_nic *efx = netdev_priv(net_dev);
187 187
188 efx->board_info.blink(efx, 1); 188 efx->board_info.blink(efx, 1);
189 schedule_timeout_interruptible(seconds * HZ); 189 schedule_timeout_interruptible(seconds * HZ);
@@ -195,7 +195,7 @@ static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds)
195int efx_ethtool_get_settings(struct net_device *net_dev, 195int efx_ethtool_get_settings(struct net_device *net_dev,
196 struct ethtool_cmd *ecmd) 196 struct ethtool_cmd *ecmd)
197{ 197{
198 struct efx_nic *efx = net_dev->priv; 198 struct efx_nic *efx = netdev_priv(net_dev);
199 int rc; 199 int rc;
200 200
201 mutex_lock(&efx->mac_lock); 201 mutex_lock(&efx->mac_lock);
@@ -209,7 +209,7 @@ int efx_ethtool_get_settings(struct net_device *net_dev,
209int efx_ethtool_set_settings(struct net_device *net_dev, 209int efx_ethtool_set_settings(struct net_device *net_dev,
210 struct ethtool_cmd *ecmd) 210 struct ethtool_cmd *ecmd)
211{ 211{
212 struct efx_nic *efx = net_dev->priv; 212 struct efx_nic *efx = netdev_priv(net_dev);
213 int rc; 213 int rc;
214 214
215 mutex_lock(&efx->mac_lock); 215 mutex_lock(&efx->mac_lock);
@@ -224,7 +224,7 @@ int efx_ethtool_set_settings(struct net_device *net_dev,
224static void efx_ethtool_get_drvinfo(struct net_device *net_dev, 224static void efx_ethtool_get_drvinfo(struct net_device *net_dev,
225 struct ethtool_drvinfo *info) 225 struct ethtool_drvinfo *info)
226{ 226{
227 struct efx_nic *efx = net_dev->priv; 227 struct efx_nic *efx = netdev_priv(net_dev);
228 228
229 strlcpy(info->driver, EFX_DRIVER_NAME, sizeof(info->driver)); 229 strlcpy(info->driver, EFX_DRIVER_NAME, sizeof(info->driver));
230 strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version)); 230 strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version));
@@ -376,7 +376,7 @@ static int efx_ethtool_get_stats_count(struct net_device *net_dev)
376 376
377static int efx_ethtool_self_test_count(struct net_device *net_dev) 377static int efx_ethtool_self_test_count(struct net_device *net_dev)
378{ 378{
379 struct efx_nic *efx = net_dev->priv; 379 struct efx_nic *efx = netdev_priv(net_dev);
380 380
381 return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL); 381 return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL);
382} 382}
@@ -384,7 +384,7 @@ static int efx_ethtool_self_test_count(struct net_device *net_dev)
384static void efx_ethtool_get_strings(struct net_device *net_dev, 384static void efx_ethtool_get_strings(struct net_device *net_dev,
385 u32 string_set, u8 *strings) 385 u32 string_set, u8 *strings)
386{ 386{
387 struct efx_nic *efx = net_dev->priv; 387 struct efx_nic *efx = netdev_priv(net_dev);
388 struct ethtool_string *ethtool_strings = 388 struct ethtool_string *ethtool_strings =
389 (struct ethtool_string *)strings; 389 (struct ethtool_string *)strings;
390 int i; 390 int i;
@@ -410,7 +410,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
410 struct ethtool_stats *stats, 410 struct ethtool_stats *stats,
411 u64 *data) 411 u64 *data)
412{ 412{
413 struct efx_nic *efx = net_dev->priv; 413 struct efx_nic *efx = netdev_priv(net_dev);
414 struct efx_mac_stats *mac_stats = &efx->mac_stats; 414 struct efx_mac_stats *mac_stats = &efx->mac_stats;
415 struct efx_ethtool_stat *stat; 415 struct efx_ethtool_stat *stat;
416 struct efx_channel *channel; 416 struct efx_channel *channel;
@@ -460,7 +460,7 @@ static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
460 460
461static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) 461static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
462{ 462{
463 struct efx_nic *efx = net_dev->priv; 463 struct efx_nic *efx = netdev_priv(net_dev);
464 int rc; 464 int rc;
465 465
466 rc = ethtool_op_set_tx_csum(net_dev, enable); 466 rc = ethtool_op_set_tx_csum(net_dev, enable);
@@ -483,7 +483,7 @@ static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
483 483
484static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) 484static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable)
485{ 485{
486 struct efx_nic *efx = net_dev->priv; 486 struct efx_nic *efx = netdev_priv(net_dev);
487 487
488 /* No way to stop the hardware doing the checks; we just 488 /* No way to stop the hardware doing the checks; we just
489 * ignore the result. 489 * ignore the result.
@@ -495,7 +495,7 @@ static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable)
495 495
496static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev) 496static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev)
497{ 497{
498 struct efx_nic *efx = net_dev->priv; 498 struct efx_nic *efx = netdev_priv(net_dev);
499 499
500 return efx->rx_checksum_enabled; 500 return efx->rx_checksum_enabled;
501} 501}
@@ -503,7 +503,7 @@ static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev)
503static void efx_ethtool_self_test(struct net_device *net_dev, 503static void efx_ethtool_self_test(struct net_device *net_dev,
504 struct ethtool_test *test, u64 *data) 504 struct ethtool_test *test, u64 *data)
505{ 505{
506 struct efx_nic *efx = net_dev->priv; 506 struct efx_nic *efx = netdev_priv(net_dev);
507 struct efx_self_tests efx_tests; 507 struct efx_self_tests efx_tests;
508 int offline, already_up; 508 int offline, already_up;
509 int rc; 509 int rc;
@@ -561,14 +561,14 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
561/* Restart autonegotiation */ 561/* Restart autonegotiation */
562static int efx_ethtool_nway_reset(struct net_device *net_dev) 562static int efx_ethtool_nway_reset(struct net_device *net_dev)
563{ 563{
564 struct efx_nic *efx = net_dev->priv; 564 struct efx_nic *efx = netdev_priv(net_dev);
565 565
566 return mii_nway_restart(&efx->mii); 566 return mii_nway_restart(&efx->mii);
567} 567}
568 568
569static u32 efx_ethtool_get_link(struct net_device *net_dev) 569static u32 efx_ethtool_get_link(struct net_device *net_dev)
570{ 570{
571 struct efx_nic *efx = net_dev->priv; 571 struct efx_nic *efx = netdev_priv(net_dev);
572 572
573 return efx->link_up; 573 return efx->link_up;
574} 574}
@@ -576,7 +576,7 @@ static u32 efx_ethtool_get_link(struct net_device *net_dev)
576static int efx_ethtool_get_coalesce(struct net_device *net_dev, 576static int efx_ethtool_get_coalesce(struct net_device *net_dev,
577 struct ethtool_coalesce *coalesce) 577 struct ethtool_coalesce *coalesce)
578{ 578{
579 struct efx_nic *efx = net_dev->priv; 579 struct efx_nic *efx = netdev_priv(net_dev);
580 struct efx_tx_queue *tx_queue; 580 struct efx_tx_queue *tx_queue;
581 struct efx_rx_queue *rx_queue; 581 struct efx_rx_queue *rx_queue;
582 struct efx_channel *channel; 582 struct efx_channel *channel;
@@ -614,7 +614,7 @@ static int efx_ethtool_get_coalesce(struct net_device *net_dev,
614static int efx_ethtool_set_coalesce(struct net_device *net_dev, 614static int efx_ethtool_set_coalesce(struct net_device *net_dev,
615 struct ethtool_coalesce *coalesce) 615 struct ethtool_coalesce *coalesce)
616{ 616{
617 struct efx_nic *efx = net_dev->priv; 617 struct efx_nic *efx = netdev_priv(net_dev);
618 struct efx_channel *channel; 618 struct efx_channel *channel;
619 struct efx_tx_queue *tx_queue; 619 struct efx_tx_queue *tx_queue;
620 unsigned tx_usecs, rx_usecs; 620 unsigned tx_usecs, rx_usecs;
@@ -657,7 +657,7 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
657static int efx_ethtool_set_pauseparam(struct net_device *net_dev, 657static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
658 struct ethtool_pauseparam *pause) 658 struct ethtool_pauseparam *pause)
659{ 659{
660 struct efx_nic *efx = net_dev->priv; 660 struct efx_nic *efx = netdev_priv(net_dev);
661 enum efx_fc_type flow_control = efx->flow_control; 661 enum efx_fc_type flow_control = efx->flow_control;
662 int rc; 662 int rc;
663 663
@@ -680,7 +680,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
680static void efx_ethtool_get_pauseparam(struct net_device *net_dev, 680static void efx_ethtool_get_pauseparam(struct net_device *net_dev,
681 struct ethtool_pauseparam *pause) 681 struct ethtool_pauseparam *pause)
682{ 682{
683 struct efx_nic *efx = net_dev->priv; 683 struct efx_nic *efx = netdev_priv(net_dev);
684 684
685 pause->rx_pause = (efx->flow_control & EFX_FC_RX) ? 1 : 0; 685 pause->rx_pause = (efx->flow_control & EFX_FC_RX) ? 1 : 0;
686 pause->tx_pause = (efx->flow_control & EFX_FC_TX) ? 1 : 0; 686 pause->tx_pause = (efx->flow_control & EFX_FC_TX) ? 1 : 0;