diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-08-28 02:04:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-28 07:59:40 +0200 |
commit | ec9436baedb689668c409cfc8b69eb9573b0d661 (patch) | |
tree | 928b1885d12a73c353a6a7f1047d3790a3ee5ad6 /include/net/dsa.h | |
parent | net: dsa: allow switches to work without tagging (diff) | |
download | linux-ec9436baedb689668c409cfc8b69eb9573b0d661.tar.xz linux-ec9436baedb689668c409cfc8b69eb9573b0d661.zip |
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 1035f6452d79..2d3835924dd2 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); |