ath9k: use PS wakeup before REG_READ
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>
Wed, 18 May 2011 12:26:00 +0000 (17:56 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 May 2011 17:54:20 +0000 (13:54 -0400)
otherwise we will get deadbeef when the station is in idle state

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/debug.c

index c21269c99580847161bca9f4816b7b83c5670407..d55ffd7d4bd28565df7d93b5e1ed65c010b99ba5 100644 (file)
@@ -435,6 +435,7 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
                        conf->channel_type,
                        channel_type_str(conf->channel_type));
 
+       ath9k_ps_wakeup(sc);
        put_unaligned_le32(REG_READ_D(sc->sc_ah, AR_STA_ID0), addr);
        put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_STA_ID1) & 0xffff, addr + 4);
        len += snprintf(buf + len, sizeof(buf) - len,
@@ -443,7 +444,6 @@ 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);
        len += snprintf(buf + len, sizeof(buf) - len,
                        "addrmask: %pM\n", addr);
-       ath9k_ps_wakeup(sc);
        tmp = ath9k_hw_getrxfilter(sc->sc_ah);
        ath9k_ps_restore(sc);
        len += snprintf(buf + len, sizeof(buf) - len,