Lines Matching refs:hf
284 struct gs_host_frame *hf = urb->transfer_buffer; in gs_usb_receive_bulk_callback() local
303 if (hf->channel >= GS_MAX_INTF) in gs_usb_receive_bulk_callback()
306 dev = usbcan->canch[hf->channel]; in gs_usb_receive_bulk_callback()
314 if (hf->echo_id == -1) { /* normal rx */ in gs_usb_receive_bulk_callback()
319 cf->can_id = hf->can_id; in gs_usb_receive_bulk_callback()
321 cf->can_dlc = get_can_dlc(hf->can_dlc); in gs_usb_receive_bulk_callback()
322 memcpy(cf->data, hf->data, 8); in gs_usb_receive_bulk_callback()
325 if (hf->can_id & CAN_ERR_FLAG) in gs_usb_receive_bulk_callback()
329 netdev->stats.rx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
333 if (hf->echo_id >= GS_MAX_TX_URBS) { in gs_usb_receive_bulk_callback()
336 hf->echo_id); in gs_usb_receive_bulk_callback()
341 netdev->stats.tx_bytes += hf->can_dlc; in gs_usb_receive_bulk_callback()
343 txc = gs_get_tx_context(dev, hf->echo_id); in gs_usb_receive_bulk_callback()
349 hf->echo_id); in gs_usb_receive_bulk_callback()
353 can_get_echo_skb(netdev, hf->echo_id); in gs_usb_receive_bulk_callback()
360 if (hf->flags & GS_CAN_FLAG_OVERFLOW) { in gs_usb_receive_bulk_callback()
377 hf, in gs_usb_receive_bulk_callback()
460 struct gs_host_frame *hf; in gs_can_start_xmit() local
481 hf = usb_alloc_coherent(dev->udev, sizeof(*hf), GFP_ATOMIC, in gs_can_start_xmit()
483 if (!hf) { in gs_can_start_xmit()
495 hf->echo_id = idx; in gs_can_start_xmit()
496 hf->channel = dev->channel; in gs_can_start_xmit()
500 hf->can_id = cf->can_id; in gs_can_start_xmit()
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()
506 hf, in gs_can_start_xmit()
507 sizeof(*hf), in gs_can_start_xmit()
527 sizeof(*hf), in gs_can_start_xmit()
528 hf, in gs_can_start_xmit()
551 sizeof(*hf), in gs_can_start_xmit()
552 hf, in gs_can_start_xmit()