iwlwifi: remove chain noise calibration functions from 6000 family
authorJay Sternberg <jay.e.sternberg@linux.intel.com>
Thu, 29 Jan 2009 19:09:16 +0000 (11:09 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Feb 2009 20:03:42 +0000 (15:03 -0500)
redefine structures that contain function pointer for chain noise reset
and chain noise gain for the 6000 family since these are not needed.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-calib.c

index af700707cb73b6e028c84b8f67a83656d73e831a..edfa5e149f71fd57fda248ba7d3e55a355e91fde 100644 (file)
 #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
 #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
 
+static struct iwl_hcmd_utils_ops iwl6000_hcmd_utils = {
+       .get_hcmd_size = iwl5000_get_hcmd_size,
+       .build_addsta_hcmd = iwl5000_build_addsta_hcmd,
+       .rts_tx_cmd_flag = iwl5000_rts_tx_cmd_flag,
+       .calc_rssi = iwl5000_calc_rssi,
+};
+
+static struct iwl_ops iwl6000_ops = {
+       .lib = &iwl5000_lib,
+       .hcmd = &iwl5000_hcmd,
+       .utils = &iwl6000_hcmd_utils,
+};
+
 struct iwl_cfg iwl6000_2ag_cfg = {
        .name = "6000 Series 2x2 AG",
        .fw_name_pre = IWL6000_FW_PRE,
        .ucode_api_max = IWL6000_UCODE_API_MAX,
        .ucode_api_min = IWL6000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G,
-       .ops = &iwl5000_ops,
+       .ops = &iwl6000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
        .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
        .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -83,7 +96,7 @@ struct iwl_cfg iwl6000_2agn_cfg = {
        .ucode_api_max = IWL6000_UCODE_API_MAX,
        .ucode_api_min = IWL6000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
-       .ops = &iwl5000_ops,
+       .ops = &iwl6000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
        .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
        .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -99,7 +112,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
        .ucode_api_max = IWL6050_UCODE_API_MAX,
        .ucode_api_min = IWL6050_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
-       .ops = &iwl5000_ops,
+       .ops = &iwl6000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
        .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
        .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -115,7 +128,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
        .ucode_api_max = IWL6000_UCODE_API_MAX,
        .ucode_api_min = IWL6000_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
-       .ops = &iwl5000_ops,
+       .ops = &iwl6000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
        .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
        .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
@@ -131,7 +144,7 @@ struct iwl_cfg iwl6050_3agn_cfg = {
        .ucode_api_max = IWL6050_UCODE_API_MAX,
        .ucode_api_min = IWL6050_UCODE_API_MIN,
        .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
-       .ops = &iwl5000_ops,
+       .ops = &iwl6000_ops,
        .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
        .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
        .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
index d06c57764e1138336eb512488eb7617bc0a6bb37..d95797ac02cdfbfaede763441cb53daec1714228 100644 (file)
@@ -846,8 +846,9 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
        IWL_DEBUG_CALIB(priv, "min_average_noise = %d, antenna %d\n",
                        min_average_noise, min_average_noise_antenna_i);
 
-       priv->cfg->ops->utils->gain_computation(priv, average_noise,
-               min_average_noise_antenna_i, min_average_noise);
+       if (priv->cfg->ops->utils->gain_computation)
+               priv->cfg->ops->utils->gain_computation(priv, average_noise,
+                       min_average_noise_antenna_i, min_average_noise);
 
        /* Some power changes may have been made during the calibration.
         * Update and commit the RXON