• Home
  • Raw
  • Download

Lines Matching refs:cf

389 	struct can_frame *cf = (struct can_frame *)priv->tx_skb->data;  in cc770_tx()  local
394 dlc = cf->len; in cc770_tx()
395 id = cf->can_id; in cc770_tx()
396 rtr = cf->can_id & CAN_RTR_FLAG ? 0 : MSGCFG_DIR; in cc770_tx()
419 cc770_write_reg(priv, msgobj[mo].data[i], cf->data[i]); in cc770_tx()
453 struct can_frame *cf; in cc770_rx() local
459 skb = alloc_can_skb(dev, &cf); in cc770_rx()
471 cf->can_id = CAN_RTR_FLAG; in cc770_rx()
473 cf->can_id |= CAN_EFF_FLAG; in cc770_rx()
474 cf->len = 0; in cc770_rx()
489 cf->can_id = id; in cc770_rx()
490 cf->len = can_cc_dlc2len((config & 0xf0) >> 4); in cc770_rx()
491 for (i = 0; i < cf->len; i++) in cc770_rx()
492 cf->data[i] = cc770_read_reg(priv, msgobj[mo].data[i]); in cc770_rx()
494 stats->rx_bytes += cf->len; in cc770_rx()
504 struct can_frame *cf; in cc770_err() local
510 skb = alloc_can_err_skb(dev, &cf); in cc770_err()
516 cf->can_id |= CAN_ERR_CNT; in cc770_err()
517 cf->data[6] = cc770_read_reg(priv, tx_error_counter); in cc770_err()
518 cf->data[7] = cc770_read_reg(priv, rx_error_counter); in cc770_err()
524 cf->can_id |= CAN_ERR_BUSOFF; in cc770_err()
529 cf->can_id |= CAN_ERR_CRTL; in cc770_err()
531 if (cf->data[7] > 127) { in cc770_err()
532 cf->data[1] = CAN_ERR_CRTL_RX_PASSIVE | in cc770_err()
537 cf->data[1] = CAN_ERR_CRTL_RX_WARNING | in cc770_err()
544 cf->can_id |= CAN_ERR_PROT; in cc770_err()
545 cf->data[2] = CAN_ERR_PROT_ACTIVE; in cc770_err()
552 cf->can_id |= CAN_ERR_ACK; in cc770_err()
554 cf->can_id |= CAN_ERR_PROT; in cc770_err()
557 cf->data[2] |= CAN_ERR_PROT_STUFF; in cc770_err()
560 cf->data[2] |= CAN_ERR_PROT_FORM; in cc770_err()
563 cf->data[2] |= CAN_ERR_PROT_BIT1; in cc770_err()
566 cf->data[2] |= CAN_ERR_PROT_BIT0; in cc770_err()
569 cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ; in cc770_err()