aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-01-05 08:09:44 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-01-13 15:17:15 -0500
commit099d8f20b65d0dac07fb6e2ca0ed19e5d36d7d2e (patch)
treeac1b1bda45486835e4b31a8df86ac48aa759adec /drivers/net/wireless
parentcf9d11888091920e356d085a5fa1644fc5c05429 (diff)
iwlwifi: mvm: send all the NVM sections to the NIC
Some NIC comes with more than the 4 NVM (non volative memory) sections described in the nvm_to_read array. These NICs usually get their NVM from an external file fetched from userland during init. We already parsed the file, but sent to the NIC only 4 NVM sections whereas there could be more sections in the file. Fix this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/nvm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c
index c6beb0f842d5..9affd43db811 100644
--- a/drivers/net/wireless/iwlwifi/mvm/nvm.c
+++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c
@@ -393,16 +393,15 @@ out:
393int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm) 393int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm)
394{ 394{
395 int i, ret; 395 int i, ret;
396 u16 section_id;
397 struct iwl_nvm_section *sections = mvm->nvm_sections; 396 struct iwl_nvm_section *sections = mvm->nvm_sections;
398 397
399 IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n"); 398 IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n");
400 399
401 for (i = 0; i < ARRAY_SIZE(nvm_to_read); i++) { 400 for (i = 0; i < ARRAY_SIZE(mvm->nvm_sections); i++) {
402 section_id = nvm_to_read[i]; 401 if (!mvm->nvm_sections[i].data || !mvm->nvm_sections[i].length)
403 ret = iwl_nvm_write_section(mvm, section_id, 402 continue;
404 sections[section_id].data, 403 ret = iwl_nvm_write_section(mvm, i, sections[i].data,
405 sections[section_id].length); 404 sections[i].length);
406 if (ret < 0) { 405 if (ret < 0) {
407 IWL_ERR(mvm, "iwl_mvm_send_cmd failed: %d\n", ret); 406 IWL_ERR(mvm, "iwl_mvm_send_cmd failed: %d\n", ret);
408 break; 407 break;