iwlwifi: mvm: fix NVM check for 3168 devices
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 25 Nov 2019 11:21:58 +0000 (13:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:40:24 +0000 (16:40 +0200)
commitf1bb90b885cf4a27fc4faacadd9850602fff281e
tree82afa8e4ac3a1f465a459af0e171df77f4d6c18c
parent0315cfc6f81643c5b969cb61b8733fc77713ed49
iwlwifi: mvm: fix NVM check for 3168 devices

[ Upstream commit b3f20e098293892388d6a0491d6bbb2efb46fbff ]

We had a check on !NVM_EXT and then a check for NVM_SDP in the else
block of this if.  The else block, obviously, could only be reached if
using NVM_EXT, so it would never be NVM_SDP.

Fix that by checking whether the nvm_type is IWL_NVM instead of
checking for !IWL_NVM_EXT to solve this issue.

Reported-by: Stefan Sperling <stsp@stsp.name>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c