Skip to content

Commit 79d2b15

Browse files
Rajkumar Manoharanlinvjw
authored andcommitted
ath9k: Fix power save wrappers in debug ops
Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 099fb8a commit 79d2b15

File tree

1 file changed

+8
-0
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+8
-0
lines changed

drivers/net/wireless/ath/ath9k/debug.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
443443
put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_BSSMSKU) & 0xffff, addr + 4);
444444
len += snprintf(buf + len, sizeof(buf) - len,
445445
"addrmask: %pM\n", addr);
446+
ath9k_ps_wakeup(sc);
446447
tmp = ath9k_hw_getrxfilter(sc->sc_ah);
448+
ath9k_ps_restore(sc);
447449
len += snprintf(buf + len, sizeof(buf) - len,
448450
"rfilt: 0x%x", tmp);
449451
if (tmp & ATH9K_RX_FILTER_UCAST)
@@ -725,6 +727,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
725727
break;
726728
}
727729

730+
ath9k_ps_wakeup(sc);
728731
len += snprintf(buf + len, size - len,
729732
"curbssid: %pM\n"
730733
"OP-Mode: %s(%i)\n"
@@ -734,6 +737,7 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
734737
REG_READ(ah, AR_BEACON_PERIOD));
735738

736739
reg = REG_READ(ah, AR_TIMER_MODE);
740+
ath9k_ps_restore(sc);
737741
len += snprintf(buf + len, size - len, "Timer-Mode-Register: 0x%x (",
738742
reg);
739743
if (reg & AR_TBTT_TIMER_EN)
@@ -1050,7 +1054,9 @@ static ssize_t read_file_regval(struct file *file, char __user *user_buf,
10501054
unsigned int len;
10511055
u32 regval;
10521056

1057+
ath9k_ps_wakeup(sc);
10531058
regval = REG_READ_D(ah, sc->debug.regidx);
1059+
ath9k_ps_restore(sc);
10541060
len = sprintf(buf, "0x%08x\n", regval);
10551061
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
10561062
}
@@ -1072,7 +1078,9 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
10721078
if (strict_strtoul(buf, 0, &regval))
10731079
return -EINVAL;
10741080

1081+
ath9k_ps_wakeup(sc);
10751082
REG_WRITE_D(ah, sc->debug.regidx, regval);
1083+
ath9k_ps_restore(sc);
10761084
return count;
10771085
}
10781086

0 commit comments

Comments
 (0)