]> err.no Git - linux-2.6/commitdiff
mac80211: add last beacon time in scan list
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 24 Jun 2008 10:38:00 +0000 (13:38 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Jun 2008 21:37:34 +0000 (17:37 -0400)
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>
net/mac80211/mlme.c

index c9f7c13d2e7ec2286aa5898a20ff57b4a89a4068..cffef44cec052a2e3fe15d03a368fb9102dd96c1 100644 (file)
@@ -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);
                }
        }