aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@nokia.com>2009-12-11 08:40:55 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:31:33 -0500
commit94210897e2b7df8446fdecd360342149e5b4a400 (patch)
tree346d51bae1758c3f460bf3944ca602b912e48031 /drivers/net
parent3ed8f2c61466f10d99585365fd2aaafaf2d4c949 (diff)
wl1271: use channel 1 when configuring the data path
In the data path configuration, one of the parameters is the channel. We have been setting it to wl->channel, which is not correct in this case. This channel has nothing to do with the channel we're currently tuned to, since it is only used for calibration during this phase. Hardcoded the channel to 1, according to the reference driver. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c13
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.h2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.c2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c2
4 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index ceb1ca63c43a..20f3e67c8e48 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -505,7 +505,7 @@ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len)
505 return 0; 505 return 0;
506} 506}
507 507
508int wl1271_cmd_data_path(struct wl1271 *wl, u8 channel, bool enable) 508int wl1271_cmd_data_path(struct wl1271 *wl, bool enable)
509{ 509{
510 struct cmd_enabledisable_path *cmd; 510 struct cmd_enabledisable_path *cmd;
511 int ret; 511 int ret;
@@ -519,7 +519,8 @@ int wl1271_cmd_data_path(struct wl1271 *wl, u8 channel, bool enable)
519 goto out; 519 goto out;
520 } 520 }
521 521
522 cmd->channel = channel; 522 /* the channel here is only used for calibration, so hardcoded to 1 */
523 cmd->channel = 1;
523 524
524 if (enable) { 525 if (enable) {
525 cmd_rx = CMD_ENABLE_RX; 526 cmd_rx = CMD_ENABLE_RX;
@@ -532,22 +533,22 @@ int wl1271_cmd_data_path(struct wl1271 *wl, u8 channel, bool enable)
532 ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0); 533 ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0);
533 if (ret < 0) { 534 if (ret < 0) {
534 wl1271_error("rx %s cmd for channel %d failed", 535 wl1271_error("rx %s cmd for channel %d failed",
535 enable ? "start" : "stop", channel); 536 enable ? "start" : "stop", cmd->channel);
536 goto out; 537 goto out;
537 } 538 }
538 539
539 wl1271_debug(DEBUG_BOOT, "rx %s cmd channel %d", 540 wl1271_debug(DEBUG_BOOT, "rx %s cmd channel %d",
540 enable ? "start" : "stop", channel); 541 enable ? "start" : "stop", cmd->channel);
541 542
542 ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0); 543 ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0);
543 if (ret < 0) { 544 if (ret < 0) {
544 wl1271_error("tx %s cmd for channel %d failed", 545 wl1271_error("tx %s cmd for channel %d failed",
545 enable ? "start" : "stop", channel); 546 enable ? "start" : "stop", cmd->channel);
546 return ret; 547 return ret;
547 } 548 }
548 549
549 wl1271_debug(DEBUG_BOOT, "tx %s cmd channel %d", 550 wl1271_debug(DEBUG_BOOT, "tx %s cmd channel %d",
550 enable ? "start" : "stop", channel); 551 enable ? "start" : "stop", cmd->channel);
551 552
552out: 553out:
553 kfree(cmd); 554 kfree(cmd);
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index 057f925db2aa..09fe91297acf 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -37,7 +37,7 @@ int wl1271_cmd_join(struct wl1271 *wl);
37int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); 37int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer);
38int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len); 38int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len);
39int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len); 39int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len);
40int wl1271_cmd_data_path(struct wl1271 *wl, u8 channel, bool enable); 40int wl1271_cmd_data_path(struct wl1271 *wl, bool enable);
41int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode); 41int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode);
42int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer, 42int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer,
43 size_t len); 43 size_t len);
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 39f01d875703..bdd4a968b37d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -289,7 +289,7 @@ int wl1271_hw_init(struct wl1271 *wl)
289 goto out_free_memmap; 289 goto out_free_memmap;
290 290
291 /* Enable data path */ 291 /* Enable data path */
292 ret = wl1271_cmd_data_path(wl, wl->channel, 1); 292 ret = wl1271_cmd_data_path(wl, 1);
293 if (ret < 0) 293 if (ret < 0)
294 goto out_free_memmap; 294 goto out_free_memmap;
295 295
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index fb2221749f7b..55a45d339184 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -384,7 +384,7 @@ static int wl1271_plt_init(struct wl1271 *wl)
384 if (ret < 0) 384 if (ret < 0)
385 return ret; 385 return ret;
386 386
387 ret = wl1271_cmd_data_path(wl, wl->channel, 1); 387 ret = wl1271_cmd_data_path(wl, 1);
388 if (ret < 0) 388 if (ret < 0)
389 return ret; 389 return ret;
390 390