diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2008-06-06 16:53:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:17:56 -0400 |
commit | b869767b6f5049f1d1ede2bb3e48832e0722ca5a (patch) | |
tree | a75e43aad931ffdaea889af7b2275f12a16f077a /drivers/net/wireless/rt2x00/rt2x00queue.h | |
parent | 6db3786aee36b32e5ed072ed67fad6d5341b0991 (diff) |
rt2x00: Don't kick TX queue after each frame
TX queues shouldn't be kicked after each frame that is put into the
queue. This could cause problems during RTS and CTS-to-self as well
as with fragmentation. In all those cases you want all frames to be
send out in a single burst. Off course we shouldn't let the queue fill
up entirely, thus we introduce a 10% threshold which, when reached,
will force the frames to be send out regardless of the frame.
In addition we should prevent queues to become full in such a way
that the tx() handler can fail. Instead of stopping the queue when
it is full, we should stop it when it is below the threshold.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 303d5568470d..623fc27dc7bb 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -82,12 +82,10 @@ enum data_queue_qid { | |||
82 | /** | 82 | /** |
83 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc | 83 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc |
84 | * | 84 | * |
85 | * @FRAME_DESC_DRIVER_GENERATED: Frame was generated inside driver | ||
86 | * and should not be reported back to mac80211 during txdone. | ||
87 | */ | 85 | */ |
88 | enum skb_frame_desc_flags { | 86 | //enum skb_frame_desc_flags { |
89 | FRAME_DESC_DRIVER_GENERATED = 1 << 0, | 87 | // TEMPORARILY EMPTY |
90 | }; | 88 | //}; |
91 | 89 | ||
92 | /** | 90 | /** |
93 | * struct skb_frame_desc: Descriptor information for the skb buffer | 91 | * struct skb_frame_desc: Descriptor information for the skb buffer |
@@ -325,6 +323,7 @@ enum queue_index { | |||
325 | * index corruption due to concurrency. | 323 | * index corruption due to concurrency. |
326 | * @count: Number of frames handled in the queue. | 324 | * @count: Number of frames handled in the queue. |
327 | * @limit: Maximum number of entries in the queue. | 325 | * @limit: Maximum number of entries in the queue. |
326 | * @threshold: Minimum number of free entries before queue is kicked by force. | ||
328 | * @length: Number of frames in queue. | 327 | * @length: Number of frames in queue. |
329 | * @index: Index pointers to entry positions in the queue, | 328 | * @index: Index pointers to entry positions in the queue, |
330 | * use &enum queue_index to get a specific index field. | 329 | * use &enum queue_index to get a specific index field. |
@@ -343,6 +342,7 @@ struct data_queue { | |||
343 | spinlock_t lock; | 342 | spinlock_t lock; |
344 | unsigned int count; | 343 | unsigned int count; |
345 | unsigned short limit; | 344 | unsigned short limit; |
345 | unsigned short threshold; | ||
346 | unsigned short length; | 346 | unsigned short length; |
347 | unsigned short index[Q_INDEX_MAX]; | 347 | unsigned short index[Q_INDEX_MAX]; |
348 | 348 | ||
@@ -467,6 +467,15 @@ static inline int rt2x00queue_available(struct data_queue *queue) | |||
467 | } | 467 | } |
468 | 468 | ||
469 | /** | 469 | /** |
470 | * rt2x00queue_threshold - Check if the queue is below threshold | ||
471 | * @queue: Queue to check. | ||
472 | */ | ||
473 | static inline int rt2x00queue_threshold(struct data_queue *queue) | ||
474 | { | ||
475 | return rt2x00queue_available(queue) < queue->threshold; | ||
476 | } | ||
477 | |||
478 | /** | ||
470 | * rt2x00_desc_read - Read a word from the hardware descriptor. | 479 | * rt2x00_desc_read - Read a word from the hardware descriptor. |
471 | * @desc: Base descriptor address | 480 | * @desc: Base descriptor address |
472 | * @word: Word index from where the descriptor should be read. | 481 | * @word: Word index from where the descriptor should be read. |