summaryrefslogtreecommitdiff
path: root/net/ieee80211/ieee80211_wx.c
diff options
context:
space:
mode:
authorJames Ketrenos <jketreno@linux.intel.com>2005-09-21 11:54:07 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-09-21 23:01:52 -0400
commit42e349fd10d471d9ae6955a7f12523291c0193e6 (patch)
tree9c7ce6a08a8b237b3fb9c53b7ad506d0343f0a02 /net/ieee80211/ieee80211_wx.c
parentf1bf6638af9e9bbbb6fb0b769054fb7db1ae652f (diff)
downloadlinux-3.10-42e349fd10d471d9ae6955a7f12523291c0193e6.tar.gz
linux-3.10-42e349fd10d471d9ae6955a7f12523291c0193e6.tar.bz2
linux-3.10-42e349fd10d471d9ae6955a7f12523291c0193e6.zip
[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/ieee80211_wx.c')
-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 f88c8116a23..df64bf3716b 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -32,6 +32,7 @@
#include <linux/kmod.h>
#include <linux/module.h>
+#include <linux/jiffies.h>
#include <net/ieee80211.h>
#include <linux/wireless.h>
@@ -217,8 +218,8 @@ static inline char *ipw2100_translate_scan(struct ieee80211_device *ieee,
iwe.cmd = IWEVCUSTOM;
p = custom;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
- " Last beacon: %lums ago",
- (jiffies - network->last_scanned) / (HZ / 100));
+ " Last beacon: %dms ago",
+ jiffies_to_msecs(jiffies - network->last_scanned));
iwe.u.data.length = p - custom;
if (iwe.u.data.length)
start = iwe_stream_add_point(start, stop, &iwe, custom);
@@ -248,13 +249,13 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
ev = ipw2100_translate_scan(ieee, ev, stop, network);
else
IEEE80211_DEBUG_SCAN("Not showing network '%s ("
- MAC_FMT ")' due to age (%lums).\n",
+ MAC_FMT ")' due to age (%dms).\n",
escape_essid(network->ssid,
network->ssid_len),
MAC_ARG(network->bssid),
- (jiffies -
- network->last_scanned) / (HZ /
- 100));
+ jiffies_to_msecs(jiffies -
+ network->
+ last_scanned));
}
spin_unlock_irqrestore(&ieee->lock, flags);