From: Emmanuel Grumbach Date: Tue, 24 Jun 2008 10:38:00 +0000 (+0300) Subject: mac80211: add last beacon time in scan list X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bf998f686430107fb8790ef6713f8e352a3deede;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Tomas Winkler Signed-off-by: John W. Linville --- 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); } }