aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-09-11 08:34:12 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-17 05:02:09 -0400
commit04ecd2578e712c301fa1369d2a8f298a2b4b146a (patch)
tree81fc8135db27831f4456b61c3aeb5d332848b449 /net/mac80211/iface.c
parent55de908ab292c03f1eb280f51170ddb9c6b57e31 (diff)
mac80211: track needed RX chains for channel contexts
On each channel that the device is operating on, it may need to listen using one or more chains depending on the SMPS settings of the interfaces using it. The previous channel context changes completely removed this ability (before, it was available as the SMPS mode). Add per-context tracking of the required static and dynamic RX chains and notify the driver on changes. To achieve this, track the chains and SMPS mode used on each virtual interface and update the channel context whenever this changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7cb8382b19e5..99f2b19c8f0d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -739,6 +739,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
739 del_timer_sync(&local->dynamic_ps_timer); 739 del_timer_sync(&local->dynamic_ps_timer);
740 cancel_work_sync(&local->dynamic_ps_enable_work); 740 cancel_work_sync(&local->dynamic_ps_enable_work);
741 741
742 cancel_work_sync(&sdata->recalc_smps);
743
742 /* APs need special treatment */ 744 /* APs need special treatment */
743 if (sdata->vif.type == NL80211_IFTYPE_AP) { 745 if (sdata->vif.type == NL80211_IFTYPE_AP) {
744 struct ieee80211_sub_if_data *vlan, *tmpsdata; 746 struct ieee80211_sub_if_data *vlan, *tmpsdata;
@@ -1125,6 +1127,13 @@ static void ieee80211_iface_work(struct work_struct *work)
1125 } 1127 }
1126} 1128}
1127 1129
1130static void ieee80211_recalc_smps_work(struct work_struct *work)
1131{
1132 struct ieee80211_sub_if_data *sdata =
1133 container_of(work, struct ieee80211_sub_if_data, recalc_smps);
1134
1135 ieee80211_recalc_smps(sdata);
1136}
1128 1137
1129/* 1138/*
1130 * Helper function to initialise an interface to a specific type. 1139 * Helper function to initialise an interface to a specific type.
@@ -1153,6 +1162,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
1153 1162
1154 skb_queue_head_init(&sdata->skb_queue); 1163 skb_queue_head_init(&sdata->skb_queue);
1155 INIT_WORK(&sdata->work, ieee80211_iface_work); 1164 INIT_WORK(&sdata->work, ieee80211_iface_work);
1165 INIT_WORK(&sdata->recalc_smps, ieee80211_recalc_smps_work);
1156 1166
1157 switch (type) { 1167 switch (type) {
1158 case NL80211_IFTYPE_P2P_GO: 1168 case NL80211_IFTYPE_P2P_GO: