aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-19 02:42:08 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-20 02:42:21 -0400
commit8d40f4eebf43bd73aa7c6e06665fd7a26012f9c9 (patch)
tree6935c786c5a40b91e52e0030bee6641e11025795 /drivers/net/wireless/iwlwifi
parent0d4e07726ea468c0f9bb7f84b02a9f1bfd16b69e (diff)
iwlwifi: remove sku field from hw_params
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/lib.c2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c4
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c13
4 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
index 4620b657948a..54cf085ddc89 100644
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
@@ -568,7 +568,6 @@ enum iwl_scan_type {
568 * 568 *
569 * @tx_chains_num: Number of TX chains 569 * @tx_chains_num: Number of TX chains
570 * @rx_chains_num: Number of RX chains 570 * @rx_chains_num: Number of RX chains
571 * @sku: sku read from EEPROM
572 * @ct_kill_threshold: temperature threshold - in hw dependent unit 571 * @ct_kill_threshold: temperature threshold - in hw dependent unit
573 * @ct_kill_exit_threshold: when to reeable the device - in hw dependent unit 572 * @ct_kill_exit_threshold: when to reeable the device - in hw dependent unit
574 * relevant for 1000, 6000 and up 573 * relevant for 1000, 6000 and up
@@ -579,7 +578,6 @@ struct iwl_hw_params {
579 u8 tx_chains_num; 578 u8 tx_chains_num;
580 u8 rx_chains_num; 579 u8 rx_chains_num;
581 bool use_rts_for_aggregation; 580 bool use_rts_for_aggregation;
582 u16 sku;
583 u32 ct_kill_threshold; 581 u32 ct_kill_threshold;
584 u32 ct_kill_exit_threshold; 582 u32 ct_kill_exit_threshold;
585 583
diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c
index 76f259283c3a..207ae91a83aa 100644
--- a/drivers/net/wireless/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
@@ -160,7 +160,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
160 IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK | 160 IWL_PAN_SCD_BK_MSK | IWL_PAN_SCD_MGMT_MSK |
161 IWL_PAN_SCD_MULTICAST_MSK; 161 IWL_PAN_SCD_MULTICAST_MSK;
162 162
163 if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE) 163 if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)
164 flush_cmd.fifo_control |= IWL_AGG_TX_QUEUE_MSK; 164 flush_cmd.fifo_control |= IWL_AGG_TX_QUEUE_MSK;
165 165
166 IWL_DEBUG_INFO(priv, "fifo queue control: 0X%x\n", 166 IWL_DEBUG_INFO(priv, "fifo queue control: 0X%x\n",
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index c57726348ffe..b581f035d4b0 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -164,7 +164,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
164 hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; 164 hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
165 */ 165 */
166 166
167 if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE) 167 if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)
168 hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | 168 hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
169 IEEE80211_HW_SUPPORTS_STATIC_SMPS; 169 IEEE80211_HW_SUPPORTS_STATIC_SMPS;
170 170
@@ -649,7 +649,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
649 IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", 649 IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n",
650 sta->addr, tid); 650 sta->addr, tid);
651 651
652 if (!(priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE)) 652 if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE))
653 return -EACCES; 653 return -EACCES;
654 654
655 IWL_DEBUG_MAC80211(priv, "enter\n"); 655 IWL_DEBUG_MAC80211(priv, "enter\n");
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index c642c217e29f..abfd7916bde6 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -1187,9 +1187,6 @@ static void iwl_set_hw_params(struct iwl_priv *priv)
1187 priv->hw_params.use_rts_for_aggregation = 1187 priv->hw_params.use_rts_for_aggregation =
1188 priv->cfg->ht_params->use_rts_for_aggregation; 1188 priv->cfg->ht_params->use_rts_for_aggregation;
1189 1189
1190 if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL)
1191 priv->hw_params.sku &= ~EEPROM_SKU_CAP_11N_ENABLE;
1192
1193 /* Device-specific setup */ 1190 /* Device-specific setup */
1194 priv->lib->set_hw_params(priv); 1191 priv->lib->set_hw_params(priv);
1195} 1192}
@@ -1234,20 +1231,20 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
1234{ 1231{
1235 u16 radio_cfg; 1232 u16 radio_cfg;
1236 1233
1237 priv->hw_params.sku = priv->eeprom_data->sku; 1234 priv->eeprom_data->sku = priv->eeprom_data->sku;
1238 1235
1239 if (priv->hw_params.sku & EEPROM_SKU_CAP_11N_ENABLE && 1236 if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE &&
1240 !priv->cfg->ht_params) { 1237 !priv->cfg->ht_params) {
1241 IWL_ERR(priv, "Invalid 11n configuration\n"); 1238 IWL_ERR(priv, "Invalid 11n configuration\n");
1242 return -EINVAL; 1239 return -EINVAL;
1243 } 1240 }
1244 1241
1245 if (!priv->hw_params.sku) { 1242 if (!priv->eeprom_data->sku) {
1246 IWL_ERR(priv, "Invalid device sku\n"); 1243 IWL_ERR(priv, "Invalid device sku\n");
1247 return -EINVAL; 1244 return -EINVAL;
1248 } 1245 }
1249 1246
1250 IWL_INFO(priv, "Device SKU: 0x%X\n", priv->hw_params.sku); 1247 IWL_INFO(priv, "Device SKU: 0x%X\n", priv->eeprom_data->sku);
1251 1248
1252 radio_cfg = priv->eeprom_data->radio_cfg; 1249 radio_cfg = priv->eeprom_data->radio_cfg;
1253 1250
@@ -1453,7 +1450,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1453 ************************/ 1450 ************************/
1454 iwl_set_hw_params(priv); 1451 iwl_set_hw_params(priv);
1455 1452
1456 if (!(priv->hw_params.sku & EEPROM_SKU_CAP_IPAN_ENABLE)) { 1453 if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_IPAN_ENABLE)) {
1457 IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN"); 1454 IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN");
1458 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; 1455 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1459 /* 1456 /*