]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/mac80211/debugfs_netdev.c
Merge remote-tracking branch 'net-next/master' into mac80211-next
[linux.git] / net / mac80211 / debugfs_netdev.c
index a5ba739cd2a7480587520873c88b5836bfe382cf..bcec1240f41d90bec8b97a3bf52f8a8fcf918384 100644 (file)
@@ -30,7 +30,7 @@ static ssize_t ieee80211_if_read(
        size_t count, loff_t *ppos,
        ssize_t (*format)(const struct ieee80211_sub_if_data *, char *, int))
 {
-       char buf[70];
+       char buf[200];
        ssize_t ret = -EINVAL;
 
        read_lock(&dev_base_lock);
@@ -486,6 +486,38 @@ static ssize_t ieee80211_if_fmt_num_buffered_multicast(
 }
 IEEE80211_IF_FILE_R(num_buffered_multicast);
 
+static ssize_t ieee80211_if_fmt_aqm(
+       const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
+{
+       struct ieee80211_local *local = sdata->local;
+       struct txq_info *txqi = to_txq_info(sdata->vif.txq);
+       int len;
+
+       spin_lock_bh(&local->fq.lock);
+       rcu_read_lock();
+
+       len = scnprintf(buf,
+                       buflen,
+                       "ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets\n"
+                       "%u %u %u %u %u %u %u %u %u %u\n",
+                       txqi->txq.ac,
+                       txqi->tin.backlog_bytes,
+                       txqi->tin.backlog_packets,
+                       txqi->tin.flows,
+                       txqi->cstats.drop_count,
+                       txqi->cstats.ecn_mark,
+                       txqi->tin.overlimit,
+                       txqi->tin.collisions,
+                       txqi->tin.tx_bytes,
+                       txqi->tin.tx_packets);
+
+       rcu_read_unlock();
+       spin_unlock_bh(&local->fq.lock);
+
+       return len;
+}
+IEEE80211_IF_FILE_R(aqm);
+
 /* IBSS attributes */
 static ssize_t ieee80211_if_fmt_tsf(
        const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
@@ -524,9 +556,15 @@ static ssize_t ieee80211_if_parse_tsf(
                ret = kstrtoull(buf, 10, &tsf);
                if (ret < 0)
                        return ret;
-               if (tsf_is_delta)
-                       tsf = drv_get_tsf(local, sdata) + tsf_is_delta * tsf;
-               if (local->ops->set_tsf) {
+               if (tsf_is_delta && local->ops->offset_tsf) {
+                       drv_offset_tsf(local, sdata, tsf_is_delta * tsf);
+                       wiphy_info(local->hw.wiphy,
+                                  "debugfs offset TSF by %018lld\n",
+                                  tsf_is_delta * tsf);
+               } else if (local->ops->set_tsf) {
+                       if (tsf_is_delta)
+                               tsf = drv_get_tsf(local, sdata) +
+                                     tsf_is_delta * tsf;
                        drv_set_tsf(local, sdata, tsf);
                        wiphy_info(local->hw.wiphy,
                                   "debugfs set TSF to %#018llx\n", tsf);
@@ -618,6 +656,9 @@ static void add_common_files(struct ieee80211_sub_if_data *sdata)
        DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_2ghz);
        DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
        DEBUGFS_ADD(hw_queues);
+
+       if (sdata->local->ops->wake_tx_queue)
+               DEBUGFS_ADD(aqm);
 }
 
 static void add_sta_files(struct ieee80211_sub_if_data *sdata)