Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237013
b: refs/heads/master
c: 4e6975f
h: refs/heads/master
i:
  237011: 27e9ae3
v: v3
  • Loading branch information
Ben Greear authored and John W. Linville committed Feb 3, 2011
1 parent 55a2eff commit 4f62906
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c89fe954d929781126af41691fba1bc670293a5
refs/heads/master: 4e6975f7b8ca31febaa94a1ee1acfb5322f8a82b
23 changes: 21 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,21 +381,40 @@ static const struct file_operations fops_interrupt = {
.llseek = default_llseek,
};

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 ieee80211_channel *chan = sc->hw->conf.channel;
struct ieee80211_conf *conf = &(sc->hw->conf);
char buf[512];
unsigned int len = 0;
u8 addr[ETH_ALEN];
u32 tmp;

len += snprintf(buf + len, sizeof(buf) - len,
"%s (chan=%d ht=%d)\n",
"%s (chan=%d center-freq: %d MHz channel-type: %d (%s))\n",
wiphy_name(sc->hw->wiphy),
ieee80211_frequency_to_channel(chan->center_freq),
conf_is_ht(&sc->hw->conf));
chan->center_freq,
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);
Expand Down

0 comments on commit 4f62906

Please sign in to comment.