public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: question on timestamps generated with "hcidump -t"
Date: Thu, 05 Apr 2012 12:34:39 -0700	[thread overview]
Message-ID: <1333654479.16897.17.camel@aeonflux> (raw)
In-Reply-To: <201204052100.17893.oliver@neukum.org>

Hi Oliver,

> could somebody enlighten me, when exactly those timestamps are generated?

they are normally stamped when they enter our internal queues. So the
Bluetooth core stamps them when they come from the driver.

/* Receive frame from HCI drivers */
int hci_recv_frame(struct sk_buff *skb)
{
        struct hci_dev *hdev = (struct hci_dev *) skb->dev;
        if (!hdev || (!test_bit(HCI_UP, &hdev->flags)
                                && !test_bit(HCI_INIT, &hdev->flags))) {
                kfree_skb(skb);
                return -ENXIO;
        }

        /* Incomming skb */
        bt_cb(skb)->incoming = 1;

        /* Time stamp */
        __net_timestamp(skb);

        skb_queue_tail(&hdev->rx_q, skb);
        queue_work(hdev->workqueue, &hdev->rx_work);

        return 0;
}

Regards

Marcel



  reply	other threads:[~2012-04-05 19:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 19:00 question on timestamps generated with "hcidump -t" Oliver Neukum
2012-04-05 19:34 ` Marcel Holtmann [this message]
2012-04-05 20:39   ` Oliver Neukum
2012-04-05 22:11     ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333654479.16897.17.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=oliver@neukum.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox