]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/p54/txrx.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[karo-tx-linux.git] / drivers / net / wireless / p54 / txrx.c
index 44a3bd4b0f43c5258d04db670f62b2ae4ec6a828..f485784a60aeb0a903871464e6db494c71dc2bf6 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/firmware.h>
 #include <linux/etherdevice.h>
+#include <asm/div64.h>
 
 #include <net/mac80211.h>
 
@@ -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);
@@ -685,7 +689,7 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
        if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
                *flags |= P54_HDR_FLAG_DATA_OUT_SEQNR;
 
-       if (info->flags & IEEE80211_TX_CTL_PSPOLL_RESPONSE)
+       if (info->flags & IEEE80211_TX_CTL_POLL_RESPONSE)
                *flags |= P54_HDR_FLAG_DATA_OUT_NOCANCEL;
 
        if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)