On Dienstag, 15. November 2016 22:07:29 CEST akolli@xxxxxxxxxxxxxxxx wrote: > From: Anilkumar Kolli <akolli@xxxxxxxxxxxxxxxx> > > Per peer tx stats are part of 'HTT_10_4_T2H_MSG_TYPE_PEER_STATS' > event, Firmware sends one HTT event for every four PPDUs. > HTT payload has success pkts/bytes, failed pkts/bytes, retry > pkts/bytes and rate info per ppdu. > Peer stats are enabled through 'WMI_SERVICE_PEER_STATS', > which are nowadays enabled by default. > > Parse peer stats and update the tx rate information per STA. > > tx rate, Peer stats are tested on QCA4019 with Firmware version > 10.4-3.2.1-00028. > > Signed-off-by: Anilkumar Kolli <akolli@xxxxxxxxxxxxxxxx> > --- Just played a little bit around with it and an 802.11n client (2x2x). The thing I've observed was that MCS 0-7 was reported as MCS rate but the client received mostly MCS 8-15. Guessing from this section > if (((txrate.flags == WMI_RATE_PREAMBLE_HT) || > (txrate.flags == WMI_RATE_PREAMBLE_VHT)) && txrate.mcs > 9) { > ath10k_warn(ar, "Invalid mcs %hhd peer stats", txrate.mcs); > return; > } it looks like HT rates are reported as 0-9 with an NSS setting (yes, as odd as this is). I've printed the values to check it: [ 68.529197] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 5 [ 68.529500] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 [ 68.535225] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 [ 68.542290] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 [ 68.549507] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 [ 68.555627] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 [ 68.562652] XXXXX txrate.flags 2, txrate.bw 1, txrate.nss 2, txrate.mcs 4 I don't know this for sure but my next guess is now that following change is missing: @@ -2231,8 +2231,10 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar, sgi = ATH10K_HW_GI(peer_stats->flags); if (((txrate.flags == WMI_RATE_PREAMBLE_HT) || - (txrate.flags == WMI_RATE_PREAMBLE_VHT)) && txrate.mcs > 9) { - ath10k_warn(ar, "Invalid mcs %hhd peer stats", txrate.mcs); + (txrate.flags == WMI_RATE_PREAMBLE_VHT)) && + (txrate.mcs > 9 || txrate.nss < 1)) { + ath10k_warn(ar, "Invalid mcs %hhd nss %hhd peer stats", + txrate.mcs, txrate.nss); return; } @@ -2255,7 +2257,7 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar, arsta->txrate.legacy = rate; } else if (txrate.flags == WMI_RATE_PREAMBLE_HT) { arsta->txrate.flags = RATE_INFO_FLAGS_MCS; - arsta->txrate.mcs = txrate.mcs; + arsta->txrate.mcs = txrate.mcs + 8 * (txrate.nss - 1); } else { arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS; arsta->txrate.mcs = txrate.mcs; Funny enough, I was spamming following with my 802.11n!!!! 2x2 client: [ 115.694987] XXXXX txrate.flags 3, txrate.bw 1, txrate.nss 4, txrate.mcs 15 [ 115.701851] ath10k_ahb a800000.wifi: Invalid mcs 15 peer stats Firmware was 10.4-3.2.1-00050 on an Dakota (IPQ401X) board. Kind regards, Sven
Attachment:
signature.asc
Description: This is a digitally signed message part.