aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h5
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c74
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
4 files changed, 0 insertions, 95 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index e739b56db533..80bab1b8447a 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -259,9 +259,6 @@ struct ath_atx_tid {
259}; 259};
260 260
261struct ath_node { 261struct ath_node {
262#ifdef CONFIG_ATH9K_DEBUGFS
263 struct list_head list; /* for sc->nodes */
264#endif
265 struct ieee80211_sta *sta; /* station struct we're part of */ 262 struct ieee80211_sta *sta; /* station struct we're part of */
266 struct ieee80211_vif *vif; /* interface with which we're associated */ 263 struct ieee80211_vif *vif; /* interface with which we're associated */
267 struct ath_atx_tid tid[WME_NUM_TID]; 264 struct ath_atx_tid tid[WME_NUM_TID];
@@ -723,8 +720,6 @@ struct ath_softc {
723 720
724#ifdef CONFIG_ATH9K_DEBUGFS 721#ifdef CONFIG_ATH9K_DEBUGFS
725 struct ath9k_debug debug; 722 struct ath9k_debug debug;
726 spinlock_t nodes_lock;
727 struct list_head nodes; /* basically, stations */
728#endif 723#endif
729 struct ath_beacon_config cur_beacon_conf; 724 struct ath_beacon_config cur_beacon_conf;
730 struct delayed_work tx_complete_work; 725 struct delayed_work tx_complete_work;
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,
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 345a01af542b..80cae53a33e5 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -563,10 +563,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
563 spin_lock_init(&sc->sc_serial_rw); 563 spin_lock_init(&sc->sc_serial_rw);
564 spin_lock_init(&sc->sc_pm_lock); 564 spin_lock_init(&sc->sc_pm_lock);
565 mutex_init(&sc->mutex); 565 mutex_init(&sc->mutex);
566#ifdef CONFIG_ATH9K_DEBUGFS
567 spin_lock_init(&sc->nodes_lock);
568 INIT_LIST_HEAD(&sc->nodes);
569#endif
570#ifdef CONFIG_ATH9K_MAC_DEBUG 566#ifdef CONFIG_ATH9K_MAC_DEBUG
571 spin_lock_init(&sc->debug.samp_lock); 567 spin_lock_init(&sc->debug.samp_lock);
572#endif 568#endif
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6a809bfd5aa5..0653dbc99e31 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -331,11 +331,6 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
331 u8 density; 331 u8 density;
332 an = (struct ath_node *)sta->drv_priv; 332 an = (struct ath_node *)sta->drv_priv;
333 333
334#ifdef CONFIG_ATH9K_DEBUGFS
335 spin_lock(&sc->nodes_lock);
336 list_add(&an->list, &sc->nodes);
337 spin_unlock(&sc->nodes_lock);
338#endif
339 an->sta = sta; 334 an->sta = sta;
340 an->vif = vif; 335 an->vif = vif;
341 336
@@ -352,13 +347,6 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
352{ 347{
353 struct ath_node *an = (struct ath_node *)sta->drv_priv; 348 struct ath_node *an = (struct ath_node *)sta->drv_priv;
354 349
355#ifdef CONFIG_ATH9K_DEBUGFS
356 spin_lock(&sc->nodes_lock);
357 list_del(&an->list);
358 spin_unlock(&sc->nodes_lock);
359 an->sta = NULL;
360#endif
361
362 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) 350 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
363 ath_tx_node_cleanup(sc, an); 351 ath_tx_node_cleanup(sc, an);
364} 352}