Search Linux Wireless

Re: [RFC] mac80211: Add station uptime in debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

 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@xxxxxxxxxxx>


 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux