Skip to content

Commit

Permalink
wl12xx: call extended radio parameters for wl127x AP mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luciano Coelho committed Dec 15, 2011
1 parent f414218 commit 2c8f82e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions drivers/net/wireless/wl12xx/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,6 @@ static int wl1271_sta_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
int ret;

if (wl->chip.id != CHIP_ID_1283_PG20) {
ret = wl1271_cmd_ext_radio_parms(wl);
if (ret < 0)
return ret;
}

/* PS config */
ret = wl12xx_acx_config_ps(wl, wlvif);
if (ret < 0)
Expand Down Expand Up @@ -659,19 +653,24 @@ int wl1271_hw_init(struct wl1271 *wl)
{
int ret;

if (wl->chip.id == CHIP_ID_1283_PG20)
if (wl->chip.id == CHIP_ID_1283_PG20) {
ret = wl128x_cmd_general_parms(wl);
else
ret = wl1271_cmd_general_parms(wl);
if (ret < 0)
return ret;

if (wl->chip.id == CHIP_ID_1283_PG20)
if (ret < 0)
return ret;
ret = wl128x_cmd_radio_parms(wl);
else
if (ret < 0)
return ret;
} else {
ret = wl1271_cmd_general_parms(wl);
if (ret < 0)
return ret;
ret = wl1271_cmd_radio_parms(wl);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
ret = wl1271_cmd_ext_radio_parms(wl);
if (ret < 0)
return ret;
}

/* Chip-specific init */
ret = wl1271_chip_specific_init(wl);
Expand Down

0 comments on commit 2c8f82e

Please sign in to comment.