mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode
authorFelix Fietkau <nbd@nbd.name>
Sat, 6 Oct 2018 17:35:05 +0000 (19:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:32 +0000 (08:23 +0100)
commit28b6a09fbf23d2616af88b13b5654e89bda74777
tree082dea3f1a4286b7acf6b131d95ff90434536509
parent21082313c028bb0ff4eae44029e202dbcb81814b
mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode

[ Upstream commit 972b66b86f85f4e8201db454f4c3e9d990cf9836 ]

Long/short preamble selection cannot be sampled separately, since it
depends on the BSS state. Because of that, sampling attempts to
currently not used preamble modes are not counted in the statistics,
which leads to CCK rates being sampled too often.

Fix statistics accounting for long/short preamble by increasing the
index where necessary.
Fix excessive CCK rate sampling by dropping unsupported sample attempts.

This improves throughput on 2.4 GHz channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/rc80211_minstrel_ht.c