aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
authorJames Ketrenos <jketreno@linux.intel.com>2005-09-21 12:54:07 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-21 23:01:52 -0400
commit42e349fd10d471d9ae6955a7f12523291c0193e6 (patch)
tree9c7ce6a08a8b237b3fb9c53b7ad506d0343f0a02 /net/ieee80211
parentf1bf6638af9e9bbbb6fb0b769054fb7db1ae652f (diff)
[PATCH] ieee80211: Fix time calculation, switching to use jiffies_to_msecs
tree b9cdd7058b787807655ea6f125e2adbf8d26c863 parent 85d9b2bddfcf3ed2eb4d061947c25c6a832891ab author Zhu Yi <jketreno@io.(none)> 1124435212 -0500 committer James Ketrenos <jketreno@linux.intel.com> 1127312152 -0500 Fix time calculation, switching to use jiffies_to_msecs. Signed-off-by: James Ketrenos <jketreno@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/ieee80211_wx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index f88c8116a23c..df64bf3716b7 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -32,6 +32,7 @@
32 32
33#include <linux/kmod.h> 33#include <linux/kmod.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/jiffies.h>
35 36
36#include <net/ieee80211.h> 37#include <net/ieee80211.h>
37#include <linux/wireless.h> 38#include <linux/wireless.h>
@@ -217,8 +218,8 @@ static inline char *ipw2100_translate_scan(struct ieee80211_device *ieee,
217 iwe.cmd = IWEVCUSTOM; 218 iwe.cmd = IWEVCUSTOM;
218 p = custom; 219 p = custom;
219 p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), 220 p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
220 " Last beacon: %lums ago", 221 " Last beacon: %dms ago",
221 (jiffies - network->last_scanned) / (HZ / 100)); 222 jiffies_to_msecs(jiffies - network->last_scanned));
222 iwe.u.data.length = p - custom; 223 iwe.u.data.length = p - custom;
223 if (iwe.u.data.length) 224 if (iwe.u.data.length)
224 start = iwe_stream_add_point(start, stop, &iwe, custom); 225 start = iwe_stream_add_point(start, stop, &iwe, custom);
@@ -248,13 +249,13 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
248 ev = ipw2100_translate_scan(ieee, ev, stop, network); 249 ev = ipw2100_translate_scan(ieee, ev, stop, network);
249 else 250 else
250 IEEE80211_DEBUG_SCAN("Not showing network '%s (" 251 IEEE80211_DEBUG_SCAN("Not showing network '%s ("
251 MAC_FMT ")' due to age (%lums).\n", 252 MAC_FMT ")' due to age (%dms).\n",
252 escape_essid(network->ssid, 253 escape_essid(network->ssid,
253 network->ssid_len), 254 network->ssid_len),
254 MAC_ARG(network->bssid), 255 MAC_ARG(network->bssid),
255 (jiffies - 256 jiffies_to_msecs(jiffies -
256 network->last_scanned) / (HZ / 257 network->
257 100)); 258 last_scanned));
258 } 259 }
259 260
260 spin_unlock_irqrestore(&ieee->lock, flags); 261 spin_unlock_irqrestore(&ieee->lock, flags);