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>
This commit is contained in:
Sujith
2009-02-12 11:38:37 +05:30
committed by John W. Linville
parent b06e786d4c
commit 81cb7623ad
3 changed files with 38 additions and 0 deletions

View File

@@ -1974,6 +1974,16 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw,
/* Rate control API */
/**
* enum rate_control_changed - flags to indicate which parameter changed
*
* @IEEE80211_RC_HT_CHANGED: The HT parameters of the operating channel have
* changed, rate control algorithm can update its internal state if needed.
*/
enum rate_control_changed {
IEEE80211_RC_HT_CHANGED = BIT(0)
};
/**
* struct ieee80211_tx_rate_control - rate control information for/from RC algo
*
@@ -2010,6 +2020,9 @@ struct rate_control_ops {
void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
void (*rate_init)(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, void *priv_sta);
void (*rate_update)(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta,
void *priv_sta, u32 changed);
void (*free_sta)(void *priv, struct ieee80211_sta *sta,
void *priv_sta);