aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@nokia.com>2009-12-11 08:40:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:31:29 -0500
commitcf18be4467b5aca1ccf3b5a72b67fc33a0b30c59 (patch)
treeb9b17dfedff91b62c41f439f324be579626017a9
parenta3e84847b042f10262f8ef66db66a0e527a00cff (diff)
wl1271: added radio parameters configuration values newer firmwares
Add new radio parameters for new structures based on firmware revision 6.1.0.0.288. 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>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c13
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_conf.h17
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c10
3 files changed, 35 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index fe9b187f476e..57c21454e543 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -273,6 +273,8 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
273 CONF_NUMBER_OF_RATE_GROUPS); 273 CONF_NUMBER_OF_RATE_GROUPS);
274 memcpy(radio_parms->tx_rate_limits_degraded, r->tx_rate_limits_degraded, 274 memcpy(radio_parms->tx_rate_limits_degraded, r->tx_rate_limits_degraded,
275 CONF_NUMBER_OF_RATE_GROUPS); 275 CONF_NUMBER_OF_RATE_GROUPS);
276 memcpy(radio_parms->tx_rate_limits_extreme, r->tx_rate_limits_extreme,
277 CONF_NUMBER_OF_RATE_GROUPS);
276 278
277 memcpy(radio_parms->tx_channel_limits_11b, r->tx_channel_limits_11b, 279 memcpy(radio_parms->tx_channel_limits_11b, r->tx_channel_limits_11b,
278 CONF_NUMBER_OF_CHANNELS_2_4); 280 CONF_NUMBER_OF_CHANNELS_2_4);
@@ -283,6 +285,11 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
283 memcpy(radio_parms->tx_ibias, r->tx_ibias, CONF_NUMBER_OF_RATE_GROUPS); 285 memcpy(radio_parms->tx_ibias, r->tx_ibias, CONF_NUMBER_OF_RATE_GROUPS);
284 286
285 radio_parms->rx_fem_insertion_loss = r->rx_fem_insertion_loss; 287 radio_parms->rx_fem_insertion_loss = r->rx_fem_insertion_loss;
288 radio_parms->degraded_low_to_normal_threshold =
289 r->degraded_low_to_normal_threshold;
290 radio_parms->degraded_normal_to_high_threshold =
291 r->degraded_normal_to_high_threshold;
292
286 293
287 for (i = 0; i < CONF_NUMBER_OF_SUB_BANDS_5; i++) 294 for (i = 0; i < CONF_NUMBER_OF_SUB_BANDS_5; i++)
288 radio_parms->tx_ref_pd_voltage_5[i] = 295 radio_parms->tx_ref_pd_voltage_5[i] =
@@ -295,6 +302,8 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
295 r->tx_rate_limits_normal_5, CONF_NUMBER_OF_RATE_GROUPS); 302 r->tx_rate_limits_normal_5, CONF_NUMBER_OF_RATE_GROUPS);
296 memcpy(radio_parms->tx_rate_limits_degraded_5, 303 memcpy(radio_parms->tx_rate_limits_degraded_5,
297 r->tx_rate_limits_degraded_5, CONF_NUMBER_OF_RATE_GROUPS); 304 r->tx_rate_limits_degraded_5, CONF_NUMBER_OF_RATE_GROUPS);
305 memcpy(radio_parms->tx_rate_limits_extreme_5,
306 r->tx_rate_limits_extreme_5, CONF_NUMBER_OF_RATE_GROUPS);
298 memcpy(radio_parms->tx_channel_limits_ofdm_5, 307 memcpy(radio_parms->tx_channel_limits_ofdm_5,
299 r->tx_channel_limits_ofdm_5, CONF_NUMBER_OF_CHANNELS_5); 308 r->tx_channel_limits_ofdm_5, CONF_NUMBER_OF_CHANNELS_5);
300 memcpy(radio_parms->tx_pdv_rate_offsets_5, r->tx_pdv_rate_offsets_5, 309 memcpy(radio_parms->tx_pdv_rate_offsets_5, r->tx_pdv_rate_offsets_5,
@@ -303,6 +312,10 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
303 CONF_NUMBER_OF_RATE_GROUPS); 312 CONF_NUMBER_OF_RATE_GROUPS);
304 memcpy(radio_parms->rx_fem_insertion_loss_5, 313 memcpy(radio_parms->rx_fem_insertion_loss_5,
305 r->rx_fem_insertion_loss_5, CONF_NUMBER_OF_SUB_BANDS_5); 314 r->rx_fem_insertion_loss_5, CONF_NUMBER_OF_SUB_BANDS_5);
315 radio_parms->degraded_low_to_normal_threshold_5 =
316 r->degraded_low_to_normal_threshold_5;
317 radio_parms->degraded_normal_to_high_threshold_5 =
318 r->degraded_normal_to_high_threshold_5;
306 319
307 wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ", 320 wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ",
308 radio_parms, sizeof(*radio_parms)); 321 radio_parms, sizeof(*radio_parms));
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 5e36cd90d0c6..a4bd35b0f9fd 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -864,12 +864,13 @@ struct conf_radio_parms {
864 * 864 *
865 * Range: unknown 865 * Range: unknown
866 */ 866 */
867 s16 tx_ref_pd_voltage; 867 u16 tx_ref_pd_voltage;
868 s8 tx_ref_power; 868 u8 tx_ref_power;
869 s8 tx_offset_db; 869 s8 tx_offset_db;
870 870
871 s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS]; 871 s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
872 s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS]; 872 s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
873 s8 tx_rate_limits_extreme[CONF_NUMBER_OF_RATE_GROUPS];
873 874
874 s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4]; 875 s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
875 s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4]; 876 s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
@@ -878,17 +879,22 @@ struct conf_radio_parms {
878 u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS]; 879 u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
879 u8 rx_fem_insertion_loss; 880 u8 rx_fem_insertion_loss;
880 881
882 u8 degraded_low_to_normal_threshold;
883 u8 degraded_normal_to_high_threshold;
884
885
881 /* 886 /*
882 * Dynamic radio parameters for 5GHz 887 * Dynamic radio parameters for 5GHz
883 * 888 *
884 * Range: unknown 889 * Range: unknown
885 */ 890 */
886 s16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5]; 891 u16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
887 s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5]; 892 u8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
888 s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5]; 893 s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
889 894
890 s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS]; 895 s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
891 s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS]; 896 s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
897 s8 tx_rate_limits_extreme_5[CONF_NUMBER_OF_RATE_GROUPS];
892 898
893 s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5]; 899 s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
894 s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS]; 900 s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
@@ -896,6 +902,9 @@ struct conf_radio_parms {
896 /* FIXME: this is inconsistent with the types for 2.4GHz */ 902 /* FIXME: this is inconsistent with the types for 2.4GHz */
897 s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS]; 903 s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
898 s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5]; 904 s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
905
906 u8 degraded_low_to_normal_threshold_5;
907 u8 degraded_normal_to_high_threshold_5;
899}; 908};
900 909
901#define CONF_SR_ERR_TBL_COUNT 3 910#define CONF_SR_ERR_TBL_COUNT 3
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 1d5b73ca23b7..f1cb7cbd7c1c 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -293,6 +293,8 @@ static struct conf_drv_settings default_conf = {
293 0x1d, 0x1f, 0x24, 0x28, 0x28, 0x29 }, 293 0x1d, 0x1f, 0x24, 0x28, 0x28, 0x29 },
294 .tx_rate_limits_degraded = { 294 .tx_rate_limits_degraded = {
295 0x19, 0x1f, 0x22, 0x23, 0x27, 0x28 }, 295 0x19, 0x1f, 0x22, 0x23, 0x27, 0x28 },
296 .tx_rate_limits_extreme = {
297 0x19, 0x1c, 0x1e, 0x20, 0x24, 0x25 },
296 .tx_channel_limits_11b = { 298 .tx_channel_limits_11b = {
297 0x22, 0x50, 0x50, 0x50, 0x50, 0x50, 299 0x22, 0x50, 0x50, 0x50, 0x50, 0x50,
298 0x50, 0x50, 0x50, 0x50, 0x22, 0x50, 300 0x50, 0x50, 0x50, 0x50, 0x22, 0x50,
@@ -306,6 +308,8 @@ static struct conf_drv_settings default_conf = {
306 .tx_ibias = { 308 .tx_ibias = {
307 0x11, 0x11, 0x15, 0x11, 0x15, 0x0f }, 309 0x11, 0x11, 0x15, 0x11, 0x15, 0x0f },
308 .rx_fem_insertion_loss = 0x0e, 310 .rx_fem_insertion_loss = 0x0e,
311 .degraded_low_to_normal_threshold = 0x1e,
312 .degraded_normal_to_high_threshold = 0x2d,
309 .tx_ref_pd_voltage_5 = { 313 .tx_ref_pd_voltage_5 = {
310 0x0190, 0x01a4, 0x01c3, 0x01d8, 314 0x0190, 0x01a4, 0x01c3, 0x01d8,
311 0x020a, 0x021c }, 315 0x020a, 0x021c },
@@ -317,6 +321,8 @@ static struct conf_drv_settings default_conf = {
317 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 }, 321 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
318 .tx_rate_limits_degraded_5 = { 322 .tx_rate_limits_degraded_5 = {
319 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 }, 323 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
324 .tx_rate_limits_extreme_5 = {
325 0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
320 .tx_channel_limits_ofdm_5 = { 326 .tx_channel_limits_ofdm_5 = {
321 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 327 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
322 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 328 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
@@ -328,7 +334,9 @@ static struct conf_drv_settings default_conf = {
328 .tx_ibias_5 = { 334 .tx_ibias_5 = {
329 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }, 335 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 },
330 .rx_fem_insertion_loss_5 = { 336 .rx_fem_insertion_loss_5 = {
331 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 } 337 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 },
338 .degraded_low_to_normal_threshold_5 = 0x00,
339 .degraded_normal_to_high_threshold_5 = 0x00
332 } 340 }
333 } 341 }
334}; 342};