summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/wmm.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-06-12 08:31:34 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-06-25 15:55:49 -0400
commitc64800e772a03a8162e107c2d03d06175fff443d (patch)
tree021ab5244c2b09bdc722f4462764ccee0a1e855d /drivers/net/wireless/mwifiex/wmm.c
parent057d32f03d0d5425b3e089d98712d6cc962b705f (diff)
downloadlinux-c64800e772a03a8162e107c2d03d06175fff443d.tar.bz2
wireless: mwifiex: Use the proper interfaces
Why is converting time formats so desired if there are proper interfaces for this? Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Bing Zhao <bzhao@marvell.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/wmm.c')
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 8cd123ecebbf..94c98a86ebbe 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -878,15 +878,8 @@ u8
mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv,
const struct sk_buff *skb)
{
+ u32 queue_delay = ktime_to_ms(net_timedelta(skb->tstamp));
u8 ret_val;
- struct timeval out_tstamp, in_tstamp;
- u32 queue_delay;
-
- do_gettimeofday(&out_tstamp);
- in_tstamp = ktime_to_timeval(skb->tstamp);
-
- queue_delay = (out_tstamp.tv_sec - in_tstamp.tv_sec) * 1000;
- queue_delay += (out_tstamp.tv_usec - in_tstamp.tv_usec) / 1000;
/*
* Queue delay is passed as a uint8 in units of 2ms (ms shifted