diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 22 |
2 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index f63a9c5ba262..814afaf6d10b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -683,11 +683,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
683 | if (sta) | 683 | if (sta) |
684 | rate_mask = sta->supp_rates[sband->band]; | 684 | rate_mask = sta->supp_rates[sband->band]; |
685 | 685 | ||
686 | /* Send management frames and broadcast/multicast data using lowest | 686 | /* Send management frames and NO_ACK data using lowest rate. */ |
687 | * rate. */ | ||
688 | fc = le16_to_cpu(hdr->frame_control); | 687 | fc = le16_to_cpu(hdr->frame_control); |
689 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || | 688 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || |
690 | is_multicast_ether_addr(hdr->addr1) || | 689 | info->flags & IEEE80211_TX_CTL_NO_ACK || |
691 | !sta || !priv_sta) { | 690 | !sta || !priv_sta) { |
692 | IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); | 691 | IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); |
693 | if (!rate_mask) | 692 | if (!rate_mask) |
@@ -696,6 +695,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
696 | else | 695 | else |
697 | info->control.rates[0].idx = | 696 | info->control.rates[0].idx = |
698 | rate_lowest_index(sband, sta); | 697 | rate_lowest_index(sband, sta); |
698 | if (info->flags & IEEE80211_TX_CTL_NO_ACK) | ||
699 | info->control.rates[0].count = 1; | ||
699 | return; | 700 | return; |
700 | } | 701 | } |
701 | 702 | ||
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 | ||
174 | static void rs_rate_scale_perform(struct iwl_priv *priv, | 174 | static 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); |
178 | static void rs_fill_link_cmd(const struct iwl_priv *priv, | 178 | static 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); |
999 | out: | 999 | out: |
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 | */ |
1977 | static void rs_rate_scale_perform(struct iwl_priv *priv, | 1977 | static 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 | ||