Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290668
b: refs/heads/master
c: 78e5a46
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and Wey-Yi Guy committed Feb 17, 2012
1 parent 220aa4f commit 16b1686
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 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: 655ccceb59f8fbffc2ed151d07d03eb88f27adb6
refs/heads/master: 78e5a464320338a90b0367ab9cc58029393a9824
19 changes: 5 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,14 +738,14 @@ int iwl_alive_start(struct iwl_priv *priv)
return iwl_power_update_mode(priv, true);
}

static void iwl_cancel_deferred_work(struct iwl_priv *priv);

void __iwl_down(struct iwl_priv *priv)
void iwl_down(struct iwl_priv *priv)
{
int exit_pending;

IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n");

lockdep_assert_held(&priv->shrd->mutex);

iwl_scan_cancel_timeout(priv, 200);

/*
Expand Down Expand Up @@ -803,15 +803,6 @@ void __iwl_down(struct iwl_priv *priv)
priv->beacon_skb = NULL;
}

void iwl_down(struct iwl_priv *priv)
{
mutex_lock(&priv->shrd->mutex);
__iwl_down(priv);
mutex_unlock(&priv->shrd->mutex);

iwl_cancel_deferred_work(priv);
}

/*****************************************************************************
*
* Workqueue callbacks
Expand Down Expand Up @@ -869,7 +860,7 @@ void iwlagn_prepare_restart(struct iwl_priv *priv)
bt_status = priv->bt_status;
bt_is_sco = priv->bt_is_sco;

__iwl_down(priv);
iwl_down(priv);

priv->bt_full_concurrent = bt_full_concurrent;
priv->bt_ci_compliance = bt_ci_compliance;
Expand Down Expand Up @@ -970,7 +961,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv)
priv->watchdog.function = iwl_bg_watchdog;
}

static void iwl_cancel_deferred_work(struct iwl_priv *priv)
void iwl_cancel_deferred_work(struct iwl_priv *priv)
{
if (cfg(priv)->lib->cancel_deferred_work)
cfg(priv)->lib->cancel_deferred_work(priv);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
hdr->data_valid = 1;
}

void __iwl_down(struct iwl_priv *priv);
void iwl_down(struct iwl_priv *priv);
void iwl_cancel_deferred_work(struct iwl_priv *priv);
void iwlagn_prepare_restart(struct iwl_priv *priv);

/* MAC80211 */
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int __iwl_up(struct iwl_priv *priv)

error:
set_bit(STATUS_EXIT_PENDING, &priv->shrd->status);
__iwl_down(priv);
iwl_down(priv);
clear_bit(STATUS_EXIT_PENDING, &priv->shrd->status);

IWL_ERR(priv, "Unable to initialize device.\n");
Expand Down Expand Up @@ -341,7 +341,11 @@ static void iwlagn_mac_stop(struct ieee80211_hw *hw)

priv->is_open = 0;

mutex_lock(&priv->shrd->mutex);
iwl_down(priv);
mutex_unlock(&priv->shrd->mutex);

iwl_cancel_deferred_work(priv);

flush_workqueue(priv->workqueue);

Expand Down

0 comments on commit 16b1686

Please sign in to comment.