aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-21 07:43:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-21 14:16:04 -0500
commit580bdac386daa25e0432cbb4078d1cc3919127e3 (patch)
tree1923cf1ed7bfae1239be2165807440800b99cb95 /drivers/net/wireless/ath/ath9k/debug.c
parent4d28f771ff2ca0701999b037df38ad06e949edf6 (diff)
ath9k: Remove 'stations' debugfs file
The 'stations' debugfs file has multiple issues. It doesn't scale to an arbitrary number of associated stations and allocating 64K is not elegant either. Now that changes have been made in mac80211 to support dynamic creation/deletion of driver-specific debugfs files on station addition/removal, remove this file and make use of the mac80211 hooks (which will be done in a sebsequent patch). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 086dee841622..939308c25712 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -602,71 +602,6 @@ static ssize_t read_file_queues(struct file *file, char __user *user_buf,
602 return retval; 602 return retval;
603} 603}
604 604
605static ssize_t read_file_stations(struct file *file, char __user *user_buf,
606 size_t count, loff_t *ppos)
607{
608 struct ath_softc *sc = file->private_data;
609 char *buf;
610 unsigned int len = 0, size = 64000;
611 struct ath_node *an = NULL;
612 ssize_t retval = 0;
613 int q;
614
615 buf = kzalloc(size, GFP_KERNEL);
616 if (buf == NULL)
617 return -ENOMEM;
618
619 len += snprintf(buf + len, size - len,
620 "Stations:\n"
621 " tid: addr sched paused buf_q-empty an ac baw\n"
622 " ac: addr sched tid_q-empty txq\n");
623
624 spin_lock(&sc->nodes_lock);
625 list_for_each_entry(an, &sc->nodes, list) {
626 unsigned short ma = an->maxampdu;
627 if (ma == 0)
628 ma = 65535; /* see ath_lookup_rate */
629 len += snprintf(buf + len, size - len,
630 "iface: %pM sta: %pM max-ampdu: %hu mpdu-density: %uus\n",
631 an->vif->addr, an->sta->addr, ma,
632 (unsigned int)(an->mpdudensity));
633 if (len >= size)
634 goto done;
635
636 for (q = 0; q < WME_NUM_TID; q++) {
637 struct ath_atx_tid *tid = &(an->tid[q]);
638 len += snprintf(buf + len, size - len,
639 " tid: %p %s %s %i %p %p %hu\n",
640 tid, tid->sched ? "sched" : "idle",
641 tid->paused ? "paused" : "running",
642 skb_queue_empty(&tid->buf_q),
643 tid->an, tid->ac, tid->baw_size);
644 if (len >= size)
645 goto done;
646 }
647
648 for (q = 0; q < IEEE80211_NUM_ACS; q++) {
649 struct ath_atx_ac *ac = &(an->ac[q]);
650 len += snprintf(buf + len, size - len,
651 " ac: %p %s %i %p\n",
652 ac, ac->sched ? "sched" : "idle",
653 list_empty(&ac->tid_q), ac->txq);
654 if (len >= size)
655 goto done;
656 }
657 }
658
659done:
660 spin_unlock(&sc->nodes_lock);
661 if (len > size)
662 len = size;
663
664 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
665 kfree(buf);
666
667 return retval;
668}
669
670static ssize_t read_file_misc(struct file *file, char __user *user_buf, 605static ssize_t read_file_misc(struct file *file, char __user *user_buf,
671 size_t count, loff_t *ppos) 606 size_t count, loff_t *ppos)
672{ 607{
@@ -879,13 +814,6 @@ static const struct file_operations fops_queues = {
879 .llseek = default_llseek, 814 .llseek = default_llseek,
880}; 815};
881 816
882static const struct file_operations fops_stations = {
883 .read = read_file_stations,
884 .open = simple_open,
885 .owner = THIS_MODULE,
886 .llseek = default_llseek,
887};
888
889static const struct file_operations fops_misc = { 817static const struct file_operations fops_misc = {
890 .read = read_file_misc, 818 .read = read_file_misc,
891 .open = simple_open, 819 .open = simple_open,
@@ -1614,8 +1542,6 @@ int ath9k_init_debug(struct ath_hw *ah)
1614 &sc->tx.txq_max_pending[IEEE80211_AC_VI]); 1542 &sc->tx.txq_max_pending[IEEE80211_AC_VI]);
1615 debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1543 debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
1616 &sc->tx.txq_max_pending[IEEE80211_AC_VO]); 1544 &sc->tx.txq_max_pending[IEEE80211_AC_VO]);
1617 debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
1618 &fops_stations);
1619 debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc, 1545 debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
1620 &fops_misc); 1546 &fops_misc);
1621 debugfs_create_file("reset", S_IRUSR, sc->debug.debugfs_phy, sc, 1547 debugfs_create_file("reset", S_IRUSR, sc->debug.debugfs_phy, sc,