Difference between revisions of "Unit RT2X00LIB"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ralink RT2x00 Wireless Driver Library unit'''
 +
 
 +
This unit provides functionality and definitions common to all implementations of the RT2x00 chipset series PCI, USB or other.
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB device and driver configuration flags''' <code> RT2X00_DEVICE_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_PRESENT = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_REGISTERED_HW = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_INITIALIZED = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_STARTED = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_ENABLED_RADIO = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DEVICE_STATE_SCANNING = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_CHANNEL_HT40 = (1 shl 6);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_POWERSAVING = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_HT_DISABLED = (1 shl 8);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_QOS_DISABLED = (1 shl 9);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RT2X00_TX_STATUS_READING = (1 shl 10);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB standard timings and sizes''' <code> RT2X00_*_SIZE </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|These values should follow the ieee80211 specifications
 +
|-
 +
| <code>RT2X00_ACK_SIZE = 14;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_IEEE80211_HEADER = 24;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_PLCP = 48;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_BEACON  = 100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_PREAMBLE = 144;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SHORT_PREAMBLE = 72;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SLOT_TIME = 20;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SHORT_SLOT_TIME = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SIFS = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_PIFS = RT2X00_SIFS + RT2X00_SLOT_TIME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SHORT_PIFS = RT2X00_SIFS + RT2X00_SHORT_SLOT_TIME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DIFS = RT2X00_PIFS + RT2X00_SLOT_TIME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SHORT_DIFS = RT2X00_SHORT_PIFS + RT2X00_SHORT_SLOT_TIME;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_EIFS = RT2X00_SIFS + RT2X00_DIFS +  RT2X00_GET_DURATION(RT2X00_IEEE80211_HEADER + RT2X00_ACK_SIZE,10);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_SHORT_EIFS = RT2X00_SIFS + RT2X00_SHORT_DIFS +  RT2X00_GET_DURATION(RT2X00_IEEE80211_HEADER + RT2X00_ACK_SIZE,10);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB extra TX headroom''' <code> RT2X00_*_EXTRA </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>|colspan="2"|Note: For alignment purposes</code>
 +
|-
 +
| <code>RT2X00_ALIGN_EXTRA = 4;</code>
 +
| RT2X00_ALIGN_SIZE Only whole frame needs alignment
 +
|-
 +
| <code>RT2X00_L2PAD_EXTRA = 8;</code>
 +
| RT2X00_L2PAD_SIZE Both header & payload need alignment
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB chipset''' <code> RT2X00_RT* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|The chipset on the device is composed of an RT and RF chip)
 +
|-
 +
| <code>RT2X00_RT2460 = $2460;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT2560 = $2560;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT2570 = $2570;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT2661 = $2661;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT2573 = $2573;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT2860 = $2860;</code>
 +
| 2.4GHz
 +
|-
 +
| <code>RT2X00_RT2872 = $2872;</code>
 +
| WSOC
 +
|-
 +
| <code>RT2X00_RT2883 = $2883;</code>
 +
| WSOC
 +
|-
 +
| <code>RT2X00_RT3070 = $3070;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3071 = $3071;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3090 = $3090;</code>
 +
| 2.4GHz PCIe
 +
|-
 +
| <code>RT2X00_RT3290 = $3290;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3352 = $3352;</code>
 +
| WSOC
 +
|-
 +
| <code>RT2X00_RT3390 = $3390;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3572 = $3572;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3593 = $3593;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RT3883 = $3883;</code>
 +
| WSOC
 +
|-
 +
| <code>RT2X00_RT5390 = $5390;</code>
 +
| 2.4GHz
 +
|-
 +
| <code>RT2X00_RT5392 = $5392;</code>
 +
| 2.4GHz
 +
|-
 +
| <code>RT2X00_RT5592 = $5592;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB requirements''' <code> RT2X00_REQUIRE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_REQUIRE_FIRMWARE = 1 shl 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_BEACON_GUARD = 1 shl 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_ATIM_QUEUE = 1 shl 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_DMA = 1 shl 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_COPY_IV = 1 shl 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_L2PAD = 1 shl 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_TXSTATUS_FIFO = 1 shl 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_SW_SEQNO = 1 shl 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_HT_TX_DESC = 1 shl 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REQUIRE_PS_AUTOWAKE = 1 shl 9;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB capabilities''' <code> RT2X00_CAPABILITY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_CAPABILITY_HW_BUTTON = 1 shl 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_HW_CRYPTO = 1 shl 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_POWER_LIMIT = 1 shl 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_CONTROL_FILTERS = 1 shl 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_CONTROL_FILTER_PSPOLL = 1 shl 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_PRE_TBTT_INTERRUPT = 1 shl 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_LINK_TUNING = 1 shl 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_FRAME_TYPE = 1 shl 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_RF_SEQUENCE = 1 shl 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_EXTERNAL_LNA_A = 1 shl 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_EXTERNAL_LNA_BG = 1 shl 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_DOUBLE_ANTENNA = 1 shl 11;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_BT_COEXIST = 1 shl 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CAPABILITY_VCO_RECALIBRATION = 1 shl 13;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB busy delay''' <code> RT2X00_REGISTER_BUSY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_REGISTER_BUSY_COUNT = 100;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_REGISTER_USB_BUSY_COUNT = 20;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_REGISTER_BUSY_DELAY = 100;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB RX crypto status''' <code> RT2X00_RX_CRYPTO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_RX_CRYPTO_SUCCESS = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_RX_CRYPTO_FAIL_ICV = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RX_CRYPTO_FAIL_MIC = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RX_CRYPTO_FAIL_KEY = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB RX descriptor flags''' <code> RT2X00_RXDONE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_RXDONE_SIGNAL_PLCP = (1 shl 0);</code>
 +
| Signal field contains the plcp value
 +
|-
 +
| <code>RT2X00_RXDONE_SIGNAL_BITRATE = (1 shl 1);</code>
 +
| Signal field contains the bitrate value
 +
|-
 +
| <code>RT2X00_RXDONE_SIGNAL_MCS = (1 shl 2);</code>
 +
| Signal field contains the mcs value
 +
|-
 +
| <code>RT2X00_RXDONE_MY_BSS = (1 shl 3);</code>
 +
| Does this frame originate from device's BSS
 +
|-
 +
| <code>RT2X00_RXDONE_CRYPTO_IV = (1 shl 4);</code>
 +
| Driver provided IV/EIV data
 +
|-
 +
| <code>RT2X00_RXDONE_CRYPTO_ICV = (1 shl 5);</code>
 +
| Driver provided ICV data
 +
|-
 +
| <code>RT2X00_RXDONE_L2PAD = (1 shl 6);</code>
 +
| 802.11 payload has been padded to 4-byte boundary
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RT2X00_RXDONE_SIGNAL_MASK = (RT2X00_RXDONE_SIGNAL_PLCP or RT2X00_RXDONE_SIGNAL_BITRATE or RT2X00_RXDONE_SIGNAL_MCS);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB TX descriptor flags''' <code> RT2X00_ENTRY_TXD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_RTS_FRAME = (1 shl 0);</code>
 +
| This frame is a RTS frame
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_CTS_FRAME = (1 shl 1);</code>
 +
| This frame is a CTS-to-self frame
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_GENERATE_SEQ = (1 shl 2);</code>
 +
| This frame requires sequence counter
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_FIRST_FRAGMENT = (1 shl 3);</code>
 +
| This is the first frame
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_MORE_FRAG = (1 shl 4);</code>
 +
| This frame is followed by another fragment
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_REQ_TIMESTAMP = (1 shl 5);</code>
 +
| Require timestamp to be inserted
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_BURST = (1 shl 6);</code>
 +
| This frame belongs to the same burst event
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_ACK = (1 shl 7);</code>
 +
| An ACK is required for this frame
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_RETRY_MODE = (1 shl 8);</code>
 +
| When set, the long retry count is used
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_ENCRYPT = (1 shl 9);</code>
 +
| This frame should be encrypted
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_ENCRYPT_PAIRWISE = (1 shl 10);</code>
 +
| Use pairwise key table (instead of shared)
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_ENCRYPT_IV = (1 shl 11);</code>
 +
| Generate IV/EIV in hardware
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_ENCRYPT_MMIC = (1 shl 12);</code>
 +
| Generate MIC in hardware
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_HT_AMPDU = (1 shl 13);</code>
 +
| This frame is part of an AMPDU
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_HT_BW_40 = (1 shl 14);</code>
 +
| Use 40MHz Bandwidth
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_HT_SHORT_GI = (1 shl 15);</code>
 +
| Use short GI
 +
|-
 +
| <code>RT2X00_ENTRY_TXD_HT_MIMO_PS = (1 shl 16);</code>
 +
| The receiving STA is in dynamic SM PS mode
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB TX complete flags''' <code> RT2X00_TXDONE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_TXDONE_UNKNOWN = (1 shl 0);</code>
 +
| Hardware could not determine success of transmission
 +
|-
 +
| <code>RT2X00_TXDONE_SUCCESS = (1 shl 1);</code>
 +
| Frame was successfully sent
 +
|-
 +
| <code>RT2X00_TXDONE_FALLBACK = (1 shl 2);</code>
 +
| Hardware used fallback rates for retries
 +
|-
 +
| <code>RT2X00_TXDONE_FAILURE = (1 shl 3);</code>
 +
| Frame was not successfully sent
 +
|-
 +
| <code>RT2X00_TXDONE_EXCESSIVE_RETRY = (1 shl 4);</code>
 +
| In addition to TXDONE_FAILURE, the frame transmission failed due to excessive retries
 +
|-
 +
| <code>RT2X00_TXDONE_AMPDU = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB antenna''' <code> RT2X00_ANTENNA_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_ANTENNA_SW_DIVERSITY = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_ANTENNA_A = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_ANTENNA_B = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_ANTENNA_HW_DIVERSITY = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB antenna flags''' <code> RT2X00_ANTENNA_RX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_ANTENNA_RX_DIVERSITY = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_ANTENNA_TX_DIVERSITY = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_ANTENNA_MODE_SAMPLE = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB LED type''' <code> RT2X00_LED_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_LED_TYPE_RADIO = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_LED_TYPE_ASSOC = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_LED_TYPE_ACTIVITY = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_LED_TYPE_QUALITY = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB LED mode''' <code> RT2X00_LED_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_LED_MODE_DEFAULT = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_LED_MODE_TXRX_ACTIVITY = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_LED_MODE_SIGNAL_STRENGTH = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_LED_MODE_ASUS = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_LED_MODE_ALPHA = 4;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB TSF synchronization''' <code> RT2X00_TSF_SYNC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_TSF_SYNC_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_TSF_SYNC_INFRA = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_TSF_SYNC_ADHOC = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_TSF_SYNC_AP_NONE = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB device states''' <code> RT2X00_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_STATE_DEEP_SLEEP = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_STATE_SLEEP = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_STATE_STANDBY = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_STATE_AWAKE = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Additional device states, these values are not directly passed into the device''
 +
|-
 +
| <code>RT2X00_STATE_RADIO_ON = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_STATE_RADIO_OFF = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_STATE_RADIO_IRQ_ON = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_STATE_RADIO_IRQ_OFF = 7;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB IFS backoff''' <code> RT2X00_IFS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_IFS_BACKOFF = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_IFS_SIFS = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_IFS_NEW_BACKOFF = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_IFS_NONE = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB IFS backoff (for HT devices)''' <code> RT2X00_TXOP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_TXOP_HTTXOP = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_TXOP_PIFS = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_TXOP_SIFS = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_TXOP_BACKOFF = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB cipher''' <code> RT2X00_CIPHER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_CIPHER_NONE = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_WEP64 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_WEP128 = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_TKIP = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_AES = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''The following were added by rt61pci and rt73usb''
 +
|-
 +
| <code>RT2X00_CIPHER_CKIP64 = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_CKIP128 = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_TKIP_NO_MIC = 7;</code>
 +
| Don't send to device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RT2X00_CIPHER_MAX = 4;</code>
 +
| Note that CIPHER_NONE isn't counted, and CKIP64 and CKIP128 are excluded.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB rate modulation''' <code> RT2X00_RATE_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_RATE_MODE_CCK = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_RATE_MODE_OFDM = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RATE_MODE_HT_MIX = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_RATE_MODE_HT_GREENFIELD = 3;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB size''' <code> RT2X00_*_SIZE </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|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 IEEE 802.11 specs. The aggregation size depends on support from the driver, but should be something around 3840 bytes.
 +
|-
 +
| <code>RT2X00_DATA_FRAME_SIZE = 2432;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_MGMT_FRAME_SIZE = 256;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_AGGREGATION_SIZE = 3840;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB channel''' <code> RT2X00_CHANNEL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_CHANNEL_GEOGRAPHY_ALLOWED = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB supported bands''' <code> RT2X00_SUPPORT_BAND_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_SUPPORT_BAND_2GHZ = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_SUPPORT_BAND_5GHZ = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB supported rates''' <code> RT2X00_SUPPORT_RATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_SUPPORT_RATE_CCK = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_SUPPORT_RATE_OFDM = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB device supported rates''' <code> RT2X00_DEV_RATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_DEV_RATE_CCK = $0001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_DEV_RATE_OFDM = $0002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_DEV_RATE_SHORT_PREAMBLE = $0004;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RT2X00LIB configuration update''' <code> RT2X00_CONFIG_UPDATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RT2X00_CONFIG_UPDATE_TYPE = (1 shl 1);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_UPDATE_MAC = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RT2X00_CONFIG_UPDATE_BSSID = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''RT2X00LIB chipset'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Chipset = ^TRT2X00Chipset;</code>
 +
 
 +
<code>TRT2X00Chipset = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rt2x00_chip
 +
|-
 +
| <code>RTChip:Word;</code>
 +
| RT2X00_RT2460 etc
 +
|-
 +
| <code>RFChip:Word;</code>
 +
| RT2800_RF2820 etc
 +
|-
 +
| <code>Revision:Word;</code>
 +
| RT2800_REV_RT2860C etc
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RT2X00LIB rate'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Rate = ^TRT2X00Rate;</code>
 +
 
 +
<code>TRT2X00Rate = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Flags:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BitRate:Word;</code>
 +
| In 100kbit/s
 +
|-
 +
| <code>RateMask:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PLCP:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MCS:Word;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB antenna'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Antenna = ^TRT2X00Antenna;</code>
 +
 
 +
<code>TRT2X00Antenna = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|antenna_setup
 +
|-
 +
| <code>RX:Byte;</code>
 +
| RT2X00_ANTENNA_A etc
 +
|-
 +
| <code>TX:Byte;</code>
 +
| RT2X00_ANTENNA_A etc
 +
|-
 +
| <code>RXChainNo:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXChainNo:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB channel'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Channel = ^TRT2X00Channel;</code>
 +
 
 +
<code>TRT2X00Channel = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|channel_info
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| RT2X00_CHANNEL_GEOGRAPHY_ALLOWED etc
 +
|-
 +
| <code>MaxPower:ShortInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DefaultPower1:ShortInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DefaultPower2:ShortInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DefaultPower3:ShortInt;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB channels'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Channels = ^TRT2X00Channels;</code>
 +
 
 +
<code>TRT2X00Channels = array[0..0] of TRT2X00Channel;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RT2X00LIB RF channel'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00RFChannel = ^TRT2X00RFChannel;</code>
 +
 
 +
<code>TRT2X00RFChannel = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rf_channel
 +
|-
 +
| <code>Channel:LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RF1:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RF2:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RF3:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RF4:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB RF channels'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00RFChannels = ^TRT2X00RFChannels;</code>
 +
 
 +
<code>TRT2X00RFChannels = array[0..0] of TRT2X00RFChannel;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RT2X00LIB specifications'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Specifications = ^TRT2X00Specifications;</code>
 +
 
 +
<code>TRT2X00Specifications = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|hw_mode_spec
 +
|-
 +
| <code>SupportedBands:LongWord;</code>
 +
| RT2X00_SUPPORT_BAND_2GHZ etc
 +
|-
 +
| <code>SupportedRates:LongWord;</code>
 +
| RT2X00_SUPPORT_RATE_CCK etc
 +
|-
 +
| <code>ChannelCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Channels:PRT2X00Channels;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RFChannels:PRT2X00RFChannels;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTCapabilities:TIEEE80211StationHTCap;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RT2X00LIB EWMA'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00EWMA = ^TRT2X00EWMA;</code>
 +
 
 +
<code>TRT2X00EWMA = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Exponentially weighted moving average
 +
EWMA
 +
|-
 +
| <code>Internal:LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Factor:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Weight:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB link quality'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00LinkQuality = ^TRT2X00LinkQuality;</code>
 +
 
 +
<code>TRT2X00LinkQuality = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Quality statistics about the currently active link
 +
link_qual
 +
|-
 +
| <code>RSSI:LongInt;</code>
 +
| Statistics required for Link tuning by driver
 +
|-
 +
| <code>FalseCCA:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''VGC levels''
 +
|-
 +
| <code>VGCLevel:Byte;</code>
 +
| Driver will tune the VGC level during each call to the link tuner callback function
 +
|-
 +
| <code>VGCLevelRegister:Byte;</code>
 +
| The vgc_level is determined based on the link quality statistics like average RSSI and the false CCA count
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RXSuccess:LongWord;</code>
 +
| Statistics required for Signal quality calculation
 +
|-
 +
| <code>RXFailed:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXSuccess:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXFailed:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB link antenna'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00LinkAntenna = ^TRT2X00LinkAntenna;</code>
 +
 
 +
<code>TRT2X00LinkAntenna = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Antenna settings about the currently active link
 +
link_ant
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Antenna flags (RT2X00_ANTENNA_RX_DIVERSITY etc)
 +
|-
 +
| <code>ActiveAntenna:TRT2X00Antenna;</code>
 +
| Currently active TX/RX antenna setup
 +
|-
 +
| <code>RSSIHistory:LongInt;</code>
 +
| RSSI history information for the antenna
 +
|-
 +
| <code>RSSIAntenna:TRT2X00EWMA;</code>
 +
| Current RSSI average of the currently active antenna
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB link'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Link = ^TRT2X00Link;</code>
 +
 
 +
<code>TRT2X00Link = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|link
 +
|-
 +
| <code>Count:LongWord;</code>
 +
| Link tuner counter
 +
|-
 +
| <code>Quality:TRT2X00LinkQuality;</code>
 +
| Quality measurement values
 +
|-
 +
| <code>Antenna:TRT2X00LinkAntenna;</code>
 +
| TX/RX antenna setup
 +
|-
 +
| <code>RSSIAverage:TRT2X00EWMA;</code>
 +
| Currently active average RSSI value
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB interface'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00Interface = ^TRT2X00Interface;</code>
 +
 
 +
<code>TRT2X00Interface = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rt2x00_intf
 +
|-
 +
| <code>EnableBeacon:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SequenceNo:LongWord;</code>
 +
| Software sequence counter (only required for hardware which doesn't support hardware sequence counting)
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''RT2X00LIB channel configuration'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00ChannelConfiguration = ^TRT2X00ChannelConfiguration;</code>
 +
 
 +
<code>TRT2X00ChannelConfiguration = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rt2x00lib_conf
 +
|-
 +
| <code>Channel:TRT2X00Channel;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RFChannel:TRT2X00RFChannel;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB interface configuration'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00InterfaceConfiguration = ^TRT2X00InterfaceConfiguration;</code>
 +
 
 +
<code>TRT2X00InterfaceConfiguration = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rt2x00intf_conf
 +
|-
 +
| <code>InterfaceType:LongWord;</code>
 +
| Interface type (WIFI_IFTYPE_STATION etc)
 +
|-
 +
| <code>TSFSync:LongWord;</code>
 +
| TSF sync value (dependent on the interface type) (RT2X00_TSF_SYNC_NONE etc)
 +
|-
 +
| <code>MAC:array[0..1] of LongWord;</code>
 +
| All devices (except RT2500USB) have 32 bits register word sizes
 +
|-
 +
| <code>BSSID:array[0..1] of LongWord;</code>
 +
| Which means these variables must be a multiple of 32 bits
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB RX descriptor'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00RXDescriptor = ^TRT2X00RXDescriptor;</code>
 +
 
 +
<code>TRT2X00RXDescriptor = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|rxdone_entry_desc
 +
|-
 +
| <code>Timestamp:Int64;</code>
 +
| RX Timestamp
 +
|-
 +
| <code>Signal:LongInt;</code>
 +
| Signal of the received frame
 +
|-
 +
| <code>RSSI:LongInt;</code>
 +
| RSSI of the received frame
 +
|-
 +
| <code>Size:LongWord;</code>
 +
| Data size of the received frame
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Receive flags (WIFI_RX_FLAG_*)
 +
|-
 +
| <code>RXFlags:LongWord;</code>
 +
| Receive flags (RT2X00_RXDONE_*)
 +
|-
 +
| <code>RateMode:Word;</code>
 +
| Rate mode (RT2X00_RATE_MODE_*)
 +
|-
 +
| <code>Cipher:Byte;</code>
 +
| Cipher type used during decryption
 +
|-
 +
| <code>CipherStatus:Byte;</code>
 +
| Decryption status
 +
|-
 +
| <code>IV:array[0..1] of LongWord;</code>
 +
| IV/EIV data used during decryption
 +
|-
 +
| <code>ICV:LongWord;</code>
 +
| ICV data used during decryption
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB TX decriptor'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00TXDescriptor = ^TRT2X00TXDescriptor;</code>
 +
 
 +
<code>TRT2X00TXDescriptor = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|txentry_desc
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Length:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HeaderLength:Word;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB TX complete''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00TXComplete = ^TRT2X00TXComplete;</code>
 +
 
 +
<code>TRT2X00TXComplete = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|txdone_entry_desc
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Transmit flags (RT2X00_TXDONE_*)
 +
|-
 +
| <code>Retry:LongWord; {Retry count}</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''RT2X00LIB driver initialization'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00DriverInit = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB EEPROM load'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00EepromLoad = function(RT2X00:PRT2X00WiFiDevice; Data:PWord; Size:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB register read'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00RegisterRead = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:PLongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB register write'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00RegisterWrite = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB register multi read'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00RegisterMultiRead = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB register multi write'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00RegisterMultiWrite = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB register busy read'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00RegisterBusyRead = function(RT2X00:PRT2X00WiFiDevice; Offset,Mask:LongWord; Reg:PLongWord):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB set LED'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00SetLED = function(RT2X00:PRT2X00WiFiDevice; ID,Level:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB set state'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00SetState = function(RT2X00:PRT2X00WiFiDevice; State:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB enable RX'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00EnableRX = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''RT2X00LIB disable RX'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00DisableRX = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB enable beacon'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00EnableBeacon = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB disable beacon'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00DisableBeacon = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''RT2X00LIB get firmware'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00GetFirmware = function(RT2X00:PRT2X00WiFiDevice; var Name:String; var Address:Pointer; var Size:LongWord):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB check firmware'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00CheckFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB load firmware'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00LoadFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB write firmware'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00WriteFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB configure'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00Configure = function(RT2X00:PRT2X00WiFiDevice; Configuration:PRT2X00ChannelConfiguration; Flags:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB configure filter'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00ConfigureFilter = function(RT2X00:PRT2X00WiFiDevice; Filter:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB configure antenna'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00ConfigureAntenna = function(RT2X00:PRT2X00WiFiDevice; Antenna:PRT2X00Antenna):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB configure interface'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00ConfigureInterface = function(RT2X00:PRT2X00WiFiDevice; Configuration:PRT2X00InterfaceConfiguration; Flags:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB initialize registers'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00InitializeRegisters = function(RT2X00:PRT2X00WiFiDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB hardware encryption disabled'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRT2X00HardwareEncryptionDisabled = function(RT2X00:PRT2X00WiFiDevice):Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''RT2X00LIB WiFi device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRT2X00WiFiDevice = ^TRT2X00WiFiDevice;</code>
 +
 
 +
<code>TRT2X00WiFiDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''WiFi Properties''
 +
|-
 +
| <code>WiFi:TWiFiDevice;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''RT2X00 Methods''
 +
|-
 +
| <code>DriverInit:TRT2X00DriverInit;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EepromLoad:TRT2X00EepromLoad;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RegisterRead:TRT2X00RegisterRead;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RegisterWrite:TRT2X00RegisterWrite;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RegisterMultiRead:TRT2X00RegisterMultiRead;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RegisterMultiWrite:TRT2X00RegisterMultiWrite;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RegisterBusyRead:TRT2X00RegisterBusyRead;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SetLED:TRT2X00SetLED;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SetState:TRT2X00SetState;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EnableRX:TRT2X00EnableRX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DisableRX:TRT2X00DisableRX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EnableBeacon:TRT2X00EnableBeacon;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DisableBeacon:TRT2X00DisableBeacon;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GetFirmware:TRT2X00GetFirmware;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CheckFirmware:TRT2X00CheckFirmware;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LoadFirmware:TRT2X00LoadFirmware;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WriteFirmware:TRT2X00WriteFirmware;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Configure:TRT2X00Configure;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigureFilter:TRT2X00ConfigureFilter;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigureAntenna:TRT2X00ConfigureAntenna;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ConfigureInterface:TRT2X00ConfigureInterface;</code>
 +
| &nbsp;
 +
|-
 +
| <code>InitializeRegisters:TRT2X00InitializeRegisters;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HardwareEncryptionDisabled:TRT2X00HardwareEncryptionDisabled;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''RT2X00 Properties''
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Driver configuration flags (RT2X00_CONFIG_*)
 +
|-
 +
| <code>Chipset:TRT2X00Chipset;</code>
 +
| Detected RT/RF chipset and revision
 +
|-
 +
| <code>Capabilities:LongWord;</code>
 +
| Detected capabilities flags
 +
|-
 +
| <code>Requirements:LongWord;</code>
 +
| Detected requirements flags
 +
|-
 +
| <code>Antenna:TRT2X00Antenna;</code>
 +
| Default Antenna configuration
 +
|-
 +
| <code>Specifications:TRT2X00Specifications;</code>
 +
| Detected hardware specifications (Channels, Bands, Rates etc)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>LNAGain:SmallInt;</code>
 +
| LNA gain
 +
|-
 +
| <code>TXPower:Word;</code>
 +
| Current TX power value
 +
|-
 +
| <code>ShortRetry:Byte;</code>
 +
| Current retry values
 +
|-
 +
| <code>LongRetry:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RSSIOffset:Byte;</code>
 +
| RSSI <-> Dbm offset
 +
|-
 +
| <code>FrequencyOffset:Byte;</code>
 +
| Frequency offset
 +
|-
 +
| <code>APInterfaceCount:LongWord;</code>
 +
| AP interface count
 +
|-
 +
| <code>STAInterfaceCount:LongWord;</code>
 +
| STA interface count
 +
|-
 +
| <code>AssociationCount:LongWord;</code>
 +
| Association count
 +
|-
 +
| <code>BeaconingCount:LongWord;</code>
 +
| Beaconing enabled count
 +
|-
 +
| <code>PacketFilter:LongWord;</code>
 +
| Current packet filter configuration for the device (IEEE80211_FIF_*)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>Link:TRT2X00Link;</code>
 +
| Link information
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RFChannel:LongWord;</code>
 +
| Used for VCO periodic calibration
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>LEDRadio:LongBool;</code>
 +
| If True then chipset has a radio LED
 +
|-
 +
| <code>LEDAssoc:LongBool;</code>
 +
| If True then chipset has an association LED
 +
|-
 +
| <code>LEDActivity:LongBool;</code>
 +
| If True then chipset has an activity LED
 +
|-
 +
| <code>LEDQuality:LongBool;</code>
 +
| If True then chipset has a quality LED
 +
|-
 +
| <code>LEDMCURegister:Word;</code>
 +
| The MCU value read from EEPROM during initialization
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CurrentBand:LongWord;</code>
 +
| Current RF band (eg IEEE80211_BAND_2GHZ)
 +
|-
 +
| <code>CurrentFrequency:LongWord;</code>
 +
| Current RF frequency
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| Chipset Driver specific data (eg RT2800)
 +
|-
 +
| <code>DataSize:LongWord;</code>
 +
| Size of the chipset driver data
 +
|-
 +
| <code>RFData:PLongWord;</code>
 +
| RF chip data
 +
|-
 +
| <code>RFSize:LongWord;</code>
 +
| RF data size
 +
|-
 +
| <code>EepromData:PWord;</code>
 +
| EEPROM data
 +
|-
 +
| <code>EepromSize:LongWord;</code>
 +
| EEPROM size
 +
|-
 +
| <code>CSRLock:TMutexHandle;</code>
 +
| Protect against concurrent indirect register access (BBP, RF, MCU)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TXWISize:LongWord;</code>
 +
| Size of the TXWI field in the TX frame
 +
|-
 +
| <code>RXWISize:LongWord;</code>
 +
| Size of the RXWI field in the RX frame
 +
|-
 +
| <code>TXINFOSize:LongWord;</code>
 +
| Size of the TXINFO field in the TX frame
 +
|-
 +
| <code>RXINFOSize:LongWord;</code>
 +
| Size of the RXINFO field in the RX frame
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>ExtraTXHeadroom:LongWord;</code>
 +
| Extra headroom required for TX frames
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''RT2X00LIB functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00DriverInit(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00DriverQuit(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00InitializeModes(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00LoadFirmware(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00EnableRX(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_start_queue
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00DisableRX(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_stop_queue
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00EnableBeacon(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_start_queue
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00DisableBeacon(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_stop_queue
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00EnableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00DisableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00SetLED(RT2X00:PRT2X00WiFiDevice; ID:LongWord; Enabled:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00RadioLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00AssocLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ActivityLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00QualityLED(RT2X00:PRT2X00WiFiDevice; RSSI:LongInt):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00InitializeRate(Entry:PIEEE80211Rate; Index:Word; Rate:PRT2X00Rate);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00InitializeChannel(Entry:PIEEE80211Channel; Channel,TXPower,Value:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetHTCenterChannel(RT2X00:PRT2X00WiFiDevice):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00Configure(RT2X00:PRT2X00WiFiDevice; Flags:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00lib_config
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ConfigureAntenna(RT2X00:PRT2X00WiFiDevice; Antenna:PRT2X00Antenna):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00lib_config_antenna
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ConfigureInterface(RT2X00:PRT2X00WiFiDevice; InterfaceType:LongWord; Address,BSSID:PHardwareAddress):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00lib_config_intf
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''RT2X00LIB helper functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsPCI(RT2X00:PRT2X00WiFiDevice):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsPCIe(RT2X00:PRT2X00WiFiDevice):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsUSB(RT2X00:PRT2X00WiFiDevice):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsMMIO(RT2X00:PRT2X00WiFiDevice):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRTChip(RT2X00:PRT2X00WiFiDevice):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRTChip(RT2X00:PRT2X00WiFiDevice; RTChip:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRFChip(RT2X00:PRT2X00WiFiDevice):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRFChip(RT2X00:PRT2X00WiFiDevice; RFChip:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRevision(RT2X00:PRT2X00WiFiDevice):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRevision(RT2X00:PRT2X00WiFiDevice; Revision:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsRTChipRevision(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsRTChipRevisionLT(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00IsRTChipRevisionGTE(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00_rt_rev_gte
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00ClearCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00ClearRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00RFRead(RT2X00:PRT2X00WiFiDevice; Index:LongWord; Data:PLongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00RFWrite(RT2X00:PRT2X00WiFiDevice; Index,Data:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetEeprom8(RT2X00:PRT2X00WiFiDevice; Offset:Word):Byte;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00_eeprom_byte
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetEeprom16(RT2X00:PRT2X00WiFiDevice; Offset:Word):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetEeprom16(RT2X00:PRT2X00WiFiDevice; Offset,Value:Word);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetEepromAddress(RT2X00:PRT2X00WiFiDevice; Offset:Word):Pointer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return a pointer to the EEPROM value at Offset</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRegister8(Reg,Mask,Shift:Byte):Byte; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the result right (SHR)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRegister8(var Reg:Byte; Mask,Shift,Value:Byte); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the value left (SHL)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRegister16(Reg,Mask,Shift:Word):Word; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the result right (SHR)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRegister16(var Reg:Word; Mask,Shift,Value:Word); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the value left (SHL)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRegister32(Reg,Mask,Shift:LongWord):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the result right (SHR)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00SetRegister32(var Reg:LongWord; Mask,Shift,Value:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Shift is the number of bits to shift the value left (SHL)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ReadDescriptor(Descriptor:PLongWord; Index:Byte):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure RT2X00WriteDescriptor(Descriptor:PLongWord; Index:Byte; Value:LongWord); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRate(Value:Word):PRT2X00Rate; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00_get_rate
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRateMCS(Value:Word):LongInt; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00_get_rate_mcs
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetTXBufferSize(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetTXBufferOffset(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRXBufferSize(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_alloc_rxskb
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00GetRXBufferOffset(RT2X00:PRT2X00WiFiDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00InsertL2PAD(var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_insert_l2pad
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00RemoveL2PAD(var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00queue_remove_l2pad
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ReceiveReadSignal(RT2X00:PRT2X00WiFiDevice; Descriptor:PRT2X00RXDescriptor):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00lib_rxdone_read_signal
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00ReceiveInsertIV(Descriptor:PRT2X00RXDescriptor; var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| rt2x00crypto_rx_insert_iv
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00_RATE_MCS(Mode,MCS:Word):Word; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| RATE_MCS
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RT2X00_L2PAD_SIZE(HeaderLength:LongWord):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| L2PAD_SIZE
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 02:06, 22 April 2022

Return to Unit Reference


Description


Ralink RT2x00 Wireless Driver Library unit

This unit provides functionality and definitions common to all implementations of the RT2x00 chipset series PCI, USB or other.

Constants



RT2X00LIB device and driver configuration flags RT2X00_DEVICE_STATE_*
RT2X00_DEVICE_STATE_PRESENT = (1 shl 0);  
RT2X00_DEVICE_STATE_REGISTERED_HW = (1 shl 1);  
RT2X00_DEVICE_STATE_INITIALIZED = (1 shl 2);  
RT2X00_DEVICE_STATE_STARTED = (1 shl 3);  
RT2X00_DEVICE_STATE_ENABLED_RADIO = (1 shl 4);  
RT2X00_DEVICE_STATE_SCANNING = (1 shl 5);  
 
RT2X00_CONFIG_CHANNEL_HT40 = (1 shl 6);  
RT2X00_CONFIG_POWERSAVING = (1 shl 7);  
RT2X00_CONFIG_HT_DISABLED = (1 shl 8);  
RT2X00_CONFIG_QOS_DISABLED = (1 shl 9);  
 
RT2X00_TX_STATUS_READING = (1 shl 10);  


RT2X00LIB standard timings and sizes RT2X00_*_SIZE
These values should follow the ieee80211 specifications
RT2X00_ACK_SIZE = 14;  
RT2X00_IEEE80211_HEADER = 24;  
RT2X00_PLCP = 48;  
RT2X00_BEACON = 100;  
RT2X00_PREAMBLE = 144;  
RT2X00_SHORT_PREAMBLE = 72;  
RT2X00_SLOT_TIME = 20;  
RT2X00_SHORT_SLOT_TIME = 9;  
RT2X00_SIFS = 10;  
RT2X00_PIFS = RT2X00_SIFS + RT2X00_SLOT_TIME;  
RT2X00_SHORT_PIFS = RT2X00_SIFS + RT2X00_SHORT_SLOT_TIME;  
RT2X00_DIFS = RT2X00_PIFS + RT2X00_SLOT_TIME;  
RT2X00_SHORT_DIFS = RT2X00_SHORT_PIFS + RT2X00_SHORT_SLOT_TIME;  
RT2X00_EIFS = RT2X00_SIFS + RT2X00_DIFS + RT2X00_GET_DURATION(RT2X00_IEEE80211_HEADER + RT2X00_ACK_SIZE,10);  
RT2X00_SHORT_EIFS = RT2X00_SIFS + RT2X00_SHORT_DIFS + RT2X00_GET_DURATION(RT2X00_IEEE80211_HEADER + RT2X00_ACK_SIZE,10);  


RT2X00LIB extra TX headroom RT2X00_*_EXTRA
colspan="2"|Note: For alignment purposes
RT2X00_ALIGN_EXTRA = 4; RT2X00_ALIGN_SIZE Only whole frame needs alignment
RT2X00_L2PAD_EXTRA = 8; RT2X00_L2PAD_SIZE Both header & payload need alignment


RT2X00LIB chipset RT2X00_RT*
The chipset on the device is composed of an RT and RF chip)
RT2X00_RT2460 = $2460;  
RT2X00_RT2560 = $2560;  
RT2X00_RT2570 = $2570;  
RT2X00_RT2661 = $2661;  
RT2X00_RT2573 = $2573;  
RT2X00_RT2860 = $2860; 2.4GHz
RT2X00_RT2872 = $2872; WSOC
RT2X00_RT2883 = $2883; WSOC
RT2X00_RT3070 = $3070;  
RT2X00_RT3071 = $3071;  
RT2X00_RT3090 = $3090; 2.4GHz PCIe
RT2X00_RT3290 = $3290;  
RT2X00_RT3352 = $3352; WSOC
RT2X00_RT3390 = $3390;  
RT2X00_RT3572 = $3572;  
RT2X00_RT3593 = $3593;  
RT2X00_RT3883 = $3883; WSOC
RT2X00_RT5390 = $5390; 2.4GHz
RT2X00_RT5392 = $5392; 2.4GHz
RT2X00_RT5592 = $5592;  


RT2X00LIB requirements RT2X00_REQUIRE_*
RT2X00_REQUIRE_FIRMWARE = 1 shl 0;  
RT2X00_REQUIRE_BEACON_GUARD = 1 shl 1;  
RT2X00_REQUIRE_ATIM_QUEUE = 1 shl 2;  
RT2X00_REQUIRE_DMA = 1 shl 3;  
RT2X00_REQUIRE_COPY_IV = 1 shl 4;  
RT2X00_REQUIRE_L2PAD = 1 shl 5;  
RT2X00_REQUIRE_TXSTATUS_FIFO = 1 shl 6;  
RT2X00_REQUIRE_SW_SEQNO = 1 shl 7;  
RT2X00_REQUIRE_HT_TX_DESC = 1 shl 8;  
RT2X00_REQUIRE_PS_AUTOWAKE = 1 shl 9;  


RT2X00LIB capabilities RT2X00_CAPABILITY_*
RT2X00_CAPABILITY_HW_BUTTON = 1 shl 0;  
RT2X00_CAPABILITY_HW_CRYPTO = 1 shl 1;  
RT2X00_CAPABILITY_POWER_LIMIT = 1 shl 2;  
RT2X00_CAPABILITY_CONTROL_FILTERS = 1 shl 3;  
RT2X00_CAPABILITY_CONTROL_FILTER_PSPOLL = 1 shl 4;  
RT2X00_CAPABILITY_PRE_TBTT_INTERRUPT = 1 shl 5;  
RT2X00_CAPABILITY_LINK_TUNING = 1 shl 6;  
RT2X00_CAPABILITY_FRAME_TYPE = 1 shl 7;  
RT2X00_CAPABILITY_RF_SEQUENCE = 1 shl 8;  
RT2X00_CAPABILITY_EXTERNAL_LNA_A = 1 shl 9;  
RT2X00_CAPABILITY_EXTERNAL_LNA_BG = 1 shl 10;  
RT2X00_CAPABILITY_DOUBLE_ANTENNA = 1 shl 11;  
RT2X00_CAPABILITY_BT_COEXIST = 1 shl 12;  
RT2X00_CAPABILITY_VCO_RECALIBRATION = 1 shl 13;  


RT2X00LIB busy delay RT2X00_REGISTER_BUSY_*
RT2X00_REGISTER_BUSY_COUNT = 100;  
RT2X00_REGISTER_USB_BUSY_COUNT = 20;  
RT2X00_REGISTER_BUSY_DELAY = 100;  


RT2X00LIB RX crypto status RT2X00_RX_CRYPTO_*
RT2X00_RX_CRYPTO_SUCCESS = 0;  
RT2X00_RX_CRYPTO_FAIL_ICV = 1;  
RT2X00_RX_CRYPTO_FAIL_MIC = 2;  
RT2X00_RX_CRYPTO_FAIL_KEY = 3;  


RT2X00LIB RX descriptor flags RT2X00_RXDONE_*
RT2X00_RXDONE_SIGNAL_PLCP = (1 shl 0); Signal field contains the plcp value
RT2X00_RXDONE_SIGNAL_BITRATE = (1 shl 1); Signal field contains the bitrate value
RT2X00_RXDONE_SIGNAL_MCS = (1 shl 2); Signal field contains the mcs value
RT2X00_RXDONE_MY_BSS = (1 shl 3); Does this frame originate from device's BSS
RT2X00_RXDONE_CRYPTO_IV = (1 shl 4); Driver provided IV/EIV data
RT2X00_RXDONE_CRYPTO_ICV = (1 shl 5); Driver provided ICV data
RT2X00_RXDONE_L2PAD = (1 shl 6); 802.11 payload has been padded to 4-byte boundary
 
RT2X00_RXDONE_SIGNAL_MASK = (RT2X00_RXDONE_SIGNAL_PLCP or RT2X00_RXDONE_SIGNAL_BITRATE or RT2X00_RXDONE_SIGNAL_MCS);  


RT2X00LIB TX descriptor flags RT2X00_ENTRY_TXD_*
RT2X00_ENTRY_TXD_RTS_FRAME = (1 shl 0); This frame is a RTS frame
RT2X00_ENTRY_TXD_CTS_FRAME = (1 shl 1); This frame is a CTS-to-self frame
RT2X00_ENTRY_TXD_GENERATE_SEQ = (1 shl 2); This frame requires sequence counter
RT2X00_ENTRY_TXD_FIRST_FRAGMENT = (1 shl 3); This is the first frame
RT2X00_ENTRY_TXD_MORE_FRAG = (1 shl 4); This frame is followed by another fragment
RT2X00_ENTRY_TXD_REQ_TIMESTAMP = (1 shl 5); Require timestamp to be inserted
RT2X00_ENTRY_TXD_BURST = (1 shl 6); This frame belongs to the same burst event
RT2X00_ENTRY_TXD_ACK = (1 shl 7); An ACK is required for this frame
RT2X00_ENTRY_TXD_RETRY_MODE = (1 shl 8); When set, the long retry count is used
RT2X00_ENTRY_TXD_ENCRYPT = (1 shl 9); This frame should be encrypted
RT2X00_ENTRY_TXD_ENCRYPT_PAIRWISE = (1 shl 10); Use pairwise key table (instead of shared)
RT2X00_ENTRY_TXD_ENCRYPT_IV = (1 shl 11); Generate IV/EIV in hardware
RT2X00_ENTRY_TXD_ENCRYPT_MMIC = (1 shl 12); Generate MIC in hardware
RT2X00_ENTRY_TXD_HT_AMPDU = (1 shl 13); This frame is part of an AMPDU
RT2X00_ENTRY_TXD_HT_BW_40 = (1 shl 14); Use 40MHz Bandwidth
RT2X00_ENTRY_TXD_HT_SHORT_GI = (1 shl 15); Use short GI
RT2X00_ENTRY_TXD_HT_MIMO_PS = (1 shl 16); The receiving STA is in dynamic SM PS mode


RT2X00LIB TX complete flags RT2X00_TXDONE_*
RT2X00_TXDONE_UNKNOWN = (1 shl 0); Hardware could not determine success of transmission
RT2X00_TXDONE_SUCCESS = (1 shl 1); Frame was successfully sent
RT2X00_TXDONE_FALLBACK = (1 shl 2); Hardware used fallback rates for retries
RT2X00_TXDONE_FAILURE = (1 shl 3); Frame was not successfully sent
RT2X00_TXDONE_EXCESSIVE_RETRY = (1 shl 4); In addition to TXDONE_FAILURE, the frame transmission failed due to excessive retries
RT2X00_TXDONE_AMPDU = (1 shl 5);  


RT2X00LIB antenna RT2X00_ANTENNA_*
RT2X00_ANTENNA_SW_DIVERSITY = 0;  
RT2X00_ANTENNA_A = 1;  
RT2X00_ANTENNA_B = 2;  
RT2X00_ANTENNA_HW_DIVERSITY = 3;  


RT2X00LIB antenna flags RT2X00_ANTENNA_RX_*
RT2X00_ANTENNA_RX_DIVERSITY = $00000001;  
RT2X00_ANTENNA_TX_DIVERSITY = $00000002;  
RT2X00_ANTENNA_MODE_SAMPLE = $00000004;  


RT2X00LIB LED type RT2X00_LED_TYPE_*
RT2X00_LED_TYPE_RADIO = 0;  
RT2X00_LED_TYPE_ASSOC = 1;  
RT2X00_LED_TYPE_ACTIVITY = 2;  
RT2X00_LED_TYPE_QUALITY = 3;  


RT2X00LIB LED mode RT2X00_LED_MODE_*
RT2X00_LED_MODE_DEFAULT = 0;  
RT2X00_LED_MODE_TXRX_ACTIVITY = 1;  
RT2X00_LED_MODE_SIGNAL_STRENGTH = 2;  
RT2X00_LED_MODE_ASUS = 3;  
RT2X00_LED_MODE_ALPHA = 4;  


RT2X00LIB TSF synchronization RT2X00_TSF_SYNC_*
RT2X00_TSF_SYNC_NONE = 0;  
RT2X00_TSF_SYNC_INFRA = 1;  
RT2X00_TSF_SYNC_ADHOC = 2;  
RT2X00_TSF_SYNC_AP_NONE = 3;  


RT2X00LIB device states RT2X00_STATE_*
RT2X00_STATE_DEEP_SLEEP = 0;  
RT2X00_STATE_SLEEP = 1;  
RT2X00_STATE_STANDBY = 2;  
RT2X00_STATE_AWAKE = 3;  
Additional device states, these values are not directly passed into the device
RT2X00_STATE_RADIO_ON = 4;  
RT2X00_STATE_RADIO_OFF = 5;  
RT2X00_STATE_RADIO_IRQ_ON = 6;  
RT2X00_STATE_RADIO_IRQ_OFF = 7;  


RT2X00LIB IFS backoff RT2X00_IFS_*
RT2X00_IFS_BACKOFF = 0;  
RT2X00_IFS_SIFS = 1;  
RT2X00_IFS_NEW_BACKOFF = 2;  
RT2X00_IFS_NONE = 3;  


RT2X00LIB IFS backoff (for HT devices) RT2X00_TXOP_*
RT2X00_TXOP_HTTXOP = 0;  
RT2X00_TXOP_PIFS = 1;  
RT2X00_TXOP_SIFS = 2;  
RT2X00_TXOP_BACKOFF = 3;  


RT2X00LIB cipher RT2X00_CIPHER_*
RT2X00_CIPHER_NONE = 0;  
RT2X00_CIPHER_WEP64 = 1;  
RT2X00_CIPHER_WEP128 = 2;  
RT2X00_CIPHER_TKIP = 3;  
RT2X00_CIPHER_AES = 4;  
The following were added by rt61pci and rt73usb
RT2X00_CIPHER_CKIP64 = 5;  
RT2X00_CIPHER_CKIP128 = 6;  
RT2X00_CIPHER_TKIP_NO_MIC = 7; Don't send to device
 
RT2X00_CIPHER_MAX = 4; Note that CIPHER_NONE isn't counted, and CKIP64 and CKIP128 are excluded.


RT2X00LIB rate modulation RT2X00_RATE_MODE_*
RT2X00_RATE_MODE_CCK = 0;  
RT2X00_RATE_MODE_OFDM = 1;  
RT2X00_RATE_MODE_HT_MIX = 2;  
RT2X00_RATE_MODE_HT_GREENFIELD = 3;  


RT2X00LIB size RT2X00_*_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 IEEE 802.11 specs. The aggregation size depends on support from the driver, but should be something around 3840 bytes.
RT2X00_DATA_FRAME_SIZE = 2432;  
RT2X00_MGMT_FRAME_SIZE = 256;  
RT2X00_AGGREGATION_SIZE = 3840;  


RT2X00LIB channel RT2X00_CHANNEL_*
RT2X00_CHANNEL_GEOGRAPHY_ALLOWED = $00000001;  


RT2X00LIB supported bands RT2X00_SUPPORT_BAND_*
RT2X00_SUPPORT_BAND_2GHZ = $00000001;  
RT2X00_SUPPORT_BAND_5GHZ = $00000002;  


RT2X00LIB supported rates RT2X00_SUPPORT_RATE_*
RT2X00_SUPPORT_RATE_CCK = $00000001;  
RT2X00_SUPPORT_RATE_OFDM = $00000002;  


RT2X00LIB device supported rates RT2X00_DEV_RATE_*
RT2X00_DEV_RATE_CCK = $0001;  
RT2X00_DEV_RATE_OFDM = $0002;  
RT2X00_DEV_RATE_SHORT_PREAMBLE = $0004;  


RT2X00LIB configuration update RT2X00_CONFIG_UPDATE_*
RT2X00_CONFIG_UPDATE_TYPE = (1 shl 1);  
RT2X00_CONFIG_UPDATE_MAC = (1 shl 2);  
RT2X00_CONFIG_UPDATE_BSSID = (1 shl 3);  


Type definitions



RT2X00LIB chipset

PRT2X00Chipset = ^TRT2X00Chipset;

TRT2X00Chipset = record

rt2x00_chip
RTChip:Word; RT2X00_RT2460 etc
RFChip:Word; RT2800_RF2820 etc
Revision:Word; RT2800_REV_RT2860C etc

RT2X00LIB rate

PRT2X00Rate = ^TRT2X00Rate;

TRT2X00Rate = record

Flags:Word;  
BitRate:Word; In 100kbit/s
RateMask:Word;  
PLCP:Word;  
MCS:Word;  

RT2X00LIB antenna

PRT2X00Antenna = ^TRT2X00Antenna;

TRT2X00Antenna = record

antenna_setup
RX:Byte; RT2X00_ANTENNA_A etc
TX:Byte; RT2X00_ANTENNA_A etc
RXChainNo:Byte;  
TXChainNo:Byte;  

RT2X00LIB channel

PRT2X00Channel = ^TRT2X00Channel;

TRT2X00Channel = record

channel_info
Flags:LongWord; RT2X00_CHANNEL_GEOGRAPHY_ALLOWED etc
MaxPower:ShortInt;  
DefaultPower1:ShortInt;  
DefaultPower2:ShortInt;  
DefaultPower3:ShortInt;  

RT2X00LIB channels

PRT2X00Channels = ^TRT2X00Channels;

TRT2X00Channels = array[0..0] of TRT2X00Channel;

   

RT2X00LIB RF channel

PRT2X00RFChannel = ^TRT2X00RFChannel;

TRT2X00RFChannel = record

rf_channel
Channel:LongWord;  
RF1:LongWord;  
RF2:LongWord;  
RF3:LongWord;  
RF4:LongWord;  

RT2X00LIB RF channels

PRT2X00RFChannels = ^TRT2X00RFChannels;

TRT2X00RFChannels = array[0..0] of TRT2X00RFChannel;

   

RT2X00LIB specifications

PRT2X00Specifications = ^TRT2X00Specifications;

TRT2X00Specifications = record

hw_mode_spec
SupportedBands:LongWord; RT2X00_SUPPORT_BAND_2GHZ etc
SupportedRates:LongWord; RT2X00_SUPPORT_RATE_CCK etc
ChannelCount:LongWord;  
Channels:PRT2X00Channels;  
RFChannels:PRT2X00RFChannels;  
HTCapabilities:TIEEE80211StationHTCap;  

RT2X00LIB EWMA

PRT2X00EWMA = ^TRT2X00EWMA;

TRT2X00EWMA = record

Exponentially weighted moving average

EWMA

Internal:LongWord;  
Factor:LongWord;  
Weight:LongWord;  

RT2X00LIB link quality

PRT2X00LinkQuality = ^TRT2X00LinkQuality;

TRT2X00LinkQuality = record

Quality statistics about the currently active link

link_qual

RSSI:LongInt; Statistics required for Link tuning by driver
FalseCCA:LongInt;  
VGC levels
VGCLevel:Byte; Driver will tune the VGC level during each call to the link tuner callback function
VGCLevelRegister:Byte; The vgc_level is determined based on the link quality statistics like average RSSI and the false CCA count
 
RXSuccess:LongWord; Statistics required for Signal quality calculation
RXFailed:LongWord;  
TXSuccess:LongWord;  
TXFailed:LongWord;  

RT2X00LIB link antenna

PRT2X00LinkAntenna = ^TRT2X00LinkAntenna;

TRT2X00LinkAntenna = record

Antenna settings about the currently active link

link_ant

Flags:LongWord; Antenna flags (RT2X00_ANTENNA_RX_DIVERSITY etc)
ActiveAntenna:TRT2X00Antenna; Currently active TX/RX antenna setup
RSSIHistory:LongInt; RSSI history information for the antenna
RSSIAntenna:TRT2X00EWMA; Current RSSI average of the currently active antenna

RT2X00LIB link

PRT2X00Link = ^TRT2X00Link;

TRT2X00Link = record

link
Count:LongWord; Link tuner counter
Quality:TRT2X00LinkQuality; Quality measurement values
Antenna:TRT2X00LinkAntenna; TX/RX antenna setup
RSSIAverage:TRT2X00EWMA; Currently active average RSSI value

RT2X00LIB interface

PRT2X00Interface = ^TRT2X00Interface;

TRT2X00Interface = record

rt2x00_intf
EnableBeacon:LongBool;  
SequenceNo:LongWord; Software sequence counter (only required for hardware which doesn't support hardware sequence counting)

RT2X00LIB channel configuration

PRT2X00ChannelConfiguration = ^TRT2X00ChannelConfiguration;

TRT2X00ChannelConfiguration = record

rt2x00lib_conf
Channel:TRT2X00Channel;  
RFChannel:TRT2X00RFChannel;  

RT2X00LIB interface configuration

PRT2X00InterfaceConfiguration = ^TRT2X00InterfaceConfiguration;

TRT2X00InterfaceConfiguration = record

rt2x00intf_conf
InterfaceType:LongWord; Interface type (WIFI_IFTYPE_STATION etc)
TSFSync:LongWord; TSF sync value (dependent on the interface type) (RT2X00_TSF_SYNC_NONE etc)
MAC:array[0..1] of LongWord; All devices (except RT2500USB) have 32 bits register word sizes
BSSID:array[0..1] of LongWord; Which means these variables must be a multiple of 32 bits

RT2X00LIB RX descriptor

PRT2X00RXDescriptor = ^TRT2X00RXDescriptor;

TRT2X00RXDescriptor = record

rxdone_entry_desc
Timestamp:Int64; RX Timestamp
Signal:LongInt; Signal of the received frame
RSSI:LongInt; RSSI of the received frame
Size:LongWord; Data size of the received frame
Flags:LongWord; Receive flags (WIFI_RX_FLAG_*)
RXFlags:LongWord; Receive flags (RT2X00_RXDONE_*)
RateMode:Word; Rate mode (RT2X00_RATE_MODE_*)
Cipher:Byte; Cipher type used during decryption
CipherStatus:Byte; Decryption status
IV:array[0..1] of LongWord; IV/EIV data used during decryption
ICV:LongWord; ICV data used during decryption

RT2X00LIB TX decriptor

PRT2X00TXDescriptor = ^TRT2X00TXDescriptor;

TRT2X00TXDescriptor = record

txentry_desc
Flags:LongWord;  
Length:Word;  
HeaderLength:Word;  

'RT2X00LIB TX complete

PRT2X00TXComplete = ^TRT2X00TXComplete;

TRT2X00TXComplete = record

txdone_entry_desc
Flags:LongWord; Transmit flags (RT2X00_TXDONE_*)
Retry:LongWord; {Retry count}  

RT2X00LIB driver initialization

TRT2X00DriverInit = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB EEPROM load

TRT2X00EepromLoad = function(RT2X00:PRT2X00WiFiDevice; Data:PWord; Size:LongWord):LongWord;

RT2X00LIB register read

TRT2X00RegisterRead = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:PLongWord):LongWord;

RT2X00LIB register write

TRT2X00RegisterWrite = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Value:LongWord):LongWord;

RT2X00LIB register multi read

TRT2X00RegisterMultiRead = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;

RT2X00LIB register multi write

TRT2X00RegisterMultiWrite = function(RT2X00:PRT2X00WiFiDevice; Offset:Word; Data:Pointer; Size:LongWord):LongWord;

RT2X00LIB register busy read

TRT2X00RegisterBusyRead = function(RT2X00:PRT2X00WiFiDevice; Offset,Mask:LongWord; Reg:PLongWord):Boolean;

RT2X00LIB set LED

TRT2X00SetLED = function(RT2X00:PRT2X00WiFiDevice; ID,Level:LongWord):LongWord;

RT2X00LIB set state

TRT2X00SetState = function(RT2X00:PRT2X00WiFiDevice; State:LongWord):LongWord;

RT2X00LIB enable RX

TRT2X00EnableRX = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB disable RX

TRT2X00DisableRX = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB enable beacon

TRT2X00EnableBeacon = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB disable beacon

TRT2X00DisableBeacon = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB get firmware

TRT2X00GetFirmware = function(RT2X00:PRT2X00WiFiDevice; var Name:String; var Address:Pointer; var Size:LongWord):Boolean;

RT2X00LIB check firmware

TRT2X00CheckFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;

RT2X00LIB load firmware

TRT2X00LoadFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;

RT2X00LIB write firmware

TRT2X00WriteFirmware = function(RT2X00:PRT2X00WiFiDevice; Data:PByte; Size:LongWord):Boolean;

RT2X00LIB configure

TRT2X00Configure = function(RT2X00:PRT2X00WiFiDevice; Configuration:PRT2X00ChannelConfiguration; Flags:LongWord):LongWord;

RT2X00LIB configure filter

TRT2X00ConfigureFilter = function(RT2X00:PRT2X00WiFiDevice; Filter:LongWord):LongWord;

RT2X00LIB configure antenna

TRT2X00ConfigureAntenna = function(RT2X00:PRT2X00WiFiDevice; Antenna:PRT2X00Antenna):LongWord;

RT2X00LIB configure interface

TRT2X00ConfigureInterface = function(RT2X00:PRT2X00WiFiDevice; Configuration:PRT2X00InterfaceConfiguration; Flags:LongWord):LongWord;

RT2X00LIB initialize registers

TRT2X00InitializeRegisters = function(RT2X00:PRT2X00WiFiDevice):LongWord;

RT2X00LIB hardware encryption disabled

TRT2X00HardwareEncryptionDisabled = function(RT2X00:PRT2X00WiFiDevice):Boolean;

RT2X00LIB WiFi device

PRT2X00WiFiDevice = ^TRT2X00WiFiDevice;

TRT2X00WiFiDevice = record

WiFi Properties
WiFi:TWiFiDevice;  
RT2X00 Methods
DriverInit:TRT2X00DriverInit;  
EepromLoad:TRT2X00EepromLoad;  
RegisterRead:TRT2X00RegisterRead;  
RegisterWrite:TRT2X00RegisterWrite;  
RegisterMultiRead:TRT2X00RegisterMultiRead;  
RegisterMultiWrite:TRT2X00RegisterMultiWrite;  
RegisterBusyRead:TRT2X00RegisterBusyRead;  
SetLED:TRT2X00SetLED;  
SetState:TRT2X00SetState;  
EnableRX:TRT2X00EnableRX;  
DisableRX:TRT2X00DisableRX;  
EnableBeacon:TRT2X00EnableBeacon;  
DisableBeacon:TRT2X00DisableBeacon;  
GetFirmware:TRT2X00GetFirmware;  
CheckFirmware:TRT2X00CheckFirmware;  
LoadFirmware:TRT2X00LoadFirmware;  
WriteFirmware:TRT2X00WriteFirmware;  
Configure:TRT2X00Configure;  
ConfigureFilter:TRT2X00ConfigureFilter;  
ConfigureAntenna:TRT2X00ConfigureAntenna;  
ConfigureInterface:TRT2X00ConfigureInterface;  
InitializeRegisters:TRT2X00InitializeRegisters;  
HardwareEncryptionDisabled:TRT2X00HardwareEncryptionDisabled;  
RT2X00 Properties
Flags:LongWord; Driver configuration flags (RT2X00_CONFIG_*)
Chipset:TRT2X00Chipset; Detected RT/RF chipset and revision
Capabilities:LongWord; Detected capabilities flags
Requirements:LongWord; Detected requirements flags
Antenna:TRT2X00Antenna; Default Antenna configuration
Specifications:TRT2X00Specifications; Detected hardware specifications (Channels, Bands, Rates etc)
 
LNAGain:SmallInt; LNA gain
TXPower:Word; Current TX power value
ShortRetry:Byte; Current retry values
LongRetry:Byte;  
RSSIOffset:Byte; RSSI <-> Dbm offset
FrequencyOffset:Byte; Frequency offset
APInterfaceCount:LongWord; AP interface count
STAInterfaceCount:LongWord; STA interface count
AssociationCount:LongWord; Association count
BeaconingCount:LongWord; Beaconing enabled count
PacketFilter:LongWord; Current packet filter configuration for the device (IEEE80211_FIF_*)
 
Link:TRT2X00Link; Link information
 
RFChannel:LongWord; Used for VCO periodic calibration
 
LEDRadio:LongBool; If True then chipset has a radio LED
LEDAssoc:LongBool; If True then chipset has an association LED
LEDActivity:LongBool; If True then chipset has an activity LED
LEDQuality:LongBool; If True then chipset has a quality LED
LEDMCURegister:Word; The MCU value read from EEPROM during initialization
 
CurrentBand:LongWord; Current RF band (eg IEEE80211_BAND_2GHZ)
CurrentFrequency:LongWord; Current RF frequency
 
Data:Pointer; Chipset Driver specific data (eg RT2800)
DataSize:LongWord; Size of the chipset driver data
RFData:PLongWord; RF chip data
RFSize:LongWord; RF data size
EepromData:PWord; EEPROM data
EepromSize:LongWord; EEPROM size
CSRLock:TMutexHandle; Protect against concurrent indirect register access (BBP, RF, MCU)
 
TXWISize:LongWord; Size of the TXWI field in the TX frame
RXWISize:LongWord; Size of the RXWI field in the RX frame
TXINFOSize:LongWord; Size of the TXINFO field in the TX frame
RXINFOSize:LongWord; Size of the RXINFO field in the RX frame
 
ExtraTXHeadroom:LongWord; Extra headroom required for TX frames


Public variables


None defined

Function declarations



RT2X00LIB functions

function RT2X00DriverInit(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00DriverQuit(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00InitializeModes(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00LoadFirmware(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00EnableRX(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note rt2x00queue_start_queue


function RT2X00DisableRX(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note rt2x00queue_stop_queue


function RT2X00EnableBeacon(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note rt2x00queue_start_queue


function RT2X00DisableBeacon(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note rt2x00queue_stop_queue


function RT2X00EnableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00DisableRadio(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00SetLED(RT2X00:PRT2X00WiFiDevice; ID:LongWord; Enabled:Boolean):LongWord;
Description: To be documented
Note None documented


function RT2X00RadioLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;
Description: To be documented
Note None documented


function RT2X00AssocLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;
Description: To be documented
Note None documented


function RT2X00ActivityLED(RT2X00:PRT2X00WiFiDevice; Enabled:Boolean):LongWord;
Description: To be documented
Note None documented


function RT2X00QualityLED(RT2X00:PRT2X00WiFiDevice; RSSI:LongInt):LongWord;
Description: To be documented
Note None documented


procedure RT2X00InitializeRate(Entry:PIEEE80211Rate; Index:Word; Rate:PRT2X00Rate);
Description: To be documented
Note None documented


procedure RT2X00InitializeChannel(Entry:PIEEE80211Channel; Channel,TXPower,Value:LongWord);
Description: To be documented
Note None documented


function RT2X00GetHTCenterChannel(RT2X00:PRT2X00WiFiDevice):Word;
Description: To be documented
Note None documented


function RT2X00Configure(RT2X00:PRT2X00WiFiDevice; Flags:LongWord):LongWord;
Description: To be documented
Note rt2x00lib_config


function RT2X00ConfigureAntenna(RT2X00:PRT2X00WiFiDevice; Antenna:PRT2X00Antenna):LongWord;
Description: To be documented
Note rt2x00lib_config_antenna


function RT2X00ConfigureInterface(RT2X00:PRT2X00WiFiDevice; InterfaceType:LongWord; Address,BSSID:PHardwareAddress):LongWord;
Description: To be documented
Note rt2x00lib_config_intf


RT2X00LIB helper functions

function RT2X00IsPCI(RT2X00:PRT2X00WiFiDevice):Boolean;
Description: To be documented
Note None documented


function RT2X00IsPCIe(RT2X00:PRT2X00WiFiDevice):Boolean;
Description: To be documented
Note None documented


function RT2X00IsUSB(RT2X00:PRT2X00WiFiDevice):Boolean;
Description: To be documented
Note None documented


function RT2X00IsMMIO(RT2X00:PRT2X00WiFiDevice):Boolean;
Description: To be documented
Note None documented


function RT2X00GetRTChip(RT2X00:PRT2X00WiFiDevice):Word;
Description: To be documented
Note None documented


procedure RT2X00SetRTChip(RT2X00:PRT2X00WiFiDevice; RTChip:Word);
Description: To be documented
Note None documented


function RT2X00GetRFChip(RT2X00:PRT2X00WiFiDevice):Word;
Description: To be documented
Note None documented


procedure RT2X00SetRFChip(RT2X00:PRT2X00WiFiDevice; RFChip:Word);
Description: To be documented
Note None documented


function RT2X00GetRevision(RT2X00:PRT2X00WiFiDevice):Word;
Description: To be documented
Note None documented


procedure RT2X00SetRevision(RT2X00:PRT2X00WiFiDevice; Revision:Word);
Description: To be documented
Note None documented


function RT2X00IsRTChipRevision(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;
Description: To be documented
Note None documented


function RT2X00IsRTChipRevisionLT(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;
Description: To be documented
Note None documented


function RT2X00IsRTChipRevisionGTE(RT2X00:PRT2X00WiFiDevice; RTChip:Word; Revision:Word):Boolean;
Description: To be documented
Note rt2x00_rt_rev_gte


function RT2X00GetCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord):Boolean;
Description: To be documented
Note None documented


procedure RT2X00SetCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord);
Description: To be documented
Note None documented


procedure RT2X00ClearCapability(RT2X00:PRT2X00WiFiDevice; Capability:LongWord);
Description: To be documented
Note None documented


function RT2X00GetRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord):Boolean;
Description: To be documented
Note None documented


procedure RT2X00SetRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord);
Description: To be documented
Note None documented


procedure RT2X00ClearRequirement(RT2X00:PRT2X00WiFiDevice; Requirement:LongWord);
Description: To be documented
Note None documented


function RT2X00RFRead(RT2X00:PRT2X00WiFiDevice; Index:LongWord; Data:PLongWord):Boolean;
Description: To be documented
Note None documented


function RT2X00RFWrite(RT2X00:PRT2X00WiFiDevice; Index,Data:LongWord):Boolean;
Description: To be documented
Note None documented


function RT2X00GetEeprom8(RT2X00:PRT2X00WiFiDevice; Offset:Word):Byte;
Description: To be documented
Note rt2x00_eeprom_byte


function RT2X00GetEeprom16(RT2X00:PRT2X00WiFiDevice; Offset:Word):Word;
Description: To be documented
Note None documented


procedure RT2X00SetEeprom16(RT2X00:PRT2X00WiFiDevice; Offset,Value:Word);
Description: To be documented
Note None documented


function RT2X00GetEepromAddress(RT2X00:PRT2X00WiFiDevice; Offset:Word):Pointer;
Description: Return a pointer to the EEPROM value at Offset
Note None documented


function RT2X00GetRegister8(Reg,Mask,Shift:Byte):Byte; inline;
Description: Shift is the number of bits to shift the result right (SHR)
Note None documented


procedure RT2X00SetRegister8(var Reg:Byte; Mask,Shift,Value:Byte); inline;
Description: Shift is the number of bits to shift the value left (SHL)
Note None documented


function RT2X00GetRegister16(Reg,Mask,Shift:Word):Word; inline;
Description: Shift is the number of bits to shift the result right (SHR)
Note None documented


procedure RT2X00SetRegister16(var Reg:Word; Mask,Shift,Value:Word); inline;
Description: Shift is the number of bits to shift the value left (SHL)
Note None documented


function RT2X00GetRegister32(Reg,Mask,Shift:LongWord):LongWord; inline;
Description: Shift is the number of bits to shift the result right (SHR)
Note None documented


procedure RT2X00SetRegister32(var Reg:LongWord; Mask,Shift,Value:LongWord);
Description: Shift is the number of bits to shift the value left (SHL)
Note None documented


function RT2X00ReadDescriptor(Descriptor:PLongWord; Index:Byte):LongWord; inline;
Description: To be documented
Note None documented


procedure RT2X00WriteDescriptor(Descriptor:PLongWord; Index:Byte; Value:LongWord); inline;
Description: To be documented
Note None documented


function RT2X00GetRate(Value:Word):PRT2X00Rate; inline;
Description: To be documented
Note rt2x00_get_rate


function RT2X00GetRateMCS(Value:Word):LongInt; inline;
Description: To be documented
Note rt2x00_get_rate_mcs


function RT2X00GetTXBufferSize(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00GetTXBufferOffset(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00GetRXBufferSize(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note rt2x00queue_alloc_rxskb


function RT2X00GetRXBufferOffset(RT2X00:PRT2X00WiFiDevice):LongWord;
Description: To be documented
Note None documented


function RT2X00InsertL2PAD(var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;
Description: To be documented
Note rt2x00queue_insert_l2pad


function RT2X00RemoveL2PAD(var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;
Description: To be documented
Note rt2x00queue_remove_l2pad


function RT2X00ReceiveReadSignal(RT2X00:PRT2X00WiFiDevice; Descriptor:PRT2X00RXDescriptor):LongWord;
Description: To be documented
Note rt2x00lib_rxdone_read_signal


function RT2X00ReceiveInsertIV(Descriptor:PRT2X00RXDescriptor; var Data:Pointer; var Size:LongWord; HeaderLength:LongWord):Boolean;
Description: To be documented
Note rt2x00crypto_rx_insert_iv


function RT2X00_RATE_MCS(Mode,MCS:Word):Word; inline;
Description: To be documented
Note RATE_MCS


function RT2X00_L2PAD_SIZE(HeaderLength:LongWord):LongWord; inline;
Description: To be documented
Note L2PAD_SIZE


Return to Unit Reference