]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: revisit the NVM handling code
authorEran Harary <eran.harary@intel.com>
Sun, 11 May 2014 06:44:17 +0000 (09:44 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 13 May 2014 10:58:15 +0000 (13:58 +0300)
commit85a9552ca3c37547cf171175c1ef75c4ee0d7bbe
treed06a9c7f2843b5f0b1ab20cc455c1af484f35017
parentdfdcbe81a00bd8ea6b2690240b4c7354e3bf9310
iwlwifi: mvm: revisit the NVM handling code

Fix a bug in nvm_read_section function if size of the section
is a multiple of 2K:

   - if the size of the section is *not* multiple of 2K,
   then we will have: read(2K) - return 2K ... read(2K) - return 2K
   read(2K) - return the rest (in bytes) and exit the while loop.
   - else, if the size of the section is a multiple of 2K,
   then we have: read(2K) - return 2K read(2K) - return 2K read(2K) -
   return 2K read(2K) - return 0 and exit the while with an error.

We should not return an error in the latter case, because it
might well be that the section was completely read.

Also, we try now to read all the sections as this is needed
for new devices.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-config.h
drivers/net/wireless/iwlwifi/mvm/nvm.c