Lines Matching refs:hf
306 struct gs_host_frame *hf = urb->transfer_buffer; in gs_usb_receive_bulk_callback() local
325 if (hf->channel >= GS_MAX_INTF) in gs_usb_receive_bulk_callback()
328 dev = usbcan->canch[hf->channel]; in gs_usb_receive_bulk_callback()
336 if (hf->echo_id == -1) { /* normal rx */ in gs_usb_receive_bulk_callback()
341 cf->can_id = le32_to_cpu(hf->can_id); in gs_usb_receive_bulk_callback()
343 can_frame_set_cc_len(cf, hf->can_dlc, dev->can.ctrlmode); in gs_usb_receive_bulk_callback()
344 memcpy(cf->data, hf->data, 8); in gs_usb_receive_bulk_callback()
347 if (le32_to_cpu(hf->can_id) & CAN_ERR_FLAG) in gs_usb_receive_bulk_callback()
351 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
355 if (hf->echo_id >= GS_MAX_TX_URBS) { in gs_usb_receive_bulk_callback()
358 hf->echo_id); in gs_usb_receive_bulk_callback()
363 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
365 txc = gs_get_tx_context(dev, hf->echo_id); in gs_usb_receive_bulk_callback()
371 hf->echo_id); in gs_usb_receive_bulk_callback()
375 can_get_echo_skb(netdev, hf->echo_id, NULL); in gs_usb_receive_bulk_callback()
384 if (hf->flags & GS_CAN_FLAG_OVERFLOW) { in gs_usb_receive_bulk_callback()
402 hf, in gs_usb_receive_bulk_callback()
479 struct gs_host_frame *hf; in gs_can_start_xmit() local
498 hf = usb_alloc_coherent(dev->udev, sizeof(*hf), GFP_ATOMIC, in gs_can_start_xmit()
500 if (!hf) { in gs_can_start_xmit()
512 hf->echo_id = idx; in gs_can_start_xmit()
513 hf->channel = dev->channel; in gs_can_start_xmit()
514 hf->flags = 0; in gs_can_start_xmit()
515 hf->reserved = 0; in gs_can_start_xmit()
519 hf->can_id = cpu_to_le32(cf->can_id); in gs_can_start_xmit()
520 hf->can_dlc = can_get_cc_dlc(cf, dev->can.ctrlmode); in gs_can_start_xmit()
522 memcpy(hf->data, cf->data, cf->len); in gs_can_start_xmit()
526 hf, in gs_can_start_xmit()
527 sizeof(*hf), in gs_can_start_xmit()
547 sizeof(*hf), in gs_can_start_xmit()
548 hf, in gs_can_start_xmit()
570 sizeof(*hf), in gs_can_start_xmit()
571 hf, in gs_can_start_xmit()