diff options
author | Shahar Levi <shahar_levi@ti.com> | 2011-04-03 06:54:54 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-05-02 03:25:48 -0400 |
commit | b03acadea4f46884aa3c3e4d3a6ce03d283525e6 (patch) | |
tree | ec5b16f851da79fb2d43ac1371fc325249696f13 | |
parent | a665d6e260f0233aac73f74d15bb6a029cc5ec47 (diff) |
wl12xx: Set correct REF CLK and TCXO CLK values to the FW
Fix mismatch between the REF CLK and TCXO CLK information that is
set in the platform data and the NVS, so we override what comes
from the NVS and replace it with what comes from the platform data.
[Small fix in a comment -- Luca]
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index d48331682e7e..a9ffdd86f9b8 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -129,6 +129,9 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) | |||
129 | if (gp->tx_bip_fem_auto_detect) | 129 | if (gp->tx_bip_fem_auto_detect) |
130 | answer = true; | 130 | answer = true; |
131 | 131 | ||
132 | /* Override the REF CLK from the NVS with the one from platform data */ | ||
133 | gen_parms->general_params.ref_clock = wl->ref_clock; | ||
134 | |||
132 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); | 135 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); |
133 | if (ret < 0) { | 136 | if (ret < 0) { |
134 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); | 137 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); |
@@ -168,6 +171,10 @@ int wl128x_cmd_general_parms(struct wl1271 *wl) | |||
168 | if (gp->tx_bip_fem_auto_detect) | 171 | if (gp->tx_bip_fem_auto_detect) |
169 | answer = true; | 172 | answer = true; |
170 | 173 | ||
174 | /* Replace REF and TCXO CLKs with the ones from platform data */ | ||
175 | gen_parms->general_params.ref_clock = wl->ref_clock; | ||
176 | gen_parms->general_params.tcxo_ref_clock = wl->tcxo_clock; | ||
177 | |||
171 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); | 178 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); |
172 | if (ret < 0) { | 179 | if (ret < 0) { |
173 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); | 180 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); |