]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: rs: fix max rate allowed if no rate is allowed
authorEyal Shapira <eyal@wizery.com>
Sun, 7 Dec 2014 16:18:27 +0000 (18:18 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 28 Dec 2014 18:00:15 +0000 (20:00 +0200)
commit2579fe66f0e11b576e7925a0f5ece97187ced554
treed6ce95aaf6c7343972b3f4ad943c6cc095773816
parenta05a94f67b177ba7f9e30a77571c27c4c8cd3be7
iwlwifi: mvm: rs: fix max rate allowed if no rate is allowed

In case the rate mask for one of the modulations was zero the
max rate idx for that modulation was set to 32 (BITS_PER_LONG).
This is bad as it would later lead to an out of bounds access
to the expected tpt table. In most cases there was no real effect
as the expected tpt was set to 0 and this led to avoiding the
modulation effectively.
Fix the out of bounds access and explicitly skip the modulation
in case there's no rate allowed in it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/rs.c