Commit 099d8f20 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach

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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent cf9d1188
...@@ -393,16 +393,15 @@ static int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm) ...@@ -393,16 +393,15 @@ static int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm)
int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm) int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm)
{ {
int i, ret; int i, ret;
u16 section_id;
struct iwl_nvm_section *sections = mvm->nvm_sections; struct iwl_nvm_section *sections = mvm->nvm_sections;
IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n"); IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n");
for (i = 0; i < ARRAY_SIZE(nvm_to_read); i++) { for (i = 0; i < ARRAY_SIZE(mvm->nvm_sections); i++) {
section_id = nvm_to_read[i]; if (!mvm->nvm_sections[i].data || !mvm->nvm_sections[i].length)
ret = iwl_nvm_write_section(mvm, section_id, continue;
sections[section_id].data, ret = iwl_nvm_write_section(mvm, i, sections[i].data,
sections[section_id].length); sections[i].length);
if (ret < 0) { if (ret < 0) {
IWL_ERR(mvm, "iwl_mvm_send_cmd failed: %d\n", ret); IWL_ERR(mvm, "iwl_mvm_send_cmd failed: %d\n", ret);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment