Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ll_temac: Do not make promiscuous mode sticky on multicast

When user has requested IFF_ALLMULTI or have set more than 4 multicast
addresses, we should just use promiscuous mode, but not set it in flags,
as it causes the interface to stay in promiscuous mode even when the
non-IFF_PROMISC condition that caused promiscuous mode to be enabled
has gone away.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Esben Haabendal and committed by
David S. Miller
ddc0bf34 5556fdb0

-7
-7
drivers/net/ethernet/xilinx/ll_temac_main.c
··· 389 389 mutex_lock(lp->indirect_mutex); 390 390 if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC) || 391 391 netdev_mc_count(ndev) > MULTICAST_CAM_TABLE_NUM) { 392 - /* 393 - * We must make the kernel realise we had to move 394 - * into promisc mode or we start all out war on 395 - * the cable. If it was a promisc request the 396 - * flag is already set. If not we assert it. 397 - */ 398 - ndev->flags |= IFF_PROMISC; 399 392 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); 400 393 dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); 401 394 } else if (!netdev_mc_empty(ndev)) {