aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
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/ht.c
parentb06e786d4c850515e2efdf6dc37ba9e2ffc86bab (diff)
downloadkernel_samsung_smdk4412-81cb7623ad3b408f871fa36b774fc20d8dfccac0.zip
kernel_samsung_smdk4412-81cb7623ad3b408f871fa36b774fc20d8dfccac0.tar.gz
kernel_samsung_smdk4412-81cb7623ad3b408f871fa36b774fc20d8dfccac0.tar.bz2
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/ht.c')
-rw-r--r--net/mac80211/ht.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 69b6e9a..4e3c72f 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -17,6 +17,7 @@
#include <net/wireless.h>
#include <net/mac80211.h>
#include "ieee80211_i.h"
+#include "rate.h"
void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
struct ieee80211_ht_cap *ht_cap_ie,
@@ -93,7 +94,9 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_bss_ht_conf ht;
+ struct sta_info *sta;
u32 changed = 0;
bool enable_ht = true, ht_changed;
enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
@@ -136,6 +139,16 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
if (ht_changed) {
/* channel_type change automatically detected */
ieee80211_hw_config(local, 0);
+
+ rcu_read_lock();
+
+ sta = sta_info_get(local, ifmgd->bssid);
+ if (sta)
+ rate_control_rate_update(local, sband, sta,
+ IEEE80211_RC_HT_CHANGED);
+
+ rcu_read_unlock();
+
}
/* disable HT */