aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-01-21 14:33:19 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-09 19:04:54 -0500
commit4a02886bae3f2362d4e6efc6fb25dd3507bde8b9 (patch)
treecb4f83f363474bc73e58e518d79f774239c53874 /drivers/net/wireless
parent470ab2dd6a7b0719e59830e11d7bc2e710867b94 (diff)
iwlwifi: remove priv->active_rate_basic
This variable is assigned a default value, but then assigned zero as soon as mac80211 calls a change channel (which will happen right after the hw is started) and after that it never changes again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c51
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c1
6 files changed, 10 insertions, 50 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 696e668b801d..84271cc62afa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -597,10 +597,6 @@ static u16 rs_get_supported_rates(struct iwl_lq_sta *lq_sta,
597 struct ieee80211_hdr *hdr, 597 struct ieee80211_hdr *hdr,
598 enum iwl_table_type rate_type) 598 enum iwl_table_type rate_type)
599{ 599{
600 if (hdr && is_multicast_ether_addr(hdr->addr1) &&
601 lq_sta->active_rate_basic)
602 return lq_sta->active_rate_basic;
603
604 if (is_legacy(rate_type)) { 600 if (is_legacy(rate_type)) {
605 return lq_sta->active_legacy_rate; 601 return lq_sta->active_legacy_rate;
606 } else { 602 } else {
@@ -2552,7 +2548,6 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
2552 lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX; 2548 lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX;
2553 lq_sta->is_green = rs_use_green(sta, &priv->current_ht_config); 2549 lq_sta->is_green = rs_use_green(sta, &priv->current_ht_config);
2554 lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000); 2550 lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000);
2555 lq_sta->active_rate_basic = priv->active_rate_basic;
2556 lq_sta->band = priv->band; 2551 lq_sta->band = priv->band;
2557 /* 2552 /*
2558 * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3), 2553 * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3),
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
index e71923961e69..e182f5a0f736 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
@@ -411,7 +411,6 @@ struct iwl_lq_sta {
411 u16 active_siso_rate; 411 u16 active_siso_rate;
412 u16 active_mimo2_rate; 412 u16 active_mimo2_rate;
413 u16 active_mimo3_rate; 413 u16 active_mimo3_rate;
414 u16 active_rate_basic;
415 s8 max_rate_idx; /* Max rate set by user */ 414 s8 max_rate_idx; /* Max rate set by user */
416 u8 missed_rate_counter; 415 u8 missed_rate_counter;
417 416
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e7e4bf71568c..fbbe99859662 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2104,7 +2104,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
2104 ieee80211_wake_queues(priv->hw); 2104 ieee80211_wake_queues(priv->hw);
2105 2105
2106 priv->active_rate = IWL_RATES_MASK; 2106 priv->active_rate = IWL_RATES_MASK;
2107 priv->active_rate_basic = IWL_RATES_MASK & IWL_BASIC_RATES_MASK;
2108 2107
2109 /* Configure Tx antenna selection based on H/W config */ 2108 /* Configure Tx antenna selection based on H/W config */
2110 if (priv->cfg->ops->hcmd->set_tx_ant) 2109 if (priv->cfg->ops->hcmd->set_tx_ant)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 1cfcc9fe9dc3..8e8f5282c01c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -897,23 +897,10 @@ EXPORT_SYMBOL(iwl_full_rxon_required);
897 897
898u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv) 898u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv)
899{ 899{
900 int i; 900 /*
901 int rate_mask; 901 * Assign the lowest rate -- should really get this from
902 902 * the beacon skb from mac80211.
903 /* Set rate mask*/ 903 */
904 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
905 rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK;
906 else
907 rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK;
908
909 /* Find lowest valid rate */
910 for (i = IWL_RATE_1M_INDEX; i != IWL_RATE_INVALID;
911 i = iwl_rates[i].next_ieee) {
912 if (rate_mask & (1 << i))
913 return iwl_rates[i].plcp;
914 }
915
916 /* No valid rate was found. Assign the lowest one */
917 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) 904 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
918 return IWL_RATE_1M_PLCP; 905 return IWL_RATE_1M_PLCP;
919 else 906 else
@@ -1272,7 +1259,6 @@ static void iwl_set_rate(struct iwl_priv *priv)
1272 } 1259 }
1273 1260
1274 priv->active_rate = 0; 1261 priv->active_rate = 0;
1275 priv->active_rate_basic = 0;
1276 1262
1277 for (i = 0; i < hw->n_bitrates; i++) { 1263 for (i = 0; i < hw->n_bitrates; i++) {
1278 rate = &(hw->bitrates[i]); 1264 rate = &(hw->bitrates[i]);
@@ -1280,30 +1266,13 @@ static void iwl_set_rate(struct iwl_priv *priv)
1280 priv->active_rate |= (1 << rate->hw_value); 1266 priv->active_rate |= (1 << rate->hw_value);
1281 } 1267 }
1282 1268
1283 IWL_DEBUG_RATE(priv, "Set active_rate = %0x, active_rate_basic = %0x\n", 1269 IWL_DEBUG_RATE(priv, "Set active_rate = %0x\n", priv->active_rate);
1284 priv->active_rate, priv->active_rate_basic);
1285 1270
1286 /* 1271 priv->staging_rxon.cck_basic_rates =
1287 * If a basic rate is configured, then use it (adding IWL_RATE_1M_MASK) 1272 (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
1288 * otherwise set it to the default of all CCK rates and 6, 12, 24 for 1273
1289 * OFDM 1274 priv->staging_rxon.ofdm_basic_rates =
1290 */ 1275 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
1291 if (priv->active_rate_basic & IWL_CCK_BASIC_RATES_MASK)
1292 priv->staging_rxon.cck_basic_rates =
1293 ((priv->active_rate_basic &
1294 IWL_CCK_RATES_MASK) >> IWL_FIRST_CCK_RATE) & 0xF;
1295 else
1296 priv->staging_rxon.cck_basic_rates =
1297 (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
1298
1299 if (priv->active_rate_basic & IWL_OFDM_BASIC_RATES_MASK)
1300 priv->staging_rxon.ofdm_basic_rates =
1301 ((priv->active_rate_basic &
1302 (IWL_OFDM_BASIC_RATES_MASK | IWL_RATE_6M_MASK)) >>
1303 IWL_FIRST_OFDM_RATE) & 0xFF;
1304 else
1305 priv->staging_rxon.ofdm_basic_rates =
1306 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
1307} 1276}
1308 1277
1309void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) 1278void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 4d6558fbebe5..ba404b99f4fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1168,7 +1168,6 @@ struct iwl_priv {
1168 u64 led_tpt; 1168 u64 led_tpt;
1169 1169
1170 u16 active_rate; 1170 u16 active_rate;
1171 u16 active_rate_basic;
1172 1171
1173 u8 assoc_station_added; 1172 u8 assoc_station_added;
1174 u8 start_calib; 1173 u8 start_calib;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index b2b050592bc1..9cc15f96d208 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2509,7 +2509,6 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
2509 ieee80211_wake_queues(priv->hw); 2509 ieee80211_wake_queues(priv->hw);
2510 2510
2511 priv->active_rate = IWL_RATES_MASK; 2511 priv->active_rate = IWL_RATES_MASK;
2512 priv->active_rate_basic = IWL_RATES_MASK & IWL_BASIC_RATES_MASK;
2513 2512
2514 iwl_power_update_mode(priv, true); 2513 iwl_power_update_mode(priv, true);
2515 2514