summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/common.h
diff options
context:
space:
mode:
authorLABBE Corentin2017-05-24 09:16:47 +0200
committerDavid S. Miller2017-05-25 19:08:35 +0200
commitca84dfb9ab70849c2b01f30d658a8900cff9889d (patch)
treef93b8455ab7626c43d9e266ade6bf907fa733045 /drivers/net/ethernet/stmicro/stmmac/common.h
parentnet-next: stmmac: Convert old_link to bool (diff)
downloadkernel-qcow2-linux-ca84dfb9ab70849c2b01f30d658a8900cff9889d.tar.gz
kernel-qcow2-linux-ca84dfb9ab70849c2b01f30d658a8900cff9889d.tar.xz
kernel-qcow2-linux-ca84dfb9ab70849c2b01f30d658a8900cff9889d.zip
net-next: stmmac: rework the speed selection
The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be combined for writing speed. So this patch replace speed/port by simpler speed10/speed100/speed1000/speed_mask variables. In dwmac4_core_init and dwmac1000_core_init, port/speed value was used directly without using the struct link. This patch convert also their usage to speedxxx. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/common.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index b7ce3fbb5375..e82b4b70b7be 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -549,9 +549,11 @@ extern const struct stmmac_hwtimestamp stmmac_ptp;
extern const struct stmmac_mode_ops dwmac4_ring_mode_ops;
struct mac_link {
- int port;
- int duplex;
- int speed;
+ u32 speed_mask;
+ u32 speed10;
+ u32 speed100;
+ u32 speed1000;
+ u32 duplex;
};
struct mii_regs {