Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
rt2x00queue.h File Reference
#include <linux/prefetch.h>

Go to the source code of this file.

Data Structures

struct  skb_frame_desc
 
struct  rxdone_entry_desc
 
struct  txdone_entry_desc
 
struct  txentry_desc
 
struct  queue_entry
 
struct  data_queue
 
struct  data_queue_desc
 

Macros

#define DATA_FRAME_SIZE   2432
 
#define MGMT_FRAME_SIZE   256
 
#define AGGREGATION_SIZE   3840
 
#define RXDONE_SIGNAL_MASK   ( RXDONE_SIGNAL_PLCP | RXDONE_SIGNAL_BITRATE | RXDONE_SIGNAL_MCS )
 
#define queue_end(__dev)   &(__dev)->rx[(__dev)->data_queues]
 
#define tx_queue_end(__dev)   &(__dev)->tx[(__dev)->ops->tx_queues]
 
#define queue_next(__queue)   &(__queue)[1]
 
#define queue_loop(__entry, __start, __end)
 
#define queue_for_each(__dev, __entry)   queue_loop(__entry, (__dev)->rx, queue_end(__dev))
 
#define tx_queue_for_each(__dev, __entry)   queue_loop(__entry, (__dev)->tx, tx_queue_end(__dev))
 
#define txall_queue_for_each(__dev, __entry)   queue_loop(__entry, (__dev)->tx, queue_end(__dev))
 

Enumerations

enum  data_queue_qid {
  QID_AC_VO = 0, QID_AC_VI = 1, QID_AC_BE = 2, QID_AC_BK = 3,
  QID_HCCA = 4, QID_MGMT = 13, QID_RX = 14, QID_OTHER = 15,
  QID_BEACON, QID_ATIM
}
 
enum  skb_frame_desc_flags {
  SKBDESC_DMA_MAPPED_RX = 1 << 0, SKBDESC_DMA_MAPPED_TX = 1 << 1, SKBDESC_IV_STRIPPED = 1 << 2, SKBDESC_NOT_MAC80211 = 1 << 3,
  SKBDESC_DESC_IN_SKB = 1 << 4
}
 
enum  rxdone_entry_desc_flags {
  RXDONE_SIGNAL_PLCP = BIT(0), RXDONE_SIGNAL_BITRATE = BIT(1), RXDONE_SIGNAL_MCS = BIT(2), RXDONE_MY_BSS = BIT(3),
  RXDONE_CRYPTO_IV = BIT(4), RXDONE_CRYPTO_ICV = BIT(5), RXDONE_L2PAD = BIT(6)
}
 
enum  txdone_entry_desc_flags {
  TXDONE_UNKNOWN, TXDONE_SUCCESS, TXDONE_FALLBACK, TXDONE_FAILURE,
  TXDONE_EXCESSIVE_RETRY, TXDONE_AMPDU
}
 
enum  txentry_desc_flags {
  ENTRY_TXD_RTS_FRAME, ENTRY_TXD_CTS_FRAME, ENTRY_TXD_GENERATE_SEQ, ENTRY_TXD_FIRST_FRAGMENT,
  ENTRY_TXD_MORE_FRAG, ENTRY_TXD_REQ_TIMESTAMP, ENTRY_TXD_BURST, ENTRY_TXD_ACK,
  ENTRY_TXD_RETRY_MODE, ENTRY_TXD_ENCRYPT, ENTRY_TXD_ENCRYPT_PAIRWISE, ENTRY_TXD_ENCRYPT_IV,
  ENTRY_TXD_ENCRYPT_MMIC, ENTRY_TXD_HT_AMPDU, ENTRY_TXD_HT_BW_40, ENTRY_TXD_HT_SHORT_GI,
  ENTRY_TXD_HT_MIMO_PS
}
 
enum  queue_entry_flags {
  ENTRY_BCN_ASSIGNED, ENTRY_OWNER_DEVICE_DATA, ENTRY_DATA_PENDING, ENTRY_DATA_IO_FAILED,
  ENTRY_DATA_STATUS_PENDING
}
 
enum  queue_index { Q_INDEX, Q_INDEX_DMA_DONE, Q_INDEX_DONE, Q_INDEX_MAX }
 
enum  data_queue_flags { QUEUE_STARTED, QUEUE_PAUSED }
 

Functions

bool rt2x00queue_for_each_entry (struct data_queue *queue, enum queue_index start, enum queue_index end, bool(*fn)(struct queue_entry *entry))
 

Macro Definition Documentation

#define AGGREGATION_SIZE   3840

Definition at line 43 of file rt2x00queue.h.

#define DATA_FRAME_SIZE   2432

DOC: Entry frame size

Ralink PCI devices demand the Frame size to be a multiple of 128 bytes, for USB devices this restriction does not apply, but the value of 2432 makes sense since it is big enough to contain the maximum fragment size according to the ieee802.11 specs. The aggregation size depends on support from the driver, but should be something around 3840 bytes.

Definition at line 41 of file rt2x00queue.h.

#define MGMT_FRAME_SIZE   256

Definition at line 42 of file rt2x00queue.h.

#define queue_end (   __dev)    &(__dev)->rx[(__dev)->data_queues]

queue_end - Return pointer to the last queue (HELPER MACRO). : Pointer to &struct rt2x00_dev

Using the base rx pointer and the maximum number of available queues, this macro will return the address of 1 position beyond the end of the queues array.

Definition at line 510 of file rt2x00queue.h.

#define queue_for_each (   __dev,
  __entry 
)    queue_loop(__entry, (__dev)->rx, queue_end(__dev))

queue_for_each - Loop through all queues : Pointer to &struct rt2x00_dev : Pointer where the current queue entry will be stored in.

This macro will loop through all available queues.

Definition at line 557 of file rt2x00queue.h.

#define queue_loop (   __entry,
  __start,
  __end 
)
Value:
for ((__entry) = (__start); \
prefetch(queue_next(__entry)), (__entry) != (__end);\

queue_loop - Loop through the queues within a specific range (HELPER MACRO). : Pointer where the current queue entry will be stored in. : Start queue pointer. : End queue pointer.

This macro will loop through all queues between &__start and &__end.

Definition at line 545 of file rt2x00queue.h.

#define queue_next (   __queue)    &(__queue)[1]

queue_next - Return pointer to next queue in list (HELPER MACRO). : Current queue for which we need the next queue

Using the current queue address we take the address directly after the queue to take the next queue. Note that this macro should be used carefully since it does not protect against moving past the end of the list. (See macros &queue_end and &tx_queue_end for determining the end of the queue).

Definition at line 534 of file rt2x00queue.h.

#define RXDONE_SIGNAL_MASK   ( RXDONE_SIGNAL_PLCP | RXDONE_SIGNAL_BITRATE | RXDONE_SIGNAL_MCS )

RXDONE_SIGNAL_MASK - Define to mask off all &rxdone_entry_desc_flags flags except for the RXDONE_SIGNAL_* flags. This is useful to convert the dev_flags from &rxdone_entry_desc to a signal value type.

Definition at line 162 of file rt2x00queue.h.

#define tx_queue_end (   __dev)    &(__dev)->tx[(__dev)->ops->tx_queues]

tx_queue_end - Return pointer to the last TX queue (HELPER MACRO). : Pointer to &struct rt2x00_dev

Using the base tx pointer and the maximum number of available TX queues, this macro will return the address of 1 position beyond the end of the TX queue array.

Definition at line 521 of file rt2x00queue.h.

#define tx_queue_for_each (   __dev,
  __entry 
)    queue_loop(__entry, (__dev)->tx, tx_queue_end(__dev))

tx_queue_for_each - Loop through the TX queues : Pointer to &struct rt2x00_dev : Pointer where the current queue entry will be stored in.

This macro will loop through all TX related queues excluding the Beacon and Atim queues.

Definition at line 568 of file rt2x00queue.h.

#define txall_queue_for_each (   __dev,
  __entry 
)    queue_loop(__entry, (__dev)->tx, queue_end(__dev))

txall_queue_for_each - Loop through all TX related queues : Pointer to &struct rt2x00_dev : Pointer where the current queue entry will be stored in.

This macro will loop through all TX related queues including the Beacon and Atim queues.

Definition at line 579 of file rt2x00queue.h.

Enumeration Type Documentation

enum data_queue_flags: Status flags for data queues

: The queue has been started. Fox RX queues this means the device might be DMA'ing skbuffers. TX queues will accept skbuffers to be transmitted and beacon queues will start beaconing the configured beacons. : The queue has been started but is currently paused. When this bit is set, the queue has been stopped in mac80211, preventing new frames to be enqueued. However, a few frames might still appear shortly after the pausing...

Enumerator:
QUEUE_STARTED 
QUEUE_PAUSED 

Definition at line 421 of file rt2x00queue.h.

enum data_queue_qid: Queue identification

: AC VO queue : AC VI queue : AC BE queue : AC BK queue : HCCA queue : MGMT queue (prio queue) : RX queue : None of the above (don't use, only present for completeness) : Beacon queue (value unspecified, don't send it to device) : Atim queue (value unspecified, don't send it to device)

Enumerator:
QID_AC_VO 
QID_AC_VI 
QID_AC_BE 
QID_AC_BK 
QID_HCCA 
QID_MGMT 
QID_RX 
QID_OTHER 
QID_BEACON 
QID_ATIM 

Definition at line 59 of file rt2x00queue.h.

enum queue_entry_flags: Status flags for queue entry

: This entry has been assigned to an interface. As long as this bit is set, this entry may only be touched through the interface structure. : This entry is owned by the device for data transfer (either TX or RX depending on the queue). The entry should only be touched after the device has signaled it is done with it. : This entry contains a valid frame and is waiting for the signal to start sending. : Hardware indicated that an IO error occurred while transferring the data to the hardware. No TX status report will be expected from the hardware. : The entry has been send to the device and returned. It is now waiting for the status reporting before the entry can be reused again.

Enumerator:
ENTRY_BCN_ASSIGNED 
ENTRY_OWNER_DEVICE_DATA 
ENTRY_DATA_PENDING 
ENTRY_DATA_IO_FAILED 
ENTRY_DATA_STATUS_PENDING 

Definition at line 356 of file rt2x00queue.h.

enum queue_index: Queue index type

: Index pointer to the current entry in the queue, if this entry is owned by the hardware then the queue is considered to be full. : Index pointer for the next entry which will have been transferred to the hardware. : Index pointer to the next entry which will be completed by the hardware and for which we need to run the txdone handler. If this entry is not owned by the hardware the queue is considered to be empty. : Keep last, used in &struct data_queue to determine the size of the index array.

Enumerator:
Q_INDEX 
Q_INDEX_DMA_DONE 
Q_INDEX_DONE 
Q_INDEX_MAX 

Definition at line 402 of file rt2x00queue.h.

enum rxdone_entry_desc_flags: Flags for &struct rxdone_entry_desc

: Signal field contains the plcp value. : Signal field contains the bitrate value. : Signal field contains the mcs value. : Does this frame originate from device's BSS. : Driver provided IV/EIV data. : Driver provided ICV data. : 802.11 payload has been padded to 4-byte boundary.

Enumerator:
RXDONE_SIGNAL_PLCP 
RXDONE_SIGNAL_BITRATE 
RXDONE_SIGNAL_MCS 
RXDONE_MY_BSS 
RXDONE_CRYPTO_IV 
RXDONE_CRYPTO_ICV 
RXDONE_L2PAD 

Definition at line 147 of file rt2x00queue.h.

enum skb_frame_desc_flags: Flags for &struct skb_frame_desc

: &skb_dma field has been mapped for RX : &skb_dma field has been mapped for TX : Frame contained a IV/EIV provided by mac80211 but was stripped for processing by the driver. : Frame didn't originate from mac80211, don't try to pass it back. : The descriptor is at the start of the skb, instead of in the desc field.

Enumerator:
SKBDESC_DMA_MAPPED_RX 
SKBDESC_DMA_MAPPED_TX 
SKBDESC_IV_STRIPPED 
SKBDESC_NOT_MAC80211 
SKBDESC_DESC_IN_SKB 

Definition at line 84 of file rt2x00queue.h.

enum txdone_entry_desc_flags: Flags for &struct txdone_entry_desc

Every txdone report has to contain the basic result of the transmission, either &TXDONE_UNKNOWN, &TXDONE_SUCCESS or &TXDONE_FAILURE. The flag &TXDONE_FALLBACK can be used in conjunction with all of these flags but should only be set if retires > 0. The flag &TXDONE_EXCESSIVE_RETRY can only be used in conjunction with &TXDONE_FAILURE.

: Hardware could not determine success of transmission. : Frame was successfully send : Hardware used fallback rates for retries : Frame was not successfully send : In addition to &TXDONE_FAILURE, the frame transmission failed due to excessive retries.

Enumerator:
TXDONE_UNKNOWN 
TXDONE_SUCCESS 
TXDONE_FALLBACK 
TXDONE_FAILURE 
TXDONE_EXCESSIVE_RETRY 
TXDONE_AMPDU 

Definition at line 214 of file rt2x00queue.h.

enum txentry_desc_flags: Status flags for TX entry descriptor

: This frame is a RTS frame. : This frame is a CTS-to-self frame. : This frame requires sequence counter. : This is the first frame. : This frame is followed by another fragment. : Require timestamp to be inserted. : This frame belongs to the same burst event. : An ACK is required for this frame. : When set, the long retry count is used. : This frame should be encrypted. : Use pairwise key table (instead of shared). : Generate IV/EIV in hardware. : Generate MIC in hardware. : This frame is part of an AMPDU. : Use 40MHz Bandwidth. : Use short GI. : The receiving STA is in dynamic SM PS mode.

Enumerator:
ENTRY_TXD_RTS_FRAME 
ENTRY_TXD_CTS_FRAME 
ENTRY_TXD_GENERATE_SEQ 
ENTRY_TXD_FIRST_FRAGMENT 
ENTRY_TXD_MORE_FRAG 
ENTRY_TXD_REQ_TIMESTAMP 
ENTRY_TXD_BURST 
ENTRY_TXD_ACK 
ENTRY_TXD_RETRY_MODE 
ENTRY_TXD_ENCRYPT 
ENTRY_TXD_ENCRYPT_PAIRWISE 
ENTRY_TXD_ENCRYPT_IV 
ENTRY_TXD_ENCRYPT_MMIC 
ENTRY_TXD_HT_AMPDU 
ENTRY_TXD_HT_BW_40 
ENTRY_TXD_HT_SHORT_GI 
ENTRY_TXD_HT_MIMO_PS 

Definition at line 258 of file rt2x00queue.h.

Function Documentation

bool rt2x00queue_for_each_entry ( struct data_queue queue,
enum queue_index  start,
enum queue_index  end,
bool(*)(struct queue_entry *entry fn 
)

Definition at line 776 of file rt2x00queue.c.