linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Mohammed Shafi <mshajakhan@atheros.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>
Subject: Re: [RFC] mac80211: Add station uptime in debugfs
Date: Tue, 05 Apr 2011 17:25:30 +0200	[thread overview]
Message-ID: <4D9B346A.5000601@openwrt.org> (raw)
In-Reply-To: <4D9B2F79.2090606@atheros.com>

On 2011-04-05 5:04 PM, Mohammed Shafi wrote:
> On Tuesday 05 April 2011 07:38 PM, Felix Fietkau wrote:
>>  On 2011-04-05 3:39 PM, Mohammed Shafi Shajakhan wrote:
>>
>>>  From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>
>>>  Add station uptime parameter in debugfs. This will be helpful to get a
>>>  measure of stability of connection and also during stress testing.
>>>
>>>  Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>>
>>
>>>  diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
>>>  index 999f8fb..08b9f51 100644
>>>  --- a/net/mac80211/sta_info.c
>>>  +++ b/net/mac80211/sta_info.c
>>>  @@ -244,6 +244,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
>>>     	sta->local = local;
>>>     	sta->sdata = sdata;
>>>     	sta->last_rx = jiffies;
>>>  +	sta->sta_uptime = jiffies;
>>>
>>>     	ewma_init(&sta->avg_signal, 1024, 8);
>>>
>>>
>>  I think jiffies can easily overflow. Maybe it would be better to get a
>>  timeval from the monotonic clock.
>>
> Thanks, yes thats true and I assumed this will work fine for 49 days
> assuming 32 bit(please correct me if my calculations are wrong). will
> the overflow will take place in less than this time?.
Yes, but there are people that deploy point to point links that can last 
longer than that ;)

> I will dig more into it by looking at the time val.
Thanks.

- Felix

  reply	other threads:[~2011-04-05 15:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 13:39 [RFC] mac80211: Add station uptime in debugfs Mohammed Shafi Shajakhan
2011-04-05 14:04 ` Helmut Schaa
2011-04-05 14:36   ` Mohammed Shafi
2011-04-05 14:50     ` Johannes Berg
2011-04-05 14:59       ` Mohammed Shafi
2011-04-05 15:05   ` Mohammed Shafi
2011-04-05 14:08 ` Felix Fietkau
2011-04-05 15:04   ` Mohammed Shafi
2011-04-05 15:25     ` Felix Fietkau [this message]
2011-04-05 15:29       ` Mohammed Shafi

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=4D9B346A.5000601@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mshajakhan@atheros.com \
    /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;
as well as URLs for NNTP newsgroup(s).