Lines Matching refs:cf
225 struct can_frame *cf; in rcar_can_error() local
230 skb = alloc_can_err_skb(ndev, &cf); in rcar_can_error()
237 cf->can_id |= CAN_ERR_CRTL; in rcar_can_error()
245 cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_PROT; in rcar_can_error()
253 cf->data[3] = CAN_ERR_PROT_LOC_ACK_DEL; in rcar_can_error()
260 cf->data[2] |= CAN_ERR_PROT_BIT0; in rcar_can_error()
267 cf->data[2] |= CAN_ERR_PROT_BIT1; in rcar_can_error()
274 cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ; in rcar_can_error()
281 cf->can_id |= CAN_ERR_ACK; in rcar_can_error()
282 cf->data[3] = CAN_ERR_PROT_LOC_ACK; in rcar_can_error()
290 cf->data[2] |= CAN_ERR_PROT_FORM; in rcar_can_error()
297 cf->data[2] |= CAN_ERR_PROT_STUFF; in rcar_can_error()
312 cf->data[1] = txerr > rxerr ? CAN_ERR_CRTL_TX_WARNING : in rcar_can_error()
322 cf->data[1] = txerr > rxerr ? CAN_ERR_CRTL_TX_PASSIVE : in rcar_can_error()
336 cf->can_id |= CAN_ERR_BUSOFF; in rcar_can_error()
338 cf->can_id |= CAN_ERR_CNT; in rcar_can_error()
339 cf->data[6] = txerr; in rcar_can_error()
340 cf->data[7] = rxerr; in rcar_can_error()
348 cf->can_id |= CAN_ERR_CRTL; in rcar_can_error()
349 cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW; in rcar_can_error()
359 cf->can_id |= CAN_ERR_PROT; in rcar_can_error()
360 cf->data[2] |= CAN_ERR_PROT_OVERLOAD; in rcar_can_error()
590 struct can_frame *cf = (struct can_frame *)skb->data; in rcar_can_start_xmit() local
596 if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ in rcar_can_start_xmit()
597 data = (cf->can_id & CAN_EFF_MASK) | RCAR_CAN_IDE; in rcar_can_start_xmit()
599 data = (cf->can_id & CAN_SFF_MASK) << RCAR_CAN_SID_SHIFT; in rcar_can_start_xmit()
601 if (cf->can_id & CAN_RTR_FLAG) { /* Remote transmission request */ in rcar_can_start_xmit()
604 for (i = 0; i < cf->len; i++) in rcar_can_start_xmit()
605 writeb(cf->data[i], in rcar_can_start_xmit()
611 writeb(cf->len, &priv->regs->mb[RCAR_CAN_TX_FIFO_MBX].dlc); in rcar_can_start_xmit()
641 struct can_frame *cf; in rcar_can_rx_pkt() local
646 skb = alloc_can_skb(priv->ndev, &cf); in rcar_can_rx_pkt()
654 cf->can_id = (data & CAN_EFF_MASK) | CAN_EFF_FLAG; in rcar_can_rx_pkt()
656 cf->can_id = (data >> RCAR_CAN_SID_SHIFT) & CAN_SFF_MASK; in rcar_can_rx_pkt()
659 cf->len = can_cc_dlc2len(dlc); in rcar_can_rx_pkt()
661 cf->can_id |= CAN_RTR_FLAG; in rcar_can_rx_pkt()
663 for (dlc = 0; dlc < cf->len; dlc++) in rcar_can_rx_pkt()
664 cf->data[dlc] = in rcar_can_rx_pkt()
667 stats->rx_bytes += cf->len; in rcar_can_rx_pkt()