diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-05-16 08:53:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-19 10:32:33 -0400 |
commit | 79d2b1570bcc31b846ccb2114a34e98ca87bf1d9 (patch) | |
tree | e0e0e12d7e85f784c5eb0a4154778e7308d843ec /drivers/net/wireless/ath | |
parent | 099fb8ab1e57e5d609ac686cc0ab6d1835a79155 (diff) |
ath9k: Fix power save wrappers in debug ops
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index bad1a87249b6..7afe33269d4b 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -443,7 +443,9 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf, | |||
443 | put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_BSSMSKU) & 0xffff, addr + 4); | 443 | put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_BSSMSKU) & 0xffff, addr + 4); |
444 | len += snprintf(buf + len, sizeof(buf) - len, | 444 | len += snprintf(buf + len, sizeof(buf) - len, |
445 | "addrmask: %pM\n", addr); | 445 | "addrmask: %pM\n", addr); |
446 | ath9k_ps_wakeup(sc); | ||
446 | tmp = ath9k_hw_getrxfilter(sc->sc_ah); | 447 | tmp = ath9k_hw_getrxfilter(sc->sc_ah); |
448 | ath9k_ps_restore(sc); | ||
447 | len += snprintf(buf + len, sizeof(buf) - len, | 449 | len += snprintf(buf + len, sizeof(buf) - len, |
448 | "rfilt: 0x%x", tmp); | 450 | "rfilt: 0x%x", tmp); |
449 | if (tmp & ATH9K_RX_FILTER_UCAST) | 451 | if (tmp & ATH9K_RX_FILTER_UCAST) |
@@ -725,6 +727,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, | |||
725 | break; | 727 | break; |
726 | } | 728 | } |
727 | 729 | ||
730 | ath9k_ps_wakeup(sc); | ||
728 | len += snprintf(buf + len, size - len, | 731 | len += snprintf(buf + len, size - len, |
729 | "curbssid: %pM\n" | 732 | "curbssid: %pM\n" |
730 | "OP-Mode: %s(%i)\n" | 733 | "OP-Mode: %s(%i)\n" |
@@ -734,6 +737,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, | |||
734 | REG_READ(ah, AR_BEACON_PERIOD)); | 737 | REG_READ(ah, AR_BEACON_PERIOD)); |
735 | 738 | ||
736 | reg = REG_READ(ah, AR_TIMER_MODE); | 739 | reg = REG_READ(ah, AR_TIMER_MODE); |
740 | ath9k_ps_restore(sc); | ||
737 | len += snprintf(buf + len, size - len, "Timer-Mode-Register: 0x%x (", | 741 | len += snprintf(buf + len, size - len, "Timer-Mode-Register: 0x%x (", |
738 | reg); | 742 | reg); |
739 | if (reg & AR_TBTT_TIMER_EN) | 743 | if (reg & AR_TBTT_TIMER_EN) |
@@ -1050,7 +1054,9 @@ static ssize_t read_file_regval(struct file *file, char __user *user_buf, | |||
1050 | unsigned int len; | 1054 | unsigned int len; |
1051 | u32 regval; | 1055 | u32 regval; |
1052 | 1056 | ||
1057 | ath9k_ps_wakeup(sc); | ||
1053 | regval = REG_READ_D(ah, sc->debug.regidx); | 1058 | regval = REG_READ_D(ah, sc->debug.regidx); |
1059 | ath9k_ps_restore(sc); | ||
1054 | len = sprintf(buf, "0x%08x\n", regval); | 1060 | len = sprintf(buf, "0x%08x\n", regval); |
1055 | return simple_read_from_buffer(user_buf, count, ppos, buf, len); | 1061 | return simple_read_from_buffer(user_buf, count, ppos, buf, len); |
1056 | } | 1062 | } |
@@ -1072,7 +1078,9 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf, | |||
1072 | if (strict_strtoul(buf, 0, ®val)) | 1078 | if (strict_strtoul(buf, 0, ®val)) |
1073 | return -EINVAL; | 1079 | return -EINVAL; |
1074 | 1080 | ||
1081 | ath9k_ps_wakeup(sc); | ||
1075 | REG_WRITE_D(ah, sc->debug.regidx, regval); | 1082 | REG_WRITE_D(ah, sc->debug.regidx, regval); |
1083 | ath9k_ps_restore(sc); | ||
1076 | return count; | 1084 | return count; |
1077 | } | 1085 | } |
1078 | 1086 | ||