summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlegacy/iwl4965-base.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-02 12:21:47 -0700
committerDavid S. Miller <davem@davemloft.net>2011-05-02 12:21:47 -0700
commitbadb02953aac4af9993163e2a87be60f10700db9 (patch)
tree2f60f9eeda84733423169aae6a84878b582502eb /drivers/net/wireless/iwlegacy/iwl4965-base.c
parent7cfd260910b881250cde76ba92ebe3cbf8493a8f (diff)
parent16b345d89686ca0482a9ca741a1167def1abdd7f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index d484c3678163..a62fe24ee594 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -2984,15 +2984,15 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
struct iwl_priv *priv = container_of(work, struct iwl_priv,
txpower_work);
+ mutex_lock(&priv->mutex);
+
/* If a scan happened to start before we got here
* then just return; the statistics notification will
* kick off another scheduled work to compensate for
* any temperature delta we missed here. */
if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
test_bit(STATUS_SCANNING, &priv->status))
- return;
-
- mutex_lock(&priv->mutex);
+ goto out;
/* Regardless of if we are associated, we must reconfigure the
* TX power since frames can be sent on non-radar channels while
@@ -3002,7 +3002,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
/* Update last_temperature to keep is_calib_needed from running
* when it isn't needed... */
priv->last_temperature = priv->temperature;
-
+out:
mutex_unlock(&priv->mutex);
}