aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2009-04-23 13:36:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:14:51 -0400
commit514d65c18ee3595f7f9c9132895ed449f911ecd4 (patch)
tree096cb13a50c70152cda1d5f4d9d8f3aca8efe2bf /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent922368414e5700d1ed51510e54137359297d78e7 (diff)
iwlwifi: Fix handling of retry count of NO_ACK frames in iwl-{3945|agn}-rs
Make iwl-{3945|agn}-rs check for IEEE80211_TX_CTL_NO_ACK instead of is_multicast_ether_addr when determining whether to use the lowest rate, and set the retry count to 0 (total try count = 1) if IEEE80211_TX_CTL_NO_ACK is set. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 3504279c7586..29d38b938f38 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -172,7 +172,7 @@ struct iwl_lq_sta {
172}; 172};
173 173
174static void rs_rate_scale_perform(struct iwl_priv *priv, 174static void rs_rate_scale_perform(struct iwl_priv *priv,
175 struct ieee80211_hdr *hdr, 175 struct sk_buff *skb,
176 struct ieee80211_sta *sta, 176 struct ieee80211_sta *sta,
177 struct iwl_lq_sta *lq_sta); 177 struct iwl_lq_sta *lq_sta);
178static void rs_fill_link_cmd(const struct iwl_priv *priv, 178static void rs_fill_link_cmd(const struct iwl_priv *priv,
@@ -829,7 +829,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
829 IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n"); 829 IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n");
830 830
831 if (!ieee80211_is_data(hdr->frame_control) || 831 if (!ieee80211_is_data(hdr->frame_control) ||
832 is_multicast_ether_addr(hdr->addr1)) 832 info->flags & IEEE80211_TX_CTL_NO_ACK)
833 return; 833 return;
834 834
835 /* This packet was aggregated but doesn't carry rate scale info */ 835 /* This packet was aggregated but doesn't carry rate scale info */
@@ -995,7 +995,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
995 995
996 /* See if there's a better rate or modulation mode to try. */ 996 /* See if there's a better rate or modulation mode to try. */
997 if (sta && sta->supp_rates[sband->band]) 997 if (sta && sta->supp_rates[sband->band])
998 rs_rate_scale_perform(priv, hdr, sta, lq_sta); 998 rs_rate_scale_perform(priv, skb, sta, lq_sta);
999out: 999out:
1000 return; 1000 return;
1001} 1001}
@@ -1975,12 +1975,14 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta)
1975 * Do rate scaling and search for new modulation mode. 1975 * Do rate scaling and search for new modulation mode.
1976 */ 1976 */
1977static void rs_rate_scale_perform(struct iwl_priv *priv, 1977static void rs_rate_scale_perform(struct iwl_priv *priv,
1978 struct ieee80211_hdr *hdr, 1978 struct sk_buff *skb,
1979 struct ieee80211_sta *sta, 1979 struct ieee80211_sta *sta,
1980 struct iwl_lq_sta *lq_sta) 1980 struct iwl_lq_sta *lq_sta)
1981{ 1981{
1982 struct ieee80211_hw *hw = priv->hw; 1982 struct ieee80211_hw *hw = priv->hw;
1983 struct ieee80211_conf *conf = &hw->conf; 1983 struct ieee80211_conf *conf = &hw->conf;
1984 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1985 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1984 int low = IWL_RATE_INVALID; 1986 int low = IWL_RATE_INVALID;
1985 int high = IWL_RATE_INVALID; 1987 int high = IWL_RATE_INVALID;
1986 int index; 1988 int index;
@@ -2006,11 +2008,10 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2006 2008
2007 IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n"); 2009 IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n");
2008 2010
2009 /* Send management frames and broadcast/multicast data using 2011 /* Send management frames and NO_ACK data using lowest rate. */
2010 * lowest rate. */
2011 /* TODO: this could probably be improved.. */ 2012 /* TODO: this could probably be improved.. */
2012 if (!ieee80211_is_data(hdr->frame_control) || 2013 if (!ieee80211_is_data(hdr->frame_control) ||
2013 is_multicast_ether_addr(hdr->addr1)) 2014 info->flags & IEEE80211_TX_CTL_NO_ACK)
2014 return; 2015 return;
2015 2016
2016 if (!sta || !lq_sta) 2017 if (!sta || !lq_sta)
@@ -2450,16 +2451,17 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2450 if (sta) 2451 if (sta)
2451 mask_bit = sta->supp_rates[sband->band]; 2452 mask_bit = sta->supp_rates[sband->band];
2452 2453
2453 /* Send management frames and broadcast/multicast data using lowest 2454 /* Send management frames and NO_ACK data using lowest rate. */
2454 * rate. */
2455 if (!ieee80211_is_data(hdr->frame_control) || 2455 if (!ieee80211_is_data(hdr->frame_control) ||
2456 is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) { 2456 info->flags & IEEE80211_TX_CTL_NO_ACK || !sta || !lq_sta) {
2457 if (!mask_bit) 2457 if (!mask_bit)
2458 info->control.rates[0].idx = 2458 info->control.rates[0].idx =
2459 rate_lowest_index(sband, NULL); 2459 rate_lowest_index(sband, NULL);
2460 else 2460 else
2461 info->control.rates[0].idx = 2461 info->control.rates[0].idx =
2462 rate_lowest_index(sband, sta); 2462 rate_lowest_index(sband, sta);
2463 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
2464 info->control.rates[0].count = 1;
2463 return; 2465 return;
2464 } 2466 }
2465 2467