aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-14 20:13:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:14 -0400
commit0ab216d9727c0728c8b5f9ad627b6955570303d7 (patch)
treee60e64506e4208451c1d71c1676c39f2438e8179
parente43419f9ad99112a2715ee34c634ffeac3bf730d (diff)
iwlwifi: remove rs_get_rate workaround
This removes the work around implemented for transmitting on an unsupported band on iwlwifi. This was added via the patch: 8e1856e82cb8f541e925738bebfbc473420cda68: iwlwifi: fix rs_get_rate WARN_ON() Cc: Mohamed Abbas <mohamed.abbas@intel.com> Cc: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c11
2 files changed, 3 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index 5eb538d18a8..b23fd537f21 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -674,28 +674,20 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
674 unsigned long flags; 674 unsigned long flags;
675 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 675 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
676 u16 fc; 676 u16 fc;
677 u16 rate_mask = 0; 677 u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
678 s8 max_rate_idx = -1; 678 s8 max_rate_idx = -1;
679 struct iwl_priv *priv = (struct iwl_priv *)priv_r; 679 struct iwl_priv *priv = (struct iwl_priv *)priv_r;
680 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 680 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
681 681
682 IWL_DEBUG_RATE(priv, "enter\n"); 682 IWL_DEBUG_RATE(priv, "enter\n");
683 683
684 if (sta)
685 rate_mask = sta->supp_rates[sband->band];
686
687 /* Send management frames and NO_ACK data using lowest rate. */ 684 /* Send management frames and NO_ACK data using lowest rate. */
688 fc = le16_to_cpu(hdr->frame_control); 685 fc = le16_to_cpu(hdr->frame_control);
689 if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || 686 if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
690 info->flags & IEEE80211_TX_CTL_NO_ACK || 687 info->flags & IEEE80211_TX_CTL_NO_ACK ||
691 !sta || !priv_sta) { 688 !sta || !priv_sta) {
692 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); 689 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
693 if (!rate_mask) 690 info->control.rates[0].idx = rate_lowest_index(sband, sta);
694 info->control.rates[0].idx =
695 rate_lowest_index(sband, NULL);
696 else
697 info->control.rates[0].idx =
698 rate_lowest_index(sband, sta);
699 if (info->flags & IEEE80211_TX_CTL_NO_ACK) 691 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
700 info->control.rates[0].count = 1; 692 info->control.rates[0].count = 1;
701 return; 693 return;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index ff20e5048a5..3fea027f35d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2466,7 +2466,6 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2466 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 2466 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
2467 struct iwl_lq_sta *lq_sta = priv_sta; 2467 struct iwl_lq_sta *lq_sta = priv_sta;
2468 int rate_idx; 2468 int rate_idx;
2469 u64 mask_bit = 0;
2470 2469
2471 IWL_DEBUG_RATE_LIMIT(priv, "rate scale calculate new rate for skb\n"); 2470 IWL_DEBUG_RATE_LIMIT(priv, "rate scale calculate new rate for skb\n");
2472 2471
@@ -2481,18 +2480,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2481 lq_sta->max_rate_idx = -1; 2480 lq_sta->max_rate_idx = -1;
2482 } 2481 }
2483 2482
2484 if (sta)
2485 mask_bit = sta->supp_rates[sband->band];
2486
2487 /* Send management frames and NO_ACK data using lowest rate. */ 2483 /* Send management frames and NO_ACK data using lowest rate. */
2488 if (!ieee80211_is_data(hdr->frame_control) || 2484 if (!ieee80211_is_data(hdr->frame_control) ||
2489 info->flags & IEEE80211_TX_CTL_NO_ACK || !sta || !lq_sta) { 2485 info->flags & IEEE80211_TX_CTL_NO_ACK || !sta || !lq_sta) {
2490 if (!mask_bit) 2486 info->control.rates[0].idx = rate_lowest_index(sband, sta);
2491 info->control.rates[0].idx =
2492 rate_lowest_index(sband, NULL);
2493 else
2494 info->control.rates[0].idx =
2495 rate_lowest_index(sband, sta);
2496 if (info->flags & IEEE80211_TX_CTL_NO_ACK) 2487 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
2497 info->control.rates[0].count = 1; 2488 info->control.rates[0].count = 1;
2498 return; 2489 return;