Commit 79d2b157 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k: Fix power save wrappers in debug ops

Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 099fb8ab
...@@ -443,7 +443,9 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf, ...@@ -443,7 +443,9 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_BSSMSKU) & 0xffff, addr + 4); put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_BSSMSKU) & 0xffff, addr + 4);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"addrmask: %pM\n", addr); "addrmask: %pM\n", addr);
ath9k_ps_wakeup(sc);
tmp = ath9k_hw_getrxfilter(sc->sc_ah); tmp = ath9k_hw_getrxfilter(sc->sc_ah);
ath9k_ps_restore(sc);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"rfilt: 0x%x", tmp); "rfilt: 0x%x", tmp);
if (tmp & ATH9K_RX_FILTER_UCAST) if (tmp & ATH9K_RX_FILTER_UCAST)
...@@ -725,6 +727,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, ...@@ -725,6 +727,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
break; break;
} }
ath9k_ps_wakeup(sc);
len += snprintf(buf + len, size - len, len += snprintf(buf + len, size - len,
"curbssid: %pM\n" "curbssid: %pM\n"
"OP-Mode: %s(%i)\n" "OP-Mode: %s(%i)\n"
...@@ -734,6 +737,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf, ...@@ -734,6 +737,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
REG_READ(ah, AR_BEACON_PERIOD)); REG_READ(ah, AR_BEACON_PERIOD));
reg = REG_READ(ah, AR_TIMER_MODE); reg = REG_READ(ah, AR_TIMER_MODE);
ath9k_ps_restore(sc);
len += snprintf(buf + len, size - len, "Timer-Mode-Register: 0x%x (", len += snprintf(buf + len, size - len, "Timer-Mode-Register: 0x%x (",
reg); reg);
if (reg & AR_TBTT_TIMER_EN) if (reg & AR_TBTT_TIMER_EN)
...@@ -1050,7 +1054,9 @@ static ssize_t read_file_regval(struct file *file, char __user *user_buf, ...@@ -1050,7 +1054,9 @@ static ssize_t read_file_regval(struct file *file, char __user *user_buf,
unsigned int len; unsigned int len;
u32 regval; u32 regval;
ath9k_ps_wakeup(sc);
regval = REG_READ_D(ah, sc->debug.regidx); regval = REG_READ_D(ah, sc->debug.regidx);
ath9k_ps_restore(sc);
len = sprintf(buf, "0x%08x\n", regval); len = sprintf(buf, "0x%08x\n", regval);
return simple_read_from_buffer(user_buf, count, ppos, buf, len); return simple_read_from_buffer(user_buf, count, ppos, buf, len);
} }
...@@ -1072,7 +1078,9 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf, ...@@ -1072,7 +1078,9 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
if (strict_strtoul(buf, 0, &regval)) if (strict_strtoul(buf, 0, &regval))
return -EINVAL; return -EINVAL;
ath9k_ps_wakeup(sc);
REG_WRITE_D(ah, sc->debug.regidx, regval); REG_WRITE_D(ah, sc->debug.regidx, regval);
ath9k_ps_restore(sc);
return count; return count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment