summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_acx.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-13 12:47:43 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:08 -0400
commit47fab7d589d46d87a5dbfd7f2ddd53deccfad504 (patch)
tree7ef786fb166d86449605723e29dd52ab8338e8ab /drivers/net/wireless/wl12xx/wl1271_acx.c
parent51f2be24328957f9e2acf116b1b1d2dfd10bf41f (diff)
downloadblackbird-obmc-linux-47fab7d589d46d87a5dbfd7f2ddd53deccfad504.tar.gz
blackbird-obmc-linux-47fab7d589d46d87a5dbfd7f2ddd53deccfad504.zip
wl1271: Add config structure for FW init parameters
Add a configuration structure for RX path parameters, and set default configuration values there. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.c39
1 files changed, 10 insertions, 29 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index d0036860ab60..880c82894f63 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -1014,7 +1014,7 @@ int wl1271_acx_smart_reflex(struct wl1271 *wl)
{
struct acx_smart_reflex_state *sr_state = NULL;
struct acx_smart_reflex_config_params *sr_param = NULL;
- int ret;
+ int i, ret;
wl1271_debug(DEBUG_ACX, "acx smart reflex");
@@ -1024,33 +1024,14 @@ int wl1271_acx_smart_reflex(struct wl1271 *wl)
goto out;
}
- /* set cryptic smart reflex parameters - source TI reference code */
- sr_param->error_table[0].len = 0x07;
- sr_param->error_table[0].upper_limit = 0x03;
- sr_param->error_table[0].values[0] = 0x18;
- sr_param->error_table[0].values[1] = 0x10;
- sr_param->error_table[0].values[2] = 0x05;
- sr_param->error_table[0].values[3] = 0xfb;
- sr_param->error_table[0].values[4] = 0xf0;
- sr_param->error_table[0].values[5] = 0xe8;
-
- sr_param->error_table[1].len = 0x07;
- sr_param->error_table[1].upper_limit = 0x03;
- sr_param->error_table[1].values[0] = 0x18;
- sr_param->error_table[1].values[1] = 0x10;
- sr_param->error_table[1].values[2] = 0x05;
- sr_param->error_table[1].values[3] = 0xf6;
- sr_param->error_table[1].values[4] = 0xf0;
- sr_param->error_table[1].values[5] = 0xe8;
-
- sr_param->error_table[2].len = 0x07;
- sr_param->error_table[2].upper_limit = 0x03;
- sr_param->error_table[2].values[0] = 0x18;
- sr_param->error_table[2].values[1] = 0x10;
- sr_param->error_table[2].values[2] = 0x05;
- sr_param->error_table[2].values[3] = 0xfb;
- sr_param->error_table[2].values[4] = 0xf0;
- sr_param->error_table[2].values[5] = 0xe8;
+ for (i = 0; i < CONF_SR_ERR_TBL_COUNT; i++) {
+ struct conf_mart_reflex_err_table *e =
+ &(wl->conf.init.sr_err_tbl[i]);
+
+ sr_param->error_table[i].len = e->len;
+ sr_param->error_table[i].upper_limit = e->upper_limit;
+ memcpy(sr_param->error_table[i].values, e->values, e->len);
+ }
ret = wl1271_cmd_configure(wl, ACX_SET_SMART_REFLEX_PARAMS,
sr_param, sizeof(*sr_param));
@@ -1066,7 +1047,7 @@ int wl1271_acx_smart_reflex(struct wl1271 *wl)
}
/* enable smart reflex */
- sr_state->enable = 1;
+ sr_state->enable = wl->conf.init.sr_enable;
ret = wl1271_cmd_configure(wl, ACX_SET_SMART_REFLEX_STATE,
sr_state, sizeof(*sr_state));
OpenPOWER on IntegriCloud