Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194504
b: refs/heads/master
c: c9c99e5
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Apr 20, 2010
1 parent 3bc4201 commit a8ab76a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 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: 80725f454e58937ad546103e6a141c46b0d65a1b
refs/heads/master: c9c99e5e440013c420fd8ec41ee83e89909d5186
28 changes: 28 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,34 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
return true;
}

bool ath9k_hw_check_alive(struct ath_hw *ah)
{
int count = 50;
u32 reg;

if (AR_SREV_9285_10_OR_LATER(ah))
return true;

do {
reg = REG_READ(ah, AR_OBS_BUS_1);

if ((reg & 0x7E7FFFEF) == 0x00702400)
continue;

switch (reg & 0x7E000B00) {
case 0x1E000000:
case 0x52000B00:
case 0x18000B00:
continue;
default:
return true;
}
} while (count-- > 0);

return false;
}
EXPORT_SYMBOL(ath9k_hw_check_alive);

int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
bool bChannelChange)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ void ath9k_hw_set11nmac2040(struct ath_hw *ah);
void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period);
void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
const struct ath9k_beacon_state *bs);
bool ath9k_hw_check_alive(struct ath_hw *ah);

bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ void ath9k_tasklet(unsigned long data)

ath9k_ps_wakeup(sc);

if (status & ATH9K_INT_FATAL) {
if ((status & ATH9K_INT_FATAL) ||
!ath9k_hw_check_alive(ah)) {
ath_reset(sc, false);
ath9k_ps_restore(sc);
return;
Expand Down

0 comments on commit a8ab76a

Please sign in to comment.