linux-stable/net/mac80211
Peter Seiderer b462be98b9 mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output)
[ Upstream commit 5c6dd7bd56 ]

Using an ath9k card the debugfs output of minstrel_ht looks like the following
(note the zero values for the first four rates sum-of success/attempts):

             best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
OFDM       1    DP     6.0M  272    1640     5.2       3.1      53.8       3     0 0             0   0
OFDM       1   C       9.0M  273    1104     7.7       4.6      53.8       4     0 0             0   0
OFDM       1  B       12.0M  274     836    10.0       6.0      53.8       4     0 0             0   0
OFDM       1 A    S   18.0M  275     568    14.3       8.5      53.8       5     0 0             0   0
OFDM       1      S   24.0M  276     436    18.1       0.0       0.0       5     0 1            80   1778
OFDM       1          36.0M  277     300    24.9       0.0       0.0       0     0 1             0   107
OFDM       1      S   48.0M  278     236    30.4       0.0       0.0       0     0 0             0   75
OFDM       1          54.0M  279     212    33.0       0.0       0.0       0     0 0             0   72

Total packet count::    ideal 16582      lookaround 885
Average # of aggregated frames per A-MPDU: 1.0

Debugging showed that the rate statistics for the first four rates where
stored in the MINSTREL_CCK_GROUP instead of the MINSTREL_OFDM_GROUP because
in minstrel_ht_get_stats() the supported check was not honoured as done in
various other places, e.g net/mac80211/rc80211_minstrel_ht_debugfs.c:

 74                 if (!(mi->supported[i] & BIT(j)))
 75                         continue;

With the patch applied the output looks good:

              best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
OFDM       1    D      6.0M  272    1640     5.2       5.2     100.0       3     0 0             1   1
OFDM       1   C       9.0M  273    1104     7.7       7.7     100.0       4     0 0            38   38
OFDM       1  B       12.0M  274     836    10.0       9.9      89.5       4     2 2           372   395
OFDM       1 A   P    18.0M  275     568    14.3      14.3      97.2       5    52 53         6956   7181
OFDM       1      S   24.0M  276     436    18.1       0.0       0.0       0     0 1             6   163
OFDM       1          36.0M  277     300    24.9       0.0       0.0       0     0 1             0   35
OFDM       1      S   48.0M  278     236    30.4       0.0       0.0       0     0 0             0   38
OFDM       1      S   54.0M  279     212    33.0       0.0       0.0       0     0 0             0   38

Total packet count::    ideal 7097      lookaround 287
Average # of aggregated frames per A-MPDU: 1.0

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Link: https://lore.kernel.org/r/20220404165414.1036-1-ps.report@gmx.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:19 +02:00
..
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c mac80211: aes_cmac: check crypto_shash_setkey() return value 2021-04-19 12:01:40 +02:00
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c mac80211: fix lookup when adding AddBA extension element 2021-12-14 11:21:05 +01:00
agg-tx.c mac80211: refuse aggregations sessions before authorized 2022-02-16 15:26:34 +01:00
airtime.c
cfg.c mac80211: fix potential double free on mesh join 2022-03-28 10:03:21 +02:00
chan.c mac80211: handle rate control (RC) racing with chanctx definition 2021-06-23 11:29:14 +02:00
debug.h
debugfs.c mac80211: Switch to a virtual time-based airtime scheduler 2021-06-23 18:12:00 +02:00
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c mac80211: Switch to a virtual time-based airtime scheduler 2021-06-23 18:12:00 +02:00
debugfs_netdev.h
debugfs_sta.c mac80211: fix ht_capa printout in debugfs 2022-04-20 09:36:14 +02:00
debugfs_sta.h
driver-ops.c
driver-ops.h This time we have: 2021-12-21 07:41:52 -08:00
ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
fils_aead.c mac80211: fils: use cfg80211_find_ext_elem() 2021-10-21 17:01:16 +02:00
fils_aead.h
he.c mac80211: fix NULL ptr dereference during mesh peer connection for non HE devices 2021-06-23 18:06:44 +02:00
ht.c mac80211: allow SMPS requests only in client mode 2021-06-23 11:29:13 +02:00
ibss.c mac80211: fix memory leaks with element parsing 2021-10-21 16:54:04 +02:00
ieee80211_i.h mac80211: limit bandwidth in HE capabilities 2022-04-08 13:58:03 +02:00
iface.c mac80211: add support for .ndo_fill_forward_path 2021-11-26 11:47:26 +01:00
Kconfig
key.c mac80211: prevent mixed key and fragment cache attacks 2021-05-11 20:12:51 +02:00
key.h mac80211: prevent mixed key and fragment cache attacks 2021-05-11 20:12:51 +02:00
led.c mac80211: don't open-code LED manipulations 2021-06-23 11:29:12 +02:00
led.h mac80211: fix throughput LED trigger 2021-11-15 10:56:57 +01:00
main.c mac80211: Remove a couple of obsolete TODO 2021-12-20 10:36:14 +01:00
Makefile
mesh.c mac80211: limit bandwidth in HE capabilities 2022-04-08 13:58:03 +02:00
mesh.h mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh 2022-01-04 15:11:49 +01:00
mesh_hwmp.c mac80211: always allocate struct ieee802_11_elems 2021-09-23 16:27:07 +02:00
mesh_pathtbl.c mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh 2022-01-04 15:11:49 +01:00
mesh_plink.c mac80211: always allocate struct ieee802_11_elems 2021-09-23 16:27:07 +02:00
mesh_ps.c mac80211: mesh: fix potentially unaligned access 2021-09-23 13:25:09 +02:00
mesh_sync.c mac80211: mesh: clean up rx_bcn_presp API 2021-09-23 16:26:33 +02:00
michael.c
michael.h
mlme.c mac80211: Reset MBSSID parameters upon connection 2022-05-18 10:28:11 +02:00
ocb.c
offchannel.c
pm.c mac80211: Prevent AP probing during suspend 2021-10-21 17:27:51 +02:00
rate.c Revert "mac80211: do not use low data rates for data frames with no ack flag" 2021-09-23 12:59:29 +02:00
rate.h
rc80211_minstrel_ht.c mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) 2022-06-09 10:25:19 +02:00
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c mac80211: fix rx reordering with non explicit / psmp ack policy 2022-05-25 09:59:13 +02:00
s1g.c mac80211: twt: don't use potentially unaligned pointer 2021-09-27 13:02:51 +02:00
scan.c mac80211: always allocate struct ieee802_11_elems 2021-09-23 16:27:07 +02:00
spectmgmt.c
sta_info.c mac80211: update channel context before station state 2021-12-14 11:21:39 +01:00
sta_info.h mac80211: add docs for ssn in struct tid_ampdu_tx 2021-11-29 09:31:17 +01:00
status.c mac80211: introduce individual TWT support in AP mode 2021-08-24 10:30:43 +02:00
tdls.c mac80211: always allocate struct ieee802_11_elems 2021-09-23 16:27:07 +02:00
tkip.c
tkip.h
trace.c
trace.h mac80211: add support for .ndo_fill_forward_path 2021-11-26 11:47:26 +01:00
trace_msg.h
tx.c This time we have: 2021-12-21 07:41:52 -08:00
util.c mac80211: limit bandwidth in HE capabilities 2022-04-08 13:58:03 +02:00
vht.c
wep.c
wep.h
wme.c mac80211: drop check for DONT_REORDER in __ieee80211_select_queue 2021-11-15 10:55:40 +01:00
wme.h
wpa.c mac80211: Remove unused assignment statements 2021-11-26 11:46:24 +01:00
wpa.h