ath9k: make per-WMM-AC queue sizes configurable via debugfs
[deliverable/linux.git] / drivers / net / wireless / ath / ath9k / debug.c
index fde700c4e49092d760e537ba6dda6409b609fa63..b9ea067a7bb5e8a5bf7a9c60cd5529b113ba0905 100644 (file)
@@ -205,10 +205,10 @@ static ssize_t write_file_disable_ani(struct file *file,
        common->disable_ani = !!disable_ani;
 
        if (disable_ani) {
-               sc->sc_flags &= ~SC_OP_ANI_RUN;
+               clear_bit(SC_OP_ANI_RUN, &sc->sc_flags);
                del_timer_sync(&common->ani.timer);
        } else {
-               sc->sc_flags |= SC_OP_ANI_RUN;
+               set_bit(SC_OP_ANI_RUN, &sc->sc_flags);
                ath_start_ani(common);
        }
 
@@ -348,8 +348,6 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status)
                sc->debug.stats.istats.txok++;
        if (status & ATH9K_INT_TXURN)
                sc->debug.stats.istats.txurn++;
-       if (status & ATH9K_INT_MIB)
-               sc->debug.stats.istats.mib++;
        if (status & ATH9K_INT_RXPHY)
                sc->debug.stats.istats.rxphyerr++;
        if (status & ATH9K_INT_RXKCM)
@@ -374,6 +372,8 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status)
                sc->debug.stats.istats.dtim++;
        if (status & ATH9K_INT_TSFOOR)
                sc->debug.stats.istats.tsfoor++;
+       if (status & ATH9K_INT_MCI)
+               sc->debug.stats.istats.mci++;
 }
 
 static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
@@ -418,6 +418,7 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
        PR_IS("DTIMSYNC", dtimsync);
        PR_IS("DTIM", dtim);
        PR_IS("TSFOOR", tsfoor);
+       PR_IS("MCI", mci);
        PR_IS("TOTAL", total);
 
        len += snprintf(buf + len, mxlen - len,
@@ -1318,7 +1319,7 @@ static int open_file_bb_mac_samps(struct inode *inode, struct file *file)
        u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
        u8 nread;
 
-       if (sc->sc_flags & SC_OP_INVALID)
+       if (test_bit(SC_OP_INVALID, &sc->sc_flags))
                return -EAGAIN;
 
        buf = vmalloc(size);
@@ -1555,6 +1556,14 @@ int ath9k_init_debug(struct ath_hw *ah)
                            &fops_interrupt);
        debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_xmit);
+       debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_BK]);
+       debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_BE]);
+       debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_VI]);
+       debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_VO]);
        debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_stations);
        debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
This page took 0.034357 seconds and 5 git commands to generate.