aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDor Shaish <dor.shaish@intel.com>2013-02-27 06:01:09 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-04 07:36:55 -0500
commitde8bc6dd2d52cacaa76ea381ffdc00919b100a2c (patch)
treed4b5fd41cd3c2059c88061ca314a3070416119ac /drivers/net
parent6221d47cf7a57eb1e2b5b51c65e2edcde369a0d4 (diff)
iwlwifi: mvm: Remove overriding calibrations for the 7000 family
This fix removes the override of calibration request values sent to the FW. Due to that, the sending of default values to now implemented calibrations is removed. Signed-off-by: Dor Shaish <dor.shaish@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
index d3c067e670a8..500f818dba04 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
@@ -79,17 +79,8 @@
79#define UCODE_VALID_OK cpu_to_le32(0x1) 79#define UCODE_VALID_OK cpu_to_le32(0x1)
80 80
81/* Default calibration values for WkP - set to INIT image w/o running */ 81/* Default calibration values for WkP - set to INIT image w/o running */
82static const u8 wkp_calib_values_bb_filter[] = { 0xbf, 0x00, 0x5f, 0x00, 0x2f,
83 0x00, 0x18, 0x00 };
84static const u8 wkp_calib_values_rx_dc[] = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
85 0x7f, 0x7f, 0x7f };
86static const u8 wkp_calib_values_tx_lo[] = { 0x00, 0x00, 0x00, 0x00 };
87static const u8 wkp_calib_values_tx_iq[] = { 0xff, 0x00, 0xff, 0x00, 0x00,
88 0x00 };
89static const u8 wkp_calib_values_rx_iq[] = { 0xff, 0x00, 0x00, 0x00 };
90static const u8 wkp_calib_values_rx_iq_skew[] = { 0x00, 0x00, 0x01, 0x00 }; 82static const u8 wkp_calib_values_rx_iq_skew[] = { 0x00, 0x00, 0x01, 0x00 };
91static const u8 wkp_calib_values_tx_iq_skew[] = { 0x01, 0x00, 0x00, 0x00 }; 83static const u8 wkp_calib_values_tx_iq_skew[] = { 0x01, 0x00, 0x00, 0x00 };
92static const u8 wkp_calib_values_xtal[] = { 0xd2, 0xd2 };
93 84
94struct iwl_calib_default_data { 85struct iwl_calib_default_data {
95 u16 size; 86 u16 size;
@@ -99,12 +90,7 @@ struct iwl_calib_default_data {
99#define CALIB_SIZE_N_DATA(_buf) {.size = sizeof(_buf), .data = &_buf} 90#define CALIB_SIZE_N_DATA(_buf) {.size = sizeof(_buf), .data = &_buf}
100 91
101static const struct iwl_calib_default_data wkp_calib_default_data[12] = { 92static const struct iwl_calib_default_data wkp_calib_default_data[12] = {
102 [5] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_dc),
103 [6] = CALIB_SIZE_N_DATA(wkp_calib_values_bb_filter),
104 [7] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_lo),
105 [8] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_iq),
106 [9] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_iq_skew), 93 [9] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_iq_skew),
107 [10] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_iq),
108 [11] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_iq_skew), 94 [11] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_iq_skew),
109}; 95};
110 96
@@ -261,103 +247,6 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
261 sizeof(phy_cfg_cmd), &phy_cfg_cmd); 247 sizeof(phy_cfg_cmd), &phy_cfg_cmd);
262} 248}
263 249
264/* Starting with the new PHY DB implementation - New calibs are enabled */
265/* Value - 0x405e7 */
266#define IWL_CALIB_DEFAULT_FLOW_INIT (IWL_CALIB_CFG_XTAL_IDX |\
267 IWL_CALIB_CFG_TEMPERATURE_IDX |\
268 IWL_CALIB_CFG_VOLTAGE_READ_IDX |\
269 IWL_CALIB_CFG_DC_IDX |\
270 IWL_CALIB_CFG_BB_FILTER_IDX |\
271 IWL_CALIB_CFG_LO_LEAKAGE_IDX |\
272 IWL_CALIB_CFG_TX_IQ_IDX |\
273 IWL_CALIB_CFG_RX_IQ_IDX |\
274 IWL_CALIB_CFG_AGC_IDX)
275
276#define IWL_CALIB_DEFAULT_EVENT_INIT 0x0
277
278/* Value 0x41567 */
279#define IWL_CALIB_DEFAULT_FLOW_RUN (IWL_CALIB_CFG_XTAL_IDX |\
280 IWL_CALIB_CFG_TEMPERATURE_IDX |\
281 IWL_CALIB_CFG_VOLTAGE_READ_IDX |\
282 IWL_CALIB_CFG_BB_FILTER_IDX |\
283 IWL_CALIB_CFG_DC_IDX |\
284 IWL_CALIB_CFG_TX_IQ_IDX |\
285 IWL_CALIB_CFG_RX_IQ_IDX |\
286 IWL_CALIB_CFG_SENSITIVITY_IDX |\
287 IWL_CALIB_CFG_AGC_IDX)
288
289#define IWL_CALIB_DEFAULT_EVENT_RUN (IWL_CALIB_CFG_XTAL_IDX |\
290 IWL_CALIB_CFG_TEMPERATURE_IDX |\
291 IWL_CALIB_CFG_VOLTAGE_READ_IDX |\
292 IWL_CALIB_CFG_TX_PWR_IDX |\
293 IWL_CALIB_CFG_DC_IDX |\
294 IWL_CALIB_CFG_TX_IQ_IDX |\
295 IWL_CALIB_CFG_SENSITIVITY_IDX)
296
297/*
298 * Sets the calibrations trigger values that will be sent to the FW for runtime
299 * and init calibrations.
300 * The ones given in the FW TLV are not correct.
301 */
302static void iwl_set_default_calib_trigger(struct iwl_mvm *mvm)
303{
304 struct iwl_tlv_calib_ctrl default_calib;
305
306 /*
307 * WkP FW TLV calib bits are wrong, overwrite them.
308 * This defines the dynamic calibrations which are implemented in the
309 * uCode both for init(flow) calculation and event driven calibs.
310 */
311
312 /* Init Image */
313 default_calib.event_trigger = cpu_to_le32(IWL_CALIB_DEFAULT_EVENT_INIT);
314 default_calib.flow_trigger = cpu_to_le32(IWL_CALIB_DEFAULT_FLOW_INIT);
315
316 if (default_calib.event_trigger !=
317 mvm->fw->default_calib[IWL_UCODE_INIT].event_trigger)
318 IWL_ERR(mvm,
319 "Updating the event calib for INIT image: 0x%x -> 0x%x\n",
320 mvm->fw->default_calib[IWL_UCODE_INIT].event_trigger,
321 default_calib.event_trigger);
322 if (default_calib.flow_trigger !=
323 mvm->fw->default_calib[IWL_UCODE_INIT].flow_trigger)
324 IWL_ERR(mvm,
325 "Updating the flow calib for INIT image: 0x%x -> 0x%x\n",
326 mvm->fw->default_calib[IWL_UCODE_INIT].flow_trigger,
327 default_calib.flow_trigger);
328
329 memcpy((void *)&mvm->fw->default_calib[IWL_UCODE_INIT],
330 &default_calib, sizeof(struct iwl_tlv_calib_ctrl));
331 IWL_ERR(mvm,
332 "Setting uCode init calibrations event 0x%x, trigger 0x%x\n",
333 default_calib.event_trigger,
334 default_calib.flow_trigger);
335
336 /* Run time image */
337 default_calib.event_trigger = cpu_to_le32(IWL_CALIB_DEFAULT_EVENT_RUN);
338 default_calib.flow_trigger = cpu_to_le32(IWL_CALIB_DEFAULT_FLOW_RUN);
339
340 if (default_calib.event_trigger !=
341 mvm->fw->default_calib[IWL_UCODE_REGULAR].event_trigger)
342 IWL_ERR(mvm,
343 "Updating the event calib for RT image: 0x%x -> 0x%x\n",
344 mvm->fw->default_calib[IWL_UCODE_REGULAR].event_trigger,
345 default_calib.event_trigger);
346 if (default_calib.flow_trigger !=
347 mvm->fw->default_calib[IWL_UCODE_REGULAR].flow_trigger)
348 IWL_ERR(mvm,
349 "Updating the flow calib for RT image: 0x%x -> 0x%x\n",
350 mvm->fw->default_calib[IWL_UCODE_REGULAR].flow_trigger,
351 default_calib.flow_trigger);
352
353 memcpy((void *)&mvm->fw->default_calib[IWL_UCODE_REGULAR],
354 &default_calib, sizeof(struct iwl_tlv_calib_ctrl));
355 IWL_ERR(mvm,
356 "Setting uCode runtime calibs event 0x%x, trigger 0x%x\n",
357 default_calib.event_trigger,
358 default_calib.flow_trigger);
359}
360
361static int iwl_set_default_calibrations(struct iwl_mvm *mvm) 250static int iwl_set_default_calibrations(struct iwl_mvm *mvm)
362{ 251{
363 u8 cmd_raw[16]; /* holds the variable size commands */ 252 u8 cmd_raw[16]; /* holds the variable size commands */
@@ -437,9 +326,6 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)
437 if (ret) 326 if (ret)
438 goto error; 327 goto error;
439 328
440 /* Override the calibrations from TLV and the const of fw */
441 iwl_set_default_calib_trigger(mvm);
442
443 /* WkP doesn't have all calibrations, need to set default values */ 329 /* WkP doesn't have all calibrations, need to set default values */
444 if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_7000) { 330 if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
445 ret = iwl_set_default_calibrations(mvm); 331 ret = iwl_set_default_calibrations(mvm);