Skip to content

Commit

Permalink
ath6kl: Remove unnecessary recovery state check in ath6kl_recovery_hb…
Browse files Browse the repository at this point in the history
…_timer()

Checking for recovery state just before re-arming hb_timer is not
necessary, this should be done at the begining of the timer instead.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Oct 24, 2012
1 parent 9d91884 commit e451f94
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/wireless/ath/ath6kl/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void ath6kl_recovery_hb_timer(unsigned long data)
struct ath6kl *ar = (struct ath6kl *) data;
int err;

if (!ar->fw_recovery.enable)
if (!ar->fw_recovery.enable || (ar->state == ATH6KL_STATE_RECOVERY))
return;

if (ar->fw_recovery.hb_pending)
Expand All @@ -86,9 +86,6 @@ static void ath6kl_recovery_hb_timer(unsigned long data)
ath6kl_warn("Failed to send hb challenge request, err:%d\n",
err);

if ((ar->state == ATH6KL_STATE_RECOVERY) || !ar->fw_recovery.enable)
return;

mod_timer(&ar->fw_recovery.hb_timer, jiffies +
msecs_to_jiffies(ar->fw_recovery.hb_poll));
}
Expand Down

0 comments on commit e451f94

Please sign in to comment.