aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2011-08-25 15:00:54 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-26 10:47:58 -0400
commit80d6e96be80593ae98a5d68c9ae4e054359d1a89 (patch)
tree0a78c5b5b80a42cc611b65fe47f9e4b750c57f35 /drivers/net/wireless
parentath9k_hw: add AR9580 support (diff)
downloadlinux-dev-80d6e96be80593ae98a5d68c9ae4e054359d1a89.tar.xz
linux-dev-80d6e96be80593ae98a5d68c9ae4e054359d1a89.zip
carl9170: Use do_div for 64-bit division to fix 32-bit kernels
Use the do_div macro for 64-bit division. Otherwise, the module will reference __udivdi3 under 32-bit kernels, which is not allowed in kernel space. drivers/built-in.o: In function `carl9170_collect_tally': cmd.c:191: undefined reference to `__udivdi3' cmd.c:192: undefined reference to `__udivdi3' cmd.c:193: undefined reference to `__udivdi3' Reported-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Tested-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/carl9170/cmd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/carl9170/cmd.c b/drivers/net/wireless/ath/carl9170/cmd.c
index 9970bf8edc40..195dc6538110 100644
--- a/drivers/net/wireless/ath/carl9170/cmd.c
+++ b/drivers/net/wireless/ath/carl9170/cmd.c
@@ -36,6 +36,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <asm/div64.h>
#include "carl9170.h"
#include "cmd.h"
@@ -187,10 +188,12 @@ int carl9170_collect_tally(struct ar9170 *ar)
if (ar->channel) {
info = &ar->survey[ar->channel->hw_value];
-
- info->channel_time = ar->tally.active / 1000;
- info->channel_time_busy = ar->tally.cca / 1000;
- info->channel_time_tx = ar->tally.tx_time / 1000;
+ info->channel_time = ar->tally.active;
+ info->channel_time_busy = ar->tally.cca;
+ info->channel_time_tx = ar->tally.tx_time;
+ do_div(info->channel_time, 1000);
+ do_div(info->channel_time_busy, 1000);
+ do_div(info->channel_time_tx, 1000);
}
}
return 0;