"retry", "ampdu"};
        const char *str[ATH10K_COUNTER_TYPE_MAX] = {"bytes", "packets"};
        int len = 0, i, j, k, retval = 0;
-       const int size = 2 * 4096;
+       const int size = 16 * 4096;
        char *buf;
 
        buf = kzalloc(size, GFP_KERNEL);
                                len += scnprintf(buf + len, size - len, "%llu ",
                                                 stats->legacy[j][i]);
                        len += scnprintf(buf + len, size - len, "\n");
+                       len += scnprintf(buf + len, size - len,
+                                        " Rate table %s (1,2 ... Mbps)\n  ",
+                                        str[j]);
+                       for (i = 0; i < ATH10K_RATE_TABLE_NUM; i++) {
+                               len += scnprintf(buf + len, size - len, "%llu ",
+                                                stats->rate_table[j][i]);
+                               if (!((i + 1) % 8))
+                                       len +=
+                                       scnprintf(buf + len, size - len, "\n  ");
+                       }
                }
        }
 
 
 {
        struct rate_info *txrate = &arsta->txrate;
        struct ath10k_htt_tx_stats *tx_stats;
-       int ht_idx, gi, mcs, bw, nss;
+       int idx, ht_idx, gi, mcs, bw, nss;
 
        if (!arsta->tx_stats)
                return;
        mcs = txrate->mcs;
        bw = txrate->bw;
        nss = txrate->nss;
+       idx = mcs * 8 + 8 * 10 * nss;
+       idx += bw * 2 + gi;
 
 #define STATS_OP_FMT(name) tx_stats->stats[ATH10K_STATS_TYPE_##name]
 
                        pstats->succ_bytes + pstats->retry_bytes;
                STATS_OP_FMT(AMPDU).gi[0][gi] +=
                        pstats->succ_bytes + pstats->retry_bytes;
+               STATS_OP_FMT(AMPDU).rate_table[0][idx] +=
+                       pstats->succ_bytes + pstats->retry_bytes;
                STATS_OP_FMT(AMPDU).bw[1][bw] +=
                        pstats->succ_pkts + pstats->retry_pkts;
                STATS_OP_FMT(AMPDU).nss[1][nss] +=
                        pstats->succ_pkts + pstats->retry_pkts;
                STATS_OP_FMT(AMPDU).gi[1][gi] +=
                        pstats->succ_pkts + pstats->retry_pkts;
+               STATS_OP_FMT(AMPDU).rate_table[1][idx] +=
+                       pstats->succ_pkts + pstats->retry_pkts;
        } else {
                tx_stats->ack_fails +=
                                ATH10K_HW_BA_FAIL(pstats->flags);
        STATS_OP_FMT(RETRY).bw[1][bw] += pstats->retry_pkts;
        STATS_OP_FMT(RETRY).nss[1][nss] += pstats->retry_pkts;
        STATS_OP_FMT(RETRY).gi[1][gi] += pstats->retry_pkts;
+
+       if (txrate->flags >= RATE_INFO_FLAGS_MCS) {
+               STATS_OP_FMT(SUCC).rate_table[0][idx] += pstats->succ_bytes;
+               STATS_OP_FMT(SUCC).rate_table[1][idx] += pstats->succ_pkts;
+               STATS_OP_FMT(FAIL).rate_table[0][idx] += pstats->failed_bytes;
+               STATS_OP_FMT(FAIL).rate_table[1][idx] += pstats->failed_pkts;
+               STATS_OP_FMT(RETRY).rate_table[0][idx] += pstats->retry_bytes;
+               STATS_OP_FMT(RETRY).rate_table[1][idx] += pstats->retry_pkts;
+       }
 }
 
 static void