aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 10:04:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:15 -0400
commit47086fc51aa2220f58049704a8b73e4fcdf372b9 (patch)
tree31f7ae0e59318352d772b62fa26316d349cde88e /include/net/mac80211.h
parent4049e09acdf4ffd270cb8fbf1cf5b39c3d02357c (diff)
mac80211: implement uAPSD
Add uAPSD support to mac80211. This is probably not possible with all devices, so advertising it with the cfg80211 flag will be left up to drivers that want it. Due to my previous patches it is now a fairly straight-forward extension. Drivers need to have accurate TX status reporting for the EOSP frame. For drivers that buffer themselves, the provided APIs allow releasing the right number of frames, but then drivers need to set EOSP and more-data themselves. This is documented in more detail in the new code itself. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index dc2ea46eb5d6..dd07964ef154 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -339,9 +339,9 @@ struct ieee80211_bss_conf {
339 * used to indicate that a frame was already retried due to PS 339 * used to indicate that a frame was already retried due to PS
340 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, 340 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
341 * used to indicate frame should not be encrypted 341 * used to indicate frame should not be encrypted
342 * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) 342 * @IEEE80211_TX_CTL_POLL_RESPONSE: This frame is a response to a poll
343 * This frame is a response to a PS-poll frame and should be sent 343 * frame (PS-Poll or uAPSD) and should be sent although the station
344 * although the station is in powersave mode. 344 * is in powersave mode.
345 * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the 345 * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the
346 * transmit function after the current frame, this can be used 346 * transmit function after the current frame, this can be used
347 * by drivers to kick the DMA queue only if unset or when the 347 * by drivers to kick the DMA queue only if unset or when the
@@ -367,6 +367,10 @@ struct ieee80211_bss_conf {
367 * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate. 367 * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate.
368 * This flag is actually used for management frame especially for P2P 368 * This flag is actually used for management frame especially for P2P
369 * frames not being sent at CCK rate in 2GHz band. 369 * frames not being sent at CCK rate in 2GHz band.
370 * @IEEE80211_TX_STATUS_EOSP: This packet marks the end of service period,
371 * when its status is reported the service period ends. For frames in
372 * an SP that mac80211 transmits, it is already set; for driver frames
373 * the driver may set this flag.
370 * 374 *
371 * Note: If you have to add new flags to the enumeration, then don't 375 * Note: If you have to add new flags to the enumeration, then don't
372 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. 376 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -388,7 +392,7 @@ enum mac80211_tx_control_flags {
388 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 392 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
389 IEEE80211_TX_INTFL_RETRIED = BIT(15), 393 IEEE80211_TX_INTFL_RETRIED = BIT(15),
390 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), 394 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
391 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), 395 IEEE80211_TX_CTL_POLL_RESPONSE = BIT(17),
392 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), 396 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
393 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), 397 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19),
394 IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), 398 IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
@@ -398,6 +402,7 @@ enum mac80211_tx_control_flags {
398 IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), 402 IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25),
399 IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), 403 IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
400 IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27), 404 IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27),
405 IEEE80211_TX_STATUS_EOSP = BIT(28),
401}; 406};
402 407
403#define IEEE80211_TX_CTL_STBC_SHIFT 23 408#define IEEE80211_TX_CTL_STBC_SHIFT 23
@@ -411,9 +416,9 @@ enum mac80211_tx_control_flags {
411 IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \ 416 IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \
412 IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \ 417 IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \
413 IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \ 418 IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \
414 IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_PSPOLL_RESPONSE | \ 419 IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_POLL_RESPONSE | \
415 IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \ 420 IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \
416 IEEE80211_TX_CTL_STBC) 421 IEEE80211_TX_CTL_STBC | IEEE80211_TX_STATUS_EOSP)
417 422
418/** 423/**
419 * enum mac80211_rate_control_flags - per-rate flags set by the 424 * enum mac80211_rate_control_flags - per-rate flags set by the
@@ -1624,9 +1629,12 @@ enum ieee80211_tx_sync_type {
1624/** 1629/**
1625 * enum ieee80211_frame_release_type - frame release reason 1630 * enum ieee80211_frame_release_type - frame release reason
1626 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll 1631 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll
1632 * @IEEE80211_FRAME_RELEASE_UAPSD: frame(s) released due to
1633 * frame received on trigger-enabled AC
1627 */ 1634 */
1628enum ieee80211_frame_release_type { 1635enum ieee80211_frame_release_type {
1629 IEEE80211_FRAME_RELEASE_PSPOLL, 1636 IEEE80211_FRAME_RELEASE_PSPOLL,
1637 IEEE80211_FRAME_RELEASE_UAPSD,
1630}; 1638};
1631 1639
1632/** 1640/**
@@ -1954,7 +1962,9 @@ enum ieee80211_frame_release_type {
1954 * In the case this is used for uAPSD, the @num_frames parameter may be 1962 * In the case this is used for uAPSD, the @num_frames parameter may be
1955 * bigger than one, but the driver may send fewer frames (it must send 1963 * bigger than one, but the driver may send fewer frames (it must send
1956 * at least one, however). In this case it is also responsible for 1964 * at least one, however). In this case it is also responsible for
1957 * setting the EOSP flag in the QoS header of the frames. 1965 * setting the EOSP flag in the QoS header of the frames. Also, when the
1966 * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP
1967 * on the last frame in the SP.
1958 * This callback must be atomic. 1968 * This callback must be atomic.
1959 */ 1969 */
1960struct ieee80211_ops { 1970struct ieee80211_ops {