iwlwifi: mvm: Check ret code for iwl_mvm_load_nvm_to_nic
authorAbhishek Naik <abhishek.naik@intel.com>
Wed, 10 Feb 2021 15:15:10 +0000 (17:15 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 23:52:09 +0000 (01:52 +0200)
commit9ce505feb17a96e25c91839e4ee0022500f338e4
treedfc2ae9a910eee91a436b8b88f38191629d6ddcc
parentb8a86164454aa745ecb534d7477d50d440ea05b6
iwlwifi: mvm: Check ret code for iwl_mvm_load_nvm_to_nic

Return value of the iwl_mvm_load_nvm_to_nic func is not analyzed. If load
NVM to nic func fails and NVM is not loaded to fw properly, then fw may
behave badly and lead to some strange issue. This commit will analyze
return value and if load NVM to nic has failed, then the error code is
sent to the previous func, which will trigger WRT log collection.
iwl_fw_dbg_error_collect() func collects dump only if tri type is
FW_DBG_TRIGGER_ALIVE_TIMEOUT. But when Load NVM to nic function fails
trig_type is FW_DBG_TRIGGER_DRIVER. This commit also has code changes to
collect dump when trig_type is FW_DBG_TRIGGER_DRIVER.

Signed-off-by: Abhishek Naik <abhishek.naik@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210171218.32998850192a.Ic58d08cb6944ca55e343ff0032c82cfa7821e588@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/mvm/fw.c