aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-22 13:15:23 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-04-22 13:18:48 -0400
commitca7966c88e44233fac113579071a6f55e00ef5ac (patch)
treec80674f6237d48ea56b677bc6b409c54afeb9f08 /drivers/net/wireless/iwlwifi/iwl-rx.c
parente74fe2330a5a721610b2b69652d2ec2ebbd302e0 (diff)
iwlagn: implement synchronous firmware load
The current firmware loading mechanism in iwlwifi is very hard to follow, and thus hard to maintain. To make it easier, make the firmware loading synchronous. For now, as a side effect, this removes a number of retry possibilities we had. It isn't typical for this to fail, but if it does happen we restart from scratch which this also makes easier to do should it be necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index b49819ca2cd6..aca9a1d40080 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -225,55 +225,6 @@ err_bd:
225 * 225 *
226 ******************************************************************************/ 226 ******************************************************************************/
227 227
228static void iwl_rx_reply_alive(struct iwl_priv *priv,
229 struct iwl_rx_mem_buffer *rxb)
230{
231 struct iwl_rx_packet *pkt = rxb_addr(rxb);
232 struct iwl_alive_resp *palive;
233 struct delayed_work *pwork;
234
235 palive = &pkt->u.alive_frame;
236
237 IWL_DEBUG_INFO(priv, "Alive ucode status 0x%08X revision "
238 "0x%01X 0x%01X\n",
239 palive->is_valid, palive->ver_type,
240 palive->ver_subtype);
241
242 priv->device_pointers.log_event_table =
243 le32_to_cpu(palive->log_event_table_ptr);
244 priv->device_pointers.error_event_table =
245 le32_to_cpu(palive->error_event_table_ptr);
246
247 if (palive->ver_subtype == INITIALIZE_SUBTYPE) {
248 IWL_DEBUG_INFO(priv, "Initialization Alive received.\n");
249 pwork = &priv->init_alive_start;
250 } else {
251 IWL_DEBUG_INFO(priv, "Runtime Alive received.\n");
252 pwork = &priv->alive_start;
253 }
254
255 /* We delay the ALIVE response by 5ms to
256 * give the HW RF Kill time to activate... */
257 if (palive->is_valid == UCODE_VALID_OK)
258 queue_delayed_work(priv->workqueue, pwork,
259 msecs_to_jiffies(5));
260 else {
261 IWL_WARN(priv, "%s uCode did not respond OK.\n",
262 (palive->ver_subtype == INITIALIZE_SUBTYPE) ?
263 "init" : "runtime");
264 /*
265 * If fail to load init uCode,
266 * let's try to load the init uCode again.
267 * We should not get into this situation, but if it
268 * does happen, we should not move on and loading "runtime"
269 * without proper calibrate the device.
270 */
271 if (palive->ver_subtype == INITIALIZE_SUBTYPE)
272 priv->ucode_type = UCODE_NONE;
273 queue_work(priv->workqueue, &priv->restart);
274 }
275}
276
277static void iwl_rx_reply_error(struct iwl_priv *priv, 228static void iwl_rx_reply_error(struct iwl_priv *priv,
278 struct iwl_rx_mem_buffer *rxb) 229 struct iwl_rx_mem_buffer *rxb)
279{ 230{
@@ -1125,7 +1076,6 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv)
1125 1076
1126 handlers = priv->rx_handlers; 1077 handlers = priv->rx_handlers;
1127 1078
1128 handlers[REPLY_ALIVE] = iwl_rx_reply_alive;
1129 handlers[REPLY_ERROR] = iwl_rx_reply_error; 1079 handlers[REPLY_ERROR] = iwl_rx_reply_error;
1130 handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa; 1080 handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
1131 handlers[SPECTRUM_MEASURE_NOTIFICATION] = iwl_rx_spectrum_measure_notif; 1081 handlers[SPECTRUM_MEASURE_NOTIFICATION] = iwl_rx_spectrum_measure_notif;