Home
last modified time | relevance | path

Searched refs:can_dlc (Results 1 – 25 of 41) sorted by relevance

12

/Linux-v4.19/drivers/net/can/
Dslcan.c158 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()
193 for (i = 0; i < cf.can_dlc; i++) { in slc_bump()
222 sl->dev->stats.rx_bytes += cf.can_dlc; in slc_bump()
286 *pos++ = cf->can_dlc + '0'; in slc_encaps()
290 for (i = 0; i < cf->can_dlc; i++) in slc_encaps()
308 sl->dev->stats.tx_bytes += cf->can_dlc; in slc_encaps()
Dxilinx_can.c514 dlc = cf->can_dlc << XCAN_DLCR_DLC_SHIFT; in xcan_write_frame()
516 if (cf->can_dlc > 0) in xcan_write_frame()
518 if (cf->can_dlc > 4) in xcan_write_frame()
668 cf->can_dlc = get_can_dlc(dlc); in xcan_rx()
693 if (cf->can_dlc > 0) in xcan_rx()
695 if (cf->can_dlc > 4) in xcan_rx()
699 stats->rx_bytes += cf->can_dlc; in xcan_rx()
797 stats->rx_bytes += cf->can_dlc; in xcan_update_error_state_after_rxtx()
924 stats->rx_bytes += cf->can_dlc; in xcan_err_interrupt()
Djanz-ican3.c923 cf->can_dlc = get_can_dlc(desc->data[1] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame()
924 memcpy(cf->data, &desc->data[2], cf->can_dlc); in ican3_to_can_frame()
926 cf->can_dlc = get_can_dlc(desc->data[0] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame()
941 memcpy(cf->data, &desc->data[6], cf->can_dlc); in ican3_to_can_frame()
954 desc->data[0] |= cf->can_dlc; in can_frame_to_ican3()
977 memcpy(&desc->data[6], cf->data, cf->can_dlc); in can_frame_to_ican3()
1301 dlc = cf->can_dlc; in ican3_get_echo_skb()
1339 if (cf->can_dlc != echo_cf->can_dlc) in ican3_echo_skb_matches()
1342 return memcmp(cf->data, echo_cf->data, cf->can_dlc) == 0; in ican3_echo_skb_matches()
1428 stats->rx_bytes += cf->can_dlc; in ican3_recv_skb()
Dsun4i_can.c427 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()
Dat91_can.c475 (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()
Dti_hecc.c494 data = cf->can_dlc | (get_tx_head_prio(priv) << 8); in ti_hecc_xmit()
506 if (cf->can_dlc > 4) in ti_hecc_xmit()
554 cf->can_dlc = get_can_dlc(data & 0xF); in ti_hecc_rx_pkt()
557 if (cf->can_dlc > 4) { in ti_hecc_rx_pkt()
569 stats->rx_bytes += cf->can_dlc; in ti_hecc_rx_pkt()
736 stats->rx_bytes += cf->can_dlc; in ti_hecc_error()
/Linux-v4.19/net/can/
Dgw.c158 MODFUNC(mod_and_dlc, cf->can_dlc &= mod->modframe.and.can_dlc)
161 MODFUNC(mod_or_dlc, cf->can_dlc |= mod->modframe.or.can_dlc)
164 MODFUNC(mod_xor_dlc, cf->can_dlc ^= mod->modframe.xor.can_dlc)
167 MODFUNC(mod_set_dlc, cf->can_dlc = mod->modframe.set.can_dlc)
179 dst->can_dlc = src->can_dlc; in canframecpy()
212 int from = calc_idx(xor->from_idx, cf->can_dlc); in cgw_csum_xor_rel()
213 int to = calc_idx(xor->to_idx, cf->can_dlc); in cgw_csum_xor_rel()
214 int res = calc_idx(xor->result_idx, cf->can_dlc); in cgw_csum_xor_rel()
256 int from = calc_idx(crc8->from_idx, cf->can_dlc); in cgw_csum_crc8_rel()
257 int to = calc_idx(crc8->to_idx, cf->can_dlc); in cgw_csum_crc8_rel()
[all …]
/Linux-v4.19/drivers/net/can/mscan/
Dmscan.c263 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(&regs->tx.dlr, frame->can_dlc); in mscan_start_xmit()
325 frame->can_dlc = get_can_dlc(in_8(&regs->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()
421 stats->rx_bytes += frame->can_dlc; in mscan_rx_poll()
/Linux-v4.19/drivers/net/can/spi/
Dhi311x.c298 buf[HI3110_FIFO_EXT_DLC_OFF] = frame->can_dlc; in hi3110_hw_tx()
301 frame->data, frame->can_dlc); in hi3110_hw_tx()
304 (HI3110_CAN_MAX_DATA_LEN - frame->can_dlc)); in hi3110_hw_tx()
312 buf[HI3110_FIFO_STD_DLC_OFF] = frame->can_dlc; in hi3110_hw_tx()
315 frame->data, frame->can_dlc); in hi3110_hw_tx()
318 (HI3110_CAN_MAX_DATA_LEN - frame->can_dlc)); in hi3110_hw_tx()
362 frame->can_dlc = get_can_dlc(buf[HI3110_FIFO_WOTIME_DLC_OFF] & 0x0F); in hi3110_hw_rx()
368 frame->can_dlc); in hi3110_hw_rx()
371 priv->net->stats.rx_bytes += frame->can_dlc; in hi3110_hw_rx()
606 priv->tx_len = 1 + frame->can_dlc; in hi3110_tx_work_handler()
Dmcp251x.c431 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()
756 if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN) in mcp251x_tx_work_handler()
757 frame->can_dlc = CAN_FRAME_MAX_DATA_LEN; in mcp251x_tx_work_handler()
759 priv->tx_len = 1 + frame->can_dlc; in mcp251x_tx_work_handler()
/Linux-v4.19/drivers/net/can/usb/peak_usb/
Dpcan_usb.c533 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_error()
641 cf->can_dlc = get_can_dlc(rec_len); in pcan_usb_decode_data()
655 memcpy(cf->data, mc->ptr, cf->can_dlc); in pcan_usb_decode_data()
665 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_data()
743 *pc = cf->can_dlc; in pcan_usb_encode_msg()
763 memcpy(pc, cf->data, cf->can_dlc); in pcan_usb_encode_msg()
764 pc += cf->can_dlc; in pcan_usb_encode_msg()
Dpcan_usb_pro.c543 can_frame->can_dlc = rx->len & 0x0f; in pcan_usb_pro_handle_canmsg()
551 memcpy(can_frame->data, rx->data, can_frame->can_dlc); in pcan_usb_pro_handle_canmsg()
558 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_canmsg()
673 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_error()
778 if ((cf->can_id & CAN_RTR_FLAG) || (cf->can_dlc == 0)) in pcan_usb_pro_encode_msg()
780 else if (cf->can_dlc <= 4) in pcan_usb_pro_encode_msg()
785 len = (dev->ctrl_idx << 4) | (cf->can_dlc & 0x0f); in pcan_usb_pro_encode_msg()
/Linux-v4.19/drivers/net/can/usb/
Dgs_usb.c146 u8 can_dlc; member
342 cf->can_dlc = get_can_dlc(hf->can_dlc); in gs_usb_receive_bulk_callback()
350 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
362 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
389 cf->can_dlc = CAN_ERR_DLC; in gs_usb_receive_bulk_callback()
515 hf->can_dlc = cf->can_dlc; in gs_can_start_xmit()
516 memcpy(hf->data, cf->data, cf->can_dlc); in gs_can_start_xmit()
Dems_usb.c321 cf->can_dlc = get_can_dlc(msg->msg.can_msg.length & 0xF); in ems_usb_rx_can_msg()
331 for (i = 0; i < cf->can_dlc; i++) in ems_usb_rx_can_msg()
336 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_can_msg()
411 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_err()
770 msg->msg.can_msg.length = cf->can_dlc; in ems_usb_start_xmit()
781 for (i = 0; i < cf->can_dlc; i++) in ems_usb_start_xmit()
784 msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; in ems_usb_start_xmit()
809 context->dlc = cf->can_dlc; in ems_usb_start_xmit()
Dusb_8dev.c463 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_err_msg()
484 cf->can_dlc = get_can_dlc(msg->dlc & 0xF); in usb_8dev_rx_can_msg()
492 memcpy(cf->data, msg->data, cf->can_dlc); in usb_8dev_rx_can_msg()
495 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_can_msg()
651 msg->dlc = cf->can_dlc; in usb_8dev_start_xmit()
652 memcpy(msg->data, cf->data, cf->can_dlc); in usb_8dev_start_xmit()
670 context->dlc = cf->can_dlc; in usb_8dev_start_xmit()
Desd_usb2.c307 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_event()
336 cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR); in esd_usb2_rx_can_msg()
344 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_rx_can_msg()
349 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_can_msg()
752 msg->msg.tx.dlc = cf->can_dlc; in esd_usb2_start_xmit()
761 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_start_xmit()
764 msg->msg.hdr.len += (cf->can_dlc + 3) >> 2; in esd_usb2_start_xmit()
784 context->dlc = cf->can_dlc; in esd_usb2_start_xmit()
Dmcba_usb.c198 ctx->dlc = cf->can_dlc; in mcba_usb_get_free_ctx()
364 usb_msg.dlc = cf->can_dlc; in mcba_usb_start_xmit()
465 cf->can_dlc = get_can_dlc(msg->dlc & MCBA_DLC_MASK); in mcba_usb_process_can()
467 memcpy(cf->data, msg->data, cf->can_dlc); in mcba_usb_process_can()
470 stats->rx_bytes += cf->can_dlc; in mcba_usb_process_can()
/Linux-v4.19/drivers/net/can/usb/kvaser_usb/
Dkvaser_usb_leaf.c353 *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-v4.19/drivers/net/can/c_can/
Dc_can.c305 u16 ctrl = IF_MCONT_TX | frame->can_dlc; in c_can_setup_tx_object()
338 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_setup_tx_object()
346 for (i = 0; i < frame->can_dlc; i += 2) { in c_can_setup_tx_object()
405 frame->can_dlc = get_can_dlc(ctrl & 0x0F); in c_can_read_msg_object()
420 for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) { in c_can_read_msg_object()
428 for (i = 0; i < frame->can_dlc; i += 2, dreg++) { in c_can_read_msg_object()
437 stats->rx_bytes += frame->can_dlc; in c_can_read_msg_object()
483 priv->dlc[idx] = frame->can_dlc; in c_can_start_xmit()
950 stats->rx_bytes += cf->can_dlc; in c_can_handle_state_change()
1020 stats->rx_bytes += cf->can_dlc; in c_can_handle_bus_err()
/Linux-v4.19/drivers/net/can/peak_canfd/
Dpeak_canfd.c403 stats->rx_bytes += cf->can_dlc; in pucan_handle_status()
431 stats->rx_bytes += cf->can_dlc; in pucan_handle_cache_critical()
645 u8 can_dlc; in peak_canfd_start_xmit() local
675 can_dlc = can_len2dlc(cf->len); in peak_canfd_start_xmit()
686 can_dlc = cf->len; in peak_canfd_start_xmit()
700 msg->channel_dlc = PUCAN_MSG_CHANNEL_DLC(priv->index, can_dlc); in peak_canfd_start_xmit()
/Linux-v4.19/drivers/net/can/cc770/
Dcc770.c401 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()
/Linux-v4.19/drivers/net/can/sja1000/
Dsja1000.c298 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()
493 stats->rx_bytes += cf->can_dlc; in sja1000_err()
/Linux-v4.19/drivers/net/can/rcar/
Drcar_can.c362 stats->rx_bytes += cf->can_dlc; in rcar_can_error()
605 for (i = 0; i < cf->can_dlc; i++) in rcar_can_start_xmit()
612 writeb(cf->can_dlc, &priv->regs->mb[RCAR_CAN_TX_FIFO_MBX].dlc); in rcar_can_start_xmit()
614 priv->tx_dlc[priv->tx_head % RCAR_CAN_FIFO_DEPTH] = cf->can_dlc; in rcar_can_start_xmit()
657 cf->can_dlc = get_can_dlc(dlc); in rcar_can_rx_pkt()
661 for (dlc = 0; dlc < cf->can_dlc; dlc++) in rcar_can_rx_pkt()
668 stats->rx_bytes += cf->can_dlc; in rcar_can_rx_pkt()
/Linux-v4.19/drivers/net/can/softing/
Dsofting_main.c98 *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()
/Linux-v4.19/include/uapi/linux/
Dcan.h106 __u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */ member

12