summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2013-05-24 19:36:57 -0400
committerSolomon Peachy <pizza@shaftnet.org>2013-05-24 19:36:57 -0400
commitb09a3ad67fda1b8f6c7a86d49c2dfec5dd707e9a (patch)
tree9edd0c35f8e0ba36bd29d77ed3eb216d73e6ef2d
parent5115d531bda1c936753186097af4bebdbe6d07f3 (diff)
downloadcompat-wireless-cw1200-b09a3ad67fda1b8f6c7a86d49c2dfec5dd707e9a.tar.gz
compat-wireless-cw1200-b09a3ad67fda1b8f6c7a86d49c2dfec5dd707e9a.tar.bz2
compat-wireless-cw1200-b09a3ad67fda1b8f6c7a86d49c2dfec5dd707e9a.zip
[cw1200] Build fixes for newer kernels (that are relevant to old ones)
-rw-r--r--drivers/net/wireless/cw1200/itp.c12
-rw-r--r--drivers/net/wireless/cw1200/sta.c2
-rw-r--r--drivers/net/wireless/cw1200/wsm.c2
3 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/cw1200/itp.c b/drivers/net/wireless/cw1200/itp.c
index 7be3509..c0730bb 100644
--- a/drivers/net/wireless/cw1200/itp.c
+++ b/drivers/net/wireless/cw1200/itp.c
@@ -14,6 +14,7 @@
#include <linux/debugfs.h>
#include <linux/poll.h>
#include <linux/time.h>
+#include <linux/random.h>
#include <linux/kallsyms.h>
#include <net/mac80211.h>
#include "cw1200.h"
@@ -139,8 +140,6 @@ static const struct file_operations fops_itp = {
static void cw1200_itp_fill_pattern(u8 *data, int size,
enum cw1200_itp_data_modes mode)
{
- u8 *p = data;
-
if (size <= 0)
return;
@@ -156,14 +155,7 @@ static void cw1200_itp_fill_pattern(u8 *data, int size,
memset(data, 0x55, size);
break;
case ITP_DATA_RANDOM:
- while (p < data+size-sizeof(u32)) {
- (*(u32 *)p) = random32();
- p += sizeof(u32);
- }
- while (p < data+size) {
- (*p) = random32() & 0xFF;
- p++;
- }
+ get_random_bytes(data, size);
break;
}
return;
diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c
index bca9c60..7dc0b08 100644
--- a/drivers/net/wireless/cw1200/sta.c
+++ b/drivers/net/wireless/cw1200/sta.c
@@ -12,6 +12,7 @@
#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <linux/firmware.h>
+#include <linux/module.h>
#include "cw1200.h"
#include "sta.h"
@@ -23,7 +24,6 @@
#define ERP_INFO_BYTE_OFFSET 2
#endif
-
static void cw1200_do_join(struct cw1200_common *priv);
static void cw1200_do_unjoin(struct cw1200_common *priv);
diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c
index 1667944..4db6cc1 100644
--- a/drivers/net/wireless/cw1200/wsm.c
+++ b/drivers/net/wireless/cw1200/wsm.c
@@ -1657,7 +1657,7 @@ static int cw1200_get_prio_queue(struct cw1200_common *priv,
edca = &priv->edca.params[i];
score = ((edca->aifns + edca->cwmin) << 16) +
((edca->cwmax - edca->cwmin) *
- (random32() & 0xFFFF));
+ (get_random_int() & 0xFFFF));
if (score < best && (winner < 0 || i != 3)) {
best = score;
winner = i;