summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2020-02-08 09:26:54 -0700
committerGitHub <noreply@github.com>2020-02-08 09:26:54 -0700
commitb5e14fd732fd1af3f59ba40c6e72ef10b261a76e (patch)
tree87f7a6c5675abb788771623ca5e479462cae34e7 /libs
parent7649dc3b89bed3de162d2f45f113ca536842b11c (diff)
downloadbcm5719-ortega-b5e14fd732fd1af3f59ba40c6e72ef10b261a76e.tar.gz
bcm5719-ortega-b5e14fd732fd1af3f59ba40c6e72ef10b261a76e.zip
format: Re-run clang-format to clean up Network/ports.c changes. (#29)
Diffstat (limited to 'libs')
-rw-r--r--libs/Network/ports.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/Network/ports.c b/libs/Network/ports.c
index e9cea5a..c2622aa 100644
--- a/libs/Network/ports.c
+++ b/libs/Network/ports.c
@@ -58,8 +58,8 @@
#include <APE_TX_PORT1.h>
#include <APE_TX_PORT2.h>
#include <APE_TX_PORT3.h>
-#include <Network.h>
#include <MII.h>
+#include <Network.h>
NetworkPort_t gPort0 = {
.device = &DEVICE,
@@ -856,14 +856,14 @@ void Network_updatePortState(NetworkPort_t *port)
RegMIIControl_t control;
control.r16 = MII_readRegister(port->device, phy, (mii_reg_t)REG_MII_CONTROL);
- if(control.bits.RestartAutonegotiation)
+ if (control.bits.RestartAutonegotiation)
{
// Link down, don't update mac mode.
}
else
{
status.r16 = MII_readRegister(port->device, phy, (mii_reg_t)REG_MII_AUXILIARY_STATUS_SUMMARY);
- if(control.bits.AutoNegotiationEnable && !status.bits.AutoNegotiationComplete)
+ if (control.bits.AutoNegotiationEnable && !status.bits.AutoNegotiationComplete)
{
// Link down, don't update mac mode.
}
@@ -874,7 +874,7 @@ void Network_updatePortState(NetworkPort_t *port)
emacModeOrig = emacMode = port->device->EmacMode;
// Select full/half duplex mode.
- switch((uint8_t)status.bits.AutoNegotiationHCD)
+ switch ((uint8_t)status.bits.AutoNegotiationHCD)
{
case MII_AUXILIARY_STATUS_SUMMARY_AUTO_NEGOTIATION_HCD_NO_HCD:
// Error
@@ -895,7 +895,7 @@ void Network_updatePortState(NetworkPort_t *port)
}
// Select Speed
- switch((uint8_t)status.bits.AutoNegotiationHCD)
+ switch ((uint8_t)status.bits.AutoNegotiationHCD)
{
case MII_AUXILIARY_STATUS_SUMMARY_AUTO_NEGOTIATION_HCD_NO_HCD:
// Error
@@ -915,12 +915,11 @@ void Network_updatePortState(NetworkPort_t *port)
break;
}
- if(emacMode.r32 != emacModeOrig.r32)
+ if (emacMode.r32 != emacModeOrig.r32)
{
// Update emac mode to match current state.
port->device->EmacMode = emacMode;
}
-
}
}
} \ No newline at end of file
OpenPOWER on IntegriCloud