summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/wmm.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-06-19 21:48:12 -0700
committerJohn W. Linville <linville@tuxdriver.com>2014-06-20 14:13:45 -0400
commit6451acdc4f716610043442016f76a0b849c06ea6 (patch)
treedb95eb3ccf83ae750ed16301c4dae987f8ce2626 /drivers/net/wireless/mwifiex/wmm.c
parent2e91606f5e1ec7329557dfc0e298c4c021acbb80 (diff)
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> 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 d3671d009f6c..6e86d1e17d3e 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(ktime_sub(ktime_get(), 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