Skip to content

Commit e86d748

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 183a928 commit e86d748

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;
@@ -913,7 +912,6 @@ void eth_phy_link_status_poll() {
913912

914913
// Mark as configured
915914
self->mac_speed_configured = true;
916-
self->configured_phy_speed = phy_speed;
917915

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

10921089
return 0;

0 commit comments

Comments
 (0)