aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 10:04:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:15 -0400
commit4049e09acdf4ffd270cb8fbf1cf5b39c3d02357c (patch)
tree87aa0bc08650b5cc745733fcf422dcf871caeb43 /include/net
parent8a8656fa5bbbc8568348d95184d374edb03a48b7 (diff)
mac80211: allow releasing driver-buffered frames
If there are frames for a station buffered in the driver, mac80211 announces those in the TIM IE but there's no way to release them. Add new API to release such frames and use it when the station polls for a frame. Since the API will soon also be used for uAPSD it is easily extensible. Note that before this change drivers announcing driver-buffered frames in the TIM bit actually will respond to a PS-Poll with a potentially lower priority frame (if there are any frames buffered in mac80211), after this patch a driver that hasn't been changed will no longer respond at all. This only affects ath9k, which will need to be fixed to implement the new API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index acf9eaf59641..dc2ea46eb5d6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1622,6 +1622,14 @@ enum ieee80211_tx_sync_type {
1622}; 1622};
1623 1623
1624/** 1624/**
1625 * enum ieee80211_frame_release_type - frame release reason
1626 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll
1627 */
1628enum ieee80211_frame_release_type {
1629 IEEE80211_FRAME_RELEASE_PSPOLL,
1630};
1631
1632/**
1625 * struct ieee80211_ops - callbacks from mac80211 to the driver 1633 * struct ieee80211_ops - callbacks from mac80211 to the driver
1626 * 1634 *
1627 * This structure contains various callbacks that the driver may 1635 * This structure contains various callbacks that the driver may
@@ -1931,6 +1939,23 @@ enum ieee80211_tx_sync_type {
1931 * The callback can sleep. 1939 * The callback can sleep.
1932 * @rssi_callback: Notify driver when the average RSSI goes above/below 1940 * @rssi_callback: Notify driver when the average RSSI goes above/below
1933 * thresholds that were registered previously. The callback can sleep. 1941 * thresholds that were registered previously. The callback can sleep.
1942 *
1943 * @release_buffered_frames: Release buffered frames according to the given
1944 * parameters. In the case where the driver buffers some frames for
1945 * sleeping stations mac80211 will use this callback to tell the driver
1946 * to release some frames, either for PS-poll or uAPSD.
1947 * Note that if the @more_data paramter is %false the driver must check
1948 * if there are more frames on the given TIDs, and if there are more than
1949 * the frames being released then it must still set the more-data bit in
1950 * the frame. If the @more_data parameter is %true, then of course the
1951 * more-data bit must always be set.
1952 * The @tids parameter tells the driver which TIDs to release frames
1953 * from, for PS-poll it will always have only a single bit set.
1954 * 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
1956 * at least one, however). In this case it is also responsible for
1957 * setting the EOSP flag in the QoS header of the frames.
1958 * This callback must be atomic.
1934 */ 1959 */
1935struct ieee80211_ops { 1960struct ieee80211_ops {
1936 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1961 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -2045,6 +2070,12 @@ struct ieee80211_ops {
2045 const struct cfg80211_bitrate_mask *mask); 2070 const struct cfg80211_bitrate_mask *mask);
2046 void (*rssi_callback)(struct ieee80211_hw *hw, 2071 void (*rssi_callback)(struct ieee80211_hw *hw,
2047 enum ieee80211_rssi_event rssi_event); 2072 enum ieee80211_rssi_event rssi_event);
2073
2074 void (*release_buffered_frames)(struct ieee80211_hw *hw,
2075 struct ieee80211_sta *sta,
2076 u16 tids, int num_frames,
2077 enum ieee80211_frame_release_type reason,
2078 bool more_data);
2048}; 2079};
2049 2080
2050/** 2081/**