Merge branches 'stable/balloon.cleanup' and 'stable/general.cleanup' of git://git...
[pandora-kernel.git] / drivers / net / can / c_can / c_can.c
index d0bffb0..7e5cc0b 100644 (file)
@@ -699,7 +699,6 @@ static void c_can_do_tx(struct net_device *dev)
 
        for (/* nix */; (priv->tx_next - priv->tx_echo) > 0; priv->tx_echo++) {
                msg_obj_no = get_tx_echo_msg_obj(priv);
-               c_can_inval_msg_object(dev, 0, msg_obj_no);
                val = c_can_read_reg32(priv, &priv->regs->txrqst1);
                if (!(val & (1 << msg_obj_no))) {
                        can_get_echo_skb(dev,
@@ -708,6 +707,7 @@ static void c_can_do_tx(struct net_device *dev)
                                        &priv->regs->ifregs[0].msg_cntrl)
                                        & IF_MCONT_DLC_MASK;
                        stats->tx_packets++;
+                       c_can_inval_msg_object(dev, 0, msg_obj_no);
                }
        }
 
@@ -813,7 +813,7 @@ static int c_can_handle_state_change(struct net_device *dev,
        struct sk_buff *skb;
        struct can_berr_counter bec;
 
-       /* propogate the error condition to the CAN stack */
+       /* propagate the error condition to the CAN stack */
        skb = alloc_can_err_skb(dev, &cf);
        if (unlikely(!skb))
                return 0;
@@ -887,7 +887,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
        if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR)
                return 0;
 
-       /* propogate the error condition to the CAN stack */
+       /* propagate the error condition to the CAN stack */
        skb = alloc_can_err_skb(dev, &cf);
        if (unlikely(!skb))
                return 0;