Skip to content

Commit 907d820

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 99ec995 commit 907d820

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
@@ -123,7 +123,6 @@ typedef struct _eth_t {
123123
bool last_link_status;
124124
bool enabled;
125125
bool mac_speed_configured;
126-
uint16_t configured_phy_speed;
127126
uint32_t autoneg_start_ms;
128127
volatile bool mac_reconfig_in_progress;
129128
} eth_t;
@@ -915,7 +914,6 @@ void eth_phy_link_status_poll() {
915914

916915
// Mark as configured
917916
self->mac_speed_configured = true;
918-
self->configured_phy_speed = phy_speed;
919917

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

10941091
return 0;

0 commit comments

Comments
 (0)