Karl Beldan 8ec7886b1c mac80211: minstrel_ht: use group flags instead of index to display rates
When displaying a rate through debugfs minstrel_ht guesses its flags
comparing group indexes.  Since 3ec373c421b6 ("mac80211: minstrel_ht:
include type (cck/ht) in rates flag"), the rate flags of interest are
present in the mcs_group-s, so use it.
While improving the code, this also fixes a smatch false positive
"error: testing array offset 'i' after use" in minstrel_ht_stats_dump.
This warning only triggers after 9208247d74bc ("mac80211: minstrel_ht:
add basic support for VHT rates <= 3SS@80MHz") with
CONFIG_MAC80211_RC_MINSTREL_VHT unset because then MINSTREL_VHT_GROUP_0
is above MINSTREL_GROUPS_NB and smatch only barks when the "testing
array offset" seems to prevent possible out of bonds accesses (which
does not happen here since i < ARRAY_SIZE(mi->groups)).

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-23 20:36:13 +02:00
..
2013-12-18 10:33:06 +01:00
2013-12-18 10:33:06 +01:00
2014-04-09 14:49:43 +02:00
2014-07-21 12:14:04 +02:00
2013-12-16 11:29:48 +01:00
2014-04-29 17:59:27 +02:00
2014-04-09 14:49:43 +02:00
2014-06-23 11:05:23 +02:00
2013-12-18 10:33:06 +01:00
2012-06-24 11:33:18 +02:00
2014-07-21 12:14:04 +02:00
2014-06-23 11:05:31 +02:00
2012-03-13 14:54:16 -04:00