• L
    mv643xx_eth: implement ->set_rx_mode() · 66e63ffb
    Lennert Buytenhek 提交于
    Currently, if multiple unicast addresses are programmed into a
    mv643xx_eth interface, the core networking will resort to enabling
    promiscuous mode on the interface, as mv643xx_eth does not implement
    ->set_rx_mode().
    
    This patch switches mv643xx_eth over from ->set_multicast_list()
    to ->set_rx_mode(), and implements support for secondary unicast
    addresses.  The hardware can handle multiple unicast addresses as
    long as their first 11 nibbles are the same (i.e. are of the form
    xx:xx:xx:xx:xx:xy where the x part is the same for all addresses), so
    if that is the case, we use that mode.  If it's not the case, we enable
    unicast promiscuous mode in the hardware, which is slightly better than
    enabling promiscuous mode for multicasts as well, which is what would
    happen before.
    
    While we are at it, change the programming sequence so that we
    don't clear all filter bits first, so we don't lose all incoming
    packets while the filter is being reprogrammed.
    Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    66e63ffb
mv643xx_eth.c 65.6 KB