iwlwifi: mvm: rs: fix and cleanup rs_get_rate_action
authorEyal Shapira <eyal@wizery.com>
Sat, 5 Apr 2014 23:42:18 +0000 (02:42 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 13 Apr 2014 13:51:04 +0000 (16:51 +0300)
commite53839eb9882c99d3781eab0fe1b2d4369a6a2cc
tree9eedaa4715a809d7508896a9d214dbd50e59e13c
parent198266a3c110e8a68895a24e937003f5da0c5f60
iwlwifi: mvm: rs: fix and cleanup rs_get_rate_action

Change the down/upscale decision logic a bit to be based
on different success ratio thresholds. This fixes the implementation
compared to the rate scale algorithm which was planned to yield
optimal results. Also fix a case where a lower rate wasn't explored
despite being a potential for better throughput.
While at it rewrite rs_get_rate_action to be more clear and clean.

Cc: <stable@vger.kernel.org> [3.14]
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
drivers/net/wireless/iwlwifi/mvm/rs.h