iwlwifi: remove sku field from hw_params
authorJohannes Berg <johannes.berg@intel.com>
Tue, 19 Jun 2012 06:42:08 +0000 (08:42 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Jun 2012 06:42:21 +0000 (08:42 +0200)
Now that the eeprom parsing code overrides the sku
field directly with 11n_disable parameters, there's
no longer a need to keep a copy of this field.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/dev.h
drivers/net/wireless/iwlwifi/dvm/lib.c
drivers/net/wireless/iwlwifi/dvm/mac80211.c
drivers/net/wireless/iwlwifi/dvm/main.c

index 4620b657948a0731bdbcadce4cad5ac57c13b1f8..54cf085ddc8965d74cdf053750862afe51bff814 100644 (file)
@@ -568,7 +568,6 @@ enum iwl_scan_type {
  *
  * @tx_chains_num: Number of TX chains
  * @rx_chains_num: Number of RX chains
- * @sku: sku read from EEPROM
  * @ct_kill_threshold: temperature threshold - in hw dependent unit
  * @ct_kill_exit_threshold: when to reeable the device - in hw dependent unit
  *     relevant for 1000, 6000 and up
@@ -579,7 +578,6 @@ struct iwl_hw_params {
        u8  tx_chains_num;
        u8  rx_chains_num;
        bool use_rts_for_aggregation;
-       u16 sku;
        u32 ct_kill_threshold;
        u32 ct_kill_exit_threshold;
 
index 76f259283c3a30f857bfe34550f6897cd244895f..207ae91a83aa83e4f9c36b8fdd2b7bf741ac97f4 100644 (file)
@@ -160,7 +160,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
                                IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK |
                                IWL_PAN_SCD_MULTICAST_MSK;
 
-       if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE)
+       if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)
                flush_cmd.fifo_control |= IWL_AGG_TX_QUEUE_MSK;
 
        IWL_DEBUG_INFO(priv, "fifo queue control: 0X%x\n",
index c57726348ffe758ffc8d4c671c8a26a71504deb9..b581f035d4b075672ff86daeb4391ef8fd7dc06d 100644 (file)
@@ -164,7 +164,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
        hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
         */
 
-       if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE)
+       if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)
                hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
                             IEEE80211_HW_SUPPORTS_STATIC_SMPS;
 
@@ -649,7 +649,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
        IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n",
                     sta->addr, tid);
 
-       if (!(priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE))
+       if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE))
                return -EACCES;
 
        IWL_DEBUG_MAC80211(priv, "enter\n");
index c642c217e29f904693cdfffd61db35ee8363d33e..abfd7916bde60097da978e976a9fca685a6d2a0b 100644 (file)
@@ -1187,9 +1187,6 @@ static void iwl_set_hw_params(struct iwl_priv *priv)
                priv->hw_params.use_rts_for_aggregation =
                        priv->cfg->ht_params->use_rts_for_aggregation;
 
-       if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL)
-               priv->hw_params.sku &= ~EEPROM_SKU_CAP_11N_ENABLE;
-
        /* Device-specific setup */
        priv->lib->set_hw_params(priv);
 }
@@ -1234,20 +1231,20 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
 {
        u16 radio_cfg;
 
-       priv->hw_params.sku = priv->eeprom_data->sku;
+       priv->eeprom_data->sku = priv->eeprom_data->sku;
 
-       if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE &&
+       if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE &&
            !priv->cfg->ht_params) {
                IWL_ERR(priv, "Invalid 11n configuration\n");
                return -EINVAL;
        }
 
-       if (!priv->hw_params.sku) {
+       if (!priv->eeprom_data->sku) {
                IWL_ERR(priv, "Invalid device sku\n");
                return -EINVAL;
        }
 
-       IWL_INFO(priv, "Device SKU: 0x%X\n", priv->hw_params.sku);
+       IWL_INFO(priv, "Device SKU: 0x%X\n", priv->eeprom_data->sku);
 
        radio_cfg = priv->eeprom_data->radio_cfg;
 
@@ -1453,7 +1450,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
         ************************/
        iwl_set_hw_params(priv);
 
-       if (!(priv->hw_params.sku & EEPROM_SKU_CAP_IPAN_ENABLE)) {
+       if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_IPAN_ENABLE)) {
                IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN");
                ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
                /*