From: Ben Greear <greearb@xxxxxxxxxxxxxxx> Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx> --- :100644 100644 25ea746... c3f495b... M drivers/net/wireless/ath/ath9k/debug.c drivers/net/wireless/ath/ath9k/debug.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 25ea746..c3f495b 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -398,12 +398,30 @@ static const char * ath_wiphy_state_str(enum ath_wiphy_state state) return "?"; } +static const char *channel_type_str(enum nl80211_channel_type t) +{ + switch (t) { + case NL80211_CHAN_NO_HT: + return "no ht"; + case NL80211_CHAN_HT20: + return "ht20"; + case NL80211_CHAN_HT40MINUS: + return "ht40-"; + case NL80211_CHAN_HT40PLUS: + return "ht40+"; + default: + return "???"; + } +} + static ssize_t read_file_wiphy(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { struct ath_softc *sc = file->private_data; struct ath_wiphy *aphy = sc->pri_wiphy; struct ieee80211_channel *chan = aphy->hw->conf.channel; + struct ieee80211_conf *conf = &(aphy->hw->conf); + char buf[512]; unsigned int len = 0; int i; @@ -411,11 +429,12 @@ static ssize_t read_file_wiphy(struct file *file, char __user *user_buf, u32 tmp; len += snprintf(buf + len, sizeof(buf) - len, - "primary: %s (%s chan=%d ht=%d)\n", + "primary: %s (%s chan=%d channel-type: %d (%s))\n", wiphy_name(sc->pri_wiphy->hw->wiphy), ath_wiphy_state_str(sc->pri_wiphy->state), ieee80211_frequency_to_channel(chan->center_freq), - aphy->chan_is_ht); + conf->channel_type, + channel_type_str(conf->channel_type)); 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); -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html