aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/status.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-11-05 15:49:02 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-05 15:49:02 -0500
commit353c78152c10027b8da5de446bad3472f977fcdc (patch)
tree8663ca32b912e8b3df428f570b7fd376aa3aa0cb /net/mac80211/status.c
parent01925efdf7e03b4b803b5c9f985163d687f7f017 (diff)
parentd0a361a5b3f5aa28778a0c336de5a911fc0cd678 (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts: net/wireless/reg.c
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r--net/mac80211/status.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 78dc2e99027e..52a152b01b06 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -194,29 +194,36 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
194 if (ieee80211_is_action(mgmt->frame_control) && 194 if (ieee80211_is_action(mgmt->frame_control) &&
195 mgmt->u.action.category == WLAN_CATEGORY_HT && 195 mgmt->u.action.category == WLAN_CATEGORY_HT &&
196 mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS && 196 mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS &&
197 sdata->vif.type == NL80211_IFTYPE_STATION &&
198 ieee80211_sdata_running(sdata)) { 197 ieee80211_sdata_running(sdata)) {
199 /* 198 enum ieee80211_smps_mode smps_mode;
200 * This update looks racy, but isn't -- if we come 199
201 * here we've definitely got a station that we're
202 * talking to, and on a managed interface that can
203 * only be the AP. And the only other place updating
204 * this variable in managed mode is before association.
205 */
206 switch (mgmt->u.action.u.ht_smps.smps_control) { 200 switch (mgmt->u.action.u.ht_smps.smps_control) {
207 case WLAN_HT_SMPS_CONTROL_DYNAMIC: 201 case WLAN_HT_SMPS_CONTROL_DYNAMIC:
208 sdata->smps_mode = IEEE80211_SMPS_DYNAMIC; 202 smps_mode = IEEE80211_SMPS_DYNAMIC;
209 break; 203 break;
210 case WLAN_HT_SMPS_CONTROL_STATIC: 204 case WLAN_HT_SMPS_CONTROL_STATIC:
211 sdata->smps_mode = IEEE80211_SMPS_STATIC; 205 smps_mode = IEEE80211_SMPS_STATIC;
212 break; 206 break;
213 case WLAN_HT_SMPS_CONTROL_DISABLED: 207 case WLAN_HT_SMPS_CONTROL_DISABLED:
214 default: /* shouldn't happen since we don't send that */ 208 default: /* shouldn't happen since we don't send that */
215 sdata->smps_mode = IEEE80211_SMPS_OFF; 209 smps_mode = IEEE80211_SMPS_OFF;
216 break; 210 break;
217 } 211 }
218 212
219 ieee80211_queue_work(&local->hw, &sdata->recalc_smps); 213 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
214 /*
215 * This update looks racy, but isn't -- if we come
216 * here we've definitely got a station that we're
217 * talking to, and on a managed interface that can
218 * only be the AP. And the only other place updating
219 * this variable in managed mode is before association.
220 */
221 sdata->smps_mode = smps_mode;
222 ieee80211_queue_work(&local->hw, &sdata->recalc_smps);
223 } else if (sdata->vif.type == NL80211_IFTYPE_AP ||
224 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
225 sta->known_smps_mode = smps_mode;
226 }
220 } 227 }
221} 228}
222 229