]> git.baikalelectronics.ru Git - kernel.git/commit
net: sun4i-emac: add promiscuous support
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 11 Apr 2014 09:46:17 +0000 (10:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Apr 2014 05:59:38 +0000 (01:59 -0400)
commit9685339137212bda72d1854bb4c3cfc66cd8a591
treea22563a221ae67e36797ac16af46403e60396df5
parent48c34ad2b7749e7919c6bacd65d84cb2b719779f
net: sun4i-emac: add promiscuous support

The sun4i-emac driver is rather primitive, and doesn't support
promiscuous mode. This makes usage such as bridging impossible,
which is a shame on virtualization capable HW such as the
Allwinner A20.

The fix is fairly simple: move the RX setup code to the ndo_set_rx_mode
vector, and add the required HW configuration when IFF_PROMISC is passed
by the core code.

This has been tested on a generic A20 box running a few virtual
machines hanging off a bridge with the EMAC chip as the link to the
outside world.

Cc: Stefan Roese <sr@denx.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/allwinner/sun4i-emac.c