diff mbox

[6/6] Work proc for bitrate changes

Message ID 20101013224851.E3E5B2093C@glenhelen.mtv.corp.google.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Paul Stewart Oct. 13, 2010, 10:21 p.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5162303..e617b17 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -339,6 +339,16 @@  static void ieee80211_recalc_smps_work(struct work_struct *work)
 	mutex_unlock(&local->iflist_mtx);
 }
 
+static void ieee80211_rate_notify_work(struct work_struct *work)
+{
+	struct ieee80211_local *local =
+		container_of(work, struct ieee80211_local, rate_notify);
+
+	mutex_lock(&local->iflist_mtx);
+	ieee80211_cqm_bitrate_notify(local);
+	mutex_unlock(&local->iflist_mtx);
+}
+
 #ifdef CONFIG_INET
 static int ieee80211_ifa_changed(struct notifier_block *nb,
 				 unsigned long data, void *arg)
@@ -565,6 +575,7 @@  struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
 
 	INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter);
 	INIT_WORK(&local->recalc_smps, ieee80211_recalc_smps_work);
+	INIT_WORK(&local->rate_notify, ieee80211_rate_notify_work);
 	local->smps_mode = IEEE80211_SMPS_OFF;
 
 	INIT_WORK(&local->dynamic_ps_enable_work,