aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/net/mac80211.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b5f7ada2f87b..e66638e749c6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2361,17 +2361,35 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2361#define IEEE80211_TX_STATUS_HEADROOM 13 2361#define IEEE80211_TX_STATUS_HEADROOM 13
2362 2362
2363/** 2363/**
2364 * ieee80211_sta_set_tim - set the TIM bit for a sleeping station 2364 * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames
2365 * @sta: &struct ieee80211_sta pointer for the sleeping station 2365 * @sta: &struct ieee80211_sta pointer for the sleeping station
2366 * @tid: the TID that has buffered frames
2367 * @buffered: indicates whether or not frames are buffered for this TID
2366 * 2368 *
2367 * If a driver buffers frames for a powersave station instead of passing 2369 * If a driver buffers frames for a powersave station instead of passing
2368 * them back to mac80211 for retransmission, the station needs to be told 2370 * them back to mac80211 for retransmission, the station may still need
2369 * to wake up using the TIM bitmap in the beacon. 2371 * to be told that there are buffered frames via the TIM bit.
2370 * 2372 *
2371 * This function sets the station's TIM bit - it will be cleared when the 2373 * This function informs mac80211 whether or not there are frames that are
2372 * station wakes up. 2374 * buffered in the driver for a given TID; mac80211 can then use this data
2373 */ 2375 * to set the TIM bit (NOTE: This may call back into the driver's set_tim
2374void ieee80211_sta_set_tim(struct ieee80211_sta *sta); 2376 * call! Beware of the locking!)
2377 *
2378 * If all frames are released to the station (due to PS-poll or uAPSD)
2379 * then the driver needs to inform mac80211 that there no longer are
2380 * frames buffered. However, when the station wakes up mac80211 assumes
2381 * that all buffered frames will be transmitted and clears this data,
2382 * drivers need to make sure they inform mac80211 about all buffered
2383 * frames on the sleep transition (sta_notify() with %STA_NOTIFY_SLEEP).
2384 *
2385 * Note that technically mac80211 only needs to know this per AC, not per
2386 * TID, but since driver buffering will inevitably happen per TID (since
2387 * it is related to aggregation) it is easier to make mac80211 map the
2388 * TID to the AC as required instead of keeping track in all drivers that
2389 * use this API.
2390 */
2391void ieee80211_sta_set_buffered(struct ieee80211_sta *sta,
2392 u8 tid, bool buffered);
2375 2393
2376/** 2394/**
2377 * ieee80211_tx_status - transmit status callback 2395 * ieee80211_tx_status - transmit status callback