aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-10-11 15:35:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-11 15:35:42 -0400
commit094daf7db7c47861009899ce23f9177d761e20b0 (patch)
treea107065393720b80664157a035b206576e834793 /include/net
parent3ed6f6958c0ac21958285d8648f14d34da4bbcb3 (diff)
parent5f68a2b0a890d086e40fc7b55f4a0c32c28bc0d2 (diff)
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts: Documentation/feature-removal-schedule.txt
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/l2cap.h3
-rw-r--r--include/net/cfg80211.h29
-rw-r--r--include/net/ieee80211_radiotap.h1
-rw-r--r--include/net/mac80211.h229
4 files changed, 247 insertions, 15 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 7f878b9d5642..ab90ae0970a6 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -354,8 +354,8 @@ struct l2cap_chan {
354 __u8 retry_count; 354 __u8 retry_count;
355 __u8 num_acked; 355 __u8 num_acked;
356 __u16 sdu_len; 356 __u16 sdu_len;
357 __u16 partial_sdu_len;
358 struct sk_buff *sdu; 357 struct sk_buff *sdu;
358 struct sk_buff *sdu_last_frag;
359 359
360 __u8 remote_tx_win; 360 __u8 remote_tx_win;
361 __u8 remote_max_tx; 361 __u8 remote_max_tx;
@@ -448,7 +448,6 @@ enum {
448#define L2CAP_CONF_MAX_CONF_RSP 2 448#define L2CAP_CONF_MAX_CONF_RSP 2
449 449
450enum { 450enum {
451 CONN_SAR_SDU,
452 CONN_SREJ_SENT, 451 CONN_SREJ_SENT,
453 CONN_WAIT_F, 452 CONN_WAIT_F,
454 CONN_SREJ_ACT, 453 CONN_SREJ_ACT,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 31d823a3092b..74f4f85be32f 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -424,6 +424,17 @@ enum plink_actions {
424}; 424};
425 425
426/** 426/**
427 * enum station_parameters_apply_mask - station parameter values to apply
428 * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp)
429 *
430 * Not all station parameters have in-band "no change" signalling,
431 * for those that don't these flags will are used.
432 */
433enum station_parameters_apply_mask {
434 STATION_PARAM_APPLY_UAPSD = BIT(0),
435};
436
437/**
427 * struct station_parameters - station parameters 438 * struct station_parameters - station parameters
428 * 439 *
429 * Used to change and create a new station. 440 * Used to change and create a new station.
@@ -450,6 +461,7 @@ struct station_parameters {
450 u8 *supported_rates; 461 u8 *supported_rates;
451 struct net_device *vlan; 462 struct net_device *vlan;
452 u32 sta_flags_mask, sta_flags_set; 463 u32 sta_flags_mask, sta_flags_set;
464 u32 sta_modify_mask;
453 int listen_interval; 465 int listen_interval;
454 u16 aid; 466 u16 aid;
455 u8 supported_rates_len; 467 u8 supported_rates_len;
@@ -1410,6 +1422,9 @@ struct cfg80211_gtk_rekey_data {
1410 * @set_ringparam: Set tx and rx ring sizes. 1422 * @set_ringparam: Set tx and rx ring sizes.
1411 * 1423 *
1412 * @get_ringparam: Get tx and rx ring current and maximum sizes. 1424 * @get_ringparam: Get tx and rx ring current and maximum sizes.
1425 *
1426 * @tdls_mgmt: Transmit a TDLS management frame.
1427 * @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup).
1413 */ 1428 */
1414struct cfg80211_ops { 1429struct cfg80211_ops {
1415 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); 1430 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -1593,6 +1608,12 @@ struct cfg80211_ops {
1593 1608
1594 int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev, 1609 int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
1595 struct cfg80211_gtk_rekey_data *data); 1610 struct cfg80211_gtk_rekey_data *data);
1611
1612 int (*tdls_mgmt)(struct wiphy *wiphy, struct net_device *dev,
1613 u8 *peer, u8 action_code, u8 dialog_token,
1614 u16 status_code, const u8 *buf, size_t len);
1615 int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev,
1616 u8 *peer, enum nl80211_tdls_operation oper);
1596}; 1617};
1597 1618
1598/* 1619/*
@@ -1645,6 +1666,12 @@ struct cfg80211_ops {
1645 * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the 1666 * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the
1646 * firmware. 1667 * firmware.
1647 * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. 1668 * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP.
1669 * @WIPHY_FLAG_SUPPORTS_TDLS: The device supports TDLS (802.11z) operation.
1670 * @WIPHY_FLAG_TDLS_EXTERNAL_SETUP: The device does not handle TDLS (802.11z)
1671 * link setup/discovery operations internally. Setup, discovery and
1672 * teardown packets should be sent through the @NL80211_CMD_TDLS_MGMT
1673 * command. When this flag is not set, @NL80211_CMD_TDLS_OPER should be
1674 * used for asking the driver/firmware to perform a TDLS operation.
1648 */ 1675 */
1649enum wiphy_flags { 1676enum wiphy_flags {
1650 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1677 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -1661,6 +1688,8 @@ enum wiphy_flags {
1661 WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12), 1688 WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12),
1662 WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13), 1689 WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13),
1663 WIPHY_FLAG_AP_UAPSD = BIT(14), 1690 WIPHY_FLAG_AP_UAPSD = BIT(14),
1691 WIPHY_FLAG_SUPPORTS_TDLS = BIT(15),
1692 WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16),
1664}; 1693};
1665 1694
1666/** 1695/**
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index b0be5fb9de19..7e2c4d483ad0 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -251,6 +251,7 @@ enum ieee80211_radiotap_type {
251 * retries */ 251 * retries */
252#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ 252#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
253#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ 253#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
254#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* don't expect an ack */
254 255
255 256
256/* For IEEE80211_RADIOTAP_MCS */ 257/* For IEEE80211_RADIOTAP_MCS */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1e83afae3c64..cd108dfa1952 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -109,6 +109,7 @@ enum ieee80211_ac_numbers {
109 IEEE80211_AC_BE = 2, 109 IEEE80211_AC_BE = 2,
110 IEEE80211_AC_BK = 3, 110 IEEE80211_AC_BK = 3,
111}; 111};
112#define IEEE80211_NUM_ACS 4
112 113
113/** 114/**
114 * struct ieee80211_tx_queue_params - transmit queue configuration 115 * struct ieee80211_tx_queue_params - transmit queue configuration
@@ -338,9 +339,9 @@ struct ieee80211_bss_conf {
338 * 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
339 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, 340 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
340 * used to indicate frame should not be encrypted 341 * used to indicate frame should not be encrypted
341 * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) 342 * @IEEE80211_TX_CTL_POLL_RESPONSE: This frame is a response to a poll
342 * 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
343 * although the station is in powersave mode. 344 * is in powersave mode.
344 * @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
345 * transmit function after the current frame, this can be used 346 * transmit function after the current frame, this can be used
346 * 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
@@ -366,6 +367,14 @@ struct ieee80211_bss_conf {
366 * @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.
367 * This flag is actually used for management frame especially for P2P 368 * This flag is actually used for management frame especially for P2P
368 * 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. It is also used to do the same for
374 * PS-Poll responses.
375 * @IEEE80211_TX_CTL_USE_MINRATE: This frame will be sent at lowest rate.
376 * This flag is used to send nullfunc frame at minimum rate when
377 * the nullfunc is used for connection monitoring purpose.
369 * 378 *
370 * Note: If you have to add new flags to the enumeration, then don't 379 * Note: If you have to add new flags to the enumeration, then don't
371 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. 380 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -387,7 +396,7 @@ enum mac80211_tx_control_flags {
387 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 396 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
388 IEEE80211_TX_INTFL_RETRIED = BIT(15), 397 IEEE80211_TX_INTFL_RETRIED = BIT(15),
389 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), 398 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
390 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), 399 IEEE80211_TX_CTL_POLL_RESPONSE = BIT(17),
391 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), 400 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
392 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), 401 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19),
393 IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), 402 IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
@@ -397,6 +406,8 @@ enum mac80211_tx_control_flags {
397 IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), 406 IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25),
398 IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), 407 IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
399 IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27), 408 IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27),
409 IEEE80211_TX_STATUS_EOSP = BIT(28),
410 IEEE80211_TX_CTL_USE_MINRATE = BIT(29),
400}; 411};
401 412
402#define IEEE80211_TX_CTL_STBC_SHIFT 23 413#define IEEE80211_TX_CTL_STBC_SHIFT 23
@@ -410,9 +421,9 @@ enum mac80211_tx_control_flags {
410 IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \ 421 IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \
411 IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \ 422 IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \
412 IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \ 423 IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \
413 IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_PSPOLL_RESPONSE | \ 424 IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_POLL_RESPONSE | \
414 IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \ 425 IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \
415 IEEE80211_TX_CTL_STBC) 426 IEEE80211_TX_CTL_STBC | IEEE80211_TX_STATUS_EOSP)
416 427
417/** 428/**
418 * enum mac80211_rate_control_flags - per-rate flags set by the 429 * enum mac80211_rate_control_flags - per-rate flags set by the
@@ -1532,6 +1543,95 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
1532 */ 1543 */
1533 1544
1534/** 1545/**
1546 * DOC: AP support for powersaving clients
1547 *
1548 * In order to implement AP and P2P GO modes, mac80211 has support for
1549 * client powersaving, both "legacy" PS (PS-Poll/null data) and uAPSD.
1550 * There currently is no support for sAPSD.
1551 *
1552 * There is one assumption that mac80211 makes, namely that a client
1553 * will not poll with PS-Poll and trigger with uAPSD at the same time.
1554 * Both are supported, and both can be used by the same client, but
1555 * they can't be used concurrently by the same client. This simplifies
1556 * the driver code.
1557 *
1558 * The first thing to keep in mind is that there is a flag for complete
1559 * driver implementation: %IEEE80211_HW_AP_LINK_PS. If this flag is set,
1560 * mac80211 expects the driver to handle most of the state machine for
1561 * powersaving clients and will ignore the PM bit in incoming frames.
1562 * Drivers then use ieee80211_sta_ps_transition() to inform mac80211 of
1563 * stations' powersave transitions. In this mode, mac80211 also doesn't
1564 * handle PS-Poll/uAPSD.
1565 *
1566 * In the mode without %IEEE80211_HW_AP_LINK_PS, mac80211 will check the
1567 * PM bit in incoming frames for client powersave transitions. When a
1568 * station goes to sleep, we will stop transmitting to it. There is,
1569 * however, a race condition: a station might go to sleep while there is
1570 * data buffered on hardware queues. If the device has support for this
1571 * it will reject frames, and the driver should give the frames back to
1572 * mac80211 with the %IEEE80211_TX_STAT_TX_FILTERED flag set which will
1573 * cause mac80211 to retry the frame when the station wakes up. The
1574 * driver is also notified of powersave transitions by calling its
1575 * @sta_notify callback.
1576 *
1577 * When the station is asleep, it has three choices: it can wake up,
1578 * it can PS-Poll, or it can possibly start a uAPSD service period.
1579 * Waking up is implemented by simply transmitting all buffered (and
1580 * filtered) frames to the station. This is the easiest case. When
1581 * the station sends a PS-Poll or a uAPSD trigger frame, mac80211
1582 * will inform the driver of this with the @allow_buffered_frames
1583 * callback; this callback is optional. mac80211 will then transmit
1584 * the frames as usual and set the %IEEE80211_TX_CTL_POLL_RESPONSE
1585 * on each frame. The last frame in the service period (or the only
1586 * response to a PS-Poll) also has %IEEE80211_TX_STATUS_EOSP set to
1587 * indicate that it ends the service period; as this frame must have
1588 * TX status report it also sets %IEEE80211_TX_CTL_REQ_TX_STATUS.
1589 * When TX status is reported for this frame, the service period is
1590 * marked has having ended and a new one can be started by the peer.
1591 *
1592 * Another race condition can happen on some devices like iwlwifi
1593 * when there are frames queued for the station and it wakes up
1594 * or polls; the frames that are already queued could end up being
1595 * transmitted first instead, causing reordering and/or wrong
1596 * processing of the EOSP. The cause is that allowing frames to be
1597 * transmitted to a certain station is out-of-band communication to
1598 * the device. To allow this problem to be solved, the driver can
1599 * call ieee80211_sta_block_awake() if frames are buffered when it
1600 * is notified that the station went to sleep. When all these frames
1601 * have been filtered (see above), it must call the function again
1602 * to indicate that the station is no longer blocked.
1603 *
1604 * If the driver buffers frames in the driver for aggregation in any
1605 * way, it must use the ieee80211_sta_set_buffered() call when it is
1606 * notified of the station going to sleep to inform mac80211 of any
1607 * TIDs that have frames buffered. Note that when a station wakes up
1608 * this information is reset (hence the requirement to call it when
1609 * informed of the station going to sleep). Then, when a service
1610 * period starts for any reason, @release_buffered_frames is called
1611 * with the number of frames to be released and which TIDs they are
1612 * to come from. In this case, the driver is responsible for setting
1613 * the EOSP (for uAPSD) and MORE_DATA bits in the released frames,
1614 * to help the @more_data paramter is passed to tell the driver if
1615 * there is more data on other TIDs -- the TIDs to release frames
1616 * from are ignored since mac80211 doesn't know how many frames the
1617 * buffers for those TIDs contain.
1618 *
1619 * If the driver also implement GO mode, where absence periods may
1620 * shorten service periods (or abort PS-Poll responses), it must
1621 * filter those response frames except in the case of frames that
1622 * are buffered in the driver -- those must remain buffered to avoid
1623 * reordering. Because it is possible that no frames are released
1624 * in this case, the driver must call ieee80211_sta_eosp_irqsafe()
1625 * to indicate to mac80211 that the service period ended anyway.
1626 *
1627 * Finally, if frames from multiple TIDs are released from mac80211
1628 * but the driver might reorder them, it must clear & set the flags
1629 * appropriately (only the last frame may have %IEEE80211_TX_STATUS_EOSP)
1630 * and also take care of the EOSP and MORE_DATA bits in the frame.
1631 * The driver may also use ieee80211_sta_eosp_irqsafe() in this case.
1632 */
1633
1634/**
1535 * enum ieee80211_filter_flags - hardware filter flags 1635 * enum ieee80211_filter_flags - hardware filter flags
1536 * 1636 *
1537 * These flags determine what the filter in hardware should be 1637 * These flags determine what the filter in hardware should be
@@ -1621,6 +1721,17 @@ enum ieee80211_tx_sync_type {
1621}; 1721};
1622 1722
1623/** 1723/**
1724 * enum ieee80211_frame_release_type - frame release reason
1725 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll
1726 * @IEEE80211_FRAME_RELEASE_UAPSD: frame(s) released due to
1727 * frame received on trigger-enabled AC
1728 */
1729enum ieee80211_frame_release_type {
1730 IEEE80211_FRAME_RELEASE_PSPOLL,
1731 IEEE80211_FRAME_RELEASE_UAPSD,
1732};
1733
1734/**
1624 * struct ieee80211_ops - callbacks from mac80211 to the driver 1735 * struct ieee80211_ops - callbacks from mac80211 to the driver
1625 * 1736 *
1626 * This structure contains various callbacks that the driver may 1737 * This structure contains various callbacks that the driver may
@@ -1930,6 +2041,45 @@ enum ieee80211_tx_sync_type {
1930 * The callback can sleep. 2041 * The callback can sleep.
1931 * @rssi_callback: Notify driver when the average RSSI goes above/below 2042 * @rssi_callback: Notify driver when the average RSSI goes above/below
1932 * thresholds that were registered previously. The callback can sleep. 2043 * thresholds that were registered previously. The callback can sleep.
2044 *
2045 * @release_buffered_frames: Release buffered frames according to the given
2046 * parameters. In the case where the driver buffers some frames for
2047 * sleeping stations mac80211 will use this callback to tell the driver
2048 * to release some frames, either for PS-poll or uAPSD.
2049 * Note that if the @more_data paramter is %false the driver must check
2050 * if there are more frames on the given TIDs, and if there are more than
2051 * the frames being released then it must still set the more-data bit in
2052 * the frame. If the @more_data parameter is %true, then of course the
2053 * more-data bit must always be set.
2054 * The @tids parameter tells the driver which TIDs to release frames
2055 * from, for PS-poll it will always have only a single bit set.
2056 * In the case this is used for a PS-poll initiated release, the
2057 * @num_frames parameter will always be 1 so code can be shared. In
2058 * this case the driver must also set %IEEE80211_TX_STATUS_EOSP flag
2059 * on the TX status (and must report TX status) so that the PS-poll
2060 * period is properly ended. This is used to avoid sending multiple
2061 * responses for a retried PS-poll frame.
2062 * In the case this is used for uAPSD, the @num_frames parameter may be
2063 * bigger than one, but the driver may send fewer frames (it must send
2064 * at least one, however). In this case it is also responsible for
2065 * setting the EOSP flag in the QoS header of the frames. Also, when the
2066 * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP
2067 * on the last frame in the SP. Alternatively, it may call the function
2068 * ieee80211_sta_eosp_irqsafe() to inform mac80211 of the end of the SP.
2069 * This callback must be atomic.
2070 * @allow_buffered_frames: Prepare device to allow the given number of frames
2071 * to go out to the given station. The frames will be sent by mac80211
2072 * via the usual TX path after this call. The TX information for frames
2073 * released will also have the %IEEE80211_TX_CTL_POLL_RESPONSE flag set
2074 * and the last one will also have %IEEE80211_TX_STATUS_EOSP set. In case
2075 * frames from multiple TIDs are released and the driver might reorder
2076 * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag
2077 * on the last frame and clear it on all others and also handle the EOSP
2078 * bit in the QoS header correctly. Alternatively, it can also call the
2079 * ieee80211_sta_eosp_irqsafe() function.
2080 * The @tids parameter is a bitmap and tells the driver which TIDs the
2081 * frames will be on; it will at most have two bits set.
2082 * This callback must be atomic.
1933 */ 2083 */
1934struct ieee80211_ops { 2084struct ieee80211_ops {
1935 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 2085 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -2002,7 +2152,8 @@ struct ieee80211_ops {
2002 struct ieee80211_sta *sta); 2152 struct ieee80211_sta *sta);
2003 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2153 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2004 enum sta_notify_cmd, struct ieee80211_sta *sta); 2154 enum sta_notify_cmd, struct ieee80211_sta *sta);
2005 int (*conf_tx)(struct ieee80211_hw *hw, u16 queue, 2155 int (*conf_tx)(struct ieee80211_hw *hw,
2156 struct ieee80211_vif *vif, u16 queue,
2006 const struct ieee80211_tx_queue_params *params); 2157 const struct ieee80211_tx_queue_params *params);
2007 u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 2158 u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
2008 void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2159 void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -2044,6 +2195,17 @@ struct ieee80211_ops {
2044 const struct cfg80211_bitrate_mask *mask); 2195 const struct cfg80211_bitrate_mask *mask);
2045 void (*rssi_callback)(struct ieee80211_hw *hw, 2196 void (*rssi_callback)(struct ieee80211_hw *hw,
2046 enum ieee80211_rssi_event rssi_event); 2197 enum ieee80211_rssi_event rssi_event);
2198
2199 void (*allow_buffered_frames)(struct ieee80211_hw *hw,
2200 struct ieee80211_sta *sta,
2201 u16 tids, int num_frames,
2202 enum ieee80211_frame_release_type reason,
2203 bool more_data);
2204 void (*release_buffered_frames)(struct ieee80211_hw *hw,
2205 struct ieee80211_sta *sta,
2206 u16 tids, int num_frames,
2207 enum ieee80211_frame_release_type reason,
2208 bool more_data);
2047}; 2209};
2048 2210
2049/** 2211/**
@@ -2361,17 +2523,35 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2361#define IEEE80211_TX_STATUS_HEADROOM 13 2523#define IEEE80211_TX_STATUS_HEADROOM 13
2362 2524
2363/** 2525/**
2364 * ieee80211_sta_set_tim - set the TIM bit for a sleeping station 2526 * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames
2365 * @sta: &struct ieee80211_sta pointer for the sleeping station 2527 * @sta: &struct ieee80211_sta pointer for the sleeping station
2528 * @tid: the TID that has buffered frames
2529 * @buffered: indicates whether or not frames are buffered for this TID
2366 * 2530 *
2367 * If a driver buffers frames for a powersave station instead of passing 2531 * 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 2532 * them back to mac80211 for retransmission, the station may still need
2369 * to wake up using the TIM bitmap in the beacon. 2533 * to be told that there are buffered frames via the TIM bit.
2370 * 2534 *
2371 * This function sets the station's TIM bit - it will be cleared when the 2535 * This function informs mac80211 whether or not there are frames that are
2372 * station wakes up. 2536 * buffered in the driver for a given TID; mac80211 can then use this data
2537 * to set the TIM bit (NOTE: This may call back into the driver's set_tim
2538 * call! Beware of the locking!)
2539 *
2540 * If all frames are released to the station (due to PS-poll or uAPSD)
2541 * then the driver needs to inform mac80211 that there no longer are
2542 * frames buffered. However, when the station wakes up mac80211 assumes
2543 * that all buffered frames will be transmitted and clears this data,
2544 * drivers need to make sure they inform mac80211 about all buffered
2545 * frames on the sleep transition (sta_notify() with %STA_NOTIFY_SLEEP).
2546 *
2547 * Note that technically mac80211 only needs to know this per AC, not per
2548 * TID, but since driver buffering will inevitably happen per TID (since
2549 * it is related to aggregation) it is easier to make mac80211 map the
2550 * TID to the AC as required instead of keeping track in all drivers that
2551 * use this API.
2373 */ 2552 */
2374void ieee80211_sta_set_tim(struct ieee80211_sta *sta); 2553void ieee80211_sta_set_buffered(struct ieee80211_sta *sta,
2554 u8 tid, bool buffered);
2375 2555
2376/** 2556/**
2377 * ieee80211_tx_status - transmit status callback 2557 * ieee80211_tx_status - transmit status callback
@@ -3029,6 +3209,24 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
3029 struct ieee80211_sta *pubsta, bool block); 3209 struct ieee80211_sta *pubsta, bool block);
3030 3210
3031/** 3211/**
3212 * ieee80211_sta_eosp - notify mac80211 about end of SP
3213 * @pubsta: the station
3214 *
3215 * When a device transmits frames in a way that it can't tell
3216 * mac80211 in the TX status about the EOSP, it must clear the
3217 * %IEEE80211_TX_STATUS_EOSP bit and call this function instead.
3218 * This applies for PS-Poll as well as uAPSD.
3219 *
3220 * Note that there is no non-_irqsafe version right now as
3221 * it wasn't needed, but just like _tx_status() and _rx()
3222 * must not be mixed in irqsafe/non-irqsafe versions, this
3223 * function must not be mixed with those either. Use the
3224 * all irqsafe, or all non-irqsafe, don't mix! If you need
3225 * the non-irqsafe version of this, you need to add it.
3226 */
3227void ieee80211_sta_eosp_irqsafe(struct ieee80211_sta *pubsta);
3228
3229/**
3032 * ieee80211_iter_keys - iterate keys programmed into the device 3230 * ieee80211_iter_keys - iterate keys programmed into the device
3033 * @hw: pointer obtained from ieee80211_alloc_hw() 3231 * @hw: pointer obtained from ieee80211_alloc_hw()
3034 * @vif: virtual interface to iterate, may be %NULL for all 3232 * @vif: virtual interface to iterate, may be %NULL for all
@@ -3444,4 +3642,9 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
3444 int rssi_max_thold); 3642 int rssi_max_thold);
3445 3643
3446void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); 3644void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
3645
3646int ieee80211_add_srates_ie(struct ieee80211_vif *vif, struct sk_buff *skb);
3647
3648int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
3649 struct sk_buff *skb);
3447#endif /* MAC80211_H */ 3650#endif /* MAC80211_H */