aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-05 14:24:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:15 -0500
commitab0bd5b32a9c7ea2e7cc69d56c82a96be340c269 (patch)
treeffc06b7cd0ea59e6d2ef10091de15ab43cbb6389 /drivers/net/wireless/iwlwifi/iwl-mac80211.c
parent61f0439277abb4f65d99b362b62cbabbde7032a0 (diff)
iwlwifi: fix station HT parameters
My patch "iwlwifi: simplify auth/assoc flow" caused a serious throughput degradation due to me forgetting that there are HT settings in the station table. To restore throughput, set these parameters correctly when the sta moves to assoc state. This patch should probably be merged with the auth/assoc redesign patch for upstream. In that case, this paragraph should be added to the commit log as the third paragraph (before talking about RXON): However, as we only get the station HT data when the station moves into assoc state, we also need to program this into the device (and copy it into our database) then. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-mac80211.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index 8160f615f71a..7f937151a8af 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -740,8 +740,9 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw,
740 enum ieee80211_sta_state new_state) 740 enum ieee80211_sta_state new_state)
741{ 741{
742 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); 742 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
743 struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv;
743 enum { 744 enum {
744 NONE, ADD, REMOVE, RATE_INIT, ADD_RATE_INIT, 745 NONE, ADD, REMOVE, HT_RATE_INIT, ADD_RATE_INIT,
745 } op = NONE; 746 } op = NONE;
746 int ret; 747 int ret;
747 748
@@ -758,7 +759,7 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw,
758 op = REMOVE; 759 op = REMOVE;
759 else if (old_state == IEEE80211_STA_AUTH && 760 else if (old_state == IEEE80211_STA_AUTH &&
760 new_state == IEEE80211_STA_ASSOC) 761 new_state == IEEE80211_STA_ASSOC)
761 op = RATE_INIT; 762 op = HT_RATE_INIT;
762 } else { 763 } else {
763 if (old_state == IEEE80211_STA_AUTH && 764 if (old_state == IEEE80211_STA_AUTH &&
764 new_state == IEEE80211_STA_ASSOC) 765 new_state == IEEE80211_STA_ASSOC)
@@ -779,8 +780,6 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw,
779 ret = iwlagn_mac_sta_add(hw, vif, sta); 780 ret = iwlagn_mac_sta_add(hw, vif, sta);
780 if (ret) 781 if (ret)
781 break; 782 break;
782 /* fall through */
783 case RATE_INIT:
784 /* Initialize rate scaling */ 783 /* Initialize rate scaling */
785 IWL_DEBUG_INFO(priv, 784 IWL_DEBUG_INFO(priv,
786 "Initializing rate scaling for station %pM\n", 785 "Initializing rate scaling for station %pM\n",
@@ -788,6 +787,17 @@ static int iwlagn_mac_sta_state(struct ieee80211_hw *hw,
788 iwl_rs_rate_init(priv, sta, iwl_sta_id(sta)); 787 iwl_rs_rate_init(priv, sta, iwl_sta_id(sta));
789 ret = 0; 788 ret = 0;
790 break; 789 break;
790 case HT_RATE_INIT:
791 /* Initialize rate scaling */
792 ret = iwl_sta_update_ht(priv, vif_priv->ctx, sta);
793 if (ret)
794 break;
795 IWL_DEBUG_INFO(priv,
796 "Initializing rate scaling for station %pM\n",
797 sta->addr);
798 iwl_rs_rate_init(priv, sta, iwl_sta_id(sta));
799 ret = 0;
800 break;
791 default: 801 default:
792 ret = 0; 802 ret = 0;
793 break; 803 break;