@@ -456,7 +456,16 @@ int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
456
456
}
457
457
EXPORT_SYMBOL (phy_do_ioctl );
458
458
459
- /* same as phy_do_ioctl, but ensures that net_device is running */
459
+ /**
460
+ * phy_do_ioctl_running - generic ndo_do_ioctl implementation but test first
461
+ *
462
+ * @dev: the net_device struct
463
+ * @ifr: &struct ifreq for socket ioctl's
464
+ * @cmd: ioctl cmd to execute
465
+ *
466
+ * Same as phy_do_ioctl, but ensures that net_device is running before
467
+ * handling the ioctl.
468
+ */
460
469
int phy_do_ioctl_running (struct net_device * dev , struct ifreq * ifr , int cmd )
461
470
{
462
471
if (!netif_running (dev ))
@@ -466,13 +475,24 @@ int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd)
466
475
}
467
476
EXPORT_SYMBOL (phy_do_ioctl_running );
468
477
478
+ /**
479
+ * phy_queue_state_machine - Trigger the state machine to run soon
480
+ *
481
+ * @phydev: the phy_device struct
482
+ * @jiffies: Run the state machine after these jiffies
483
+ */
469
484
void phy_queue_state_machine (struct phy_device * phydev , unsigned long jiffies )
470
485
{
471
486
mod_delayed_work (system_power_efficient_wq , & phydev -> state_queue ,
472
487
jiffies );
473
488
}
474
489
EXPORT_SYMBOL (phy_queue_state_machine );
475
490
491
+ /**
492
+ * phy_queue_state_machine - Trigger the state machine to run now
493
+ *
494
+ * @phydev: the phy_device struct
495
+ */
476
496
static void phy_trigger_machine (struct phy_device * phydev )
477
497
{
478
498
phy_queue_state_machine (phydev , 0 );
@@ -489,6 +509,12 @@ static void phy_abort_cable_test(struct phy_device *phydev)
489
509
phydev_err (phydev , "Error while aborting cable test" );
490
510
}
491
511
512
+ /**
513
+ * phy_ethtool_get_strings - Get the statistic counter names
514
+ *
515
+ * @phydev: the phy_device struct
516
+ * @data: Where to put the strings
517
+ */
492
518
int phy_ethtool_get_strings (struct phy_device * phydev , u8 * data )
493
519
{
494
520
if (!phydev -> drv )
@@ -502,6 +528,11 @@ int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data)
502
528
}
503
529
EXPORT_SYMBOL (phy_ethtool_get_strings );
504
530
531
+ /**
532
+ * phy_ethtool_get_sset_count - Get the number of statistic counters
533
+ *
534
+ * @phydev: the phy_device struct
535
+ */
505
536
int phy_ethtool_get_sset_count (struct phy_device * phydev )
506
537
{
507
538
int ret ;
@@ -523,6 +554,13 @@ int phy_ethtool_get_sset_count(struct phy_device *phydev)
523
554
}
524
555
EXPORT_SYMBOL (phy_ethtool_get_sset_count );
525
556
557
+ /**
558
+ * phy_ethtool_get_stats - Get the statistic counters
559
+ *
560
+ * @phydev: the phy_device struct
561
+ * @stats: What counters to get
562
+ * @data: Where to store the counters
563
+ */
526
564
int phy_ethtool_get_stats (struct phy_device * phydev ,
527
565
struct ethtool_stats * stats , u64 * data )
528
566
{
@@ -537,6 +575,12 @@ int phy_ethtool_get_stats(struct phy_device *phydev,
537
575
}
538
576
EXPORT_SYMBOL (phy_ethtool_get_stats );
539
577
578
+ /**
579
+ * phy_start_cable_test - Start a cable test
580
+ *
581
+ * @phydev: the phy_device struct
582
+ * @extack: extack for reporting useful error messages
583
+ */
540
584
int phy_start_cable_test (struct phy_device * phydev ,
541
585
struct netlink_ext_ack * extack )
542
586
{
@@ -600,6 +644,13 @@ int phy_start_cable_test(struct phy_device *phydev,
600
644
}
601
645
EXPORT_SYMBOL (phy_start_cable_test );
602
646
647
+ /**
648
+ * phy_start_cable_test_tdr - Start a raw TDR cable test
649
+ *
650
+ * @phydev: the phy_device struct
651
+ * @extack: extack for reporting useful error messages
652
+ * @config: Configuration of the test to run
653
+ */
603
654
int phy_start_cable_test_tdr (struct phy_device * phydev ,
604
655
struct netlink_ext_ack * extack ,
605
656
const struct phy_tdr_config * config )
@@ -1363,6 +1414,12 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
1363
1414
}
1364
1415
EXPORT_SYMBOL (phy_ethtool_set_eee );
1365
1416
1417
+ /**
1418
+ * phy_ethtool_set_wol - Configure Wake On LAN
1419
+ *
1420
+ * @phydev: target phy_device struct
1421
+ * @wol: Configuration requested
1422
+ */
1366
1423
int phy_ethtool_set_wol (struct phy_device * phydev , struct ethtool_wolinfo * wol )
1367
1424
{
1368
1425
if (phydev -> drv && phydev -> drv -> set_wol )
@@ -1372,6 +1429,12 @@ int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol)
1372
1429
}
1373
1430
EXPORT_SYMBOL (phy_ethtool_set_wol );
1374
1431
1432
+ /**
1433
+ * phy_ethtool_get_wol - Get the current Wake On LAN configuration
1434
+ *
1435
+ * @phydev: target phy_device struct
1436
+ * @wol: Store the current configuration here
1437
+ */
1375
1438
void phy_ethtool_get_wol (struct phy_device * phydev , struct ethtool_wolinfo * wol )
1376
1439
{
1377
1440
if (phydev -> drv && phydev -> drv -> get_wol )
@@ -1405,6 +1468,10 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev,
1405
1468
}
1406
1469
EXPORT_SYMBOL (phy_ethtool_set_link_ksettings );
1407
1470
1471
+ /**
1472
+ * phy_ethtool_nway_reset - Restart auto negotiation
1473
+ * @ndev: Network device to restart autoneg for
1474
+ */
1408
1475
int phy_ethtool_nway_reset (struct net_device * ndev )
1409
1476
{
1410
1477
struct phy_device * phydev = ndev -> phydev ;
0 commit comments