Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions drivers/ethernet/eth_stm32_hal_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ void eth_stm32_set_mac_config(const struct device *dev, struct phy_link_state *s

heth->Init.Speed = PHY_LINK_IS_SPEED_100M(state->speed) ? ETH_SPEED_100M : ETH_SPEED_10M;

/* The default configuration is ETH_SOURCEADDRESS_REPLACE_ADDR0,
* which is bad for bridging.
*/
mac_config.SourceAddrControl = ETH_SOURCEADDRESS_DISABLE;

hal_ret = HAL_ETH_ConfigMAC(heth, NULL);
if (hal_ret != HAL_OK) {
LOG_ERR("HAL_ETH_ConfigMAC: failed: %d", hal_ret);
Expand Down
5 changes: 5 additions & 0 deletions drivers/ethernet/eth_stm32_hal_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@ void eth_stm32_set_mac_config(const struct device *dev, struct phy_link_state *s
PHY_LINK_IS_SPEED_1000M(state->speed) ? ETH_SPEED_1000M :)
PHY_LINK_IS_SPEED_100M(state->speed) ? ETH_SPEED_100M : ETH_SPEED_10M;

/* The default configuration is ETH_SOURCEADDRESS_REPLACE_ADDR0,
* which is bad for bridging.
*/
mac_config.SourceAddrControl = ETH_SOURCEADDRESS_DISABLE;

hal_ret = HAL_ETH_SetMACConfig(heth, &mac_config);
if (hal_ret != HAL_OK) {
LOG_ERR("HAL_ETH_SetMACConfig failed: %d", hal_ret);
Expand Down