diff options
author | Don Fry <donald.h.fry@intel.com> | 2012-03-20 13:33:34 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-16 17:35:10 -0400 |
commit | 8a8bbdb4de0085b1e89eae33753c80299ab88ff6 (patch) | |
tree | 981b12fdbba4f48508e37e21a24a7298825b8c53 /drivers/net/wireless/iwlwifi | |
parent | dec63ce62b1567344a6da759fd13a7c72bab08ea (diff) |
iwlwifi: complete STATUS_READY refactoring
When WiMax takes over the RF, inform the op_mode.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-op-mode.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 7 |
3 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 427f63c4fe3d..a88130fb5520 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2250,6 +2250,14 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode) | |||
2250 | priv->lib->nic_config(priv); | 2250 | priv->lib->nic_config(priv); |
2251 | } | 2251 | } |
2252 | 2252 | ||
2253 | static void iwl_wimax_active(struct iwl_op_mode *op_mode) | ||
2254 | { | ||
2255 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | ||
2256 | |||
2257 | clear_bit(STATUS_READY, &priv->status); | ||
2258 | IWL_ERR(priv, "RF is used by WiMAX\n"); | ||
2259 | } | ||
2260 | |||
2253 | static void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, int queue) | 2261 | static void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, int queue) |
2254 | { | 2262 | { |
2255 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | 2263 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); |
@@ -2341,6 +2349,7 @@ const struct iwl_op_mode_ops iwl_dvm_ops = { | |||
2341 | .nic_error = iwl_nic_error, | 2349 | .nic_error = iwl_nic_error, |
2342 | .cmd_queue_full = iwl_cmd_queue_full, | 2350 | .cmd_queue_full = iwl_cmd_queue_full, |
2343 | .nic_config = iwl_nic_config, | 2351 | .nic_config = iwl_nic_config, |
2352 | .wimax_active = iwl_wimax_active, | ||
2344 | }; | 2353 | }; |
2345 | 2354 | ||
2346 | /***************************************************************************** | 2355 | /***************************************************************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h index b1fd251e88d5..ca947aebb727 100644 --- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h | |||
@@ -125,6 +125,7 @@ struct iwl_fw; | |||
125 | * @cmd_queue_full: Called when the command queue gets full. Must be atomic. | 125 | * @cmd_queue_full: Called when the command queue gets full. Must be atomic. |
126 | * @nic_config: configure NIC, called before firmware is started. | 126 | * @nic_config: configure NIC, called before firmware is started. |
127 | * May sleep | 127 | * May sleep |
128 | * @wimax_active: invoked when WiMax becomes active. Must be atomic. | ||
128 | */ | 129 | */ |
129 | struct iwl_op_mode_ops { | 130 | struct iwl_op_mode_ops { |
130 | struct iwl_op_mode *(*start)(struct iwl_trans *trans, | 131 | struct iwl_op_mode *(*start)(struct iwl_trans *trans, |
@@ -139,6 +140,7 @@ struct iwl_op_mode_ops { | |||
139 | void (*nic_error)(struct iwl_op_mode *op_mode); | 140 | void (*nic_error)(struct iwl_op_mode *op_mode); |
140 | void (*cmd_queue_full)(struct iwl_op_mode *op_mode); | 141 | void (*cmd_queue_full)(struct iwl_op_mode *op_mode); |
141 | void (*nic_config)(struct iwl_op_mode *op_mode); | 142 | void (*nic_config)(struct iwl_op_mode *op_mode); |
143 | void (*wimax_active)(struct iwl_op_mode *op_mode); | ||
142 | }; | 144 | }; |
143 | 145 | ||
144 | /** | 146 | /** |
@@ -209,6 +211,11 @@ static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode) | |||
209 | op_mode->ops->nic_config(op_mode); | 211 | op_mode->ops->nic_config(op_mode); |
210 | } | 212 | } |
211 | 213 | ||
214 | static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode) | ||
215 | { | ||
216 | op_mode->ops->wimax_active(op_mode); | ||
217 | } | ||
218 | |||
212 | /***************************************************** | 219 | /***************************************************** |
213 | * Op mode layers implementations | 220 | * Op mode layers implementations |
214 | ******************************************************/ | 221 | ******************************************************/ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c index b35f12056caa..e1af031fccdd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | |||
@@ -547,14 +547,9 @@ static void iwl_irq_handle_error(struct iwl_trans *trans) | |||
547 | APMS_CLK_VAL_MRB_FUNC_MODE) || | 547 | APMS_CLK_VAL_MRB_FUNC_MODE) || |
548 | (iwl_read_prph(trans, APMG_PS_CTRL_REG) & | 548 | (iwl_read_prph(trans, APMG_PS_CTRL_REG) & |
549 | APMG_PS_CTRL_VAL_RESET_REQ))) { | 549 | APMG_PS_CTRL_VAL_RESET_REQ))) { |
550 | /* | ||
551 | * Keep the restart process from trying to send host | ||
552 | * commands by clearing the ready bit. | ||
553 | */ | ||
554 | clear_bit(STATUS_READY, &trans->shrd->status); | ||
555 | clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status); | 550 | clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status); |
551 | iwl_op_mode_wimax_active(trans->op_mode); | ||
556 | wake_up(&trans->wait_command_queue); | 552 | wake_up(&trans->wait_command_queue); |
557 | IWL_ERR(trans, "RF is used by WiMAX\n"); | ||
558 | return; | 553 | return; |
559 | } | 554 | } |
560 | 555 | ||