summaryrefslogtreecommitdiff
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-09-18 17:31:22 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-22 14:41:23 -0400
commit2446254915a7d6f08bba9a755a34cc0402880472 (patch)
tree2b27382c1139a4a9e2b012fa7a9b9604e51bb031 /include/net/dsa.h
parent34f6b8745d421683ca0a268540869eb30721e970 (diff)
downloadlwn-2446254915a7d6f08bba9a755a34cc0402880472.tar.gz
lwn-2446254915a7d6f08bba9a755a34cc0402880472.zip
net: dsa: allow switch drivers to implement suspend/resume hooks
Add an abstraction layer to suspend/resume switch devices, doing the following split: - suspend/resume the slave network devices and their corresponding PHY devices - suspend/resume the switch hardware using switch driver callbacks 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index e020b8a12b7d..846dce4abaa5 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -210,6 +210,12 @@ struct dsa_switch_driver {
void (*get_ethtool_stats)(struct dsa_switch *ds,
int port, uint64_t *data);
int (*get_sset_count)(struct dsa_switch *ds);
+
+ /*
+ * Suspend and resume
+ */
+ int (*suspend)(struct dsa_switch *ds);
+ int (*resume)(struct dsa_switch *ds);
};
void register_switch_driver(struct dsa_switch_driver *type);