diff options
-rw-r--r-- | drivers/net/wimax/i2400m/fw.c | 1 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/sdio-fw.c | 3 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/usb-fw.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c index 55bd69e913b9..0018cdbd0156 100644 --- a/drivers/net/wimax/i2400m/fw.c +++ b/drivers/net/wimax/i2400m/fw.c | |||
@@ -343,7 +343,6 @@ ssize_t i2400m_bm_cmd(struct i2400m *i2400m, | |||
343 | BUG_ON(i2400m->boot_mode == 0); | 343 | BUG_ON(i2400m->boot_mode == 0); |
344 | 344 | ||
345 | if (cmd != NULL) { /* send the command */ | 345 | if (cmd != NULL) { /* send the command */ |
346 | memcpy(i2400m->bm_cmd_buf, cmd, cmd_size); | ||
347 | result = i2400m->bus_bm_cmd_send(i2400m, cmd, cmd_size, flags); | 346 | result = i2400m->bus_bm_cmd_send(i2400m, cmd, cmd_size, flags); |
348 | if (result < 0) | 347 | if (result < 0) |
349 | goto error_cmd_send; | 348 | goto error_cmd_send; |
diff --git a/drivers/net/wimax/i2400m/sdio-fw.c b/drivers/net/wimax/i2400m/sdio-fw.c index c8dc538d40c1..8e025418f5be 100644 --- a/drivers/net/wimax/i2400m/sdio-fw.c +++ b/drivers/net/wimax/i2400m/sdio-fw.c | |||
@@ -118,7 +118,8 @@ ssize_t i2400ms_bus_bm_cmd_send(struct i2400m *i2400m, | |||
118 | if (cmd_size > I2400M_BM_CMD_BUF_SIZE) | 118 | if (cmd_size > I2400M_BM_CMD_BUF_SIZE) |
119 | goto error_too_big; | 119 | goto error_too_big; |
120 | 120 | ||
121 | memcpy(i2400m->bm_cmd_buf, _cmd, cmd_size); /* Prep command */ | 121 | if (_cmd != i2400m->bm_cmd_buf) |
122 | memmove(i2400m->bm_cmd_buf, _cmd, cmd_size); | ||
122 | cmd = i2400m->bm_cmd_buf; | 123 | cmd = i2400m->bm_cmd_buf; |
123 | if (cmd_size_a > cmd_size) /* Zero pad space */ | 124 | if (cmd_size_a > cmd_size) /* Zero pad space */ |
124 | memset(i2400m->bm_cmd_buf + cmd_size, 0, cmd_size_a - cmd_size); | 125 | memset(i2400m->bm_cmd_buf + cmd_size, 0, cmd_size_a - cmd_size); |
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c index a2250e49a444..f162c815d505 100644 --- a/drivers/net/wimax/i2400m/usb-fw.c +++ b/drivers/net/wimax/i2400m/usb-fw.c | |||
@@ -172,7 +172,8 @@ ssize_t i2400mu_bus_bm_cmd_send(struct i2400m *i2400m, | |||
172 | result = -E2BIG; | 172 | result = -E2BIG; |
173 | if (cmd_size > I2400M_BM_CMD_BUF_SIZE) | 173 | if (cmd_size > I2400M_BM_CMD_BUF_SIZE) |
174 | goto error_too_big; | 174 | goto error_too_big; |
175 | memcpy(i2400m->bm_cmd_buf, _cmd, cmd_size); | 175 | if (_cmd != i2400m->bm_cmd_buf) |
176 | memmove(i2400m->bm_cmd_buf, _cmd, cmd_size); | ||
176 | cmd = i2400m->bm_cmd_buf; | 177 | cmd = i2400m->bm_cmd_buf; |
177 | if (cmd_size_a > cmd_size) /* Zero pad space */ | 178 | if (cmd_size_a > cmd_size) /* Zero pad space */ |
178 | memset(i2400m->bm_cmd_buf + cmd_size, 0, cmd_size_a - cmd_size); | 179 | memset(i2400m->bm_cmd_buf + cmd_size, 0, cmd_size_a - cmd_size); |