summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2021-01-08 11:07:22 +0200
committerJakub Kicinski <kuba@kernel.org>2021-01-09 16:21:29 -0800
commit095dca16d92f32150314ef47ea150ed83c5aacd9 (patch)
tree3b0ea7a2955c9250bf8555c2cadef71c48861b71 /drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
parent38f7b449256490c312e4e83101075201fb5f87d1 (diff)
dpaa2-mac: split up initializing the MAC object from connecting to it
Split up the initialization phase of the dpmac object from actually configuring the phylink instance, connecting to it and configuring the MAC. This is done so that even though the dpni object is connected to a dpmac which has link management handled by the firmware we are still able to export the MAC counters. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
index 955a52856210..13d42dd58ec9 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
@@ -17,6 +17,7 @@ struct dpaa2_mac {
struct dpmac_link_state state;
struct net_device *net_dev;
struct fsl_mc_io *mc_io;
+ struct dpmac_attr attr;
struct phylink_config phylink_config;
struct phylink *phylink;
@@ -28,6 +29,10 @@ struct dpaa2_mac {
bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,
struct fsl_mc_io *mc_io);
+int dpaa2_mac_open(struct dpaa2_mac *mac);
+
+void dpaa2_mac_close(struct dpaa2_mac *mac);
+
int dpaa2_mac_connect(struct dpaa2_mac *mac);
void dpaa2_mac_disconnect(struct dpaa2_mac *mac);