Lines Matching +full:max +full:- +full:bit +full:- +full:rate
8 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved.
29 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
33 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved.
92 /* Multi-Station support */
138 /* RF-KILL commands and notifications */
184 * when sending the response to each driver-originated command, so
188 * There is one exception: uCode sets bit 15 when it originates
196 * 0:7 tfd idx - position within TX queue
199 * 14 huge - driver sets this to indicate command is in the
201 * 15 unsolicited RX or uCode-originated notification
215 * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
234 u8 rate; /* plcp */ member
240 * iwl4965 rate_n_flags bit fields
248 * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
249 * 2-0: 0) 6 Mbps
258 * 4-3: 0) Single stream (SISO)
264 * Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"):
265 * 3-0: 0xD) 6 Mbps
274 * Legacy CCK rate format for bits 7:0 (bit 8 must be "0", bit 9 "1"):
275 * 6-0: 10) 1 Mbps
286 /* Bit 8: (1) HT format, (0) legacy format in bits 7:0 */
291 /* Bit 9: (1) CCK, (0) OFDM. HT (bit 8) must be "0" for this bit to be valid */
295 /* Bit 10: (1) Use Green Field preamble */
299 /* Bit 11: (1) Use 40Mhz HT40 chnl width, (0) use 20 MHz legacy chnl width */
303 /* Bit 12: (1) Duplicate data on both 20MHz chnls. HT40 (bit 11) must be set. */
307 /* Bit 13: (1) Short guard interval (0.4 usec), (0) normal GI (0.8 usec) */
341 * For SISO bit rates, both values in a pair should be identical.
445 * a 256-entry history of uCode execution within a circular buffer.
456 * __le32 event_id; range 0 - 1500
458 * __le32 data; event_id-specific data value
474 * __le32 data1; error-specific data
475 * __le32 data2; error-specific data
585 /* rx response to host with 8-byte TSF
623 /* accept multi-cast */
625 /* don't decrypt uni-cast frames */
627 /* don't decrypt multi-cast frames */
641 * RXON_FILTER_ASSOC_MSK to 0. This will clear station-dependent
643 * rate tables, and txpower tables. Driver must build a new station
784 __le32 status; /* 0 - OK, 1 - fail */
789 * Quality-of-Service (QOS) Commands & Responses:
794 * struct il_ac_qos -- QOS timing params for C_QOS_PARAM
798 * Should be a power-of-2, minus 1. Device's default is 0x0f.
799 * @cw_max: Contention win, max value in numbers of slots.
800 * Should be a power-of-2, minus 1. Device's default is 0x3f.
806 * transmission retry. Device uses cw_max as a bit mask, ANDed with new CW
853 #define IL_STATION_COUNT 32 /* MAX(3945,4965) */
882 /* wep key in STA: 5-bytes (0) or 13-bytes (1) */
903 __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */
906 u8 key[16]; /* 16-byte unicast decryption key */
916 * or the idx to a pre-existing station entry when modifying that station.
932 * The device contains an internal table of per-station information,
936 * 3945 uses C_RATE_SCALE to set up rate tables).
939 * a new entry, or modifying a pre-existing one.
941 * NOTE: RXON command (without "associated" bit set) wipes the station table
945 * their own txpower/rate setup data).
964 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
965 * corresponding to bit (e.g. bit 5 controls TID 5).
966 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
971 /* TID for which to add block-ack support.
972 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
975 /* TID for which to remove block-ack support.
976 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
979 /* Starting Sequence Number for added block-ack support.
980 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
992 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
993 * corresponding to bit (e.g. bit 5 controls TID 5).
994 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
999 /* TID for which to add block-ack support.
1000 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1003 /* TID for which to remove block-ack support.
1004 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
1007 /* Starting Sequence Number for added block-ack support.
1008 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1013 * it is asleep -- used to synchronise PS-poll and u-APSD
1030 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
1031 * corresponding to bit (e.g. bit 5 controls TID 5).
1032 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
1037 /* TID for which to add block-ack support.
1038 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1041 /* TID for which to remove block-ack support.
1042 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
1045 /* Starting Sequence Number for added block-ack support.
1046 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1051 * it is asleep -- used to synchronise PS-poll and u-APSD
1088 #define IL_TX_FIFO_BK_MSK cpu_to_le32(BIT(0))
1089 #define IL_TX_FIFO_BE_MSK cpu_to_le32(BIT(1))
1090 #define IL_TX_FIFO_VI_MSK cpu_to_le32(BIT(2))
1091 #define IL_TX_FIFO_VO_MSK cpu_to_le32(BIT(3))
1176 u8 rate; member
1203 /* Fixed (non-configurable) rx data from phy */
1211 __le16 ant_selection; /* ant A bit 4, ant B bit 5, ant C bit 6 */
1227 __le32 beacon_time_stamp; /* beacon at on-air rise */
1232 __le16 byte_count; /* frame's byte-count */
1254 * handle reception of block-acks; uCode updates the host driver via
1269 * 1: Use Request-To-Send protocol before this frame.
1275 * 1: Transmit Clear-To-Send to self before this frame.
1276 * Driver should set this for AUTH/DEAUTH/ASSOC-REQ/REASSOC mgmnt frames.
1287 * 1: Use rate scale table (see C_TX_LINK_QUALITY_CMD).
1288 * Tx command's initial_rate_idx indicates first rate to try;
1290 * 0: Use Tx rate/MCS from Tx command's rate_n_flags field.
1291 * This rate will be used for all Tx attempts; it will not be scaled. */
1294 /* 1: Expect immediate block-ack.
1295 * Set when Txing a block-ack request frame. Also set TX_CMD_FLG_ACK_MSK. */
1299 * 1: Frame requires full Tx-Op protection.
1312 * Set this for management frames, non-QOS data frames, non-unicast frames,
1316 /* 1: This frame is non-last MPDU; more fragments are coming.
1334 * 0 - no CCMP encryption; 1 - CCMP encryption */
1337 /* HCCA-AP - disable duration overwriting. */
1360 * + 8-byte MIC (not used for CCM/WEP)
1361 * NOTE: Does not include Tx command bytes, post-MAC pad bytes,
1363 * Range: 14-2342 bytes.
1376 u8 rate; member
1402 * Duration of EDCA burst Tx Opportunity, in 32-usec units.
1422 u8 rate; member
1429 * Used for managing Tx retries when expecting block-acks.
1444 * + 8-byte MIC (not used for CCM/WEP)
1445 * NOTE: Does not include Tx command bytes, post-MAC pad bytes,
1447 * Range: 14-2342 bytes.
1464 /* Rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is cleared. */
1474 * Index into rate table (see C_TX_LINK_QUALITY_CMD) for initial
1477 * rate (via non-0 value) for special frames (e.g. management), while
1478 * still supporting rate scaling for all frames.
1504 * Duration of EDCA burst Tx Opportunity, in 32-usec units.
1658 * a single frame. Multiple attempts, at various bit rates, may have
1662 * 2 or more frames that used block-acknowledge. All frames were
1663 * transmitted at same rate. Rate scaling may have been used if first
1666 * Note that, for aggregation, ACK (block-ack) status is not delivered here;
1667 * block-ack has not been received by the time the 4965 device records
1684 /* For non-agg: Rate at which frame was successful.
1685 * For agg: Rate at which all frames were transmitted. */
1688 /* For non-agg: RTS + CTS + frame tx attempts time + ACK.
1689 * For agg: RTS + CTS + aggregation tx time + block-ack time. */
1697 * For non-agg: frame status TX_STATUS_*
1700 * Bit fields:
1701 * 11- 0: AGG_TX_STATE_* status code
1702 * 15-12: Retry count for 1st frame in aggregation (retries
1704 * member of a previous aggregation block). If rate
1705 * scaling is used, retry count indicates the rate
1707 * 31-16: Sequence # for this frame's Tx cmd (not SSN!)
1718 * Reports Block-Acknowledge from recipient station
1725 /* Index of recipient (BA-sending) station in uCode's station table */
1755 * struct il3945_rate_scaling_cmd - Rate Scaling Command & Response
1761 * rates used for all related commands, including rate
1765 * rate in the rate table, the bit mask for that rate
1767 * command would be bit 0 (1 << 0)
1781 /*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */
1787 /* # entries in rate scale table to support Tx retries */
1814 * EDCA QOS access categories (as implemented by tx fifos 0-3),
1816 * rs_table[LINK_QUAL_MAX_RETRY_NUM] rate table at which to start.
1862 * Other values = max # frames in aggregation.
1883 * The rate scaling procedures described below work well. Of course, other
1887 * FILLING THE RATE TBL
1889 * Given a particular initial rate and mode, as determined by the rate
1891 * formula to fill the rs_table[LINK_QUAL_MAX_RETRY_NUM] rate table in the
1895 * 1) If using High-throughput (HT) (SISO or MIMO) initial rate:
1896 * a) Use this same initial rate for first 3 entries.
1897 * b) Find next lower available rate using same mode (SISO or MIMO),
1898 * use for next 3 entries. If no lower rate available, switch to
1903 * no MIMO, no short guard interval), at the next lower bit rate
1904 * (e.g. if second HT bit rate was 54, try 48 legacy), and follow
1907 * 2) If using legacy initial rate:
1908 * a) Use the initial rate for only one entry.
1909 * b) For each following entry, reduce the rate to next lower available
1910 * rate, until reaching the lowest available rate.
1911 * c) When reducing rate, also switch antenna selection.
1912 * d) Once lowest available rate is reached, repeat this rate until
1913 * rate table is filled (16 entries), switching antenna each entry.
1918 * The rate scaling algorithm for 4965 devices, as implemented in Linux driver,
1922 * actual transfer rate is better), then the driver continues to use the
1925 * Each history set contains, separately for each possible rate, data for a
1926 * sliding win of the 62 most recent tx attempts at that rate. The data
1930 * (attempted - success), and control the size of the win (attempted).
1931 * The driver uses the bit map to remove successes from the success sum, as
1935 * attempt might be at a different rate, and have different modulation
1937 * up in the rate scaling table in the Link Quality command. The driver must
1938 * determine which rate table entry was used for each tx attempt, to determine
1939 * which rate-specific history to update, and record only those attempts that
1942 * When using block-ack (aggregation), all frames are transmitted at the same
1943 * rate, since there is no per-attempt acknowledgment from the destination
1944 * station. The Tx response struct il_tx_resp indicates the Tx rate in
1945 * rate_n_flags field. After receiving a block-ack, the driver can update
1949 * FINDING BEST STARTING RATE:
1952 * driver attempts to find a best initial rate. The initial rate is the
1953 * first entry in the Link Quality command's rate table.
1956 * table below) for current initial rate. Do this only if enough frames
1958 * tx attempts, or at least 8 successes. If not enough, don't try rate
1961 * 2) Find available rates adjacent to current initial rate. Available means:
1970 * 4) Try decreasing rate if, for current rate:
1972 * b) lower adjacent rate has better measured throughput ||
1973 * c) higher adjacent rate has worse throughput, and lower is unmeasured
1975 * As a sanity check, if decrease was determined above, leave rate
1977 * a) lower rate unavailable
1978 * b) success ratio at current rate > 85% (very good)
1980 * of lower rate (under perfect 100% tx conditions, see table below)
1982 * 5) Try increasing rate if, for current rate:
1985 * b) higher adjacent rate has better measured throughput ||
1986 * c) lower adjacent rate has worse throughput, and higher is unmeasured
1988 * As a sanity check, if increase was determined above, leave rate
1990 * a) success ratio at current rate < 70%. This is not particularly
1991 * good performance; higher rate is sure to have poorer success.
1993 * 6) Re-evaluate the rate after each tx frame. If working with block-
1996 * before re-evaluation.
2000 * After working with a modulation mode for a "while" (and doing rate scaling),
2006 * For high-throughput modes (SISO or MIMO), search for new mode after:
2018 * When trying a new mode, use the same bit rate as the old/current mode when
2020 * SISO from MIMO or legacy, or to MIMO from SISO or legacy, use a rate
2032 * RATE: 1 2 5 11 6 9 12 18 24 36 48 54 60
2067 * Rate info; when using rate-scaling, Tx command's initial_rate_idx
2068 * specifies 1st Tx rate attempted, via idx into this table.
2079 * bit 0 - 1: BT channel announcement enabled
2081 * bit 1 - 1: priority of BT device enabled
2085 #define BT_ENABLE_CHANNEL_ANNOUNCE BIT(0)
2086 #define BT_ENABLE_PRIORITY BIT(1)
2141 u8 id; /* measurement id -- 0 or 1 */
2160 __le16 status; /* 0 - command will be handled
2161 * 1 - cannot handle (conflicts with another
2175 /* 4-5 reserved */
2208 u8 id; /* measurement id -- 0 or 1 */
2211 u8 state; /* 0 - start, 1 - stop */
2212 __le32 start_time; /* lower 32-bits of TSF */
2213 u8 band; /* 0 - 5.2GHz, 1 - 2.4GHz */
2222 u8 basic_type; /* 0 - bss, 1 - ofdm preamble, 2 -
2226 __le32 stop_time; /* lower 32-bits of TSF */
2237 * struct il_powertable_cmd - Power Table Command
2243 * bit 0 - '0' Driver not allow power management
2247 * bit 1 - '0' Don't send sleep notification
2251 * bit 2 - '0' PM have to walk up every DTIM
2255 * bit 3 - '0' (PCI_CFG_LINK_CTRL & 0x1)
2259 * bit 4 - '1' Put radio to sleep when receiving frame for others
2262 * bit 31/30- '00' use both mac/xtal sleeps
2267 * NOTE: if sleep_interval[SLEEP_INTRVL_TBL_SIZE-1] > DTIM period then
2273 #define IL_POWER_DRIVER_ALLOW_SLEEP_MSK cpu_to_le16(BIT(0))
2274 #define IL_POWER_SLEEP_OVER_DTIM_MSK cpu_to_le16(BIT(2))
2275 #define IL_POWER_PCI_PM_MSK cpu_to_le16(BIT(3))
2351 * struct il_scan_channel - entry in C_SCAN channel table
2356 * 2) Txpower setting (for rate specified within Tx command)
2357 * 3) How long to stay on-channel (behavior may be modified by quiet_time,
2365 * 3) If restricting off-channel time (i.e. max_out_time !=0):
2373 * 1:4 SSID direct bit map; if a bit is set, then corresponding
2380 __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */
2381 __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */
2385 #define IL39_SCAN_PROBE_MASK(n) ((BIT(n) | (BIT(n) - BIT(1))))
2391 * 1:20 SSID direct bit map; if a bit is set, then corresponding
2399 __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */
2400 __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */
2404 #define IL_SCAN_PROBE_MASK(n) cpu_to_le32((BIT(n) | (BIT(n) - BIT(1))))
2407 * struct il_ssid_ie - directed scan network information element
2410 * 3945 SCAN api), selected by "type" bit field in struct il_scan_channel;
2439 * max_out_time is the max time off-channel (in usec), and suspend_time
2451 * 3) Sends NULL packet, with power-save (PS) bit set to 1,
2452 * to tell AP that we're going off-channel
2456 * 7) Repeats 4-6 until it no longer has time to scan the next channel
2461 * 11) Repeats entire process 2-10 until list is complete
2489 __le16 good_CRC_th; /* passive -> active promotion threshold */
2491 __le32 max_out_time; /* max usec to be away from associated (service)
2501 /* For active scans (set to all-0s for passive scans).
2502 * Does not include payload. Must specify Tx rate; no rate scaling. */
2505 /* For directed active scans (set to all-0s otherwise) */
2533 __le16 good_CRC_th; /* passive -> active promotion threshold */
2535 __le32 max_out_time; /* max usec to be away from associated (service)
2545 /* For active scans (set to all-0s for passive scans).
2546 * Does not include payload. Must specify Tx rate; no rate scaling. */
2549 /* For directed active scans (set to all-0s otherwise) */
2599 #define IL_PROBE_STATUS_TX_FAILED BIT(0)
2601 #define IL_PROBE_STATUS_FAIL_TTL BIT(1)
2602 #define IL_PROBE_STATUS_FAIL_BT BIT(2)
2690 /* Used for passing to driver number of successes and failures per rate */
2856 * struct stats_tx_power - current tx power
2922 * count the number of times we have to re-tune
2968 * 0x9c with CLEAR_STATS bit set (see above).
3054 * other non-associated-network source. Pertinent stats include:
3072 * Signal locks abandoned early (before phy-level header).
3075 * Signal locks abandoned late (during phy-level header).
3080 * after counting up to 2^32 - 1. Driver must differentiate vs.
3090 * START / MIN / MAX
3096 * If actual rate of OFDM false alarms (+ plcp_errors) is too high
3098 * by *adding* 1 to all 4 of the table entries above, up to the max for
3099 * each entry. Conversely, if false alarm rate is too low (less than 5
3105 * 1). 20-beacon history of maximum background noise, indicated by
3110 * 2). 10-beacon history of strongest signal level, as indicated
3114 * for stronger signals, so max energy will be *minimum* value.
3119 * "Max cck energy" is the maximum (higher value means lower energy!)
3130 * START / MIN / MAX
3135 * If actual rate of CCK false alarms (+ plcp_errors) is too high
3140 * up to max 400.
3144 * a moderate 161. Otherwise, *add* 3, up to max 200.
3154 * If actual rate of CCK false alarms (+ plcp_errors) is too low
3160 * "silence reference" (prev - current) is 2 or more,
3161 * OR 2) 100 or more consecutive beacon periods have had rate of
3172 * 3) *Add* 2 to value in HD_MIN_ENERGY_CCK_DET_IDX, up to max 100.
3174 * If actual rate of CCK false alarms (+ plcp_errors) is within good range
3185 * detection over the past 10 beacon periods, the "Max cck energy".
3187 * in HD_MIN_ENERGY_CCK_DET_IDX is at or *above* "Max cck energy".
3231 * in from scanning, or any other non-network source).
3265 * (accum_noise[i] - accum_noise[reference]) / 30
3269 * driver should limit the difference results to a range of 0-3 (0-4.5 dB),
3270 * and set bit 2 to indicate "reduce gain". The value for the reference
3273 * diff_gain_[abc] bit fields:
3275 * 1-0: amount of gain, units of 1.5 dB
3339 * Bit fields:
3343 * 28-14: Reserved
3344 * 13-00: RX frame size