Lines Matching +full:queue +full:- +full:rx
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 Copyright (C) 2004 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
10 Abstract: rt2x00 queue datastructures and routines
33 * enum data_queue_qid: Queue identification
35 * @QID_AC_VO: AC VO queue
36 * @QID_AC_VI: AC VI queue
37 * @QID_AC_BE: AC BE queue
38 * @QID_AC_BK: AC BK queue
39 * @QID_HCCA: HCCA queue
40 * @QID_MGMT: MGMT queue (prio queue)
41 * @QID_RX: RX queue
43 * @QID_BEACON: Beacon queue (value unspecified, don't send it to device)
44 * @QID_ATIM: Atim queue (value unspecified, don't send it to device)
62 * @SKBDESC_DMA_MAPPED_RX: &skb_dma field has been mapped for RX
91 * of the scope of the skb->data pointer.
93 * @skb_dma: (PCI-only) the DMA address associated with the sk buffer.
112 * get_skb_frame_desc - Obtain the rt2x00 frame descriptor from a sk_buff.
119 return (struct skb_frame_desc *)&IEEE80211_SKB_CB(skb)->driver_data; in get_skb_frame_desc()
131 * @RXDONE_L2PAD: 802.11 payload has been padded to 4-byte boundary.
144 * RXDONE_SIGNAL_MASK - Define to mask off all &rxdone_entry_desc_flags flags
152 * struct rxdone_entry_desc: RX Entry descriptor
154 * Summary of information that has been read from the RX frame descriptor.
156 * @timestamp: RX Timestamp
231 * @ENTRY_TXD_CTS_FRAME: This frame is a CTS-to-self frame.
282 * @ba_size: Size of the recepients RX reorder buffer - 1.
329 * enum queue_entry_flags: Status flags for queue entry
335 * transfer (either TX or RX depending on the queue). The entry should
360 * @queue: The data queue (&struct data_queue) to which this entry belongs.
361 * @skb: The buffer which is currently being transmitted (for TX queue),
362 * or used to directly receive data in (for RX queue).
364 * @priv_data: Private data belonging to this queue entry. The pointer
365 * points to data specific to a particular driver and queue type.
372 struct data_queue *queue; member
382 * enum queue_index: Queue index type
384 * @Q_INDEX: Index pointer to the current entry in the queue, if this entry is
385 * owned by the hardware then the queue is considered to be full.
390 * entry is not owned by the hardware the queue is considered to be empty.
404 * @QUEUE_STARTED: The queue has been started. Fox RX queues this means the
408 * @QUEUE_PAUSED: The queue has been started but is currently paused.
409 * When this bit is set, the queue has been stopped in mac80211,
419 * struct data_queue: Data queue
421 * @rt2x00dev: Pointer to main &struct rt2x00dev where this queue belongs to.
423 * part of this queue.
424 * @qid: The queue identification, see &enum data_queue_qid.
427 * handling on this queue.
428 * @tx_lock: Spinlock to serialize tx operations on this queue.
432 * @count: Number of frames handled in the queue.
433 * @limit: Maximum number of entries in the queue.
434 * @threshold: Minimum number of free entries before queue is kicked by force.
435 * @length: Number of frames in queue.
436 * @index: Index pointers to entry positions in the queue,
439 * in the queue
440 * @wd_idx: index of queue entry saved by watchdog
442 * @aifs: The aifs value for outgoing frames (field ignored in RX queue).
443 * @cw_min: The cw min value for outgoing frames (field ignored in RX queue).
444 * @cw_max: The cw max value for outgoing frames (field ignored in RX queue).
445 * @data_size: Maximum data size for the frames in this queue.
446 * @desc_size: Hardware descriptor size for the data in this queue.
447 * @priv_size: Size of per-queue_entry private data.
486 * queue_end - Return pointer to the last queue (HELPER MACRO).
489 * Using the base rx pointer and the maximum number of available queues,
494 &(__dev)->rx[(__dev)->data_queues]
497 * tx_queue_end - Return pointer to the last TX queue (HELPER MACRO).
502 * the end of the TX queue array.
505 &(__dev)->tx[(__dev)->ops->tx_queues]
508 * queue_next - Return pointer to next queue in list (HELPER MACRO).
509 * @__queue: Current queue for which we need the next queue
511 * Using the current queue address we take the address directly
512 * after the queue to take the next queue. Note that this macro
515 * &tx_queue_end for determining the end of the queue).
521 * queue_loop - Loop through the queues within a specific range (HELPER MACRO).
522 * @__entry: Pointer where the current queue entry will be stored in.
523 * @__start: Start queue pointer.
524 * @__end: End queue pointer.
534 * queue_for_each - Loop through all queues
536 * @__entry: Pointer where the current queue entry will be stored in.
541 queue_loop(__entry, (__dev)->rx, queue_end(__dev))
544 * tx_queue_for_each - Loop through the TX queues
546 * @__entry: Pointer where the current queue entry will be stored in.
552 queue_loop(__entry, (__dev)->tx, tx_queue_end(__dev))
555 * txall_queue_for_each - Loop through all TX related queues
557 * @__entry: Pointer where the current queue entry will be stored in.
563 queue_loop(__entry, (__dev)->tx, queue_end(__dev))
566 * rt2x00queue_for_each_entry - Loop through all entries in the queue
567 * @queue: Pointer to @data_queue
573 * This will walk through all entries in the queue, in chronological
575 * and will walk through the queue until it reaches the @end pointer.
580 bool rt2x00queue_for_each_entry(struct data_queue *queue,
588 * rt2x00queue_empty - Check if the queue is empty.
589 * @queue: Queue to check if empty.
591 static inline int rt2x00queue_empty(struct data_queue *queue) in rt2x00queue_empty() argument
593 return queue->length == 0; in rt2x00queue_empty()
597 * rt2x00queue_full - Check if the queue is full.
598 * @queue: Queue to check if full.
600 static inline int rt2x00queue_full(struct data_queue *queue) in rt2x00queue_full() argument
602 return queue->length == queue->limit; in rt2x00queue_full()
606 * rt2x00queue_free - Check the number of available entries in queue.
607 * @queue: Queue to check.
609 static inline int rt2x00queue_available(struct data_queue *queue) in rt2x00queue_available() argument
611 return queue->limit - queue->length; in rt2x00queue_available()
615 * rt2x00queue_threshold - Check if the queue is below threshold
616 * @queue: Queue to check.
618 static inline int rt2x00queue_threshold(struct data_queue *queue) in rt2x00queue_threshold() argument
620 return rt2x00queue_available(queue) < queue->threshold; in rt2x00queue_threshold()
623 * rt2x00queue_dma_timeout - Check if a timeout occurred for DMA transfers
624 * @entry: Queue entry to check.
628 if (!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) in rt2x00queue_dma_timeout()
630 return time_after(jiffies, entry->last_action + msecs_to_jiffies(100)); in rt2x00queue_dma_timeout()
634 * _rt2x00_desc_read - Read a word from the hardware descriptor.
644 * rt2x00_desc_read - Read a word from the hardware descriptor, this
655 * rt2x00_desc_write - write a word to the hardware descriptor, this
667 * rt2x00_desc_write - write a word to the hardware descriptor.