mirror of
https://xff.cz/git/u-boot/
synced 2025-09-27 21:41:16 +02:00
net: dsa: enable master promisc mode if available and needed
If ports have their own unique MAC addrs and master has a set_promisc function, call it so that packets will be received for ports. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
committed by
Stefano Babic
parent
87550a814e
commit
431f9d72ff
@@ -277,8 +277,15 @@ static int dsa_port_probe(struct udevice *pdev)
|
|||||||
* has a unique MAC address specified in the environment.
|
* has a unique MAC address specified in the environment.
|
||||||
*/
|
*/
|
||||||
eth_env_get_enetaddr_by_index("eth", dev_seq(pdev), env_enetaddr);
|
eth_env_get_enetaddr_by_index("eth", dev_seq(pdev), env_enetaddr);
|
||||||
if (!is_zero_ethaddr(env_enetaddr))
|
if (!is_zero_ethaddr(env_enetaddr)) {
|
||||||
|
/* individual port mac addrs require master to be promisc */
|
||||||
|
struct eth_ops *eth_ops = eth_get_ops(master);
|
||||||
|
|
||||||
|
if (eth_ops->set_promisc)
|
||||||
|
eth_ops->set_promisc(master, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
master_pdata = dev_get_plat(master);
|
master_pdata = dev_get_plat(master);
|
||||||
eth_pdata = dev_get_plat(pdev);
|
eth_pdata = dev_get_plat(pdev);
|
||||||
|
Reference in New Issue
Block a user