iwlwifi: don't define OTP_LOW_IMAGE_SIZE per family, but per size
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 16 Aug 2018 05:53:10 +0000 (08:53 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 14 Dec 2018 11:04:45 +0000 (13:04 +0200)
Using OTP_LOW_IMAGE_SIZE_FAMILY_8000/9000/22000 only obfuscates the
actual values, since these 3 are the same.  Redefine the values per
size so it's easier to understand and compare the different
configurations.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/cfg/1000.c
drivers/net/wireless/intel/iwlwifi/cfg/2000.c
drivers/net/wireless/intel/iwlwifi/cfg/22000.c
drivers/net/wireless/intel/iwlwifi/cfg/6000.c
drivers/net/wireless/intel/iwlwifi/cfg/7000.c
drivers/net/wireless/intel/iwlwifi/cfg/8000.c
drivers/net/wireless/intel/iwlwifi/cfg/9000.c
drivers/net/wireless/intel/iwlwifi/iwl-config.h

index 76b5ddb..1ff388b 100644 (file)
@@ -48,7 +48,7 @@
 static const struct iwl_base_params iwl1000_base_params = {
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .pll_cfg = true,
        .max_ll_items = OTP_MAX_LL_ITEMS_1000,
        .shadow_ram_support = false,
index e7e4584..a6ec7ad 100644 (file)
@@ -57,7 +57,7 @@
 #define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode"
 
 static const struct iwl_base_params iwl2000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
        .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
@@ -71,7 +71,7 @@ static const struct iwl_base_params iwl2000_base_params = {
 
 
 static const struct iwl_base_params iwl2030_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
        .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
index 8b23391..2d395a4 100644 (file)
 #define NVM_HW_SECTION_NUM_FAMILY_22000                10
 
 static const struct iwl_base_params iwl_22000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_22000,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
        .num_of_queues = 512,
        .max_tfd_queue_size = 256,
        .shadow_ram_support = true,
@@ -121,7 +121,7 @@ static const struct iwl_base_params iwl_22000_base_params = {
 };
 
 static const struct iwl_base_params iwl_22560_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_22000,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
        .num_of_queues = 512,
        .max_tfd_queue_size = 65536,
        .shadow_ram_support = true,
index 30e62a7..fbb18d0 100644 (file)
@@ -66,7 +66,7 @@
 #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
 
 static const struct iwl_base_params iwl6000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -79,7 +79,7 @@ static const struct iwl_base_params iwl6000_base_params = {
 };
 
 static const struct iwl_base_params iwl6050_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
@@ -92,7 +92,7 @@ static const struct iwl_base_params iwl6050_base_params = {
 };
 
 static const struct iwl_base_params iwl6000_g2_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .max_tfd_queue_size = 256,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
index c973bfa..38d5db5 100644 (file)
 #define NVM_HW_SECTION_NUM_FAMILY_7000         0
 
 static const struct iwl_base_params iwl7000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_7000,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_16K,
        .num_of_queues = 31,
        .max_tfd_queue_size = 256,
        .shadow_ram_support = true,
index 348c40f..dd2785e 100644 (file)
@@ -97,7 +97,7 @@
 #define DEFAULT_NVM_FILE_FAMILY_8000C          "nvmData-8000C"
 
 static const struct iwl_base_params iwl8000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
        .num_of_queues = 31,
        .max_tfd_queue_size = 256,
        .shadow_ram_support = true,
index baaaf2a..1bc12f8 100644 (file)
@@ -93,7 +93,7 @@
 #define NVM_HW_SECTION_NUM_FAMILY_9000         10
 
 static const struct iwl_base_params iwl9000_base_params = {
-       .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000,
+       .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
        .num_of_queues = 31,
        .max_tfd_queue_size = 256,
        .shadow_ram_support = true,
index 5eb906a..91861a9 100644 (file)
@@ -265,11 +265,9 @@ struct iwl_tt_params {
 #define EEPROM_REGULATORY_BAND_NO_HT40         0
 
 /* lower blocks contain EEPROM image and calibration data */
-#define OTP_LOW_IMAGE_SIZE             (2 * 512 * sizeof(u16)) /* 2 KB */
-#define OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(u16)) /* 16 KB */
-#define OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(u16)) /* 32 KB */
-#define OTP_LOW_IMAGE_SIZE_FAMILY_9000 OTP_LOW_IMAGE_SIZE_FAMILY_8000
-#define OTP_LOW_IMAGE_SIZE_FAMILY_22000        OTP_LOW_IMAGE_SIZE_FAMILY_9000
+#define OTP_LOW_IMAGE_SIZE_2K          (2 * 512 * sizeof(u16))  /*  2 KB */
+#define OTP_LOW_IMAGE_SIZE_16K         (16 * 512 * sizeof(u16)) /* 16 KB */
+#define OTP_LOW_IMAGE_SIZE_32K         (32 * 512 * sizeof(u16)) /* 32 KB */
 
 struct iwl_eeprom_params {
        const u8 regulatory_bands[7];