From: Reinette Chatre <reinette.chatre@intel.com>
To: johannes@sipsolutions.net, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 2/2] mac80211: initialize rate control after station inserted
Date: Thu, 27 Aug 2009 16:34:54 -0700 [thread overview]
Message-ID: <1251416094-10420-2-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1251416094-10420-1-git-send-email-reinette.chatre@intel.com>
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/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
next prev parent reply other threads:[~2009-08-27 23:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 23:34 [PATCH 1/2] cfg80211: initialize rate control after station inserted Reinette Chatre
2009-08-27 23:34 ` Reinette Chatre [this message]
2009-08-28 7:45 ` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251416094-10420-2-git-send-email-reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox