mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI
When netdev->flags has IFF_PROMISC or IFF_ALLMULTI, set the corresponding bits in the MAC Control Register (MACCR). This change is based on code from the ftgmac100 driver, see ftgmac100_start_hw() in ftgmac100.c Signed-off-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9259f6b573
commit
75943bc970
1 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,12 @@ static int ftmac100_start_hw(struct ftmac100 *priv)
|
|||
if (netdev->mtu > ETH_DATA_LEN)
|
||||
maccr |= FTMAC100_MACCR_RX_FTL;
|
||||
|
||||
/* Add other bits as needed */
|
||||
if (netdev->flags & IFF_PROMISC)
|
||||
maccr |= FTMAC100_MACCR_RCV_ALL;
|
||||
if (netdev->flags & IFF_ALLMULTI)
|
||||
maccr |= FTMAC100_MACCR_RX_MULTIPKT;
|
||||
|
||||
iowrite32(maccr, priv->base + FTMAC100_OFFSET_MACCR);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue