/Linux-v5.10/drivers/net/can/ |
D | slcan.c | 159 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN]; in slc_bump() 170 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN]; in slc_bump() 185 if (cf.can_dlc >= '0' && cf.can_dlc < '9') in slc_bump() 186 cf.can_dlc -= '0'; in slc_bump() 192 for (i = 0; i < cf.can_dlc; i++) { in slc_bump() 221 sl->dev->stats.rx_bytes += cf.can_dlc; in slc_bump() 285 *pos++ = cf->can_dlc + '0'; in slc_encaps() 289 for (i = 0; i < cf->can_dlc; i++) in slc_encaps() 307 sl->dev->stats.tx_bytes += cf->can_dlc; in slc_encaps()
|
D | janz-ican3.c | 919 cf->can_dlc = get_can_dlc(desc->data[1] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame() 920 memcpy(cf->data, &desc->data[2], cf->can_dlc); in ican3_to_can_frame() 922 cf->can_dlc = get_can_dlc(desc->data[0] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame() 937 memcpy(cf->data, &desc->data[6], cf->can_dlc); in ican3_to_can_frame() 950 desc->data[0] |= cf->can_dlc; in can_frame_to_ican3() 973 memcpy(&desc->data[6], cf->data, cf->can_dlc); in can_frame_to_ican3() 1297 dlc = cf->can_dlc; in ican3_get_echo_skb() 1335 if (cf->can_dlc != echo_cf->can_dlc) in ican3_echo_skb_matches() 1338 return memcmp(cf->data, echo_cf->data, cf->can_dlc) == 0; in ican3_echo_skb_matches() 1424 stats->rx_bytes += cf->can_dlc; in ican3_recv_skb()
|
D | sun4i_can.c | 427 dlc = cf->can_dlc; in sun4ican_start_xmit() 478 cf->can_dlc = get_can_dlc(fi & 0x0F); in sun4i_can_rx() 496 for (i = 0; i < cf->can_dlc; i++) in sun4i_can_rx() 504 stats->rx_bytes += cf->can_dlc; in sun4i_can_rx() 627 stats->rx_bytes += cf->can_dlc; in sun4i_can_err()
|
D | at91_can.c | 471 (cf->can_dlc << 16) | AT91_MCR_MTCR; in at91_start_xmit() 484 stats->tx_bytes += cf->can_dlc; in at91_start_xmit() 557 stats->rx_bytes += cf->can_dlc; in at91_rx_overflow_err() 583 cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf); in at91_read_mb() 622 stats->rx_bytes += cf->can_dlc; in at91_read_msg() 783 dev->stats.rx_bytes += cf->can_dlc; in at91_poll_err() 1050 dev->stats.rx_bytes += cf->can_dlc; in at91_irq_err()
|
D | pch_can.c | 566 stats->rx_bytes += cf->can_dlc; in pch_can_error() 686 cf->can_dlc = get_can_dlc((ioread32(&priv->regs-> in pch_can_rx_normal() 689 for (i = 0; i < cf->can_dlc; i += 2) { in pch_can_rx_normal() 699 stats->rx_bytes += cf->can_dlc; in pch_can_rx_normal() 922 for (i = 0; i < cf->can_dlc; i += 2) { in pch_xmit() 930 iowrite32(cf->can_dlc | PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_TXRQXT | in pch_xmit()
|
/Linux-v5.10/drivers/net/can/mscan/ |
D | mscan.c | 253 for (i = 0; i < frame->can_dlc / 2; i++) { in mscan_start_xmit() 258 if (frame->can_dlc & 1) in mscan_start_xmit() 259 out_8(data, frame->data[frame->can_dlc - 1]); in mscan_start_xmit() 262 out_8(®s->tx.dlr, frame->can_dlc); in mscan_start_xmit() 315 frame->can_dlc = get_can_dlc(in_8(®s->rx.dlr) & 0xf); in mscan_get_rx_frame() 321 for (i = 0; i < frame->can_dlc / 2; i++) { in mscan_get_rx_frame() 326 if (frame->can_dlc & 1) in mscan_get_rx_frame() 327 frame->data[frame->can_dlc - 1] = in_8(data); in mscan_get_rx_frame() 375 frame->can_dlc = CAN_ERR_DLC; in mscan_get_err_frame() 410 stats->rx_bytes += frame->can_dlc; in mscan_rx_poll()
|
/Linux-v5.10/drivers/net/can/spi/ |
D | hi311x.c | 280 buf[HI3110_FIFO_EXT_DLC_OFF] = frame->can_dlc; in hi3110_hw_tx() 283 frame->data, frame->can_dlc); in hi3110_hw_tx() 286 (HI3110_CAN_MAX_DATA_LEN - frame->can_dlc)); in hi3110_hw_tx() 294 buf[HI3110_FIFO_STD_DLC_OFF] = frame->can_dlc; in hi3110_hw_tx() 297 frame->data, frame->can_dlc); in hi3110_hw_tx() 300 (HI3110_CAN_MAX_DATA_LEN - frame->can_dlc)); in hi3110_hw_tx() 344 frame->can_dlc = get_can_dlc(buf[HI3110_FIFO_WOTIME_DLC_OFF] & 0x0F); in hi3110_hw_rx() 350 frame->can_dlc); in hi3110_hw_rx() 353 priv->net->stats.rx_bytes += frame->can_dlc; in hi3110_hw_rx() 588 priv->tx_len = 1 + frame->can_dlc; in hi3110_tx_work_handler()
|
D | mcp251x.c | 647 buf[TXBDLC_OFF] = (rtr << DLC_RTR_SHIFT) | frame->can_dlc; in mcp251x_hw_tx() 648 memcpy(buf + TXBDAT_OFF, frame->data, frame->can_dlc); in mcp251x_hw_tx() 649 mcp251x_hw_tx_frame(spi, buf, frame->can_dlc, tx_buf_idx); in mcp251x_hw_tx() 723 frame->can_dlc = get_can_dlc(buf[RXBDLC_OFF] & RXBDLC_LEN_MASK); in mcp251x_hw_rx() 724 memcpy(frame->data, buf + RXBDAT_OFF, frame->can_dlc); in mcp251x_hw_rx() 727 priv->net->stats.rx_bytes += frame->can_dlc; in mcp251x_hw_rx() 1001 if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN) in mcp251x_tx_work_handler() 1002 frame->can_dlc = CAN_FRAME_MAX_DATA_LEN; in mcp251x_tx_work_handler() 1004 priv->tx_len = 1 + frame->can_dlc; in mcp251x_tx_work_handler()
|
/Linux-v5.10/drivers/net/can/usb/ |
D | gs_usb.c | 144 u8 can_dlc; member 340 cf->can_dlc = get_can_dlc(hf->can_dlc); in gs_usb_receive_bulk_callback() 348 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback() 360 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback() 387 cf->can_dlc = CAN_ERR_DLC; in gs_usb_receive_bulk_callback() 513 hf->can_dlc = cf->can_dlc; in gs_can_start_xmit() 514 memcpy(hf->data, cf->data, cf->can_dlc); in gs_can_start_xmit()
|
D | ems_usb.c | 309 cf->can_dlc = get_can_dlc(msg->msg.can_msg.length & 0xF); in ems_usb_rx_can_msg() 319 for (i = 0; i < cf->can_dlc; i++) in ems_usb_rx_can_msg() 324 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_can_msg() 399 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_err() 758 msg->msg.can_msg.length = cf->can_dlc; in ems_usb_start_xmit() 769 for (i = 0; i < cf->can_dlc; i++) in ems_usb_start_xmit() 772 msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; in ems_usb_start_xmit() 797 context->dlc = cf->can_dlc; in ems_usb_start_xmit()
|
D | usb_8dev.c | 452 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_err_msg() 473 cf->can_dlc = get_can_dlc(msg->dlc & 0xF); in usb_8dev_rx_can_msg() 481 memcpy(cf->data, msg->data, cf->can_dlc); in usb_8dev_rx_can_msg() 484 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_can_msg() 640 msg->dlc = cf->can_dlc; in usb_8dev_start_xmit() 641 memcpy(msg->data, cf->data, cf->can_dlc); in usb_8dev_start_xmit() 659 context->dlc = cf->can_dlc; in usb_8dev_start_xmit()
|
D | esd_usb2.c | 295 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_event() 324 cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR); in esd_usb2_rx_can_msg() 332 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_rx_can_msg() 337 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_can_msg() 740 msg->msg.tx.dlc = cf->can_dlc; in esd_usb2_start_xmit() 749 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_start_xmit() 752 msg->msg.hdr.len += (cf->can_dlc + 3) >> 2; in esd_usb2_start_xmit() 772 context->dlc = cf->can_dlc; in esd_usb2_start_xmit()
|
D | mcba_usb.c | 187 ctx->dlc = cf->can_dlc; in mcba_usb_get_free_ctx() 351 usb_msg.dlc = cf->can_dlc; in mcba_usb_start_xmit() 454 cf->can_dlc = get_can_dlc(msg->dlc & MCBA_DLC_MASK); in mcba_usb_process_can() 456 memcpy(cf->data, msg->data, cf->can_dlc); in mcba_usb_process_can() 459 stats->rx_bytes += cf->can_dlc; in mcba_usb_process_can()
|
D | ucan.c | 617 cf->can_dlc = ucan_get_can_dlc(&m->msg.can_msg, len); in ucan_rx_can_msg() 621 memcpy(cf->data, m->msg.can_msg.data, cf->can_dlc); in ucan_rx_can_msg() 625 stats->rx_bytes += cf->can_dlc; in ucan_rx_can_msg() 1081 m->msg.can_msg.dlc = cf->can_dlc; in ucan_prepare_tx_urb() 1084 sizeof(m->msg.can_msg.id) + cf->can_dlc; in ucan_prepare_tx_urb() 1085 memcpy(m->msg.can_msg.data, cf->data, cf->can_dlc); in ucan_prepare_tx_urb() 1089 context->dlc = cf->can_dlc; in ucan_prepare_tx_urb()
|
/Linux-v5.10/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb_leaf.c | 353 *frame_len = cf->can_dlc; in kvaser_usb_leaf_frame_to_cmd() 386 cmd->u.tx_can.data[5] = cf->can_dlc; in kvaser_usb_leaf_frame_to_cmd() 387 memcpy(&cmd->u.tx_can.data[6], cf->data, cf->can_dlc); in kvaser_usb_leaf_frame_to_cmd() 579 stats->rx_bytes += cf->can_dlc; in kvaser_usb_leaf_tx_acknowledge() 697 .can_dlc = CAN_ERR_DLC }; in kvaser_usb_leaf_rx_error() 781 stats->rx_bytes += cf->can_dlc; in kvaser_usb_leaf_rx_error() 981 cf->can_dlc = get_can_dlc(cmd->u.leaf.log_message.dlc); in kvaser_usb_leaf_rx_can_msg() 987 cf->can_dlc); in kvaser_usb_leaf_rx_can_msg() 999 cf->can_dlc = get_can_dlc(rx_data[5]); in kvaser_usb_leaf_rx_can_msg() 1004 memcpy(cf->data, &rx_data[6], cf->can_dlc); in kvaser_usb_leaf_rx_can_msg() [all …]
|
/Linux-v5.10/drivers/net/can/usb/peak_usb/ |
D | pcan_usb.c | 599 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_error() 737 cf->can_dlc = get_can_dlc(rec_len); in pcan_usb_decode_data() 754 memcpy(cf->data, mc->ptr, cf->can_dlc); in pcan_usb_decode_data() 764 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_data() 841 *pc = cf->can_dlc; in pcan_usb_encode_msg() 861 memcpy(pc, cf->data, cf->can_dlc); in pcan_usb_encode_msg() 862 pc += cf->can_dlc; in pcan_usb_encode_msg()
|
D | pcan_usb_pro.c | 535 can_frame->can_dlc = rx->len & 0x0f; in pcan_usb_pro_handle_canmsg() 543 memcpy(can_frame->data, rx->data, can_frame->can_dlc); in pcan_usb_pro_handle_canmsg() 550 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_canmsg() 665 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_error() 770 if ((cf->can_id & CAN_RTR_FLAG) || (cf->can_dlc == 0)) in pcan_usb_pro_encode_msg() 772 else if (cf->can_dlc <= 4) in pcan_usb_pro_encode_msg() 777 len = (dev->ctrl_idx << 4) | (cf->can_dlc & 0x0f); in pcan_usb_pro_encode_msg()
|
/Linux-v5.10/drivers/net/can/c_can/ |
D | c_can.c | 309 u16 ctrl = IF_MCONT_TX | frame->can_dlc; in c_can_setup_tx_object() 342 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_setup_tx_object() 350 for (i = 0; i < frame->can_dlc; i += 2) { in c_can_setup_tx_object() 400 frame->can_dlc = get_can_dlc(ctrl & 0x0F); in c_can_read_msg_object() 415 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_read_msg_object() 423 for (i = 0; i < frame->can_dlc; i += 2, dreg++) { in c_can_read_msg_object() 432 stats->rx_bytes += frame->can_dlc; in c_can_read_msg_object() 478 priv->dlc[idx] = frame->can_dlc; in c_can_start_xmit() 980 stats->rx_bytes += cf->can_dlc; in c_can_handle_state_change() 1050 stats->rx_bytes += cf->can_dlc; in c_can_handle_bus_err()
|
/Linux-v5.10/drivers/net/can/peak_canfd/ |
D | peak_canfd.c | 413 stats->rx_bytes += cf->can_dlc; in pucan_handle_status() 441 stats->rx_bytes += cf->can_dlc; in pucan_handle_cache_critical() 655 u8 can_dlc; in peak_canfd_start_xmit() local 685 can_dlc = can_len2dlc(cf->len); in peak_canfd_start_xmit() 696 can_dlc = cf->len; in peak_canfd_start_xmit() 710 msg->channel_dlc = PUCAN_MSG_CHANNEL_DLC(priv->index, can_dlc); in peak_canfd_start_xmit()
|
/Linux-v5.10/drivers/net/can/cc770/ |
D | cc770.c | 393 dlc = cf->can_dlc; in cc770_tx() 473 cf->can_dlc = 0; in cc770_rx() 489 cf->can_dlc = get_can_dlc((config & 0xf0) >> 4); in cc770_rx() 490 for (i = 0; i < cf->can_dlc; i++) in cc770_rx() 495 stats->rx_bytes += cf->can_dlc; in cc770_rx() 575 stats->rx_bytes += cf->can_dlc; in cc770_err() 702 stats->tx_bytes += cf->can_dlc; in cc770_tx_interrupt()
|
/Linux-v5.10/drivers/net/can/sja1000/ |
D | sja1000.c | 298 fi = dlc = cf->can_dlc; in sja1000_start_xmit() 370 cf->can_dlc = get_can_dlc(fi & 0x0F); in sja1000_rx() 374 for (i = 0; i < cf->can_dlc; i++) in sja1000_rx() 384 stats->rx_bytes += cf->can_dlc; in sja1000_rx() 492 stats->rx_bytes += cf->can_dlc; in sja1000_err()
|
/Linux-v5.10/drivers/net/can/rcar/ |
D | rcar_can.c | 367 stats->rx_bytes += cf->can_dlc; in rcar_can_error() 610 for (i = 0; i < cf->can_dlc; i++) in rcar_can_start_xmit() 617 writeb(cf->can_dlc, &priv->regs->mb[RCAR_CAN_TX_FIFO_MBX].dlc); in rcar_can_start_xmit() 619 priv->tx_dlc[priv->tx_head % RCAR_CAN_FIFO_DEPTH] = cf->can_dlc; in rcar_can_start_xmit() 662 cf->can_dlc = get_can_dlc(dlc); in rcar_can_rx_pkt() 666 for (dlc = 0; dlc < cf->can_dlc; dlc++) in rcar_can_rx_pkt() 673 stats->rx_bytes += cf->can_dlc; in rcar_can_rx_pkt()
|
/Linux-v5.10/drivers/net/can/softing/ |
D | softing_main.c | 87 *ptr++ = cf->can_dlc; in softing_netdev_start_xmit() 98 memcpy(ptr, &cf->data[0], cf->can_dlc); in softing_netdev_start_xmit() 170 msg.can_dlc = CAN_ERR_DLC; in softing_handle_1() 221 msg.can_dlc = CAN_ERR_DLC; in softing_handle_1() 264 msg.can_dlc = get_can_dlc(*ptr++); in softing_handle_1() 297 netdev->stats.tx_bytes += msg.can_dlc; in softing_handle_1() 305 netdev->stats.rx_bytes += msg.can_dlc; in softing_handle_1()
|
/Linux-v5.10/include/uapi/linux/ |
D | can.h | 106 __u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */ member
|
/Linux-v5.10/net/can/j1939/ |
D | main.c | 65 skb_trim(skb, min_t(uint8_t, cf->can_dlc, 8)); in j1939_can_recv() 338 cf->can_dlc = dlc; in j1939_send_one()
|