• Heiko Schocher's avatar
    drivers: net: cpsw: fix buggy loop condition · 0d961b3b
    Heiko Schocher authored
    Commit 0cd8f9cc ("drivers: net: cpsw:
    enable promiscuous mode support")
    
    Enable promiscuous mode support for CPSW.
    
    Introduced a crash on an am335x based board (similiar to am335x-evm).
    Reason is buggy end condition in for loop in cpsw_set_promiscious()
    
    for (i = 0; i <= priv->data.slaves; i++)
    
    should be
    
    for (i = 0; i < priv->data.slaves; i++)
    
    Fix this ...
    Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
    Cc: Mugunthan V N <mugunthanvnm@ti.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Sebastian Siewior <bigeasy@linutronix.de>
    Cc: Daniel Mack <zonque@gmail.com>
    Cc: Felipe Balbi <balbi@ti.com>
    Cc: Markus Pargmann <mpa@pengutronix.de>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0d961b3b
cpsw.c 63.6 KB