diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-09-29 10:04:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-30 15:57:23 -0400 |
commit | 37fbd9080088f5f98ab81a6f2ad456857971a089 (patch) | |
tree | ea0d90d7d05056abd662e69b096d1d0628126115 /include/net | |
parent | 40b96408831f038b1a6b45e8b22cd050f82a3896 (diff) |
mac80211: allow out-of-band EOSP notification
iwlwifi has a separate EOSP notification from
the device, and to make use of that properly
it needs to be passed to mac80211. To be able
to mix with tx_status_irqsafe and rx_irqsafe
it also needs to be an "_irqsafe" version in
the sense that it goes through the tasklet,
the actual flag clearing would be IRQ-safe
but doing it directly would cause reordering
issues.
This is needed in the case of a P2P GO going
into an absence period without transmitting
any frames that should be driver-released as
in this case there's no other way to inform
mac80211 that the service period ended. Note
that for drivers that don't use the _irqsafe
functions another version of this function
will be required.
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.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 778572d38bd3..3df32a04402c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1971,7 +1971,8 @@ enum ieee80211_frame_release_type { | |||
1971 | * at least one, however). In this case it is also responsible for | 1971 | * at least one, however). In this case it is also responsible for |
1972 | * setting the EOSP flag in the QoS header of the frames. Also, when the | 1972 | * setting the EOSP flag in the QoS header of the frames. Also, when the |
1973 | * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP | 1973 | * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP |
1974 | * on the last frame in the SP. | 1974 | * on the last frame in the SP. Alternatively, it may call the function |
1975 | * ieee80211_sta_eosp_irqsafe() to inform mac80211 of the end of the SP. | ||
1975 | * This callback must be atomic. | 1976 | * This callback must be atomic. |
1976 | * @allow_buffered_frames: Prepare device to allow the given number of frames | 1977 | * @allow_buffered_frames: Prepare device to allow the given number of frames |
1977 | * to go out to the given station. The frames will be sent by mac80211 | 1978 | * to go out to the given station. The frames will be sent by mac80211 |
@@ -1981,7 +1982,8 @@ enum ieee80211_frame_release_type { | |||
1981 | * frames from multiple TIDs are released and the driver might reorder | 1982 | * frames from multiple TIDs are released and the driver might reorder |
1982 | * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag | 1983 | * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag |
1983 | * on the last frame and clear it on all others and also handle the EOSP | 1984 | * on the last frame and clear it on all others and also handle the EOSP |
1984 | * bit in the QoS header correctly. | 1985 | * bit in the QoS header correctly. Alternatively, it can also call the |
1986 | * ieee80211_sta_eosp_irqsafe() function. | ||
1985 | * The @tids parameter is a bitmap and tells the driver which TIDs the | 1987 | * The @tids parameter is a bitmap and tells the driver which TIDs the |
1986 | * frames will be on; it will at most have two bits set. | 1988 | * frames will be on; it will at most have two bits set. |
1987 | * This callback must be atomic. | 1989 | * This callback must be atomic. |
@@ -3113,6 +3115,24 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
3113 | struct ieee80211_sta *pubsta, bool block); | 3115 | struct ieee80211_sta *pubsta, bool block); |
3114 | 3116 | ||
3115 | /** | 3117 | /** |
3118 | * ieee80211_sta_eosp - notify mac80211 about end of SP | ||
3119 | * @pubsta: the station | ||
3120 | * | ||
3121 | * When a device transmits frames in a way that it can't tell | ||
3122 | * mac80211 in the TX status about the EOSP, it must clear the | ||
3123 | * %IEEE80211_TX_STATUS_EOSP bit and call this function instead. | ||
3124 | * This applies for PS-Poll as well as uAPSD. | ||
3125 | * | ||
3126 | * Note that there is no non-_irqsafe version right now as | ||
3127 | * it wasn't needed, but just like _tx_status() and _rx() | ||
3128 | * must not be mixed in irqsafe/non-irqsafe versions, this | ||
3129 | * function must not be mixed with those either. Use the | ||
3130 | * all irqsafe, or all non-irqsafe, don't mix! If you need | ||
3131 | * the non-irqsafe version of this, you need to add it. | ||
3132 | */ | ||
3133 | void ieee80211_sta_eosp_irqsafe(struct ieee80211_sta *pubsta); | ||
3134 | |||
3135 | /** | ||
3116 | * ieee80211_iter_keys - iterate keys programmed into the device | 3136 | * ieee80211_iter_keys - iterate keys programmed into the device |
3117 | * @hw: pointer obtained from ieee80211_alloc_hw() | 3137 | * @hw: pointer obtained from ieee80211_alloc_hw() |
3118 | * @vif: virtual interface to iterate, may be %NULL for all | 3138 | * @vif: virtual interface to iterate, may be %NULL for all |