Commit 66115a37 authored by iabdalkader's avatar iabdalkader Committed by Damien George

stm32/eth: Fix eth_link_status function to use correct BSR bit.

Fixes #7346.
parent 51614ce3
...@@ -791,11 +791,10 @@ int eth_link_status(eth_t *self) { ...@@ -791,11 +791,10 @@ int eth_link_status(eth_t *self) {
return 2; // link no-ip; return 2; // link no-ip;
} }
} else { } else {
int s = eth_phy_read(0) | eth_phy_read(0x10) << 16; if (eth_phy_read(PHY_BSR) & PHY_BSR_LINK_STATUS) {
if (s == 0) { return 1; // link up
return 0; // link down
} else { } else {
return 1; // link join return 0; // link down
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment