Skip to content

Commit 47d1a7f

Browse files
committed
stm32/eth: Remove unused configured_phy_speed field.
The configured_phy_speed field was only written but never read. The boolean mac_speed_configured alone is sufficient to track whether MAC speed/duplex has been configured. This removes 3 assignments and the uint16_t field from the eth_t struct. Signed-off-by: Andrew Leech <[email protected]>
1 parent ae07a78 commit 47d1a7f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

ports/stm32/eth.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ typedef struct _eth_t {
124124
bool last_link_status;
125125
bool enabled;
126126
bool mac_speed_configured;
127-
uint16_t configured_phy_speed;
128127
uint32_t autoneg_start_ms;
129128
volatile bool mac_reconfig_in_progress;
130129
} eth_t;
@@ -914,7 +913,6 @@ void eth_phy_link_status_poll() {
914913

915914
// Mark as configured
916915
self->mac_speed_configured = true;
917-
self->configured_phy_speed = phy_speed;
918916

919917
// Restart DHCP if no static IP configured (since MAC was reconfigured)
920918
struct netif *netif = &self->netif;
@@ -1087,7 +1085,6 @@ static int eth_phy_init(eth_t *self) {
10871085
// Initialize link status tracking (current state, whatever it is)
10881086
self->last_link_status = false;
10891087
self->mac_speed_configured = false;
1090-
self->configured_phy_speed = 0;
10911088
eth_phy_link_status_poll();
10921089

10931090
return 0;

0 commit comments

Comments
 (0)