Lines Matching refs:cf
488 struct can_frame *cf = (struct can_frame *)skb->data; in ti_hecc_xmit() local
509 data = cf->can_dlc | (get_tx_head_prio(priv) << 8); in ti_hecc_xmit()
510 if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ in ti_hecc_xmit()
514 if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ in ti_hecc_xmit()
515 data = (cf->can_id & CAN_EFF_MASK) | HECC_CANMID_IDE; in ti_hecc_xmit()
517 data = (cf->can_id & CAN_SFF_MASK) << 18; in ti_hecc_xmit()
520 be32_to_cpu(*(__be32 *)(cf->data))); in ti_hecc_xmit()
521 if (cf->can_dlc > 4) in ti_hecc_xmit()
523 be32_to_cpu(*(__be32 *)(cf->data + 4))); in ti_hecc_xmit()
525 *(u32 *)(cf->data + 4) = 0; in ti_hecc_xmit()
547 struct can_frame *cf; in ti_hecc_rx_pkt() local
552 skb = alloc_can_skb(priv->ndev, &cf); in ti_hecc_rx_pkt()
563 cf->can_id = (data & CAN_EFF_MASK) | CAN_EFF_FLAG; in ti_hecc_rx_pkt()
565 cf->can_id = (data >> 18) & CAN_SFF_MASK; in ti_hecc_rx_pkt()
568 cf->can_id |= CAN_RTR_FLAG; in ti_hecc_rx_pkt()
569 cf->can_dlc = get_can_dlc(data & 0xF); in ti_hecc_rx_pkt()
571 *(__be32 *)(cf->data) = cpu_to_be32(data); in ti_hecc_rx_pkt()
572 if (cf->can_dlc > 4) { in ti_hecc_rx_pkt()
574 *(__be32 *)(cf->data + 4) = cpu_to_be32(data); in ti_hecc_rx_pkt()
584 stats->rx_bytes += cf->can_dlc; in ti_hecc_rx_pkt()
665 struct can_frame *cf; in ti_hecc_error() local
669 skb = alloc_can_err_skb(ndev, &cf); in ti_hecc_error()
681 cf->can_id |= CAN_ERR_CRTL; in ti_hecc_error()
683 cf->data[1] |= CAN_ERR_CRTL_TX_WARNING; in ti_hecc_error()
685 cf->data[1] |= CAN_ERR_CRTL_RX_WARNING; in ti_hecc_error()
696 cf->can_id |= CAN_ERR_CRTL; in ti_hecc_error()
698 cf->data[1] |= CAN_ERR_CRTL_TX_PASSIVE; in ti_hecc_error()
700 cf->data[1] |= CAN_ERR_CRTL_RX_PASSIVE; in ti_hecc_error()
713 cf->can_id |= CAN_ERR_BUSOFF; in ti_hecc_error()
724 cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_PROT; in ti_hecc_error()
725 cf->data[2] |= CAN_ERR_PROT_UNSPEC; in ti_hecc_error()
728 cf->data[2] |= CAN_ERR_PROT_FORM; in ti_hecc_error()
732 cf->data[2] |= CAN_ERR_PROT_BIT; in ti_hecc_error()
736 cf->data[2] |= CAN_ERR_PROT_STUFF; in ti_hecc_error()
740 cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ | in ti_hecc_error()
745 cf->data[3] |= CAN_ERR_PROT_LOC_ACK | in ti_hecc_error()
752 stats->rx_bytes += cf->can_dlc; in ti_hecc_error()