diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ac2ed8ec662b..112dc18c658f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -6231,8 +6231,6 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, | |||
6231 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 6231 | * @hw: pointer as obtained from ieee80211_alloc_hw() |
6232 | * @ac: AC number to return packets from. | 6232 | * @ac: AC number to return packets from. |
6233 | * | 6233 | * |
6234 | * Should only be called between calls to ieee80211_txq_schedule_start() | ||
6235 | * and ieee80211_txq_schedule_end(). | ||
6236 | * Returns the next txq if successful, %NULL if no queue is eligible. If a txq | 6234 | * Returns the next txq if successful, %NULL if no queue is eligible. If a txq |
6237 | * is returned, it should be returned with ieee80211_return_txq() after the | 6235 | * is returned, it should be returned with ieee80211_return_txq() after the |
6238 | * driver has finished scheduling it. | 6236 | * driver has finished scheduling it. |
@@ -6240,51 +6238,58 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, | |||
6240 | struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac); | 6238 | struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac); |
6241 | 6239 | ||
6242 | /** | 6240 | /** |
6243 | * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq() | 6241 | * ieee80211_txq_schedule_start - start new scheduling round for TXQs |
6244 | * | ||
6245 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
6246 | * @txq: pointer obtained from station or virtual interface | ||
6247 | * | ||
6248 | * Should only be called between calls to ieee80211_txq_schedule_start() | ||
6249 | * and ieee80211_txq_schedule_end(). | ||
6250 | */ | ||
6251 | void ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq); | ||
6252 | |||
6253 | /** | ||
6254 | * ieee80211_txq_schedule_start - acquire locks for safe scheduling of an AC | ||
6255 | * | 6242 | * |
6256 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 6243 | * @hw: pointer as obtained from ieee80211_alloc_hw() |
6257 | * @ac: AC number to acquire locks for | 6244 | * @ac: AC number to acquire locks for |
6258 | * | 6245 | * |
6259 | * Acquire locks needed to schedule TXQs from the given AC. Should be called | 6246 | * Should be called before ieee80211_next_txq() or ieee80211_return_txq(). |
6260 | * before ieee80211_next_txq() or ieee80211_return_txq(). | 6247 | * The driver must not call multiple TXQ scheduling rounds concurrently. |
6261 | */ | 6248 | */ |
6262 | void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac) | 6249 | void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac); |
6263 | __acquires(txq_lock); | 6250 | |
6251 | /* (deprecated) */ | ||
6252 | static inline void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac) | ||
6253 | { | ||
6254 | } | ||
6255 | |||
6256 | void __ieee80211_schedule_txq(struct ieee80211_hw *hw, | ||
6257 | struct ieee80211_txq *txq, bool force); | ||
6264 | 6258 | ||
6265 | /** | 6259 | /** |
6266 | * ieee80211_txq_schedule_end - release locks for safe scheduling of an AC | 6260 | * ieee80211_schedule_txq - schedule a TXQ for transmission |
6267 | * | 6261 | * |
6268 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 6262 | * @hw: pointer as obtained from ieee80211_alloc_hw() |
6269 | * @ac: AC number to acquire locks for | 6263 | * @txq: pointer obtained from station or virtual interface |
6270 | * | 6264 | * |
6271 | * Release locks previously acquired by ieee80211_txq_schedule_end(). | 6265 | * Schedules a TXQ for transmission if it is not already scheduled, |
6266 | * even if mac80211 does not have any packets buffered. | ||
6267 | * | ||
6268 | * The driver may call this function if it has buffered packets for | ||
6269 | * this TXQ internally. | ||
6272 | */ | 6270 | */ |
6273 | void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac) | 6271 | static inline void |
6274 | __releases(txq_lock); | 6272 | ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) |
6273 | { | ||
6274 | __ieee80211_schedule_txq(hw, txq, true); | ||
6275 | } | ||
6275 | 6276 | ||
6276 | /** | 6277 | /** |
6277 | * ieee80211_schedule_txq - schedule a TXQ for transmission | 6278 | * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq() |
6278 | * | 6279 | * |
6279 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 6280 | * @hw: pointer as obtained from ieee80211_alloc_hw() |
6280 | * @txq: pointer obtained from station or virtual interface | 6281 | * @txq: pointer obtained from station or virtual interface |
6282 | * @force: schedule txq even if mac80211 does not have any buffered packets. | ||
6281 | * | 6283 | * |
6282 | * Schedules a TXQ for transmission if it is not already scheduled. Takes a | 6284 | * The driver may set force=true if it has buffered packets for this TXQ |
6283 | * lock, which means it must *not* be called between | 6285 | * internally. |
6284 | * ieee80211_txq_schedule_start() and ieee80211_txq_schedule_end() | ||
6285 | */ | 6286 | */ |
6286 | void ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) | 6287 | static inline void |
6287 | __acquires(txq_lock) __releases(txq_lock); | 6288 | ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq, |
6289 | bool force) | ||
6290 | { | ||
6291 | __ieee80211_schedule_txq(hw, txq, force); | ||
6292 | } | ||
6288 | 6293 | ||
6289 | /** | 6294 | /** |
6290 | * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit | 6295 | * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit |