diff options
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/fw.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/fw.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/fw.c b/drivers/net/wireless/iwmc3200wifi/fw.c index ec1a15a5a0e4..0f32cab9ced4 100644 --- a/drivers/net/wireless/iwmc3200wifi/fw.c +++ b/drivers/net/wireless/iwmc3200wifi/fw.c | |||
@@ -275,6 +275,7 @@ static int iwm_load_lmac(struct iwm_priv *iwm, const char *img_name) | |||
275 | */ | 275 | */ |
276 | int iwm_load_fw(struct iwm_priv *iwm) | 276 | int iwm_load_fw(struct iwm_priv *iwm) |
277 | { | 277 | { |
278 | unsigned long init_calib_map, periodic_calib_map; | ||
278 | int ret; | 279 | int ret; |
279 | 280 | ||
280 | /* We first start downloading the UMAC */ | 281 | /* We first start downloading the UMAC */ |
@@ -315,23 +316,19 @@ int iwm_load_fw(struct iwm_priv *iwm) | |||
315 | return ret; | 316 | return ret; |
316 | } | 317 | } |
317 | 318 | ||
318 | #ifdef CONFIG_IWM_B0_HW_SUPPORT | 319 | init_calib_map = iwm->conf.calib_map & IWM_CALIB_MAP_INIT_MSK; |
319 | if (iwm->conf.hw_b0) { | 320 | periodic_calib_map = IWM_CALIB_MAP_PER_LMAC(iwm->conf.calib_map); |
320 | clear_bit(PHY_CALIBRATE_RX_IQ_CMD, &iwm->conf.init_calib_map); | 321 | |
321 | clear_bit(PHY_CALIBRATE_RX_IQ_CMD, | ||
322 | &iwm->conf.periodic_calib_map); | ||
323 | } | ||
324 | #endif | ||
325 | /* Read RX IQ calibration result from EEPROM */ | 322 | /* Read RX IQ calibration result from EEPROM */ |
326 | if (test_bit(PHY_CALIBRATE_RX_IQ_CMD, &iwm->conf.init_calib_map)) { | 323 | if (test_bit(PHY_CALIBRATE_RX_IQ_CMD, &init_calib_map)) { |
327 | iwm_store_rxiq_calib_result(iwm); | 324 | iwm_store_rxiq_calib_result(iwm); |
328 | set_bit(PHY_CALIBRATE_RX_IQ_CMD, &iwm->calib_done_map); | 325 | set_bit(PHY_CALIBRATE_RX_IQ_CMD, &iwm->calib_done_map); |
329 | } | 326 | } |
330 | 327 | ||
331 | iwm_send_prio_table(iwm); | 328 | iwm_send_prio_table(iwm); |
332 | iwm_send_init_calib_cfg(iwm, iwm->conf.init_calib_map); | 329 | iwm_send_init_calib_cfg(iwm, init_calib_map); |
333 | 330 | ||
334 | while (iwm->calib_done_map != iwm->conf.init_calib_map) { | 331 | while (iwm->calib_done_map != init_calib_map) { |
335 | ret = iwm_notif_handle(iwm, CALIBRATION_RES_NOTIFICATION, | 332 | ret = iwm_notif_handle(iwm, CALIBRATION_RES_NOTIFICATION, |
336 | IWM_SRC_LMAC, WAIT_NOTIF_TIMEOUT); | 333 | IWM_SRC_LMAC, WAIT_NOTIF_TIMEOUT); |
337 | if (ret) { | 334 | if (ret) { |
@@ -340,7 +337,7 @@ int iwm_load_fw(struct iwm_priv *iwm) | |||
340 | } | 337 | } |
341 | IWM_DBG_FW(iwm, DBG, "Got calibration result. calib_done_map: " | 338 | IWM_DBG_FW(iwm, DBG, "Got calibration result. calib_done_map: " |
342 | "0x%lx, requested calibrations: 0x%lx\n", | 339 | "0x%lx, requested calibrations: 0x%lx\n", |
343 | iwm->calib_done_map, iwm->conf.init_calib_map); | 340 | iwm->calib_done_map, init_calib_map); |
344 | } | 341 | } |
345 | 342 | ||
346 | /* Handle LMAC CALIBRATION_COMPLETE notification */ | 343 | /* Handle LMAC CALIBRATION_COMPLETE notification */ |
@@ -378,7 +375,7 @@ int iwm_load_fw(struct iwm_priv *iwm) | |||
378 | 375 | ||
379 | iwm_send_prio_table(iwm); | 376 | iwm_send_prio_table(iwm); |
380 | iwm_send_calib_results(iwm); | 377 | iwm_send_calib_results(iwm); |
381 | iwm_send_periodic_calib_cfg(iwm, iwm->conf.periodic_calib_map); | 378 | iwm_send_periodic_calib_cfg(iwm, periodic_calib_map); |
382 | 379 | ||
383 | return 0; | 380 | return 0; |
384 | 381 | ||