STRUCT DATA_QUEUE(9)
π struct data_queue(9) π
okay so this is the struct data_queue manpage from the Kernel API Manual, and bestie, it's literally the blueprint for how a data queue is built in the rt2x00 wireless drivers. it's giving foundational. it's giving "read me before you touch anything." let's get into it β¨
πΈ NAME πΈ
struct data_queue β the Data queue itself, no cap π
π SYNOPSIS π
here's the whole struct, character for character, because we do not paraphrase code in this house:
struct data_queue {
struct rt2x00_dev *rt2x00dev;
struct queue_entry *entries;
enum data_queue_qid qid;
unsigned long flags;
struct mutex status_lock;
spinlock_t tx_lock;
spinlock_t index_lock;
unsigned int count;
unsigned short limit;
unsigned short threshold;
unsigned short length;
unsigned short index[Q_INDEX_MAX];
unsigned short wd_count;
unsigned int wd_idx;
unsigned short txop;
unsigned short aifs;
unsigned short cw_min;
unsigned short cw_max;
unsigned short data_size;
unsigned char desc_size;
unsigned char winfo_size;
unsigned short priv_size;
unsigned short usb_endpoint;
unsigned short usb_maxpacket;
};
like, look at her. every field is a little main character π«Ά
π Members π
one by one, no skips, we're being thorough today:
rt2x00devβ pointer to the mainstruct rt2x00devthat this queue belongs to. her home base, her origin story π«entriesβ base address of thestruct queue_entrythings that are part of this queue. the actual squad.qidβ the queue identification, peepenum data_queue_qidfor the deets.flagsβ entry flags, checkenum queue_entry_flags. iykyk.status_lockβ the mutex protecting the start/stop/flush handling on this queue. she's the bouncer for that whole operation π§tx_lockβ spinlock that serializes tx operations on this queue. one at a time, bestie, no shoving.index_lockβ spinlock protecting index handling. β οΈ real talk: wheneverindex,index_doneorindex_cryptneeds to be changed, you should grab this lock to prevent index corruption due to concurrency. don't skip it. that's a corruption warning, fr fr.countβ number of frames handled in the queue.limitβ maximum number of entries in the queue. the cap. the ceiling. the "no more room at the inn."thresholdβ minimum number of free entries before the queue is kicked by force. yes, by force.lengthβ number of frames in the queue.indexβ index pointers to entry positions in the queue; useenum queue_indexto get a specific index field.wd_countβ watchdog counter, i.e. the number of times an entry does change in the queue. the watchdog is watching πwd_idxβ index of the queue entry saved by the watchdog.txopβ maximum burst time.aifsβ the aifs value for outgoing frames (this field is ignored in the RX queue π).cw_minβ the cw min value for outgoing frames (also ignored in the RX queue π).cw_maxβ the cw max value for outgoing frames (ignored in the RX queue too π).data_sizeβ maximum data size for the frames in this queue.desc_sizeβ hardware descriptor size for the data in this queue.priv_sizeβ size of the per-queue_entryprivate data.usb_endpointβ device endpoint used for communication (USB only). usb girlies only πusb_maxpacketβ max packet size for the given endpoint (USB only). same, usb-only energy π¦
π¦ SEE ALSO π¦
the whole friend group, linked exactly as listed β go say hi:
Kernel file ./drivers/net/wireless/ralink/rt2x00/rt2x00queue.h Entry frame size(9), enum data_queue_qid(9), enum skb_frame_desc_flags(9), struct skb_frame_desc(9), get_skb_frame_desc(9), enum rxdone_entry_desc_flags(9), RXDONE_SIGNAL_MASK(9), struct rxdone_entry_desc(9), enum txdone_entry_desc_flags(9), struct txdone_entry_desc(9), enum txentry_desc_flags(9), struct txentry_desc(9), enum queue_entry_flags(9), struct queue_entry(9), enum queue_index(9), enum data_queue_flags(9), queue_end(9), tx_queue_end(9), queue_next(9), queue_loop(9), queue_for_each(9), tx_queue_for_each(9), txall_queue_for_each(9), rt2x00queue_for_each_entry(9), rt2x00queue_empty(9), rt2x00queue_full(9), rt2x00queue_threshold(9), rt2x00queue_dma_timeout(9), _rt2x00_desc_read(9), rt2x00_desc_read(9), rt2x00_desc_write(9)
okay and for the sign-off π: this page lives at ./drivers/net/wireless/ralink/... and it's dated October 2026, version struct data_queue(9). that's the whole thing, bestie β go forth and queue your data responsibly πβ¨π₯
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms