Lines Matching refs:cf

469 	struct can_frame *cf = (struct can_frame *)skb->data;  in flexcan_start_xmit()  local
471 u32 ctrl = FLEXCAN_MB_CNT_CODE(0xc) | (cf->can_dlc << 16); in flexcan_start_xmit()
478 if (cf->can_id & CAN_EFF_FLAG) { in flexcan_start_xmit()
479 can_id = cf->can_id & CAN_EFF_MASK; in flexcan_start_xmit()
482 can_id = (cf->can_id & CAN_SFF_MASK) << 18; in flexcan_start_xmit()
485 if (cf->can_id & CAN_RTR_FLAG) in flexcan_start_xmit()
488 if (cf->can_dlc > 0) { in flexcan_start_xmit()
489 u32 data = be32_to_cpup((__be32 *)&cf->data[0]); in flexcan_start_xmit()
492 if (cf->can_dlc > 3) { in flexcan_start_xmit()
493 u32 data = be32_to_cpup((__be32 *)&cf->data[4]); in flexcan_start_xmit()
514 struct can_frame *cf, u32 reg_esr) in do_bus_err() argument
519 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; in do_bus_err()
523 cf->data[2] |= CAN_ERR_PROT_BIT1; in do_bus_err()
528 cf->data[2] |= CAN_ERR_PROT_BIT0; in do_bus_err()
533 cf->can_id |= CAN_ERR_ACK; in do_bus_err()
534 cf->data[3] |= CAN_ERR_PROT_LOC_ACK; in do_bus_err()
539 cf->data[2] |= CAN_ERR_PROT_BIT; in do_bus_err()
540 cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ; in do_bus_err()
545 cf->data[2] |= CAN_ERR_PROT_FORM; in do_bus_err()
550 cf->data[2] |= CAN_ERR_PROT_STUFF; in do_bus_err()
564 struct can_frame *cf; in flexcan_poll_bus_err() local
566 skb = alloc_can_err_skb(dev, &cf); in flexcan_poll_bus_err()
570 do_bus_err(dev, cf, reg_esr); in flexcan_poll_bus_err()
574 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_bus_err()
583 struct can_frame *cf; in flexcan_poll_state() local
607 skb = alloc_can_err_skb(dev, &cf); in flexcan_poll_state()
611 can_change_state(dev, cf, tx_state, rx_state); in flexcan_poll_state()
619 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_state()
625 struct can_frame *cf) in flexcan_read_fifo() argument
635 cf->can_id = ((reg_id >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG; in flexcan_read_fifo()
637 cf->can_id = (reg_id >> 18) & CAN_SFF_MASK; in flexcan_read_fifo()
640 cf->can_id |= CAN_RTR_FLAG; in flexcan_read_fifo()
641 cf->can_dlc = get_can_dlc((reg_ctrl >> 16) & 0xf); in flexcan_read_fifo()
643 *(__be32 *)(cf->data + 0) = cpu_to_be32(flexcan_read(&mb->data[0])); in flexcan_read_fifo()
644 *(__be32 *)(cf->data + 4) = cpu_to_be32(flexcan_read(&mb->data[1])); in flexcan_read_fifo()
654 struct can_frame *cf; in flexcan_read_frame() local
657 skb = alloc_can_skb(dev, &cf); in flexcan_read_frame()
663 flexcan_read_fifo(dev, cf); in flexcan_read_frame()
667 stats->rx_bytes += cf->can_dlc; in flexcan_read_frame()