diff options
author | Luciano Coelho <luciano.coelho@nokia.com> | 2010-07-08 10:50:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-08 16:35:51 -0400 |
commit | e6b190ff3c2f4e4859502c41fa17b5c595e82000 (patch) | |
tree | 67643e4697d1407aab21abc7e0ff7886695d10c5 /drivers/net/wireless/wl12xx | |
parent | 90494a90bea010af47547880634e0f1c52824a7d (diff) |
wl1271: read fem manufacturer value from nvs
We should read the fem manufacturer value from the NVS, so we can modify it
easily and use a consistent value throughout the configuration. Previously
we had to set the FEM value in the NVS and in the driver's initialization
parameters. This patch removes the latter.
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')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 5 |
3 files changed, 3 insertions, 17 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 834f7f8e9c7a..23c75988f082 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -132,7 +132,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl) | |||
132 | int wl1271_cmd_radio_parms(struct wl1271 *wl) | 132 | int wl1271_cmd_radio_parms(struct wl1271 *wl) |
133 | { | 133 | { |
134 | struct wl1271_radio_parms_cmd *radio_parms; | 134 | struct wl1271_radio_parms_cmd *radio_parms; |
135 | struct conf_radio_parms *rparam = &wl->conf.init.radioparam; | 135 | struct wl1271_ini_general_params *gp = &wl->nvs->general_params; |
136 | int ret; | 136 | int ret; |
137 | 137 | ||
138 | if (!wl->nvs) | 138 | if (!wl->nvs) |
@@ -148,7 +148,7 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) | |||
148 | memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2, | 148 | memcpy(&radio_parms->static_params_2, &wl->nvs->stat_radio_params_2, |
149 | sizeof(struct wl1271_ini_band_params_2)); | 149 | sizeof(struct wl1271_ini_band_params_2)); |
150 | memcpy(&radio_parms->dyn_params_2, | 150 | memcpy(&radio_parms->dyn_params_2, |
151 | &wl->nvs->dyn_radio_params_2[rparam->fem].params, | 151 | &wl->nvs->dyn_radio_params_2[gp->tx_bip_fem_manufacturer].params, |
152 | sizeof(struct wl1271_ini_fem_params_2)); | 152 | sizeof(struct wl1271_ini_fem_params_2)); |
153 | 153 | ||
154 | /* 5GHz parameters */ | 154 | /* 5GHz parameters */ |
@@ -156,7 +156,7 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) | |||
156 | &wl->nvs->stat_radio_params_5, | 156 | &wl->nvs->stat_radio_params_5, |
157 | sizeof(struct wl1271_ini_band_params_5)); | 157 | sizeof(struct wl1271_ini_band_params_5)); |
158 | memcpy(&radio_parms->dyn_params_5, | 158 | memcpy(&radio_parms->dyn_params_5, |
159 | &wl->nvs->dyn_radio_params_5[rparam->fem].params, | 159 | &wl->nvs->dyn_radio_params_5[gp->tx_bip_fem_manufacturer].params, |
160 | sizeof(struct wl1271_ini_fem_params_5)); | 160 | sizeof(struct wl1271_ini_fem_params_5)); |
161 | 161 | ||
162 | wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ", | 162 | wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ", |
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index 84b0de7f4bc6..0435ffda8f73 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -955,14 +955,6 @@ struct conf_radio_parms { | |||
955 | u8 fem; | 955 | u8 fem; |
956 | }; | 956 | }; |
957 | 957 | ||
958 | struct conf_init_settings { | ||
959 | /* | ||
960 | * Configure radio parameters. | ||
961 | */ | ||
962 | struct conf_radio_parms radioparam; | ||
963 | |||
964 | }; | ||
965 | |||
966 | struct conf_itrim_settings { | 958 | struct conf_itrim_settings { |
967 | /* enable dco itrim */ | 959 | /* enable dco itrim */ |
968 | u8 enable; | 960 | u8 enable; |
@@ -1029,7 +1021,6 @@ struct conf_drv_settings { | |||
1029 | struct conf_rx_settings rx; | 1021 | struct conf_rx_settings rx; |
1030 | struct conf_tx_settings tx; | 1022 | struct conf_tx_settings tx; |
1031 | struct conf_conn_settings conn; | 1023 | struct conf_conn_settings conn; |
1032 | struct conf_init_settings init; | ||
1033 | struct conf_itrim_settings itrim; | 1024 | struct conf_itrim_settings itrim; |
1034 | struct conf_pm_config_settings pm_config; | 1025 | struct conf_pm_config_settings pm_config; |
1035 | struct conf_roam_trigger_settings roam_trigger; | 1026 | struct conf_roam_trigger_settings roam_trigger; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 8a4b17f74dbc..3a648963fbed 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -241,11 +241,6 @@ static struct conf_drv_settings default_conf = { | |||
241 | .keep_alive_interval = 55000, | 241 | .keep_alive_interval = 55000, |
242 | .max_listen_interval = 20, | 242 | .max_listen_interval = 20, |
243 | }, | 243 | }, |
244 | .init = { | ||
245 | .radioparam = { | ||
246 | .fem = 1, | ||
247 | } | ||
248 | }, | ||
249 | .itrim = { | 244 | .itrim = { |
250 | .enable = false, | 245 | .enable = false, |
251 | .timeout = 50000, | 246 | .timeout = 50000, |