]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: fix the type we use in the PPAG table validity checks
authorLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 11:56:29 +0000 (13:56 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 12:37:27 +0000 (14:37 +0200)
commit991a56d9cf9a0bf338398deeda8b9fd772931d89
tree911a3c75c577f828eb75f43e08ea23447e6a48ff
parent7bf8121e1dd21ff816761e44b33a4c0a621dc90b
iwlwifi: mvm: fix the type we use in the PPAG table validity checks

The value we receive from ACPI is a long long unsigned integer but the
values should be treated as signed char.  When comparing the received
value with ACPI_PPAG_MIN_LB/HB, we were doing an unsigned comparison,
so the negative value would actually be treated as a very high number.

To solve this issue, assign the value to our table of s8's before
making the comparison, so the value is already converted when we do
so.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210135352.b0ec69f312bc.If77fd9c61a96aa7ef2ac96d935b7efd7df502399@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c