Skip to content

Commit

Permalink
Style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Uziemblo committed Sep 4, 2024
1 parent 6e7c4a7 commit 7dbbd7e
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions drivers/imx-enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ static void enet_start(enet_state_t *state)
{
state->mmio->ECR &= ENET_ECR_ETHEREN;

state->mmio->MRBR = ENET_BUFFER_SIZE; // FIXME: coerce with net_allocPktBuf()
state->mmio->FTRL = BIT(14)-1; // FIXME: truncation to just above link MTU
state->mmio->MRBR = ENET_BUFFER_SIZE; // FIXME: coerce with net_allocPktBuf()
state->mmio->FTRL = BIT(14) - 1; // FIXME: truncation to just above link MTU

state->mmio->RCR =
#if ETHARP_SUPPORT_VLAN
Expand Down Expand Up @@ -223,7 +223,7 @@ static void enet_start(enet_state_t *state)
/* TCR */

state->mmio->EIR = ENET_IRQ_ALL;
enet_dataSyncBarrier();
enet_dataSyncBarrier();

mutexLock(state->irq_lock);
state->mmio->EIMR |= ENET_IRQ_EBERR;
Expand Down Expand Up @@ -777,11 +777,11 @@ static int platformctl_seq(const platformctl_t *pctl, size_t n)

static inline void enet_warnUnsupportedDeviceAddr(enet_state_t *state)
{
enet_printf(state, "Unsupported device address 0x%8x", state->dev_phys_addr);
enet_printf(state, "Supported addresses:");
printf("\tENET1=0x%08x\n", ENET_ADDR_ENET1);
enet_printf(state, "Unsupported device address 0x%8x", state->dev_phys_addr);
enet_printf(state, "Supported addresses:");
printf("\tENET1=0x%08x\n", ENET_ADDR_ENET1);
#if defined(__CPU_IMX6ULL)
printf("\tENET2=0x%08x\n", ENET_ADDR_ENET2);
printf("\tENET2=0x%08x\n", ENET_ADDR_ENET2);
#endif
}

Expand Down Expand Up @@ -1428,25 +1428,25 @@ const char *enet_media(struct netif *netif)
speed = ephy_linkSpeed(&state->phy, &full_duplex);

switch (speed) {
case 0:
return "unspecified";
case 10:
if (full_duplex)
return "10Mbps/full-duplex";
else
return "10Mbps/half-duplex";
case 100:
if (full_duplex)
return "100Mbps/full-duplex";
else
return "100Mbps/half-duplex";
case 1000:
if (full_duplex)
return "1000Mbps/full-duplex";
else
return "1000Mbps/half-duplex";
default:
return "unrecognized";
case 0:
return "unspecified";
case 10:
if (full_duplex)
return "10Mbps/full-duplex";
else
return "10Mbps/half-duplex";
case 100:
if (full_duplex)
return "100Mbps/full-duplex";
else
return "100Mbps/half-duplex";
case 1000:
if (full_duplex)
return "1000Mbps/full-duplex";
else
return "1000Mbps/half-duplex";
default:
return "unrecognized";
}
}

Expand Down

0 comments on commit 7dbbd7e

Please sign in to comment.