From: Claudiu Manoil Date: Wed, 23 Jan 2013 00:18:36 +0000 (+0000) Subject: gianfar: Restore promisc mode on gfar_init_mac() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f5ae62799a31fb2ce8b272bf184688e2a4770d19;p=linux-beck.git gianfar: Restore promisc mode on gfar_init_mac() Reactivate promiscuous mode in H/W upon gfar_init_mac(), if the net dev requires it (IFF_PROMISC flag set). This way the promisc mode is preserved accross device reset conditions like tx timeout, device restore, a.s.o. Signed-off-by: Voncken C Acksys Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index bffb2edd6858..e765b9b49a20 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -355,6 +355,10 @@ static void gfar_init_mac(struct net_device *ndev) gfar_write(®s->rir0, DEFAULT_RIR0); } + /* Restore PROMISC mode */ + if (ndev->flags & IFF_PROMISC) + rctrl |= RCTRL_PROM; + if (ndev->features & NETIF_F_RXCSUM) rctrl |= RCTRL_CHECKSUMMING;