]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iwlegacy: regulatory_bands is not an ops
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 13 Feb 2012 10:23:12 +0000 (11:23 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Feb 2012 19:51:12 +0000 (14:51 -0500)
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/3945.c
drivers/net/wireless/iwlegacy/4965.c
drivers/net/wireless/iwlegacy/common.c
drivers/net/wireless/iwlegacy/common.h

index 6c1ae5fab8999ee4cebb6c8c489d0cef019cc8c9..66a5dc072eb246271995290873d05b5f9560e8a1 100644 (file)
@@ -2646,18 +2646,9 @@ static struct il_lib_ops il3945_lib = {
                    .config = il3945_nic_config,
                    },
        .eeprom_ops = {
-                      .regulatory_bands = {
-                                           EEPROM_REGULATORY_BAND_1_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_2_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_3_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_4_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_5_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_NO_HT40,
-                                           EEPROM_REGULATORY_BAND_NO_HT40,
-                                           },
-                      .acquire_semaphore = il3945_eeprom_acquire_semaphore,
-                      .release_semaphore = il3945_eeprom_release_semaphore,
-                      },
+               .acquire_semaphore = il3945_eeprom_acquire_semaphore,
+               .release_semaphore = il3945_eeprom_release_semaphore,
+       },
        .send_tx_power = il3945_send_tx_power,
        .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
 
@@ -2707,7 +2698,17 @@ static struct il_cfg il3945_bg_cfg = {
        .set_l0s = false,
        .use_bsm = true,
        .led_compensation = 64,
-       .wd_timeout = IL_DEF_WD_TIMEOUT
+       .wd_timeout = IL_DEF_WD_TIMEOUT,
+
+       .regulatory_bands = {
+               EEPROM_REGULATORY_BAND_1_CHANNELS,
+               EEPROM_REGULATORY_BAND_2_CHANNELS,
+               EEPROM_REGULATORY_BAND_3_CHANNELS,
+               EEPROM_REGULATORY_BAND_4_CHANNELS,
+               EEPROM_REGULATORY_BAND_5_CHANNELS,
+               EEPROM_REGULATORY_BAND_NO_HT40,
+               EEPROM_REGULATORY_BAND_NO_HT40,
+       },
 };
 
 static struct il_cfg il3945_abg_cfg = {
@@ -2726,7 +2727,17 @@ static struct il_cfg il3945_abg_cfg = {
        .set_l0s = false,
        .use_bsm = true,
        .led_compensation = 64,
-       .wd_timeout = IL_DEF_WD_TIMEOUT
+       .wd_timeout = IL_DEF_WD_TIMEOUT,
+
+       .regulatory_bands = {
+               EEPROM_REGULATORY_BAND_1_CHANNELS,
+               EEPROM_REGULATORY_BAND_2_CHANNELS,
+               EEPROM_REGULATORY_BAND_3_CHANNELS,
+               EEPROM_REGULATORY_BAND_4_CHANNELS,
+               EEPROM_REGULATORY_BAND_5_CHANNELS,
+               EEPROM_REGULATORY_BAND_NO_HT40,
+               EEPROM_REGULATORY_BAND_NO_HT40,
+       },
 };
 
 DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = {
index 79e4e7971338bd225236b0cda63009756a1f8a3e..aea84bf4e93540bcce57225c46b89d6409e7c1a6 100644 (file)
@@ -2217,14 +2217,6 @@ static struct il_lib_ops il4965_lib = {
                    .config = il4965_nic_config,
                    },
        .eeprom_ops = {
-                      .regulatory_bands = {
-                                           EEPROM_REGULATORY_BAND_1_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_2_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_3_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_4_CHANNELS,
-                                           EEPROM_REGULATORY_BAND_5_CHANNELS,
-                                           EEPROM_4965_REGULATORY_BAND_24_HT40_CHANNELS,
-                                           EEPROM_4965_REGULATORY_BAND_52_HT40_CHANNELS},
                       .acquire_semaphore = il4965_eeprom_acquire_semaphore,
                       .release_semaphore = il4965_eeprom_release_semaphore,
                       },
@@ -2288,6 +2280,17 @@ struct il_cfg il4965_cfg = {
        .ucode_tracing = true,
        .sensitivity_calib_by_driver = true,
        .chain_noise_calib_by_driver = true,
+
+       .regulatory_bands = {
+               EEPROM_REGULATORY_BAND_1_CHANNELS,
+               EEPROM_REGULATORY_BAND_2_CHANNELS,
+               EEPROM_REGULATORY_BAND_3_CHANNELS,
+               EEPROM_REGULATORY_BAND_4_CHANNELS,
+               EEPROM_REGULATORY_BAND_5_CHANNELS,
+               EEPROM_4965_REGULATORY_BAND_24_HT40_CHANNELS,
+               EEPROM_4965_REGULATORY_BAND_52_HT40_CHANNELS
+       },
+
 };
 
 /* Module firmware */
index 50308da8aee334f820d44c6a19ac1a4e84df6ad0..5a7ad52db1d9b00c90480942251aac5dc96ddc47 100644 (file)
@@ -798,8 +798,8 @@ il_init_band_reference(const struct il_priv *il, int eep_band,
                       const struct il_eeprom_channel **eeprom_ch_info,
                       const u8 **eeprom_ch_idx)
 {
-       u32 offset =
-           il->ops->lib->eeprom_ops.regulatory_bands[eep_band - 1];
+       u32 offset = il->cfg->regulatory_bands[eep_band - 1];
+
        switch (eep_band) {
        case 1:         /* 2.4GHz band */
                *eeprom_ch_count = ARRAY_SIZE(il_eeprom_band_1);
@@ -1000,10 +1000,8 @@ il_init_channel_map(struct il_priv *il)
        }
 
        /* Check if we do have HT40 channels */
-       if (il->ops->lib->eeprom_ops.regulatory_bands[5] ==
-           EEPROM_REGULATORY_BAND_NO_HT40 &&
-           il->ops->lib->eeprom_ops.regulatory_bands[6] ==
-           EEPROM_REGULATORY_BAND_NO_HT40)
+       if (il->cfg->regulatory_bands[5] == EEPROM_REGULATORY_BAND_NO_HT40 &&
+           il->cfg->regulatory_bands[6] == EEPROM_REGULATORY_BAND_NO_HT40)
                return 0;
 
        /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */
index fd2a4eea85e485673e4fd4b7e0f7ec62170a76ab..37bc40636c1e32d182a0e0e16b8f78c2cd860ca7 100644 (file)
@@ -426,7 +426,6 @@ struct il_eeprom_calib_info {
 #define EEPROM_REGULATORY_BAND_NO_HT40                 (0)
 
 struct il_eeprom_ops {
-       const u32 regulatory_bands[7];
        int (*acquire_semaphore) (struct il_priv *il);
        void (*release_semaphore) (struct il_priv *il);
 };
@@ -1769,6 +1768,8 @@ struct il_cfg {
        const bool ucode_tracing;
        const bool sensitivity_calib_by_driver;
        const bool chain_noise_calib_by_driver;
+
+       const u32 regulatory_bands[7];
 };
 
 /***************************