summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rate.h
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-02-12 11:38:37 +0530
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:51:45 -0500
commit81cb7623ad3b408f871fa36b774fc20d8dfccac0 (patch)
tree4a5f0811f0030059321858c634cf7ba5613fb78f /net/mac80211/rate.h
parentb06e786d4c850515e2efdf6dc37ba9e2ffc86bab (diff)
mac80211: Extend the rate control API with an update callback
The AP can switch dynamically between 20/40 Mhz channel width, in which case we switch the local operating channel, but the rate control algorithm is not notified. This patch adds a new callback to indicate such changes to the RC algorithm. Currently, HT channel width change is notified, but this callback can be used to indicate any new requirements that might come up later on. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rate.h')
-rw-r--r--net/mac80211/rate.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 928da625e28..b9164c9a956 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -62,6 +62,18 @@ static inline void rate_control_rate_init(struct sta_info *sta)
ref->ops->rate_init(ref->priv, sband, ista, priv_sta);
}
+static inline void rate_control_rate_update(struct ieee80211_local *local,
+ struct ieee80211_supported_band *sband,
+ struct sta_info *sta, u32 changed)
+{
+ struct rate_control_ref *ref = local->rate_ctrl;
+ struct ieee80211_sta *ista = &sta->sta;
+ void *priv_sta = sta->rate_ctrl_priv;
+
+ if (ref->ops->rate_update)
+ ref->ops->rate_update(ref->priv, sband, ista,
+ priv_sta, changed);
+}
static inline void *rate_control_alloc_sta(struct rate_control_ref *ref,
struct ieee80211_sta *sta,