aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 10:04:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:10 -0400
commit042ec4533720122e6cb93dd9f3b6a75fe2fcff16 (patch)
treeed8fad40c171ab54155ce316496f68d79b438b01 /drivers/net/wireless/ath/ath9k/xmit.c
parent941c93cd039852b7ab02c74f4698c99d82bd6cfe (diff)
mac80211: let drivers inform it about per TID buffered frames
For uAPSD implementation, it is necessary to know on which ACs frames are buffered. mac80211 obviously knows about the frames it has buffered itself, but with aggregation many drivers buffer frames. Thus, mac80211 needs to be informed about this. For now, since we don't have APSD in any form, this will unconditionally set the TIM bit for the station but later with uAPSD only some ACs might cause the TIM bit to be set. ath9k is the only driver using this API and I only modify it in the most basic way, it won't be able to implement uAPSD with this yet. But it can't do that anyway since there's no way to selectively release frames to the peer yet. Since drivers will buffer frames per TID, let them inform mac80211 on a per TID basis, mac80211 will then sort out the AC mapping itself. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index f5d4764888b..c2bfc57958d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -542,7 +542,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
542 /* prepend un-acked frames to the beginning of the pending frame queue */ 542 /* prepend un-acked frames to the beginning of the pending frame queue */
543 if (!skb_queue_empty(&bf_pending)) { 543 if (!skb_queue_empty(&bf_pending)) {
544 if (an->sleeping) 544 if (an->sleeping)
545 ieee80211_sta_set_tim(sta); 545 ieee80211_sta_set_buffered(sta, tid->tidno, true);
546 546
547 spin_lock_bh(&txq->axq_lock); 547 spin_lock_bh(&txq->axq_lock);
548 if (clear_filter) 548 if (clear_filter)
@@ -1153,12 +1153,13 @@ void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
1153 ath_tx_flush_tid(sc, txtid); 1153 ath_tx_flush_tid(sc, txtid);
1154} 1154}
1155 1155
1156bool ath_tx_aggr_sleep(struct ath_softc *sc, struct ath_node *an) 1156void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
1157 struct ath_node *an)
1157{ 1158{
1158 struct ath_atx_tid *tid; 1159 struct ath_atx_tid *tid;
1159 struct ath_atx_ac *ac; 1160 struct ath_atx_ac *ac;
1160 struct ath_txq *txq; 1161 struct ath_txq *txq;
1161 bool buffered = false; 1162 bool buffered;
1162 int tidno; 1163 int tidno;
1163 1164
1164 for (tidno = 0, tid = &an->tid[tidno]; 1165 for (tidno = 0, tid = &an->tid[tidno];
@@ -1172,8 +1173,7 @@ bool ath_tx_aggr_sleep(struct ath_softc *sc, struct ath_node *an)
1172 1173
1173 spin_lock_bh(&txq->axq_lock); 1174 spin_lock_bh(&txq->axq_lock);
1174 1175
1175 if (!skb_queue_empty(&tid->buf_q)) 1176 buffered = !skb_queue_empty(&tid->buf_q);
1176 buffered = true;
1177 1177
1178 tid->sched = false; 1178 tid->sched = false;
1179 list_del(&tid->list); 1179 list_del(&tid->list);
@@ -1184,9 +1184,9 @@ bool ath_tx_aggr_sleep(struct ath_softc *sc, struct ath_node *an)
1184 } 1184 }
1185 1185
1186 spin_unlock_bh(&txq->axq_lock); 1186 spin_unlock_bh(&txq->axq_lock);
1187 }
1188 1187
1189 return buffered; 1188 ieee80211_sta_set_buffered(sta, tidno, buffered);
1189 }
1190} 1190}
1191 1191
1192void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an) 1192void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an)