Lines Matching refs:hf
305 struct gs_host_frame *hf = urb->transfer_buffer;
324 if (hf->channel >= GS_MAX_INTF)
327 dev = usbcan->canch[hf->channel];
335 if (hf->echo_id == -1) { /* normal rx */
340 cf->can_id = le32_to_cpu(hf->can_id);
342 cf->can_dlc = get_can_dlc(hf->can_dlc);
343 memcpy(cf->data, hf->data, 8);
346 if (le32_to_cpu(hf->can_id) & CAN_ERR_FLAG)
350 netdev->stats.rx_bytes += hf->can_dlc;
353 } else { /* echo_id == hf->echo_id */
354 if (hf->echo_id >= GS_MAX_TX_URBS) {
357 hf->echo_id);
362 netdev->stats.tx_bytes += hf->can_dlc;
364 txc = gs_get_tx_context(dev, hf->echo_id);
370 hf->echo_id);
374 can_get_echo_skb(netdev, hf->echo_id);
383 if (hf->flags & GS_CAN_FLAG_OVERFLOW) {
401 hf,
478 struct gs_host_frame *hf;
497 hf = usb_alloc_coherent(dev->udev, sizeof(*hf), GFP_ATOMIC,
499 if (!hf) {
511 hf->echo_id = idx;
512 hf->channel = dev->channel;
513 hf->flags = 0;
514 hf->reserved = 0;
518 hf->can_id = cpu_to_le32(cf->can_id);
519 hf->can_dlc = cf->can_dlc;
520 memcpy(hf->data, cf->data, cf->can_dlc);
524 hf,
525 sizeof(*hf),
545 sizeof(*hf),
546 hf,
568 sizeof(*hf),
569 hf,