iwlwifi: read and print OTP minor version
authorLuca Coelho <luciano.coelho@intel.com>
Sun, 30 Jan 2022 09:52:56 +0000 (11:52 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:52 +0000 (10:40 +0200)
Sometimes it can be useful to know the OTP minor version, so read it
from the register and print it out.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220130115024.a90a1363558e.Ifc08db91cdc7d2e8353af55afaf899e10b2ef875@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
drivers/net/wireless/intel/iwlwifi/iwl-prph.h

index aebae8251eb8885e2b4139f2412b5719b491be3a..895b0bc6fd5a6f390b6b6d67a43ed0f6cf775018 100644 (file)
@@ -1080,7 +1080,9 @@ static int iwl_set_hw_address(struct iwl_trans *trans,
                return -EINVAL;
        }
 
-       IWL_INFO(trans, "base HW address: %pM\n", data->hw_addr);
+       if (!trans->csme_own)
+               IWL_INFO(trans, "base HW address: %pM, OTP minor version: 0x%x\n",
+                        data->hw_addr, iwl_read_prph(trans, REG_OTP_MINOR));
 
        return 0;
 }
index 8d37a7e8fa6efd6856ac45ffb5a719fee391968b..03d296a2b38efcc47d988dc233d70e5b68821003 100644 (file)
@@ -491,4 +491,6 @@ enum {
 #define HBUS_TIMEOUT 0xA5A5A5A1
 #define WFPM_DPHY_OFF 0xDF10FF
 
+#define REG_OTP_MINOR 0xA0333C
+
 #endif                         /* __iwl_prph_h__ */