/drivers/net/can/ |
D | slcan.c | 158 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN]; in slc_bump() 169 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN]; in slc_bump() 184 if (cf.can_dlc >= '0' && cf.can_dlc < '9') in slc_bump() 185 cf.can_dlc -= '0'; in slc_bump() 191 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 | xilinx_can.c | 448 dlc = cf->can_dlc << XCAN_DLCR_DLC_SHIFT; in xcan_start_xmit() 450 if (cf->can_dlc > 0) in xcan_start_xmit() 452 if (cf->can_dlc > 4) in xcan_start_xmit() 471 stats->tx_bytes += cf->can_dlc; in xcan_start_xmit() 517 cf->can_dlc = get_can_dlc(dlc); in xcan_rx() 542 if (cf->can_dlc > 0) in xcan_rx() 544 if (cf->can_dlc > 4) in xcan_rx() 548 stats->rx_bytes += cf->can_dlc; in xcan_rx() 666 stats->rx_bytes += cf->can_dlc; in xcan_update_error_state_after_rxtx() 781 stats->rx_bytes += cf->can_dlc; in xcan_err_interrupt()
|
D | janz-ican3.c | 875 cf->can_dlc = get_can_dlc(desc->data[1] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame() 876 memcpy(cf->data, &desc->data[2], cf->can_dlc); in ican3_to_can_frame() 878 cf->can_dlc = get_can_dlc(desc->data[0] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame() 893 memcpy(cf->data, &desc->data[6], cf->can_dlc); in ican3_to_can_frame() 906 desc->data[0] |= cf->can_dlc; in can_frame_to_ican3() 929 memcpy(&desc->data[6], cf->data, cf->can_dlc); in can_frame_to_ican3() 1215 dlc = cf->can_dlc; in ican3_get_echo_skb() 1253 if (cf->can_dlc != echo_cf->can_dlc) in ican3_echo_skb_matches() 1256 return memcmp(cf->data, echo_cf->data, cf->can_dlc) == 0; in ican3_echo_skb_matches() 1342 stats->rx_bytes += cf->can_dlc; in ican3_recv_skb()
|
D | rcar_can.c | 365 stats->rx_bytes += cf->can_dlc; in rcar_can_error() 608 for (i = 0; i < cf->can_dlc; i++) in rcar_can_start_xmit() 615 writeb(cf->can_dlc, &priv->regs->mb[RCAR_CAN_TX_FIFO_MBX].dlc); in rcar_can_start_xmit() 617 priv->tx_dlc[priv->tx_head % RCAR_CAN_FIFO_DEPTH] = cf->can_dlc; in rcar_can_start_xmit() 660 cf->can_dlc = get_can_dlc(dlc); in rcar_can_rx_pkt() 664 for (dlc = 0; dlc < cf->can_dlc; dlc++) in rcar_can_rx_pkt() 671 stats->rx_bytes += cf->can_dlc; in rcar_can_rx_pkt()
|
D | bfin_can.c | 346 u8 dlc = cf->can_dlc; in bfin_can_start_xmit() 418 cf->can_dlc = get_can_dlc(readw(®->chl[obj].dlc) & 0xF); in bfin_can_rx() 423 cf->data[7 - i] = (7 - i) < cf->can_dlc ? val : 0; in bfin_can_rx() 424 cf->data[6 - i] = (6 - i) < cf->can_dlc ? (val >> 8) : 0; in bfin_can_rx() 428 stats->rx_bytes += cf->can_dlc; in bfin_can_rx() 509 stats->rx_bytes += cf->can_dlc; in bfin_can_err()
|
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() 628 stats->rx_bytes += cf->can_dlc; in sun4i_can_err()
|
D | at91_can.c | 475 (cf->can_dlc << 16) | AT91_MCR_MTCR; in at91_start_xmit() 488 stats->tx_bytes += cf->can_dlc; in at91_start_xmit() 561 stats->rx_bytes += cf->can_dlc; in at91_rx_overflow_err() 587 cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf); in at91_read_mb() 626 stats->rx_bytes += cf->can_dlc; in at91_read_msg() 787 dev->stats.rx_bytes += cf->can_dlc; in at91_poll_err() 1052 dev->stats.rx_bytes += cf->can_dlc; in at91_irq_err()
|
D | ti_hecc.c | 509 data = cf->can_dlc | (get_tx_head_prio(priv) << 8); in ti_hecc_xmit() 521 if (cf->can_dlc > 4) in ti_hecc_xmit() 569 cf->can_dlc = get_can_dlc(data & 0xF); in ti_hecc_rx_pkt() 572 if (cf->can_dlc > 4) { in ti_hecc_rx_pkt() 584 stats->rx_bytes += cf->can_dlc; in ti_hecc_rx_pkt() 751 stats->rx_bytes += cf->can_dlc; in ti_hecc_error()
|
D | flexcan.c | 481 u32 ctrl = FLEXCAN_MB_CODE_TX_DATA | (cf->can_dlc << 16); in flexcan_start_xmit() 498 if (cf->can_dlc > 0) { in flexcan_start_xmit() 502 if (cf->can_dlc > 4) { in flexcan_start_xmit() 583 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_bus_err() 627 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_state() 650 cf->can_dlc = get_can_dlc((reg_ctrl >> 16) & 0xf); in flexcan_read_fifo() 675 stats->rx_bytes += cf->can_dlc; in flexcan_read_frame()
|
D | pch_can.c | 577 stats->rx_bytes += cf->can_dlc; in pch_can_error() 697 cf->can_dlc = get_can_dlc((ioread32(&priv->regs-> in pch_can_rx_normal() 700 for (i = 0; i < cf->can_dlc; i += 2) { in pch_can_rx_normal() 709 stats->rx_bytes += cf->can_dlc; in pch_can_rx_normal() 933 for (i = 0; i < cf->can_dlc; i += 2) { in pch_xmit() 941 iowrite32(cf->can_dlc | PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_TXRQXT | in pch_xmit()
|
D | dev.c | 44 u8 can_dlc2len(u8 can_dlc) in can_dlc2len() argument 46 return dlc2len[can_dlc & 0x0F]; in can_dlc2len() 529 stats->rx_bytes += cf->can_dlc; in can_restart() 672 (*cf)->can_dlc = CAN_ERR_DLC; in alloc_can_err_skb()
|
/drivers/net/can/mscan/ |
D | mscan.c | 263 for (i = 0; i < frame->can_dlc / 2; i++) { in mscan_start_xmit() 268 if (frame->can_dlc & 1) in mscan_start_xmit() 269 out_8(data, frame->data[frame->can_dlc - 1]); in mscan_start_xmit() 272 out_8(®s->tx.dlr, frame->can_dlc); in mscan_start_xmit() 325 frame->can_dlc = get_can_dlc(in_8(®s->rx.dlr) & 0xf); in mscan_get_rx_frame() 331 for (i = 0; i < frame->can_dlc / 2; i++) { in mscan_get_rx_frame() 336 if (frame->can_dlc & 1) in mscan_get_rx_frame() 337 frame->data[frame->can_dlc - 1] = in_8(data); in mscan_get_rx_frame() 385 frame->can_dlc = CAN_ERR_DLC; in mscan_get_err_frame() 420 stats->rx_bytes += frame->can_dlc; in mscan_rx_poll()
|
/drivers/net/can/usb/ |
D | gs_usb.c | 128 u8 can_dlc; member 323 cf->can_dlc = get_can_dlc(hf->can_dlc); in gs_usb_receive_bulk_callback() 331 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback() 343 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback() 370 cf->can_dlc = CAN_ERR_DLC; in gs_usb_receive_bulk_callback() 500 hf->can_dlc = cf->can_dlc; in gs_can_start_xmit() 501 memcpy(hf->data, cf->data, cf->can_dlc); in gs_can_start_xmit()
|
D | ems_usb.c | 325 cf->can_dlc = get_can_dlc(msg->msg.can_msg.length & 0xF); in ems_usb_rx_can_msg() 335 for (i = 0; i < cf->can_dlc; i++) in ems_usb_rx_can_msg() 340 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_can_msg() 414 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_err() 786 msg->msg.can_msg.length = cf->can_dlc; in ems_usb_start_xmit() 797 for (i = 0; i < cf->can_dlc; i++) in ems_usb_start_xmit() 800 msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; in ems_usb_start_xmit() 825 context->dlc = cf->can_dlc; in ems_usb_start_xmit()
|
D | usb_8dev.c | 464 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_err_msg() 485 cf->can_dlc = get_can_dlc(msg->dlc & 0xF); in usb_8dev_rx_can_msg() 493 memcpy(cf->data, msg->data, cf->can_dlc); in usb_8dev_rx_can_msg() 496 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_can_msg() 654 msg->dlc = cf->can_dlc; in usb_8dev_start_xmit() 655 memcpy(msg->data, cf->data, cf->can_dlc); in usb_8dev_start_xmit() 673 context->dlc = cf->can_dlc; in usb_8dev_start_xmit()
|
D | esd_usb2.c | 309 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_event() 338 cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR); in esd_usb2_rx_can_msg() 346 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_rx_can_msg() 351 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_can_msg() 769 msg->msg.tx.dlc = cf->can_dlc; in esd_usb2_start_xmit() 778 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_start_xmit() 781 msg->msg.hdr.len += (cf->can_dlc + 3) >> 2; in esd_usb2_start_xmit() 801 context->dlc = cf->can_dlc; in esd_usb2_start_xmit()
|
D | kvaser_usb.c | 768 stats->rx_bytes += cf->can_dlc; in kvaser_usb_tx_acknowledge() 922 struct can_frame *cf, tmp_cf = { .can_id = CAN_ERR_FLAG, .can_dlc = CAN_ERR_DLC }; in kvaser_usb_rx_error() 1006 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_error() 1158 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_can_err() 1220 cf->can_dlc = get_can_dlc(msg->u.leaf.log_message.dlc); in kvaser_usb_rx_can_msg() 1226 cf->can_dlc); in kvaser_usb_rx_can_msg() 1238 cf->can_dlc = get_can_dlc(rx_msg[5]); in kvaser_usb_rx_can_msg() 1244 cf->can_dlc); in kvaser_usb_rx_can_msg() 1248 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_can_msg() 1750 msg->u.tx_can.msg[5] = cf->can_dlc; in kvaser_usb_start_xmit() [all …]
|
/drivers/net/can/usb/peak_usb/ |
D | pcan_usb.c | 535 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_error() 649 cf->can_dlc = get_can_dlc(rec_len); in pcan_usb_decode_data() 666 memcpy(cf->data, mc->ptr, cf->can_dlc); in pcan_usb_decode_data() 677 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_data() 754 *pc = cf->can_dlc; in pcan_usb_encode_msg() 774 memcpy(pc, cf->data, cf->can_dlc); in pcan_usb_encode_msg() 775 pc += cf->can_dlc; in pcan_usb_encode_msg()
|
D | pcan_usb_pro.c | 542 can_frame->can_dlc = rx->len & 0x0f; in pcan_usb_pro_handle_canmsg() 550 memcpy(can_frame->data, rx->data, can_frame->can_dlc); in pcan_usb_pro_handle_canmsg() 557 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_canmsg() 674 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_error() 779 if ((cf->can_id & CAN_RTR_FLAG) || (cf->can_dlc == 0)) in pcan_usb_pro_encode_msg() 781 else if (cf->can_dlc <= 4) in pcan_usb_pro_encode_msg() 786 len = (dev->ctrl_idx << 4) | (cf->can_dlc & 0x0f); in pcan_usb_pro_encode_msg()
|
D | pcan_usb_fd.c | 592 netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_fd_decode_status() 749 u8 can_dlc; in pcan_usb_fd_encode_msg() local 768 can_dlc = can_len2dlc(cfd->len); in pcan_usb_fd_encode_msg() 779 can_dlc = cfd->len; in pcan_usb_fd_encode_msg() 786 tx_msg->channel_dlc = PUCAN_MSG_CHANNEL_DLC(dev->ctrl_idx, can_dlc); in pcan_usb_fd_encode_msg()
|
/drivers/net/can/c_can/ |
D | c_can.c | 297 u16 ctrl = IF_MCONT_TX | frame->can_dlc; in c_can_setup_tx_object() 330 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_setup_tx_object() 338 for (i = 0; i < frame->can_dlc; i += 2) { in c_can_setup_tx_object() 397 frame->can_dlc = get_can_dlc(ctrl & 0x0F); in c_can_read_msg_object() 412 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_read_msg_object() 420 for (i = 0; i < frame->can_dlc; i += 2, dreg++) { in c_can_read_msg_object() 429 stats->rx_bytes += frame->can_dlc; in c_can_read_msg_object() 475 priv->dlc[idx] = frame->can_dlc; in c_can_start_xmit() 967 stats->rx_bytes += cf->can_dlc; in c_can_handle_state_change() 1037 stats->rx_bytes += cf->can_dlc; in c_can_handle_bus_err()
|
/drivers/net/can/cc770/ |
D | cc770.c | 401 dlc = cf->can_dlc; in cc770_tx() 481 cf->can_dlc = 0; in cc770_rx() 497 cf->can_dlc = get_can_dlc((config & 0xf0) >> 4); in cc770_rx() 498 for (i = 0; i < cf->can_dlc; i++) in cc770_rx() 503 stats->rx_bytes += cf->can_dlc; in cc770_rx() 583 stats->rx_bytes += cf->can_dlc; in cc770_err() 710 stats->tx_bytes += cf->can_dlc; in cc770_tx_interrupt()
|
/drivers/net/can/spi/ |
D | mcp251x.c | 431 buf[TXBDLC_OFF] = (rtr << DLC_RTR_SHIFT) | frame->can_dlc; in mcp251x_hw_tx() 432 memcpy(buf + TXBDAT_OFF, frame->data, frame->can_dlc); in mcp251x_hw_tx() 433 mcp251x_hw_tx_frame(spi, buf, frame->can_dlc, tx_buf_idx); in mcp251x_hw_tx() 499 frame->can_dlc = get_can_dlc(buf[RXBDLC_OFF] & RXBDLC_LEN_MASK); in mcp251x_hw_rx() 500 memcpy(frame->data, buf + RXBDAT_OFF, frame->can_dlc); in mcp251x_hw_rx() 503 priv->net->stats.rx_bytes += frame->can_dlc; in mcp251x_hw_rx() 766 if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN) in mcp251x_tx_work_handler() 767 frame->can_dlc = CAN_FRAME_MAX_DATA_LEN; in mcp251x_tx_work_handler() 769 priv->tx_len = 1 + frame->can_dlc; in mcp251x_tx_work_handler()
|
/drivers/net/can/softing/ |
D | softing_main.c | 98 *ptr++ = cf->can_dlc; in softing_netdev_start_xmit() 109 memcpy(ptr, &cf->data[0], cf->can_dlc); in softing_netdev_start_xmit() 181 msg.can_dlc = CAN_ERR_DLC; in softing_handle_1() 232 msg.can_dlc = CAN_ERR_DLC; in softing_handle_1() 275 msg.can_dlc = get_can_dlc(*ptr++); in softing_handle_1() 308 netdev->stats.tx_bytes += msg.can_dlc; in softing_handle_1() 316 netdev->stats.rx_bytes += msg.can_dlc; in softing_handle_1()
|
/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() 489 stats->rx_bytes += cf->can_dlc; in sja1000_err()
|