diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 3e812743f6ad..d79f18c41957 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -657,14 +657,20 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev, | |||
657 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 657 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
658 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 658 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
659 | struct sta_info *sta; | 659 | struct sta_info *sta; |
660 | u16 rate_mask; | 660 | u16 fc, rate_mask; |
661 | struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate; | 661 | struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate; |
662 | DECLARE_MAC_BUF(mac); | 662 | DECLARE_MAC_BUF(mac); |
663 | 663 | ||
664 | IWL_DEBUG_RATE("enter\n"); | 664 | IWL_DEBUG_RATE("enter\n"); |
665 | 665 | ||
666 | sta = sta_info_get(local, hdr->addr1); | 666 | sta = sta_info_get(local, hdr->addr1); |
667 | if (!sta || !sta->rate_ctrl_priv) { | 667 | |
668 | /* Send management frames and broadcast/multicast data using lowest | ||
669 | * rate. */ | ||
670 | fc = le16_to_cpu(hdr->frame_control); | ||
671 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || | ||
672 | is_multicast_ether_addr(hdr->addr1) || | ||
673 | !sta || !sta->rate_ctrl_priv) { | ||
668 | IWL_DEBUG_RATE("leave: No STA priv data to update!\n"); | 674 | IWL_DEBUG_RATE("leave: No STA priv data to update!\n"); |
669 | sel->rate = rate_lowest(local, local->oper_hw_mode, sta); | 675 | sel->rate = rate_lowest(local, local->oper_hw_mode, sta); |
670 | if (sta) | 676 | if (sta) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index 229b34199f92..5081e287b129 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c | |||
@@ -2017,6 +2017,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev, | |||
2017 | struct ieee80211_conf *conf = &local->hw.conf; | 2017 | struct ieee80211_conf *conf = &local->hw.conf; |
2018 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 2018 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
2019 | struct sta_info *sta; | 2019 | struct sta_info *sta; |
2020 | u16 fc; | ||
2020 | struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate; | 2021 | struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate; |
2021 | struct iwl4965_rate_scale_priv *lq; | 2022 | struct iwl4965_rate_scale_priv *lq; |
2022 | 2023 | ||
@@ -2024,7 +2025,11 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev, | |||
2024 | 2025 | ||
2025 | sta = sta_info_get(local, hdr->addr1); | 2026 | sta = sta_info_get(local, hdr->addr1); |
2026 | 2027 | ||
2027 | if (!sta || !sta->rate_ctrl_priv) { | 2028 | /* Send management frames and broadcast/multicast data using lowest |
2029 | * rate. */ | ||
2030 | fc = le16_to_cpu(hdr->frame_control); | ||
2031 | if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) || | ||
2032 | !sta || !sta->rate_ctrl_priv) { | ||
2028 | sel->rate = rate_lowest(local, local->oper_hw_mode, sta); | 2033 | sel->rate = rate_lowest(local, local->oper_hw_mode, sta); |
2029 | if (sta) | 2034 | if (sta) |
2030 | sta_info_put(sta); | 2035 | sta_info_put(sta); |