Skip to content

Commit

Permalink
net: ethernet: dwmac-sun8i: show message only when switching to promisc
Browse files Browse the repository at this point in the history
Printing the info message every time more than the max number of mac
addresses are requested generates unnecessary log spam.  Showing it only
when the hw is not already in promiscous mode is equally informative
without being annoying.

Signed-off-by: Mans Rullgard <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
mansr authored and davem330 committed Oct 19, 2019
1 parent 3d00cf2 commit 05908d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,8 @@ static void sun8i_dwmac_set_filter(struct mac_device_info *hw,
}
}
} else {
netdev_info(dev, "Too many address, switching to promiscuous\n");
if (!(readl(ioaddr + EMAC_RX_FRM_FLT) & EMAC_FRM_FLT_RXALL))
netdev_info(dev, "Too many address, switching to promiscuous\n");
v = EMAC_FRM_FLT_RXALL;
}

Expand Down

0 comments on commit 05908d7

Please sign in to comment.