aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-01-18 11:58:48 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-01-31 16:17:53 -0500
commit52e6b85fe07ed1d2b5c76fd42ce1d77f1a190c72 (patch)
treead1ff1b452637c8fa8db2fad0070b2b045d076e8
parent7fc11e9bbe3436e8110febf0da5c58bcb4342ede (diff)
iwlagn: add IQ inversion support for 2000 series devices
The I/Q swapping is extremely important and should be dealt with extra care. It will affects OFDM and CCK differently. For 6000/6005/6030 series devices, the I/Q were swapped, and for 2000 series devices, it is in non-swapped status (but its swapped with respected to 6000/6005/6030). so the CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER register need to be set to support the correct behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-csr.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 3c9e1b5724c7..ac5996f40e78 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -97,6 +97,10 @@ static void iwl2000_nic_config(struct iwl_priv *priv)
97 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | 97 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
98 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); 98 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
99 99
100 if (priv->cfg->iq_invert)
101 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
102 CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER);
103
100} 104}
101 105
102static struct iwl_sensitivity_ranges iwl2000_sensitivity = { 106static struct iwl_sensitivity_ranges iwl2000_sensitivity = {
@@ -428,7 +432,8 @@ static struct iwl_bt_params iwl2030_bt_params = {
428 .base_params = &iwl2000_base_params, \ 432 .base_params = &iwl2000_base_params, \
429 .need_dc_calib = true, \ 433 .need_dc_calib = true, \
430 .need_temp_offset_calib = true, \ 434 .need_temp_offset_calib = true, \
431 .led_mode = IWL_LED_RF_STATE \ 435 .led_mode = IWL_LED_RF_STATE, \
436 .iq_invert = true \
432 437
433struct iwl_cfg iwl2000_2bgn_cfg = { 438struct iwl_cfg iwl2000_2bgn_cfg = {
434 .name = "2000 Series 2x2 BGN", 439 .name = "2000 Series 2x2 BGN",
@@ -454,7 +459,8 @@ struct iwl_cfg iwl2000_2bg_cfg = {
454 .need_dc_calib = true, \ 459 .need_dc_calib = true, \
455 .need_temp_offset_calib = true, \ 460 .need_temp_offset_calib = true, \
456 .led_mode = IWL_LED_RF_STATE, \ 461 .led_mode = IWL_LED_RF_STATE, \
457 .adv_pm = true \ 462 .adv_pm = true, \
463 .iq_invert = true \
458 464
459struct iwl_cfg iwl2030_2bgn_cfg = { 465struct iwl_cfg iwl2030_2bgn_cfg = {
460 .name = "2000 Series 2x2 BGN/BT", 466 .name = "2000 Series 2x2 BGN/BT",
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index c83fcc60ccc5..b57e739e5bbb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -364,6 +364,7 @@ struct iwl_ht_params {
364 * @adv_pm: advance power management 364 * @adv_pm: advance power management
365 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity 365 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity
366 * @internal_wimax_coex: internal wifi/wimax combo device 366 * @internal_wimax_coex: internal wifi/wimax combo device
367 * @iq_invert: I/Q inversion
367 * 368 *
368 * We enable the driver to be backward compatible wrt API version. The 369 * We enable the driver to be backward compatible wrt API version. The
369 * driver specifies which APIs it supports (with @ucode_api_max being the 370 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -413,6 +414,7 @@ struct iwl_cfg {
413 const bool adv_pm; 414 const bool adv_pm;
414 const bool rx_with_siso_diversity; 415 const bool rx_with_siso_diversity;
415 const bool internal_wimax_coex; 416 const bool internal_wimax_coex;
417 const bool iq_invert;
416}; 418};
417 419
418/*************************** 420/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 6c2b2df7ee7e..f52bc040bcbf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -382,6 +382,8 @@
382#define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004) 382#define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004)
383#define CSR_GP_DRIVER_REG_BIT_6050_1x2 (0x00000008) 383#define CSR_GP_DRIVER_REG_BIT_6050_1x2 (0x00000008)
384 384
385#define CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER (0x00000080)
386
385/* GIO Chicken Bits (PCI Express bus link power management) */ 387/* GIO Chicken Bits (PCI Express bus link power management) */
386#define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) 388#define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000)
387#define CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER (0x20000000) 389#define CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER (0x20000000)