Home
last modified time | relevance | path

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

/linux-4.1.27/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()
224 sl->dev->stats.rx_bytes += cf.can_dlc; in slc_bump()
287 *pos++ = cf->can_dlc + '0'; in slc_encaps()
291 for (i = 0; i < cf->can_dlc; i++) in slc_encaps()
309 sl->dev->stats.tx_bytes += cf->can_dlc; in slc_encaps()
Dxilinx_can.c433 dlc = cf->can_dlc << XCAN_DLCR_DLC_SHIFT; in xcan_start_xmit()
435 if (cf->can_dlc > 0) in xcan_start_xmit()
437 if (cf->can_dlc > 4) in xcan_start_xmit()
453 stats->tx_bytes += cf->can_dlc; in xcan_start_xmit()
493 cf->can_dlc = get_can_dlc(dlc); in xcan_rx()
518 if (cf->can_dlc > 0) in xcan_rx()
520 if (cf->can_dlc > 4) in xcan_rx()
524 stats->rx_bytes += cf->can_dlc; in xcan_rx()
666 stats->rx_bytes += cf->can_dlc; in xcan_err_interrupt()
Dbfin_can.c346 u8 dlc = cf->can_dlc; in bfin_can_start_xmit()
418 cf->can_dlc = get_can_dlc(readw(&reg->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()
430 stats->rx_bytes += cf->can_dlc; in bfin_can_rx()
514 stats->rx_bytes += cf->can_dlc; in bfin_can_err()
Drcar_can.c363 stats->rx_bytes += cf->can_dlc; in rcar_can_error()
604 for (i = 0; i < cf->can_dlc; i++) in rcar_can_start_xmit()
611 writeb(cf->can_dlc, &priv->regs->mb[RCAR_CAN_TX_FIFO_MBX].dlc); in rcar_can_start_xmit()
613 priv->tx_dlc[priv->tx_head % RCAR_CAN_FIFO_DEPTH] = cf->can_dlc; in rcar_can_start_xmit()
656 cf->can_dlc = get_can_dlc(dlc); in rcar_can_rx_pkt()
660 for (dlc = 0; dlc < cf->can_dlc; dlc++) in rcar_can_rx_pkt()
667 stats->rx_bytes += cf->can_dlc; in rcar_can_rx_pkt()
Djanz-ican3.c815 cf->can_dlc = get_can_dlc(desc->data[1] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame()
816 memcpy(cf->data, &desc->data[2], cf->can_dlc); in ican3_to_can_frame()
818 cf->can_dlc = get_can_dlc(desc->data[0] & ICAN3_CAN_DLC_MASK); in ican3_to_can_frame()
833 memcpy(cf->data, &desc->data[6], cf->can_dlc); in ican3_to_can_frame()
846 desc->data[0] |= cf->can_dlc; in can_frame_to_ican3()
869 memcpy(&desc->data[6], cf->data, cf->can_dlc); in can_frame_to_ican3()
1156 dlc = cf->can_dlc; in ican3_get_echo_skb()
1194 if (cf->can_dlc != echo_cf->can_dlc) in ican3_echo_skb_matches()
1197 return memcmp(cf->data, echo_cf->data, cf->can_dlc) == 0; in ican3_echo_skb_matches()
1283 stats->rx_bytes += cf->can_dlc; in ican3_recv_skb()
Dat91_can.c496 (cf->can_dlc << 16) | AT91_MCR_MTCR; in at91_start_xmit()
509 stats->tx_bytes += cf->can_dlc; in at91_start_xmit()
583 stats->rx_bytes += cf->can_dlc; in at91_rx_overflow_err()
608 cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf); in at91_read_mb()
648 stats->rx_bytes += cf->can_dlc; in at91_read_msg()
808 dev->stats.rx_bytes += cf->can_dlc; in at91_poll_err()
1073 dev->stats.rx_bytes += cf->can_dlc; in at91_irq_err()
Dflexcan.c471 u32 ctrl = FLEXCAN_MB_CNT_CODE(0xc) | (cf->can_dlc << 16); in flexcan_start_xmit()
488 if (cf->can_dlc > 0) { in flexcan_start_xmit()
492 if (cf->can_dlc > 3) { in flexcan_start_xmit()
574 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_bus_err()
619 dev->stats.rx_bytes += cf->can_dlc; in flexcan_poll_state()
641 cf->can_dlc = get_can_dlc((reg_ctrl >> 16) & 0xf); in flexcan_read_fifo()
667 stats->rx_bytes += cf->can_dlc; in flexcan_read_frame()
Dti_hecc.c509 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()
752 stats->rx_bytes += cf->can_dlc; in ti_hecc_error()
Ddev.c43 u8 can_dlc2len(u8 can_dlc) in can_dlc2len() argument
45 return dlc2len[can_dlc & 0x0F]; in can_dlc2len()
441 u8 dlc = cf->can_dlc; in can_get_echo_skb()
502 stats->rx_bytes += cf->can_dlc; in can_restart()
635 (*cf)->can_dlc = CAN_ERR_DLC; in alloc_can_err_skb()
Dpch_can.c578 stats->rx_bytes += cf->can_dlc; in pch_can_error()
698 cf->can_dlc = get_can_dlc((ioread32(&priv->regs-> in pch_can_rx_normal()
701 for (i = 0; i < cf->can_dlc; i += 2) { in pch_can_rx_normal()
711 stats->rx_bytes += cf->can_dlc; in pch_can_rx_normal()
934 for (i = 0; i < cf->can_dlc; i += 2) { in pch_xmit()
942 iowrite32(cf->can_dlc | PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_TXRQXT | in pch_xmit()
Dgrcan.c1208 cf->can_dlc = get_can_dlc((slot[1] & GRCAN_MSG_DLC) in grcan_receive()
1213 for (i = 0; i < cf->can_dlc; i++) { in grcan_receive()
1223 stats->rx_bytes += cf->can_dlc; in grcan_receive()
1405 dlc = cf->can_dlc; in grcan_start_xmit()
1453 priv->txdlc[slotindex] = cf->can_dlc; /* Store dlc for statistics */ in grcan_start_xmit()
/linux-4.1.27/net/can/
Dgw.c159 MODFUNC(mod_and_dlc, cf->can_dlc &= mod->modframe.and.can_dlc)
162 MODFUNC(mod_or_dlc, cf->can_dlc |= mod->modframe.or.can_dlc)
165 MODFUNC(mod_xor_dlc, cf->can_dlc ^= mod->modframe.xor.can_dlc)
168 MODFUNC(mod_set_dlc, cf->can_dlc = mod->modframe.set.can_dlc)
180 dst->can_dlc = src->can_dlc; in canframecpy()
213 int from = calc_idx(xor->from_idx, cf->can_dlc); in cgw_csum_xor_rel()
214 int to = calc_idx(xor->to_idx, cf->can_dlc); in cgw_csum_xor_rel()
215 int res = calc_idx(xor->result_idx, cf->can_dlc); in cgw_csum_xor_rel()
257 int from = calc_idx(crc8->from_idx, cf->can_dlc); in cgw_csum_crc8_rel()
258 int to = calc_idx(crc8->to_idx, cf->can_dlc); in cgw_csum_crc8_rel()
[all …]
Dbcm.c317 firstframe->can_dlc &= BCM_CAN_DLC_MASK; in bcm_send_to_user()
416 data->can_dlc &= (BCM_CAN_DLC_MASK|RX_RECV); in bcm_rx_changed()
441 lastdata->can_dlc |= (RX_RECV|RX_THR); in bcm_rx_update_and_send()
486 if (!(op->last_frames[index].can_dlc & RX_RECV)) { in bcm_rx_cmp_to_index()
502 if (rxdata->can_dlc != (op->last_frames[index].can_dlc & in bcm_rx_cmp_to_index()
567 if ((op->last_frames) && (op->last_frames[index].can_dlc & RX_THR)) { in bcm_rx_do_flush()
862 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
897 if (op->frames[i].can_dlc > 8) in bcm_tx_setup()
Daf_can.c900 BUILD_BUG_ON(offsetof(struct can_frame, can_dlc) != in can_init()
/linux-4.1.27/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-4.1.27/drivers/net/can/usb/
Dgs_usb.c128 u8 can_dlc; member
321 cf->can_dlc = get_can_dlc(hf->can_dlc); in gs_usb_recieve_bulk_callback()
329 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_recieve_bulk_callback()
341 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_recieve_bulk_callback()
366 cf->can_dlc = CAN_ERR_DLC; in gs_usb_recieve_bulk_callback()
501 hf->can_dlc = cf->can_dlc; in gs_can_start_xmit()
502 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()
338 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_can_msg()
414 stats->rx_bytes += cf->can_dlc; in ems_usb_rx_err()
775 msg->msg.can_msg.length = cf->can_dlc; in ems_usb_start_xmit()
786 for (i = 0; i < cf->can_dlc; i++) in ems_usb_start_xmit()
789 msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; in ems_usb_start_xmit()
814 context->dlc = cf->can_dlc; in ems_usb_start_xmit()
Dusb_8dev.c467 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_err_msg()
487 cf->can_dlc = get_can_dlc(msg->dlc & 0xF); in usb_8dev_rx_can_msg()
495 memcpy(cf->data, msg->data, cf->can_dlc); in usb_8dev_rx_can_msg()
500 stats->rx_bytes += cf->can_dlc; in usb_8dev_rx_can_msg()
655 msg->dlc = cf->can_dlc; in usb_8dev_start_xmit()
656 memcpy(msg->data, cf->data, cf->can_dlc); in usb_8dev_start_xmit()
674 context->dlc = cf->can_dlc; in usb_8dev_start_xmit()
Desd_usb2.c310 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_event()
338 cf->can_dlc = get_can_dlc(msg->msg.rx.dlc); in esd_usb2_rx_can_msg()
346 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_rx_can_msg()
353 stats->rx_bytes += cf->can_dlc; in esd_usb2_rx_can_msg()
756 msg->msg.tx.dlc = cf->can_dlc; in esd_usb2_start_xmit()
765 for (i = 0; i < cf->can_dlc; i++) in esd_usb2_start_xmit()
768 msg->msg.hdr.len += (cf->can_dlc + 3) >> 2; in esd_usb2_start_xmit()
788 context->dlc = cf->can_dlc; in esd_usb2_start_xmit()
Dkvaser_usb.c736 stats->rx_bytes += cf->can_dlc; in kvaser_usb_tx_acknowledge()
889 struct can_frame *cf, tmp_cf = { .can_id = CAN_ERR_FLAG, .can_dlc = CAN_ERR_DLC }; in kvaser_usb_rx_error()
974 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_error()
1126 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_can_err()
1188 cf->can_dlc = get_can_dlc(msg->u.leaf.log_message.dlc); in kvaser_usb_rx_can_msg()
1194 cf->can_dlc); in kvaser_usb_rx_can_msg()
1206 cf->can_dlc = get_can_dlc(rx_msg[5]); in kvaser_usb_rx_can_msg()
1212 cf->can_dlc); in kvaser_usb_rx_can_msg()
1216 stats->rx_bytes += cf->can_dlc; in kvaser_usb_rx_can_msg()
1709 msg->u.tx_can.msg[5] = cf->can_dlc; in kvaser_usb_start_xmit()
[all …]
/linux-4.1.27/drivers/net/can/usb/peak_usb/
Dpcan_usb.c531 mc->netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_decode_error()
639 cf->can_dlc = get_can_dlc(rec_len); in pcan_usb_decode_data()
653 memcpy(cf->data, mc->ptr, cf->can_dlc); in pcan_usb_decode_data()
667 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.c542 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()
558 netdev->stats.rx_bytes += can_frame->can_dlc; in pcan_usb_pro_handle_canmsg()
675 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()
Dpcan_usb_fd.c580 netdev->stats.rx_bytes += cf->can_dlc; in pcan_usb_fd_decode_status()
726 u8 can_dlc; in pcan_usb_fd_encode_msg() local
742 can_dlc = can_len2dlc(cfd->len); in pcan_usb_fd_encode_msg()
753 can_dlc = cfd->len; in pcan_usb_fd_encode_msg()
760 tx_msg->channel_dlc = PUCAN_MSG_CHANNEL_DLC(dev->ctrl_idx, can_dlc); in pcan_usb_fd_encode_msg()
/linux-4.1.27/drivers/net/can/spi/
Dmcp251x.c430 buf[TXBDLC_OFF] = (rtr << DLC_RTR_SHIFT) | frame->can_dlc; in mcp251x_hw_tx()
431 memcpy(buf + TXBDAT_OFF, frame->data, frame->can_dlc); in mcp251x_hw_tx()
432 mcp251x_hw_tx_frame(spi, buf, frame->can_dlc, tx_buf_idx); in mcp251x_hw_tx()
498 frame->can_dlc = get_can_dlc(buf[RXBDLC_OFF] & RXBDLC_LEN_MASK); in mcp251x_hw_rx()
499 memcpy(frame->data, buf + RXBDAT_OFF, frame->can_dlc); in mcp251x_hw_rx()
502 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-4.1.27/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()
386 stats->rx_bytes += cf->can_dlc; in sja1000_rx()
493 stats->rx_bytes += cf->can_dlc; in sja1000_err()
/linux-4.1.27/drivers/net/can/cc770/
Dcc770.c414 dlc = cf->can_dlc; in cc770_start_xmit()
487 cf->can_dlc = 0; in cc770_rx()
503 cf->can_dlc = get_can_dlc((config & 0xf0) >> 4); in cc770_rx()
504 for (i = 0; i < cf->can_dlc; i++) in cc770_rx()
510 stats->rx_bytes += cf->can_dlc; in cc770_rx()
590 stats->rx_bytes += cf->can_dlc; in cc770_err()
/linux-4.1.27/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()
Dsofting_fw.c638 msg.can_dlc = CAN_ERR_DLC; in softing_startstop()
/linux-4.1.27/drivers/net/can/c_can/
Dc_can.c305 u16 ctrl = IF_MCONT_TX | frame->can_dlc; in c_can_setup_tx_object()
335 for (i = 0; i < frame->can_dlc; i += 2) { in c_can_setup_tx_object()
391 frame->can_dlc = get_can_dlc(ctrl & 0x0F); in c_can_read_msg_object()
405 for (i = 0; i < frame->can_dlc; i += 2, dreg ++) { in c_can_read_msg_object()
413 stats->rx_bytes += frame->can_dlc; in c_can_read_msg_object()
459 priv->dlc[idx] = frame->can_dlc; in c_can_start_xmit()
926 stats->rx_bytes += cf->can_dlc; in c_can_handle_state_change()
999 stats->rx_bytes += cf->can_dlc; in c_can_handle_bus_err()
/linux-4.1.27/include/uapi/linux/
Dcan.h102 __u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */ member
/linux-4.1.27/include/linux/can/
Ddev.h129 u8 can_dlc2len(u8 can_dlc);
/linux-4.1.27/drivers/net/can/m_can/
Dm_can.c524 stats->rx_bytes += cf->can_dlc; in m_can_handle_lec_err()
636 stats->rx_bytes += cf->can_dlc; in m_can_handle_state_change()
/linux-4.1.27/Documentation/networking/
Dcan.txt270 __u8 can_dlc; /* frame payload length in byte (0 .. 8) */
406 can_frame.can_dlc are equal and contain a length information and no DLC.
1161 payload. The representation of this length in can_frame.can_dlc and