diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index af6b9d444778..5eb538d18a80 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include "iwl-commands.h" | 39 | #include "iwl-commands.h" |
40 | #include "iwl-3945.h" | 40 | #include "iwl-3945.h" |
41 | #include "iwl-sta.h" | ||
41 | 42 | ||
42 | #define RS_NAME "iwl-3945-rs" | 43 | #define RS_NAME "iwl-3945-rs" |
43 | 44 | ||
@@ -683,11 +684,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
683 | if (sta) | 684 | if (sta) |
684 | rate_mask = sta->supp_rates[sband->band]; | 685 | rate_mask = sta->supp_rates[sband->band]; |
685 | 686 | ||
686 | /* Send management frames and broadcast/multicast data using lowest | 687 | /* Send management frames and NO_ACK data using lowest rate. */ |
687 | * rate. */ | ||
688 | fc = le16_to_cpu(hdr->frame_control); | 688 | fc = le16_to_cpu(hdr->frame_control); |
689 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || | 689 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || |
690 | is_multicast_ether_addr(hdr->addr1) || | 690 | info->flags & IEEE80211_TX_CTL_NO_ACK || |
691 | !sta || !priv_sta) { | 691 | !sta || !priv_sta) { |
692 | IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); | 692 | IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); |
693 | if (!rate_mask) | 693 | if (!rate_mask) |
@@ -696,6 +696,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
696 | else | 696 | else |
697 | info->control.rates[0].idx = | 697 | info->control.rates[0].idx = |
698 | rate_lowest_index(sband, sta); | 698 | rate_lowest_index(sband, sta); |
699 | if (info->flags & IEEE80211_TX_CTL_NO_ACK) | ||
700 | info->control.rates[0].count = 1; | ||
699 | return; | 701 | return; |
700 | } | 702 | } |
701 | 703 | ||
@@ -713,13 +715,13 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
713 | 715 | ||
714 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) && | 716 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) && |
715 | !rs_sta->ibss_sta_added) { | 717 | !rs_sta->ibss_sta_added) { |
716 | u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); | 718 | u8 sta_id = iwl_find_station(priv, hdr->addr1); |
717 | 719 | ||
718 | if (sta_id == IWL_INVALID_STATION) { | 720 | if (sta_id == IWL_INVALID_STATION) { |
719 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pm\n", | 721 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pm\n", |
720 | hdr->addr1); | 722 | hdr->addr1); |
721 | sta_id = iwl3945_add_station(priv, | 723 | sta_id = iwl_add_station(priv, hdr->addr1, false, |
722 | hdr->addr1, 0, CMD_ASYNC); | 724 | CMD_ASYNC, NULL); |
723 | } | 725 | } |
724 | if (sta_id != IWL_INVALID_STATION) | 726 | if (sta_id != IWL_INVALID_STATION) |
725 | rs_sta->ibss_sta_added = 1; | 727 | rs_sta->ibss_sta_added = 1; |
@@ -974,7 +976,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
974 | 976 | ||
975 | rcu_read_lock(); | 977 | rcu_read_lock(); |
976 | 978 | ||
977 | sta = ieee80211_find_sta(hw, priv->stations_39[sta_id].sta.sta.addr); | 979 | sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr); |
978 | if (!sta) { | 980 | if (!sta) { |
979 | rcu_read_unlock(); | 981 | rcu_read_unlock(); |
980 | return; | 982 | return; |