aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index d65a896a421d..7a5932a6691a 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -488,6 +488,8 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
488 size_t count, loff_t *ppos) 488 size_t count, loff_t *ppos)
489{ 489{
490 struct ath_softc *sc = file->private_data; 490 struct ath_softc *sc = file->private_data;
491 struct ath_wiphy *aphy = sc->pri_wiphy;
492 struct ieee80211_channel *chan = aphy->hw->conf.channel;
491 char buf[512]; 493 char buf[512];
492 unsigned int len = 0; 494 unsigned int len = 0;
493 int i; 495 int i;
@@ -498,7 +500,8 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
498 "primary: %s (%s chan=%d ht=%d)\n", 500 "primary: %s (%s chan=%d ht=%d)\n",
499 wiphy_name(sc->pri_wiphy->hw->wiphy), 501 wiphy_name(sc->pri_wiphy->hw->wiphy),
500 ath_wiphy_state_str(sc->pri_wiphy->state), 502 ath_wiphy_state_str(sc->pri_wiphy->state),
501 sc->pri_wiphy->chan_idx, sc->pri_wiphy->chan_is_ht); 503 ieee80211_frequency_to_channel(chan->center_freq),
504 aphy->chan_is_ht);
502 505
503 put_unaligned_le32(REG_READ_D(sc->sc_ah, AR_STA_ID0), addr); 506 put_unaligned_le32(REG_READ_D(sc->sc_ah, AR_STA_ID0), addr);
504 put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_STA_ID1) & 0xffff, addr + 4); 507 put_unaligned_le16(REG_READ_D(sc->sc_ah, AR_STA_ID1) & 0xffff, addr + 4);
@@ -545,11 +548,13 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf,
545 struct ath_wiphy *aphy = sc->sec_wiphy[i]; 548 struct ath_wiphy *aphy = sc->sec_wiphy[i];
546 if (aphy == NULL) 549 if (aphy == NULL)
547 continue; 550 continue;
551 chan = aphy->hw->conf.channel;
548 len += snprintf(buf + len, sizeof(buf) - len, 552 len += snprintf(buf + len, sizeof(buf) - len,
549 "secondary: %s (%s chan=%d ht=%d)\n", 553 "secondary: %s (%s chan=%d ht=%d)\n",
550 wiphy_name(aphy->hw->wiphy), 554 wiphy_name(aphy->hw->wiphy),
551 ath_wiphy_state_str(aphy->state), 555 ath_wiphy_state_str(aphy->state),
552 aphy->chan_idx, aphy->chan_is_ht); 556 ieee80211_frequency_to_channel(chan->center_freq),
557 aphy->chan_is_ht);
553 } 558 }
554 if (len > sizeof(buf)) 559 if (len > sizeof(buf))
555 len = sizeof(buf); 560 len = sizeof(buf);