summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-24 12:38:00 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-06-30 23:37:34 +0200
commitbf998f686430107fb8790ef6713f8e352a3deede (patch)
treed5dfcaf2b8ae31e44f5a4d8cd30006fd8a1e7d03 /net/mac80211
parentmac80211: add spectrum capabilities (diff)
downloadlinux-bf998f686430107fb8790ef6713f8e352a3deede.tar.xz
linux-bf998f686430107fb8790ef6713f8e352a3deede.zip
mac80211: add last beacon time in scan list
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c9f7c13d2e7e..cffef44cec05 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4340,6 +4340,13 @@ ieee80211_sta_scan_result(struct net_device *dev,
current_ev = iwe_stream_add_point(info, current_ev,
end_buf,
&iwe, buf);
+ memset(&iwe, 0, sizeof(iwe));
+ iwe.cmd = IWEVCUSTOM;
+ sprintf(buf, " Last beacon: %dms ago",
+ jiffies_to_msecs(jiffies - bss->last_update));
+ iwe.u.data.length = strlen(buf);
+ current_ev = iwe_stream_add_point(info, current_ev,
+ end_buf, &iwe, buf);
kfree(buf);
}
}