aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-csr.h12
2 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 6cca1f403da3..10a2800687bc 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -2218,6 +2218,15 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode)
2218{ 2218{
2219 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); 2219 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
2220 2220
2221 /* SKU Control */
2222 iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG,
2223 CSR_HW_IF_CONFIG_REG_MSK_MAC_DASH |
2224 CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP,
2225 (CSR_HW_REV_STEP(priv->trans->hw_rev) <<
2226 CSR_HW_IF_CONFIG_REG_POS_MAC_STEP) |
2227 (CSR_HW_REV_DASH(priv->trans->hw_rev) <<
2228 CSR_HW_IF_CONFIG_REG_POS_MAC_DASH));
2229
2221 priv->lib->nic_config(priv); 2230 priv->lib->nic_config(priv);
2222} 2231}
2223 2232
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 41dc6911b164..34a5287dfc2f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -97,13 +97,10 @@
97/* 97/*
98 * Hardware revision info 98 * Hardware revision info
99 * Bit fields: 99 * Bit fields:
100 * 31-8: Reserved 100 * 31-16: Reserved
101 * 7-4: Type of device: see CSR_HW_REV_TYPE_xxx definitions 101 * 15-4: Type of device: see CSR_HW_REV_TYPE_xxx definitions
102 * 3-2: Revision step: 0 = A, 1 = B, 2 = C, 3 = D 102 * 3-2: Revision step: 0 = A, 1 = B, 2 = C, 3 = D
103 * 1-0: "Dash" (-) value, as in A-1, etc. 103 * 1-0: "Dash" (-) value, as in A-1, etc.
104 *
105 * NOTE: Revision step affects calculation of CCK txpower for 4965.
106 * NOTE: See also CSR_HW_REV_WA_REG (work-around for bug in 4965).
107 */ 104 */
108#define CSR_HW_REV (CSR_BASE+0x028) 105#define CSR_HW_REV (CSR_BASE+0x028)
109 106
@@ -282,7 +279,10 @@
282 279
283 280
284/* HW REV */ 281/* HW REV */
285#define CSR_HW_REV_TYPE_MSK (0x00001F0) 282#define CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0)
283#define CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2)
284
285#define CSR_HW_REV_TYPE_MSK (0x000FFF0)
286#define CSR_HW_REV_TYPE_5300 (0x0000020) 286#define CSR_HW_REV_TYPE_5300 (0x0000020)
287#define CSR_HW_REV_TYPE_5350 (0x0000030) 287#define CSR_HW_REV_TYPE_5350 (0x0000030)
288#define CSR_HW_REV_TYPE_5100 (0x0000050) 288#define CSR_HW_REV_TYPE_5100 (0x0000050)