diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-08-28 00:04:53 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-28 05:59:40 (GMT) |
commit | ec9436baedb689668c409cfc8b69eb9573b0d661 (patch) | |
tree | 928b1885d12a73c353a6a7f1047d3790a3ee5ad6 /include/net/dsa.h | |
parent | 5aed85cec29882d1c4b4b2a01cb75a99efdbe4ed (diff) | |
download | linux-ec9436baedb689668c409cfc8b69eb9573b0d661.tar.xz |
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>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 1035f64..2d383592 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -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 @@ -182,6 +183,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. */ void (*get_strings)(struct dsa_switch *ds, int port, uint8_t *data); |