linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC:  Add precise timing to wifi association messages?
@ 2013-11-13 17:58 Ben Greear
  2013-11-13 18:01 ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2013-11-13 17:58 UTC (permalink / raw)
  To: linux-wireless

Any interest in a patch looking similar to that below for the
5 or so messages related to association?  I found it useful for
tracking down why it was taking longer than expected to roam
to a new AP...


diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d2510c0..2e96813 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -908,6 +908,12 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
                memcpy(pos, assoc_data->ie + offset, noffset - offset);
        }

+       {
+               struct timeval tv;
+               do_gettimeofday(&tv);
+               sdata_info(sdata, "send_assoc, calling prepare_tx at: %lu.%lu\n",
+                          tv.tv_sec, tv.tv_usec);
+       }
        drv_mgd_prepare_tx(local, sdata);

        IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;


Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: RFC:  Add precise timing to wifi association messages?
  2013-11-13 17:58 RFC: Add precise timing to wifi association messages? Ben Greear
@ 2013-11-13 18:01 ` Ben Greear
  2013-11-13 18:18   ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2013-11-13 18:01 UTC (permalink / raw)
  To: linux-wireless

On 11/13/2013 09:58 AM, Ben Greear wrote:
> Any interest in a patch looking similar to that below for the
> 5 or so messages related to association?  I found it useful for
> tracking down why it was taking longer than expected to roam
> to a new AP...
> 
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index d2510c0..2e96813 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -908,6 +908,12 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
>                 memcpy(pos, assoc_data->ie + offset, noffset - offset);
>         }
> 
> +       {
> +               struct timeval tv;
> +               do_gettimeofday(&tv);
> +               sdata_info(sdata, "send_assoc, calling prepare_tx at: %lu.%lu\n",
> +                          tv.tv_sec, tv.tv_usec);
> +       }
>         drv_mgd_prepare_tx(local, sdata);
> 
>         IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;

I chose a poor example here...my intention is to just add timers to existing
messages...

Thanks,
Ben

> 
> 
> Thanks,
> Ben
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC:  Add precise timing to wifi association messages?
  2013-11-13 18:01 ` Ben Greear
@ 2013-11-13 18:18   ` Johannes Berg
  2013-11-13 18:24     ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2013-11-13 18:18 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Wed, 2013-11-13 at 10:01 -0800, Ben Greear wrote:

> I chose a poor example here...my intention is to just add timers to existing
> messages...

What does this do that printk timestamps don't?

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC:  Add precise timing to wifi association messages?
  2013-11-13 18:18   ` Johannes Berg
@ 2013-11-13 18:24     ` Ben Greear
  2013-11-13 18:32       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2013-11-13 18:24 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 11/13/2013 10:18 AM, Johannes Berg wrote:
> On Wed, 2013-11-13 at 10:01 -0800, Ben Greear wrote:
> 
>> I chose a poor example here...my intention is to just add timers to existing
>> messages...
> 
> What does this do that printk timestamps don't?

Sub-second precision, and the same in 'dmesg' output.

There may be a way to get /var/log/messages to show sub-second
precision, but at least it is not enabled by default on the systems
I use.  dmesg has no timestamps at all from what I can tell.

Things like ath9k debugging typically do not go to /var/log/messages
at all, so I was stuck using dmesg (I'll post a similar patch for ath9k
debugging in case someone likes it.)

The format I chose matches wpa_supplicant logs as well, which I found
useful.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC:  Add precise timing to wifi association messages?
  2013-11-13 18:24     ` Ben Greear
@ 2013-11-13 18:32       ` Johannes Berg
  2013-11-13 18:39         ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2013-11-13 18:32 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Wed, 2013-11-13 at 10:24 -0800, Ben Greear wrote:
> On 11/13/2013 10:18 AM, Johannes Berg wrote:
> > On Wed, 2013-11-13 at 10:01 -0800, Ben Greear wrote:
> > 
> >> I chose a poor example here...my intention is to just add timers to existing
> >> messages...
> > 
> > What does this do that printk timestamps don't?
> 
> Sub-second precision, and the same in 'dmesg' output.
> 
> There may be a way to get /var/log/messages to show sub-second
> precision, but at least it is not enabled by default on the systems
> I use.  dmesg has no timestamps at all from what I can tell.

Err. Just set CONFIG_PRINTK_TIME in your kernel.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC:  Add precise timing to wifi association messages?
  2013-11-13 18:32       ` Johannes Berg
@ 2013-11-13 18:39         ` Ben Greear
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Greear @ 2013-11-13 18:39 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 11/13/2013 10:32 AM, Johannes Berg wrote:
> On Wed, 2013-11-13 at 10:24 -0800, Ben Greear wrote:
>> On 11/13/2013 10:18 AM, Johannes Berg wrote:
>>> On Wed, 2013-11-13 at 10:01 -0800, Ben Greear wrote:
>>>
>>>> I chose a poor example here...my intention is to just add timers to existing
>>>> messages...
>>>
>>> What does this do that printk timestamps don't?
>>
>> Sub-second precision, and the same in 'dmesg' output.
>>
>> There may be a way to get /var/log/messages to show sub-second
>> precision, but at least it is not enabled by default on the systems
>> I use.  dmesg has no timestamps at all from what I can tell.
> 
> Err. Just set CONFIG_PRINTK_TIME in your kernel.

Ok, I didn't realize that was available.

Thanks,
Ben

> 
> johannes
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-13 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 17:58 RFC: Add precise timing to wifi association messages? Ben Greear
2013-11-13 18:01 ` Ben Greear
2013-11-13 18:18   ` Johannes Berg
2013-11-13 18:24     ` Ben Greear
2013-11-13 18:32       ` Johannes Berg
2013-11-13 18:39         ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).