Skip to content

Commit

Permalink
wl1271: added radio parameters configuration values newer firmwares
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luciano Coelho authored and John W. Linville committed Dec 28, 2009
1 parent a3e8484 commit cf18be4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
13 changes: 13 additions & 0 deletions drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->tx_rate_limits_degraded, r->tx_rate_limits_degraded,
CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->tx_rate_limits_extreme, r->tx_rate_limits_extreme,
CONF_NUMBER_OF_RATE_GROUPS);

memcpy(radio_parms->tx_channel_limits_11b, r->tx_channel_limits_11b,
CONF_NUMBER_OF_CHANNELS_2_4);
Expand All @@ -283,6 +285,11 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
memcpy(radio_parms->tx_ibias, r->tx_ibias, CONF_NUMBER_OF_RATE_GROUPS);

radio_parms->rx_fem_insertion_loss = r->rx_fem_insertion_loss;
radio_parms->degraded_low_to_normal_threshold =
r->degraded_low_to_normal_threshold;
radio_parms->degraded_normal_to_high_threshold =
r->degraded_normal_to_high_threshold;


for (i = 0; i < CONF_NUMBER_OF_SUB_BANDS_5; i++)
radio_parms->tx_ref_pd_voltage_5[i] =
Expand All @@ -295,6 +302,8 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
r->tx_rate_limits_normal_5, CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->tx_rate_limits_degraded_5,
r->tx_rate_limits_degraded_5, CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->tx_rate_limits_extreme_5,
r->tx_rate_limits_extreme_5, CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->tx_channel_limits_ofdm_5,
r->tx_channel_limits_ofdm_5, CONF_NUMBER_OF_CHANNELS_5);
memcpy(radio_parms->tx_pdv_rate_offsets_5, r->tx_pdv_rate_offsets_5,
Expand All @@ -303,6 +312,10 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
CONF_NUMBER_OF_RATE_GROUPS);
memcpy(radio_parms->rx_fem_insertion_loss_5,
r->rx_fem_insertion_loss_5, CONF_NUMBER_OF_SUB_BANDS_5);
radio_parms->degraded_low_to_normal_threshold_5 =
r->degraded_low_to_normal_threshold_5;
radio_parms->degraded_normal_to_high_threshold_5 =
r->degraded_normal_to_high_threshold_5;

wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ",
radio_parms, sizeof(*radio_parms));
Expand Down
17 changes: 13 additions & 4 deletions drivers/net/wireless/wl12xx/wl1271_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,12 +864,13 @@ struct conf_radio_parms {
*
* Range: unknown
*/
s16 tx_ref_pd_voltage;
s8 tx_ref_power;
u16 tx_ref_pd_voltage;
u8 tx_ref_power;
s8 tx_offset_db;

s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
s8 tx_rate_limits_extreme[CONF_NUMBER_OF_RATE_GROUPS];

s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
Expand All @@ -878,24 +879,32 @@ struct conf_radio_parms {
u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
u8 rx_fem_insertion_loss;

u8 degraded_low_to_normal_threshold;
u8 degraded_normal_to_high_threshold;


/*
* Dynamic radio parameters for 5GHz
*
* Range: unknown
*/
s16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
u16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
u8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];

s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
s8 tx_rate_limits_extreme_5[CONF_NUMBER_OF_RATE_GROUPS];

s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];

/* FIXME: this is inconsistent with the types for 2.4GHz */
s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];

u8 degraded_low_to_normal_threshold_5;
u8 degraded_normal_to_high_threshold_5;
};

#define CONF_SR_ERR_TBL_COUNT 3
Expand Down
10 changes: 9 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ static struct conf_drv_settings default_conf = {
0x1d, 0x1f, 0x24, 0x28, 0x28, 0x29 },
.tx_rate_limits_degraded = {
0x19, 0x1f, 0x22, 0x23, 0x27, 0x28 },
.tx_rate_limits_extreme = {
0x19, 0x1c, 0x1e, 0x20, 0x24, 0x25 },
.tx_channel_limits_11b = {
0x22, 0x50, 0x50, 0x50, 0x50, 0x50,
0x50, 0x50, 0x50, 0x50, 0x22, 0x50,
Expand All @@ -306,6 +308,8 @@ static struct conf_drv_settings default_conf = {
.tx_ibias = {
0x11, 0x11, 0x15, 0x11, 0x15, 0x0f },
.rx_fem_insertion_loss = 0x0e,
.degraded_low_to_normal_threshold = 0x1e,
.degraded_normal_to_high_threshold = 0x2d,
.tx_ref_pd_voltage_5 = {
0x0190, 0x01a4, 0x01c3, 0x01d8,
0x020a, 0x021c },
Expand All @@ -317,6 +321,8 @@ static struct conf_drv_settings default_conf = {
0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
.tx_rate_limits_degraded_5 = {
0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
.tx_rate_limits_extreme_5 = {
0x1b, 0x1e, 0x21, 0x23, 0x27, 0x00 },
.tx_channel_limits_ofdm_5 = {
0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50,
Expand All @@ -328,7 +334,9 @@ static struct conf_drv_settings default_conf = {
.tx_ibias_5 = {
0x10, 0x10, 0x10, 0x10, 0x10, 0x10 },
.rx_fem_insertion_loss_5 = {
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 },
.degraded_low_to_normal_threshold_5 = 0x00,
.degraded_normal_to_high_threshold_5 = 0x00
}
}
};
Expand Down

0 comments on commit cf18be4

Please sign in to comment.