Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 24/29] iwlwifi: configure the SKU in the HW
Date: Wed,  6 Jun 2012 15:22:05 +0200	[thread overview]
Message-ID: <1338988930-11561-24-git-send-email-johannes@sipsolutions.net> (raw)
In-Reply-To: <1338988930-11561-1-git-send-email-johannes@sipsolutions.net>

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

This was missing. Fix the mask of the REV_TYPE on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/dvm/main.c |    9 +++++++++
 drivers/net/wireless/iwlwifi/iwl-csr.h  |   12 ++++++------
 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 6cca1f4..10a2800 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)
 {
 	struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
 
+	/* SKU Control */
+	iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG,
+			  CSR_HW_IF_CONFIG_REG_MSK_MAC_DASH |
+			  CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP,
+			  (CSR_HW_REV_STEP(priv->trans->hw_rev) <<
+				CSR_HW_IF_CONFIG_REG_POS_MAC_STEP) |
+			  (CSR_HW_REV_DASH(priv->trans->hw_rev) <<
+				CSR_HW_IF_CONFIG_REG_POS_MAC_DASH));
+
 	priv->lib->nic_config(priv);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 41dc691..34a5287 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -97,13 +97,10 @@
 /*
  * Hardware revision info
  * Bit fields:
- * 31-8:  Reserved
- *  7-4:  Type of device:  see CSR_HW_REV_TYPE_xxx definitions
+ * 31-16:  Reserved
+ *  15-4:  Type of device:  see CSR_HW_REV_TYPE_xxx definitions
  *  3-2:  Revision step:  0 = A, 1 = B, 2 = C, 3 = D
  *  1-0:  "Dash" (-) value, as in A-1, etc.
- *
- * NOTE:  Revision step affects calculation of CCK txpower for 4965.
- * NOTE:  See also CSR_HW_REV_WA_REG (work-around for bug in 4965).
  */
 #define CSR_HW_REV              (CSR_BASE+0x028)
 
@@ -282,7 +279,10 @@
 
 
 /* HW REV */
-#define CSR_HW_REV_TYPE_MSK            (0x00001F0)
+#define CSR_HW_REV_DASH(_val)          (((_val) & 0x0000003) >> 0)
+#define CSR_HW_REV_STEP(_val)          (((_val) & 0x000000C) >> 2)
+
+#define CSR_HW_REV_TYPE_MSK            (0x000FFF0)
 #define CSR_HW_REV_TYPE_5300           (0x0000020)
 #define CSR_HW_REV_TYPE_5350           (0x0000030)
 #define CSR_HW_REV_TYPE_5100           (0x0000050)
-- 
1.7.10


  parent reply	other threads:[~2012-06-06 13:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 13:21 [PATCH 01/29] iwlwifi: Check BSS ctx active before call mac80211 Johannes Berg
2012-06-06 13:21 ` [PATCH 02/29] iwlwifi: handle race condition in ROC flow Johannes Berg
2012-06-06 13:21 ` [PATCH 03/29] iwlwifi: make a lot of functions static Johannes Berg
2012-06-06 13:21 ` [PATCH 04/29] iwlwifi: use mac80211 channel in connection init Johannes Berg
2012-06-06 13:21 ` [PATCH 05/29] iwlwifi: trust mac80211 channel setting Johannes Berg
2012-06-06 13:21 ` [PATCH 06/29] iwlwifi: use mac80211 channels for reset scan Johannes Berg
2012-06-06 13:21 ` [PATCH 07/29] iwlwifi: use mac80211 channel for radar check Johannes Berg
2012-06-06 13:21 ` [PATCH 08/29] iwlwifi: give HT format to mac80211/radiotap Johannes Berg
2012-06-06 13:21 ` [PATCH 09/29] iwlwifi: clear STATUS_SCAN_HW when PAN_PARAMS fails Johannes Berg
2012-06-06 13:21 ` [PATCH 10/29] iwlwifi: move PCIe into subdirectory Johannes Berg
2012-06-06 13:21 ` [PATCH 11/29] iwlwifi: trust mac80211 HT40 setting Johannes Berg
2012-06-06 13:21 ` [PATCH 12/29] iwlwifi: move DVM code into subdirectory Johannes Berg
2012-06-06 13:21 ` [PATCH 13/29] iwlwifi: unify tx_chains_num setting Johannes Berg
2012-06-06 13:21 ` [PATCH 14/29] iwlwifi: move ht40 bitmap into config Johannes Berg
2012-06-06 13:21 ` [PATCH 15/29] iwlwifi: SCD_INT_MSK is obsolete - don't update it Johannes Berg
2012-06-06 13:21 ` [PATCH 16/29] iwlwifi: first config the SCD queues, then activate them Johannes Berg
2012-06-06 13:21 ` [PATCH 17/29] iwlwifi: use iwl_trans_set_wr_ptrs to init the queues Johannes Berg
2012-06-06 13:21 ` [PATCH 18/29] iwlwifi: s/txq_agg_disable/txq_disable Johannes Berg
2012-06-06 13:22 ` [PATCH 19/29] iwlwifi: s/txq_setup/txq_enable Johannes Berg
2012-06-06 13:22 ` [PATCH 20/29] iwlwifi: update mask value for SCD queue config Johannes Berg
2012-06-06 13:22 ` [PATCH 21/29] iwlwifi: allocate Tx cmd pool per device Johannes Berg
2012-06-06 13:22 ` [PATCH 22/29] iwlwifi: add iwl_set_bits_mask Johannes Berg
2012-06-06 13:22 ` [PATCH 23/29] iwlwifi: fix rf configuration Johannes Berg
2012-06-06 13:22 ` Johannes Berg [this message]
2012-06-06 13:22 ` [PATCH 25/29] iwlwifi: refactor EEPROM reading/parsing Johannes Berg
2012-06-06 13:22 ` [PATCH 26/29] iwlwifi: fix typo 'IWL_WATCHHDOG_DISABLED' Johannes Berg
2012-06-06 13:22 ` [PATCH 27/29] iwlwifi: configure PHY version for 1000 series Johannes Berg
2012-06-06 13:22 ` [PATCH 28/29] iwlwifi: move RF config into NIC config Johannes Berg
2012-06-06 13:22 ` [PATCH 29/29] iwlwifi: remove extern opmode ops declarations Johannes Berg
2012-06-06 13:27 ` [PATCH 00/29] iwlwifi updates for 3.6 Johannes Berg
2012-06-06 13:28   ` Johannes Berg
2012-06-06 13:36   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338988930-11561-24-git-send-email-johannes@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox