aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-10-25 17:08:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-11-05 10:12:25 -0500
commitadca1235cccacee91beb640a044e51b1c457b1ea (patch)
tree948ae97e253d7c13a8bd337da29d65333b7b4d25 /drivers/net/wireless/iwlwifi/iwl-trans.h
parente2b1930e6fd9aaa72cc44519b257ae71a1c2e29f (diff)
iwlwifi: check the SCD conf from ALIVE response
The ALIVE response of new fw inclues the base address of the SCD in SRAM. Until we read it from a prph register, which was set by the fw. Since the fw might well stop updating the prph register, add a WARN when there is an inconsitency between the ALIVE response and the register to catch any change in the behavior. Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index b065d48de464..e378ea6dca9c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -355,7 +355,8 @@ struct iwl_trans;
355 * @start_fw: allocates and inits all the resources for the transport 355 * @start_fw: allocates and inits all the resources for the transport
356 * layer. Also kick a fw image. 356 * layer. Also kick a fw image.
357 * May sleep 357 * May sleep
358 * @fw_alive: called when the fw sends alive notification 358 * @fw_alive: called when the fw sends alive notification. If the fw provides
359 * the SCD base address in SRAM, then provide it here, or 0 otherwise.
359 * May sleep 360 * May sleep
360 * @stop_device:stops the whole device (embedded CPU put to reset) 361 * @stop_device:stops the whole device (embedded CPU put to reset)
361 * May sleep 362 * May sleep
@@ -394,7 +395,7 @@ struct iwl_trans_ops {
394 int (*start_hw)(struct iwl_trans *iwl_trans); 395 int (*start_hw)(struct iwl_trans *iwl_trans);
395 void (*stop_hw)(struct iwl_trans *iwl_trans, bool op_mode_leaving); 396 void (*stop_hw)(struct iwl_trans *iwl_trans, bool op_mode_leaving);
396 int (*start_fw)(struct iwl_trans *trans, const struct fw_img *fw); 397 int (*start_fw)(struct iwl_trans *trans, const struct fw_img *fw);
397 void (*fw_alive)(struct iwl_trans *trans); 398 void (*fw_alive)(struct iwl_trans *trans, u32 scd_addr);
398 void (*stop_device)(struct iwl_trans *trans); 399 void (*stop_device)(struct iwl_trans *trans);
399 400
400 void (*wowlan_suspend)(struct iwl_trans *trans); 401 void (*wowlan_suspend)(struct iwl_trans *trans);
@@ -514,13 +515,13 @@ static inline void iwl_trans_stop_hw(struct iwl_trans *trans,
514 trans->state = IWL_TRANS_NO_FW; 515 trans->state = IWL_TRANS_NO_FW;
515} 516}
516 517
517static inline void iwl_trans_fw_alive(struct iwl_trans *trans) 518static inline void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
518{ 519{
519 might_sleep(); 520 might_sleep();
520 521
521 trans->state = IWL_TRANS_FW_ALIVE; 522 trans->state = IWL_TRANS_FW_ALIVE;
522 523
523 trans->ops->fw_alive(trans); 524 trans->ops->fw_alive(trans, scd_addr);
524} 525}
525 526
526static inline int iwl_trans_start_fw(struct iwl_trans *trans, 527static inline int iwl_trans_start_fw(struct iwl_trans *trans,