iwlwifi: return op_mode only in case the failure is from MEI
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Sun, 19 Dec 2021 11:28:30 +0000 (13:28 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 21 Dec 2021 10:38:15 +0000 (12:38 +0200)
commit22a1ee8e1e59ccbe6eb9072604e0625ac736228c
treed66f06f4fc029195d5a856cde185c2813aeb1c7b
parent0792df6881d0f9fe75df6b1431f4ee099c2caeb2
iwlwifi: return op_mode only in case the failure is from MEI

Currently we always return the op_mode with valid pointer in case
getting NVM failed, while it's only relevant for cases that CSME is the
owner of the nic.

Fix this by checking also who's the owner of the nic.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211219132536.b1e96021b616.Id0164855f2dd01ecdecf79b239d6ee5974882245@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c