public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cfg80211: initialize rate control after station inserted
@ 2009-08-27 23:34 Reinette Chatre
  2009-08-27 23:34 ` [PATCH 2/2] mac80211: " Reinette Chatre
  2009-08-28  7:45 ` [PATCH 1/2] cfg80211: " Johannes Berg
  0 siblings, 2 replies; 12+ messages in thread
From: Reinette Chatre @ 2009-08-27 23:34 UTC (permalink / raw)
  To: johannes, linville; +Cc: linux-wireless, Reinette Chatre

From: Reinette Chatre <reinette.chatre@intel.com>

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@intel.com>
---
 net/mac80211/cfg.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 5608f6c..598db11 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -729,8 +729,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
 
 	sta_apply_parameters(local, sta, params);
 
-	rate_control_rate_init(sta);
-
 	layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
 		sdata->vif.type == NL80211_IFTYPE_AP;
 
@@ -742,13 +740,17 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
 		if (err == -EEXIST && layer2_update) {
 			/* Need to update layer 2 devices on reassociation */
 			sta = sta_info_get(local, mac);
-			if (sta)
+			if (sta) {
+				rate_control_rate_init(sta);
 				ieee80211_send_layer2_update(sta);
+			}
 		}
 		rcu_read_unlock();
 		return err;
 	}
 
+	rate_control_rate_init(sta);
+
 	if (layer2_update)
 		ieee80211_send_layer2_update(sta);
 
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-08-31 17:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27 23:34 [PATCH 1/2] cfg80211: initialize rate control after station inserted Reinette Chatre
2009-08-27 23:34 ` [PATCH 2/2] mac80211: " Reinette Chatre
2009-08-28  7:45 ` [PATCH 1/2] cfg80211: " Johannes Berg
2009-08-28 15:45   ` reinette chatre
2009-08-28 21:01     ` Johannes Berg
2009-08-28 21:26       ` Luis R. Rodriguez
2009-08-28 21:40       ` Tim Gardner
2009-08-29  5:22         ` Kalle Valo
2009-08-29  9:01         ` Johannes Berg
2009-08-28 22:18       ` reinette chatre
2009-08-29  9:34         ` Johannes Berg
2009-08-31 17:07           ` reinette chatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox