• Home
  • Raw
  • Download

Lines Matching refs:cf

253 	struct canfd_frame *cf;  in ifi_canfd_read_fifo()  local
263 skb = alloc_canfd_skb(ndev, &cf); in ifi_canfd_read_fifo()
265 skb = alloc_can_skb(ndev, (struct can_frame **)&cf); in ifi_canfd_read_fifo()
275 cf->len = can_fd_dlc2len(dlc); in ifi_canfd_read_fifo()
277 cf->len = can_cc_dlc2len(dlc); in ifi_canfd_read_fifo()
295 cf->can_id = id; in ifi_canfd_read_fifo()
298 cf->flags |= CANFD_ESI; in ifi_canfd_read_fifo()
304 cf->can_id |= CAN_RTR_FLAG; in ifi_canfd_read_fifo()
307 cf->flags |= CANFD_BRS; in ifi_canfd_read_fifo()
309 for (i = 0; i < cf->len; i += 4) { in ifi_canfd_read_fifo()
310 *(u32 *)(cf->data + i) = in ifi_canfd_read_fifo()
314 stats->rx_bytes += cf->len; in ifi_canfd_read_fifo()
379 struct can_frame *cf; in ifi_canfd_handle_lec_err() local
397 skb = alloc_can_err_skb(ndev, &cf); in ifi_canfd_handle_lec_err()
402 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; in ifi_canfd_handle_lec_err()
405 cf->data[2] |= CAN_ERR_PROT_OVERLOAD; in ifi_canfd_handle_lec_err()
408 cf->data[3] = CAN_ERR_PROT_LOC_ACK; in ifi_canfd_handle_lec_err()
411 cf->data[2] |= CAN_ERR_PROT_BIT0; in ifi_canfd_handle_lec_err()
414 cf->data[2] |= CAN_ERR_PROT_BIT1; in ifi_canfd_handle_lec_err()
417 cf->data[2] |= CAN_ERR_PROT_STUFF; in ifi_canfd_handle_lec_err()
420 cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ; in ifi_canfd_handle_lec_err()
423 cf->data[2] |= CAN_ERR_PROT_FORM; in ifi_canfd_handle_lec_err()
455 struct can_frame *cf; in ifi_canfd_handle_state_change() local
487 skb = alloc_can_err_skb(ndev, &cf); in ifi_canfd_handle_state_change()
496 cf->can_id |= CAN_ERR_CRTL | CAN_ERR_CNT; in ifi_canfd_handle_state_change()
497 cf->data[1] = (bec.txerr > bec.rxerr) ? in ifi_canfd_handle_state_change()
500 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change()
501 cf->data[7] = bec.rxerr; in ifi_canfd_handle_state_change()
505 cf->can_id |= CAN_ERR_CRTL | CAN_ERR_CNT; in ifi_canfd_handle_state_change()
506 cf->data[1] |= CAN_ERR_CRTL_RX_PASSIVE; in ifi_canfd_handle_state_change()
508 cf->data[1] |= CAN_ERR_CRTL_TX_PASSIVE; in ifi_canfd_handle_state_change()
509 cf->data[6] = bec.txerr; in ifi_canfd_handle_state_change()
510 cf->data[7] = bec.rxerr; in ifi_canfd_handle_state_change()
514 cf->can_id |= CAN_ERR_BUSOFF; in ifi_canfd_handle_state_change()
859 struct canfd_frame *cf = (struct canfd_frame *)skb->data; in ifi_canfd_start_xmit() local
876 if (cf->can_id & CAN_EFF_FLAG) { in ifi_canfd_start_xmit()
877 txid = cf->can_id & CAN_EFF_MASK; in ifi_canfd_start_xmit()
889 txid = cf->can_id & CAN_SFF_MASK; in ifi_canfd_start_xmit()
892 txdlc = can_fd_len2dlc(cf->len); in ifi_canfd_start_xmit()
895 if (cf->flags & CANFD_BRS) in ifi_canfd_start_xmit()
899 if (cf->can_id & CAN_RTR_FLAG) in ifi_canfd_start_xmit()
906 for (i = 0; i < cf->len; i += 4) { in ifi_canfd_start_xmit()
907 writel(*(u32 *)(cf->data + i), in ifi_canfd_start_xmit()