From 175bd45ea7c99a47ac82954d158080d4c214f2b7 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 25 Aug 2011 23:47:35 +0200 Subject: [PATCH] --- yaml --- r: 265827 b: refs/heads/master c: 1cda0fd6096355ad4b0d99b691c2f9ca3198d745 h: refs/heads/master i: 265825: b885c9b97b8d2fa1bfb2f394dc94712380a10f45 265823: 3cd886f13aadf2bfec7b7ad1e192e6b716ba457a v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/p54/txrx.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 76e282a91caa..d1e2408a3c1c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 397e5d5b93ba99ad3dc56f1e294f487e77d2daa8 +refs/heads/master: 1cda0fd6096355ad4b0d99b691c2f9ca3198d745 diff --git a/trunk/drivers/net/wireless/p54/txrx.c b/trunk/drivers/net/wireless/p54/txrx.c index 44a3bd4b0f43..2b97a89e7ff8 100644 --- a/trunk/drivers/net/wireless/p54/txrx.c +++ b/trunk/drivers/net/wireless/p54/txrx.c @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -582,10 +583,13 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb) if (chan) { struct survey_info *survey = &priv->survey[chan->hw_value]; survey->noise = clamp_t(s8, priv->noise, -128, 127); - survey->channel_time = priv->survey_raw.active / 1024; - survey->channel_time_tx = priv->survey_raw.tx / 1024; - survey->channel_time_busy = priv->survey_raw.cca / 1024 + - survey->channel_time_tx; + survey->channel_time = priv->survey_raw.active; + survey->channel_time_tx = priv->survey_raw.tx; + survey->channel_time_busy = priv->survey_raw.tx + + priv->survey_raw.cca; + do_div(survey->channel_time, 1024); + do_div(survey->channel_time_tx, 1024); + do_div(survey->channel_time_busy, 1024); } tmp = p54_find_and_unlink_skb(priv, hdr->req_id);