Return-path: Received: from nbd.name ([46.4.11.11]:45815 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752639Ab1DEOIm (ORCPT ); Tue, 5 Apr 2011 10:08:42 -0400 Message-ID: <4D9B2268.8070902@openwrt.org> Date: Tue, 05 Apr 2011 16:08:40 +0200 From: Felix Fietkau MIME-Version: 1.0 To: Mohammed Shafi Shajakhan CC: linux-wireless@vger.kernel.org, johannes@sipsolutions.net Subject: Re: [RFC] mac80211: Add station uptime in debugfs References: <1302010795-2522-1-git-send-email-mshajakhan@atheros.com> In-Reply-To: <1302010795-2522-1-git-send-email-mshajakhan@atheros.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 2011-04-05 3:39 PM, Mohammed Shafi Shajakhan wrote: > From: Mohammed Shafi Shajakhan > > 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 > 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. - Felix