aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5b60bcf00ec3..bc59c8a20a39 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1184,6 +1184,7 @@ static void sta_ps_start(struct sta_info *sta)
1184 struct ieee80211_sub_if_data *sdata = sta->sdata; 1184 struct ieee80211_sub_if_data *sdata = sta->sdata;
1185 struct ieee80211_local *local = sdata->local; 1185 struct ieee80211_local *local = sdata->local;
1186 struct ps_data *ps; 1186 struct ps_data *ps;
1187 int tid;
1187 1188
1188 if (sta->sdata->vif.type == NL80211_IFTYPE_AP || 1189 if (sta->sdata->vif.type == NL80211_IFTYPE_AP ||
1189 sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 1190 sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -1197,6 +1198,18 @@ static void sta_ps_start(struct sta_info *sta)
1197 drv_sta_notify(local, sdata, STA_NOTIFY_SLEEP, &sta->sta); 1198 drv_sta_notify(local, sdata, STA_NOTIFY_SLEEP, &sta->sta);
1198 ps_dbg(sdata, "STA %pM aid %d enters power save mode\n", 1199 ps_dbg(sdata, "STA %pM aid %d enters power save mode\n",
1199 sta->sta.addr, sta->sta.aid); 1200 sta->sta.addr, sta->sta.aid);
1201
1202 if (!sta->sta.txq[0])
1203 return;
1204
1205 for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
1206 struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);
1207
1208 if (!skb_queue_len(&txqi->queue))
1209 set_bit(tid, &sta->txq_buffered_tids);
1210 else
1211 clear_bit(tid, &sta->txq_buffered_tids);
1212 }
1200} 1213}
1201 1214
1202static void sta_ps_end(struct sta_info *sta) 1215static void sta_ps_end(struct sta_info *sta)