mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 07:21:27 +00:00
net: dsa: allow drivers to do link adjustment
Whenever libphy determines that the link status of a given PHY/port has changed, allow to call into the switch driver link adjustment callback so proper actions can be taken care of by the switch driver upon link notification. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5aed85cec2
commit
ec9436baed
2 changed files with 11 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <linux/timer.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/phy.h>
|
||||
|
||||
#define DSA_MAX_SWITCHES 4
|
||||
#define DSA_MAX_PORTS 12
|
||||
|
@ -181,6 +182,12 @@ struct dsa_switch_driver {
|
|||
*/
|
||||
void (*poll_link)(struct dsa_switch *ds);
|
||||
|
||||
/*
|
||||
* Link state adjustment (called from libphy)
|
||||
*/
|
||||
void (*adjust_link)(struct dsa_switch *ds, int port,
|
||||
struct phy_device *phydev);
|
||||
|
||||
/*
|
||||
* ethtool hardware statistics.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue