diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2009-12-11 08:40:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:31:29 -0500 |
commit | 76c0f8d396bd306111d349cfe770e1c4fcf70248 (patch) | |
tree | a675cc99b67a747ded6498ebd29c7b0e364f477b /drivers | |
parent | 937a67e75a93b63f0b5d33612901906b8eb2a688 (diff) |
wl1271: updated general parameters structure for newer firmwares
In revision 6.1.0.0.288 the general parameters structure has changed. This
patch updates the driver code accordingly.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.h | 15 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 17 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 13 |
4 files changed, 65 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 886a9bc39cc1..fe9b187f476e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -209,6 +209,26 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) | |||
209 | gen_parms->tx_bip_fem_manufacturer = g->tx_bip_fem_manufacturer; | 209 | gen_parms->tx_bip_fem_manufacturer = g->tx_bip_fem_manufacturer; |
210 | gen_parms->settings = g->settings; | 210 | gen_parms->settings = g->settings; |
211 | 211 | ||
212 | gen_parms->sr_state = g->sr_state; | ||
213 | |||
214 | memcpy(gen_parms->srf1, | ||
215 | g->srf1, | ||
216 | CONF_MAX_SMART_REFLEX_PARAMS); | ||
217 | memcpy(gen_parms->srf2, | ||
218 | g->srf2, | ||
219 | CONF_MAX_SMART_REFLEX_PARAMS); | ||
220 | memcpy(gen_parms->srf3, | ||
221 | g->srf3, | ||
222 | CONF_MAX_SMART_REFLEX_PARAMS); | ||
223 | memcpy(gen_parms->sr_debug_table, | ||
224 | g->sr_debug_table, | ||
225 | CONF_MAX_SMART_REFLEX_PARAMS); | ||
226 | |||
227 | gen_parms->sr_sen_n_p = g->sr_sen_n_p; | ||
228 | gen_parms->sr_sen_n_p_gain = g->sr_sen_n_p_gain; | ||
229 | gen_parms->sr_sen_nrn = g->sr_sen_nrn; | ||
230 | gen_parms->sr_sen_prn = g->sr_sen_prn; | ||
231 | |||
212 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0); | 232 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0); |
213 | if (ret < 0) | 233 | if (ret < 0) |
214 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); | 234 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); |
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h index de23c08738a0..057f925db2aa 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h | |||
@@ -437,6 +437,21 @@ struct wl1271_general_parms_cmd { | |||
437 | u8 tx_bip_fem_autodetect; | 437 | u8 tx_bip_fem_autodetect; |
438 | u8 tx_bip_fem_manufacturer; | 438 | u8 tx_bip_fem_manufacturer; |
439 | u8 settings; | 439 | u8 settings; |
440 | |||
441 | u8 sr_state; | ||
442 | |||
443 | s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
444 | s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
445 | s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
446 | |||
447 | s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
448 | |||
449 | u8 sr_sen_n_p; | ||
450 | u8 sr_sen_n_p_gain; | ||
451 | u8 sr_sen_nrn; | ||
452 | u8 sr_sen_prn; | ||
453 | |||
454 | u8 padding[3]; | ||
440 | } __attribute__ ((packed)); | 455 | } __attribute__ ((packed)); |
441 | 456 | ||
442 | struct wl1271_radio_parms_cmd { | 457 | struct wl1271_radio_parms_cmd { |
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index 565373ede265..5e36cd90d0c6 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -759,6 +759,9 @@ enum single_dual_band_enum { | |||
759 | CONF_DUAL_BAND | 759 | CONF_DUAL_BAND |
760 | }; | 760 | }; |
761 | 761 | ||
762 | |||
763 | #define CONF_MAX_SMART_REFLEX_PARAMS 16 | ||
764 | |||
762 | struct conf_general_parms { | 765 | struct conf_general_parms { |
763 | /* | 766 | /* |
764 | * RF Reference Clock type / speed | 767 | * RF Reference Clock type / speed |
@@ -815,6 +818,20 @@ struct conf_general_parms { | |||
815 | * Range: Unknown | 818 | * Range: Unknown |
816 | */ | 819 | */ |
817 | u8 settings; | 820 | u8 settings; |
821 | |||
822 | /* Smart reflex settings */ | ||
823 | u8 sr_state; | ||
824 | |||
825 | s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
826 | s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
827 | s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
828 | |||
829 | s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS]; | ||
830 | |||
831 | u8 sr_sen_n_p; | ||
832 | u8 sr_sen_n_p_gain; | ||
833 | u8 sr_sen_nrn; | ||
834 | u8 sr_sen_prn; | ||
818 | }; | 835 | }; |
819 | 836 | ||
820 | #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15 | 837 | #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15 |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index b62c00ff42fe..7ab45c446ab8 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -259,6 +259,19 @@ static struct conf_drv_settings default_conf = { | |||
259 | .tx_bip_fem_autodetect = 0, | 259 | .tx_bip_fem_autodetect = 0, |
260 | .tx_bip_fem_manufacturer = 1, | 260 | .tx_bip_fem_manufacturer = 1, |
261 | .settings = 1, | 261 | .settings = 1, |
262 | .sr_state = 1, | ||
263 | .srf1 = { 0, 0, 0, 0, 0, 0, 0, 0, | ||
264 | 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
265 | .srf2 = { 0, 0, 0, 0, 0, 0, 0, 0, | ||
266 | 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
267 | .srf3 = { 0, 0, 0, 0, 0, 0, 0, 0, | ||
268 | 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
269 | .sr_debug_table = { 0, 0, 0, 0, 0, 0, 0, 0, | ||
270 | 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
271 | .sr_sen_n_p = 0, | ||
272 | .sr_sen_n_p_gain = 0, | ||
273 | .sr_sen_nrn = 0, | ||
274 | .sr_sen_prn = 0, | ||
262 | }, | 275 | }, |
263 | .radioparam = { | 276 | .radioparam = { |
264 | .rx_trace_loss = 10, | 277 | .rx_trace_loss = 10, |