Lines Matching refs:cf
305 struct can_frame *cf;
310 skb = alloc_can_skb(dev->netdev, &cf);
314 cf->can_id = le32_to_cpu(msg->msg.can_msg.id);
315 cf->can_dlc = get_can_dlc(msg->msg.can_msg.length & 0xF);
319 cf->can_id |= CAN_EFF_FLAG;
323 cf->can_id |= CAN_RTR_FLAG;
325 for (i = 0; i < cf->can_dlc; i++)
326 cf->data[i] = msg->msg.can_msg.msg[i];
332 stats->rx_bytes += cf->can_dlc;
337 struct can_frame *cf;
341 skb = alloc_can_err_skb(dev->netdev, &cf);
350 cf->can_id |= CAN_ERR_BUSOFF;
369 cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR;
373 cf->data[2] |= CAN_ERR_PROT_BIT;
376 cf->data[2] |= CAN_ERR_PROT_FORM;
379 cf->data[2] |= CAN_ERR_PROT_STUFF;
382 cf->data[2] |= CAN_ERR_PROT_UNSPEC;
383 cf->data[3] = ecc & SJA1000_ECC_SEG;
389 cf->data[2] |= CAN_ERR_PROT_TX;
393 cf->data[1] = (txerr > rxerr) ?
397 cf->can_id |= CAN_ERR_CRTL;
398 cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
407 stats->rx_bytes += cf->can_dlc;
743 struct can_frame *cf = (struct can_frame *)skb->data;
770 msg->msg.can_msg.id = cf->can_id & CAN_ERR_MASK;
771 msg->msg.can_msg.length = cf->can_dlc;
773 if (cf->can_id & CAN_RTR_FLAG) {
774 msg->type = cf->can_id & CAN_EFF_FLAG ?
779 msg->type = cf->can_id & CAN_EFF_FLAG ?
782 for (i = 0; i < cf->can_dlc; i++)
783 msg->msg.can_msg.msg[i] = cf->data[i];
785 msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc;
813 context->dlc = cf->can_dlc;