aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-08-27 17:04:53 -0700
committerDavid S. Miller <davem@davemloft.net>2014-08-27 22:59:40 -0700
commitec9436baedb689668c409cfc8b69eb9573b0d661 (patch)
tree928b1885d12a73c353a6a7f1047d3790a3ee5ad6 /include/net/dsa.h
parentnet: dsa: allow switches to work without tagging (diff)
downloadlinux-dev-ec9436baedb689668c409cfc8b69eb9573b0d661.tar.xz
linux-dev-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.h7
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);