]> Pileus Git - ~andy/linux/blobdiff - include/net/mac80211.h
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~andy/linux] / include / net / mac80211.h
index cb13239fe8e33be82a17bcf2269c75e74aea5951..d23dd6c1329cf463d5eb5126a97aae94f207bd15 100644 (file)
@@ -1753,8 +1753,19 @@ enum ieee80211_ampdu_mlme_action {
  *     that TX/RX_STOP can pass NULL for this parameter.
  *     The @buf_size parameter is only valid when the action is set to
  *     %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder
- *     buffer size (number of subframes) for this session -- aggregates
- *     containing more subframes than this may not be transmitted to the peer.
+ *     buffer size (number of subframes) for this session -- the driver
+ *     may neither send aggregates containing more subframes than this
+ *     nor send aggregates in a way that lost frames would exceed the
+ *     buffer size. If just limiting the aggregate size, this would be
+ *     possible with a buf_size of 8:
+ *      - TX: 1.....7
+ *      - RX:  2....7 (lost frame #1)
+ *      - TX:        8..1...
+ *     which is invalid since #1 was now re-transmitted well past the
+ *     buffer size of 8. Correct ways to retransmit #1 would be:
+ *      - TX:       1 or 18 or 81
+ *     Even "189" would be wrong since 1 could be lost again.
+ *
  *     Returns a negative error code on failure.
  *     The callback can sleep.
  *
@@ -1808,6 +1819,9 @@ enum ieee80211_ampdu_mlme_action {
  * @set_ringparam: Set tx and rx ring sizes.
  *
  * @get_ringparam: Get tx and rx ring current and maximum sizes.
+ *
+ * @tx_frames_pending: Check if there is any pending frame in the hardware
+ *     queues before entering power save.
  */
 struct ieee80211_ops {
        void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1895,6 +1909,7 @@ struct ieee80211_ops {
        int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
        void (*get_ringparam)(struct ieee80211_hw *hw,
                              u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
+       bool (*tx_frames_pending)(struct ieee80211_hw *hw);
 };
 
 /**
@@ -2211,6 +2226,18 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
  */
 #define IEEE80211_TX_STATUS_HEADROOM   13
 
+/**
+ * ieee80211_sta_set_tim - set the TIM bit for a sleeping station
+ *
+ * If a driver buffers frames for a powersave station instead of passing
+ * them back to mac80211 for retransmission, the station needs to be told
+ * to wake up using the TIM bitmap in the beacon.
+ *
+ * This function sets the station's TIM bit - it will be cleared when the
+ * station wakes up.
+ */
+void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
+
 /**
  * ieee80211_tx_status - transmit status callback
  *