Search Linux Wireless

[PATCH 2/2] mac80211: initialize rate control after station inserted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Station information may be needed by rate control algorithms, so call rate
scaling initialization after adding the station.

Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
---
 net/mac80211/ibss.c |    3 ++-
 net/mac80211/mlme.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 920ec87..040d184 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -413,11 +413,12 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
 	sta->sta.supp_rates[band] = supp_rates |
 			ieee80211_mandatory_rates(local, band);
 
-	rate_control_rate_init(sta);
 
 	if (sta_info_insert(sta))
 		return NULL;
 
+	rate_control_rate_init(sta);
+
 	return sta;
 }
 
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 97a278a..307b33c 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1554,8 +1554,6 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 
 	ap_ht_cap_flags = sta->sta.ht_cap.cap;
 
-	rate_control_rate_init(sta);
-
 	if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED)
 		set_sta_flags(sta, WLAN_STA_MFP);
 
@@ -1572,6 +1570,8 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 		}
 	}
 
+	rate_control_rate_init(sta);
+
 	rcu_read_unlock();
 
 	if (elems.wmm_param)
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux