From: Pavel Roskin <proski@gnu.org>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: linville@tuxdriver.com, johannes@sipsolutions.net,
yi.zhu@intel.com, linux-wireless@vger.kernel.org,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH 3/4 V2] mac80211: add last beacon time in scan list
Date: Wed, 25 Jun 2008 11:58:47 -0400 [thread overview]
Message-ID: <1214409527.5881.21.camel@dv> (raw)
In-Reply-To: <1214396229-18782-1-git-send-email-tomas.winkler@intel.com>
On Wed, 2008-06-25 at 15:17 +0300, Tomas Winkler wrote:
> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>
> This patch adds the interval between the scan results and the last time a
> beacon was received in the result of the scan.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
> net/mac80211/mlme.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 7b930d1..e76e62a 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -4658,12 +4658,26 @@ ieee80211_sta_scan_result(struct net_device *dev,
> char *buf;
> buf = kmalloc(30, GFP_ATOMIC);
> if (buf) {
> + unsigned long mid_range = (-1) / 2 + 1;
What is that? I guess that's where Riemann's zeta function has its
non-trivial roots :-)
> + time_diff = jiffies - bss->last_update > mid_range ?
> + jiffies - bss->last_update :
> + bss->last_update - jiffies;
That's pretty hairy. Do we really lack a function to calculate time
difference?
> + sprintf(buf, "Last beacon:%dms ago",
> + jiffies_to_msecs(time_diff));
You lost space after the colon for some reason.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-06-25 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 12:17 [PATCH 3/4 V2] mac80211: add last beacon time in scan list Tomas Winkler
2008-06-25 15:58 ` Pavel Roskin [this message]
2008-06-25 16:07 ` drago01
2008-06-25 16:12 ` Johannes Berg
2008-06-25 22:26 ` Tomas Winkler
2008-06-26 2:28 ` Pavel Roskin
2008-06-26 13:26 ` Johannes Berg
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=1214409527.5881.21.camel@dv \
--to=proski@gnu.org \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.com \
--cc=yi.zhu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.