-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vasanthakumar Thiagarajan
authored and
Kalle Valo
committed
Oct 24, 2012
1 parent
66712db
commit 0ae03bb
Showing
11 changed files
with
127 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: ede615d2f043539e23bc4022955dbe0c3ec70ca2 | ||
refs/heads/master: 84caf8005b09e0a4a57fce44119489d1b0bbbe94 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
#include "core.h" | ||
#include "cfg80211.h" | ||
#include "debug.h" | ||
|
||
static void ath6kl_recovery_work(struct work_struct *work) | ||
{ | ||
struct ath6kl *ar = container_of(work, struct ath6kl, | ||
fw_recovery.recovery_work); | ||
|
||
ath6kl_init_hw_restart(ar); | ||
} | ||
|
||
void ath6kl_recovery_err_notify(struct ath6kl *ar, enum ath6kl_fw_err reason) | ||
{ | ||
ath6kl_dbg(ATH6KL_DBG_RECOVERY, "Fw error detected, reason:%d\n", | ||
reason); | ||
|
||
set_bit(reason, &ar->fw_recovery.err_reason); | ||
|
||
if (ar->fw_recovery.enable && ar->state != ATH6KL_STATE_RECOVERY) | ||
queue_work(ar->ath6kl_wq, &ar->fw_recovery.recovery_work); | ||
} | ||
|
||
void ath6kl_recovery_init(struct ath6kl *ar) | ||
{ | ||
struct ath6kl_fw_recovery *recovery = &ar->fw_recovery; | ||
|
||
recovery->enable = true; | ||
INIT_WORK(&recovery->recovery_work, ath6kl_recovery_work); | ||
} | ||
|
||
void ath6kl_recovery_cleanup(struct ath6kl *ar) | ||
{ | ||
ar->fw_recovery.enable = false; | ||
|
||
cancel_work_sync(&ar->fw_recovery.recovery_work); | ||
} | ||
|
||
void ath6kl_recovery_suspend(struct ath6kl *ar) | ||
{ | ||
ath6kl_recovery_cleanup(ar); | ||
|
||
/* Process pending fw error detection */ | ||
if (ar->fw_recovery.err_reason) | ||
ath6kl_init_hw_restart(ar); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters