diff options
author | Michael Wu <flamingice@sourmilk.net> | 2007-12-25 19:33:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:42 -0500 |
commit | 2bc454b0b30b3645d114689b64321cb49be99923 (patch) | |
tree | a6c2bc87e02586f43a71dbb5f1808079df120dec /drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |
parent | 9ab461732a3cd8e7a7cf13cc46ed4c1ac7907824 (diff) |
mac80211: Fix rate reporting regression
Mattias Nissler's "clean up rate selection" patch incorrectly changes
the behavior of txrate setting in sta_info. This patch backs out parts
of the rate selection consolidation in order to fix this issue for now.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 10 |
1 files changed, 8 insertions, 2 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) |