aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
authorShanyu Zhao <shanyu.zhao@intel.com>2010-09-14 19:23:42 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-28 19:56:03 -0400
commit02796d77cb4cfb64b9465eabbdb13b3b7d1679e9 (patch)
tree0060b46962eaf1255f3b1eaac1d65bf78cba8876 /drivers/net/wireless/iwlwifi/iwl-6000.c
parent6b5ce501428942d9dec864a41ee223307f421574 (diff)
iwlagn: set CSR register for 6050g2 devices
For 6050g2 devices driver needs to set a special bit to CSR register so that uCode can do things correctly in calibration routines. Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 8256034285a6..83a5262d8bd8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -91,6 +91,16 @@ static void iwl6050_additional_nic_config(struct iwl_priv *priv)
91 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); 91 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
92} 92}
93 93
94static void iwl6050g2_additional_nic_config(struct iwl_priv *priv)
95{
96 /* Indicate calibration version to uCode. */
97 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
98 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
99 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
100 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
101 CSR_GP_DRIVER_REG_BIT_6050_1x2);
102}
103
94/* NIC configuration for 6000 series */ 104/* NIC configuration for 6000 series */
95static void iwl6000_nic_config(struct iwl_priv *priv) 105static void iwl6000_nic_config(struct iwl_priv *priv)
96{ 106{
@@ -422,6 +432,10 @@ static struct iwl_nic_ops iwl6050_nic_ops = {
422 .additional_nic_config = &iwl6050_additional_nic_config, 432 .additional_nic_config = &iwl6050_additional_nic_config,
423}; 433};
424 434
435static struct iwl_nic_ops iwl6050g2_nic_ops = {
436 .additional_nic_config = &iwl6050g2_additional_nic_config,
437};
438
425static const struct iwl_ops iwl6000_ops = { 439static const struct iwl_ops iwl6000_ops = {
426 .lib = &iwl6000_lib, 440 .lib = &iwl6000_lib,
427 .hcmd = &iwlagn_hcmd, 441 .hcmd = &iwlagn_hcmd,
@@ -437,6 +451,14 @@ static const struct iwl_ops iwl6050_ops = {
437 .nic = &iwl6050_nic_ops, 451 .nic = &iwl6050_nic_ops,
438}; 452};
439 453
454static const struct iwl_ops iwl6050g2_ops = {
455 .lib = &iwl6000_lib,
456 .hcmd = &iwlagn_hcmd,
457 .utils = &iwlagn_hcmd_utils,
458 .led = &iwlagn_led_ops,
459 .nic = &iwl6050g2_nic_ops,
460};
461
440static const struct iwl_ops iwl6000g2b_ops = { 462static const struct iwl_ops iwl6000g2b_ops = {
441 .lib = &iwl6000g2b_lib, 463 .lib = &iwl6000g2b_lib,
442 .hcmd = &iwlagn_bt_hcmd, 464 .hcmd = &iwlagn_bt_hcmd,
@@ -958,7 +980,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
958 .ucode_api_max = IWL6050_UCODE_API_MAX, 980 .ucode_api_max = IWL6050_UCODE_API_MAX,
959 .ucode_api_min = IWL6050_UCODE_API_MIN, 981 .ucode_api_min = IWL6050_UCODE_API_MIN,
960 .sku = IWL_SKU_G|IWL_SKU_N, 982 .sku = IWL_SKU_G|IWL_SKU_N,
961 .ops = &iwl6050_ops, 983 .ops = &iwl6050g2_ops,
962 .eeprom_size = OTP_LOW_IMAGE_SIZE, 984 .eeprom_size = OTP_LOW_IMAGE_SIZE,
963 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, 985 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
964 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, 986 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,