]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
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 76b5ddb202481a6caa6899a76828aa0156140152..1ff388b593ad59c43b12d76fce63ae8feccfd9eb 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 e7e45846dd0736929321dc0b5e56aa31cc80f800..a6ec7ad39dcb8753b1e0e1b14561a777e6b00021 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 8b2339165bca0ee737f928f6d7953110c2cb790d..2d395a4a5375470237c9b478f2bbd0acc48d24b7 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 30e62a7c9d5212c7949f6472d577ede41eb4e409..fbb18d066cd0565491e997dfe0740b125a62df6f 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 c973bfaa341490e661eada64f5e2f208f4635b55..38d5db50b1eded5506558b8fb5ae5926c4554b5d 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 348c40fcddcbfc218f4c774498301b0e287c9a85..dd2785e65f80071ef93016ebe8f72d0089077cb9 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 baaaf2a5dc7b80884332a14924c06a4f7b2c65a9..1bc12f8b716d8ab6298991bf9842db4c6a31836a 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 5eb906a0d0d25489e2c520b84bb253ede80969fd..91861a9cbe5726831e45e329d8e0d52c34d6ece9 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];