aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-12-13 04:39:50 -0500
committerLuciano Coelho <coelho@ti.com>2011-12-15 02:58:41 -0500
commit2c8f82eabc6b3b6d1fc97954377e67f2d83db687 (patch)
tree755c64ad5307f2bdd1caec0f3d4a04088cf66945 /drivers
parentf414218ed8bc716825755c9cf59f16a19f28314a (diff)
wl12xx: call extended radio parameters for wl127x AP mode
We need to set the extended radio parameters for wl127x only. Currently, we were only calling this command with wl127x STA mode, but we should also do it for AP mode. Move the call to the extended radio paramaters to the common hw_init and use a single if for the chip type to do everything at once. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/init.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index 88891cdfdd4a..76625145e32e 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -328,12 +328,6 @@ static int wl1271_sta_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif)
328{ 328{
329 int ret; 329 int ret;
330 330
331 if (wl->chip.id != CHIP_ID_1283_PG20) {
332 ret = wl1271_cmd_ext_radio_parms(wl);
333 if (ret < 0)
334 return ret;
335 }
336
337 /* PS config */ 331 /* PS config */
338 ret = wl12xx_acx_config_ps(wl, wlvif); 332 ret = wl12xx_acx_config_ps(wl, wlvif);
339 if (ret < 0) 333 if (ret < 0)
@@ -659,19 +653,24 @@ int wl1271_hw_init(struct wl1271 *wl)
659{ 653{
660 int ret; 654 int ret;
661 655
662 if (wl->chip.id == CHIP_ID_1283_PG20) 656 if (wl->chip.id == CHIP_ID_1283_PG20) {
663 ret = wl128x_cmd_general_parms(wl); 657 ret = wl128x_cmd_general_parms(wl);
664 else 658 if (ret < 0)
665 ret = wl1271_cmd_general_parms(wl); 659 return ret;
666 if (ret < 0)
667 return ret;
668
669 if (wl->chip.id == CHIP_ID_1283_PG20)
670 ret = wl128x_cmd_radio_parms(wl); 660 ret = wl128x_cmd_radio_parms(wl);
671 else 661 if (ret < 0)
662 return ret;
663 } else {
664 ret = wl1271_cmd_general_parms(wl);
665 if (ret < 0)
666 return ret;
672 ret = wl1271_cmd_radio_parms(wl); 667 ret = wl1271_cmd_radio_parms(wl);
673 if (ret < 0) 668 if (ret < 0)
674 return ret; 669 return ret;
670 ret = wl1271_cmd_ext_radio_parms(wl);
671 if (ret < 0)
672 return ret;
673 }
675 674
676 /* Chip-specific init */ 675 /* Chip-specific init */
677 ret = wl1271_chip_specific_init(wl); 676 ret = wl1271_chip_specific_init(wl);