Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247131
b: refs/heads/master
c: e74fe23
h: refs/heads/master
i:
  247129: 728e845
  247127: 0a719c1
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Apr 22, 2011
1 parent 1178dcd commit 8a6b2f1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8674a1efca60d863d4caa47e102cc4d70d5ff9b
refs/heads/master: e74fe2330a5a721610b2b69652d2ec2ebbd302e0
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,6 +2266,7 @@ void iwlagn_init_notification_wait(struct iwl_priv *priv,
wait_entry->fn_data = fn_data;
wait_entry->cmd = cmd;
wait_entry->triggered = false;
wait_entry->aborted = false;

spin_lock_bh(&priv->_agn.notif_wait_lock);
list_add(&wait_entry->list, &priv->_agn.notif_waits);
Expand All @@ -2279,13 +2280,16 @@ int iwlagn_wait_notification(struct iwl_priv *priv,
int ret;

ret = wait_event_timeout(priv->_agn.notif_waitq,
wait_entry->triggered,
wait_entry->triggered || wait_entry->aborted,
timeout);

spin_lock_bh(&priv->_agn.notif_wait_lock);
list_del(&wait_entry->list);
spin_unlock_bh(&priv->_agn.notif_wait_lock);

if (wait_entry->aborted)
return -EIO;

/* return value is always >= 0 */
if (ret <= 0)
return -ETIMEDOUT;
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,19 @@ void iwl_print_rx_config_cmd(struct iwl_priv *priv,
}
#endif

static void iwlagn_abort_notification_waits(struct iwl_priv *priv)
{
unsigned long flags;
struct iwl_notification_wait *wait_entry;

spin_lock_irqsave(&priv->_agn.notif_wait_lock, flags);
list_for_each_entry(wait_entry, &priv->_agn.notif_waits, list)
wait_entry->aborted = true;
spin_unlock_irqrestore(&priv->_agn.notif_wait_lock, flags);

wake_up_all(&priv->_agn.notif_waitq);
}

void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
{
unsigned int reload_msec;
Expand All @@ -878,6 +891,8 @@ void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
/* Cancel currently queued command. */
clear_bit(STATUS_HCMD_ACTIVE, &priv->status);

iwlagn_abort_notification_waits(priv);

/* Keep the restart process from trying to send host
* commands by clearing the ready bit */
clear_bit(STATUS_READY, &priv->status);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ struct iwl_notification_wait {
void *fn_data;

u8 cmd;
bool triggered;
bool triggered, aborted;
};

enum iwl_rxon_context_id {
Expand Down

0 comments on commit 8a6b2f1

Please sign in to comment.