net/can/mscan: Fix buggy listen only mode setting
authorWolfgang Grandegger <wg@grandegger.com>
Mon, 14 Nov 2011 19:30:05 +0000 (14:30 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2011 19:30:05 +0000 (14:30 -0500)
This patch fixes an issue introduced recently with commit
452448f9283e1939408b397e87974a418825b0a8.

CC: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/mscan/mscan.c

index 74f3b1829e0291611fdaf7661388db7d239af4ec..1c82dd8b896e773ec38fc4177ddb6e77db559f9a 100644 (file)
@@ -581,7 +581,7 @@ static int mscan_open(struct net_device *dev)
 
        priv->open_time = jiffies;
 
-       if (ctrlmode.flags & CAN_CTRLMODE_LISTENONLY)
+       if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
                setbits8(&regs->canctl1, MSCAN_LISTEN);
        else
                clrbits8(&regs->canctl1, MSCAN_LISTEN);