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
212 * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
231 u8 rate; /* plcp */ member
237 * iwl4965 rate_n_flags bit fields
245 * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
246 * 2-0: 0) 6 Mbps
255 * 4-3: 0) Single stream (SISO)
261 * Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"):
262 * 3-0: 0xD) 6 Mbps
271 * Legacy CCK rate format for bits 7:0 (bit 8 must be "0", bit 9 "1"):
272 * 6-0: 10) 1 Mbps
283 /* Bit 8: (1) HT format, (0) legacy format in bits 7:0 */
288 /* Bit 9: (1) CCK, (0) OFDM. HT (bit 8) must be "0" for this bit to be valid */
292 /* Bit 10: (1) Use Green Field preamble */
296 /* Bit 11: (1) Use 40Mhz HT40 chnl width, (0) use 20 MHz legacy chnl width */
300 /* Bit 12: (1) Duplicate data on both 20MHz chnls. HT40 (bit 11) must be set. */
304 /* Bit 13: (1) Short guard interval (0.4 usec), (0) normal GI (0.8 usec) */
338 * For SISO bit rates, both values in a pair should be identical.
442 * a 256-entry history of uCode execution within a circular buffer.
453 * __le32 event_id; range 0 - 1500
455 * __le32 data; event_id-specific data value
471 * __le32 data1; error-specific data
472 * __le32 data2; error-specific data
582 /* rx response to host with 8-byte TSF
620 /* accept multi-cast */
622 /* don't decrypt uni-cast frames */
624 /* don't decrypt multi-cast frames */
638 * RXON_FILTER_ASSOC_MSK to 0. This will clear station-dependent
640 * rate tables, and txpower tables. Driver must build a new station
781 __le32 status; /* 0 - OK, 1 - fail */
786 * Quality-of-Service (QOS) Commands & Responses:
791 * struct il_ac_qos -- QOS timing params for C_QOS_PARAM
795 * Should be a power-of-2, minus 1. Device's default is 0x0f.
796 * @cw_max: Contention win, max value in numbers of slots.
797 * Should be a power-of-2, minus 1. Device's default is 0x3f.
803 * transmission retry. Device uses cw_max as a bit mask, ANDed with new CW
850 #define IL_STATION_COUNT 32 /* MAX(3945,4965) */
879 /* wep key in STA: 5-bytes (0) or 13-bytes (1) */
900 __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */
903 u8 key[16]; /* 16-byte unicast decryption key */
913 * or the idx to a pre-existing station entry when modifying that station.
929 * The device contains an internal table of per-station information,
933 * 3945 uses C_RATE_SCALE to set up rate tables).
936 * a new entry, or modifying a pre-existing one.
938 * NOTE: RXON command (without "associated" bit set) wipes the station table
942 * their own txpower/rate setup data).
961 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
962 * corresponding to bit (e.g. bit 5 controls TID 5).
963 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
968 /* TID for which to add block-ack support.
969 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
972 /* TID for which to remove block-ack support.
973 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
976 /* Starting Sequence Number for added block-ack support.
977 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
989 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
990 * corresponding to bit (e.g. bit 5 controls TID 5).
991 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
996 /* TID for which to add block-ack support.
997 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1000 /* TID for which to remove block-ack support.
1001 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
1004 /* Starting Sequence Number for added block-ack support.
1005 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1010 * it is asleep -- used to synchronise PS-poll and u-APSD
1027 /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID)
1028 * corresponding to bit (e.g. bit 5 controls TID 5).
1029 * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */
1034 /* TID for which to add block-ack support.
1035 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1038 /* TID for which to remove block-ack support.
1039 * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */
1042 /* Starting Sequence Number for added block-ack support.
1043 * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */
1048 * it is asleep -- used to synchronise PS-poll and u-APSD
1085 #define IL_TX_FIFO_BK_MSK cpu_to_le32(BIT(0))
1086 #define IL_TX_FIFO_BE_MSK cpu_to_le32(BIT(1))
1087 #define IL_TX_FIFO_VI_MSK cpu_to_le32(BIT(2))
1088 #define IL_TX_FIFO_VO_MSK cpu_to_le32(BIT(3))
1180 u8 rate;
1210 /* Fixed (non-configurable) rx data from phy */
1218 __le16 ant_selection; /* ant A bit 4, ant B bit 5, ant C bit 6 */
1234 __le32 beacon_time_stamp; /* beacon at on-air rise */
1239 __le16 byte_count; /* frame's byte-count */
1261 * handle reception of block-acks; uCode updates the host driver via
1276 * 1: Use Request-To-Send protocol before this frame.
1282 * 1: Transmit Clear-To-Send to self before this frame.
1283 * Driver should set this for AUTH/DEAUTH/ASSOC-REQ/REASSOC mgmnt frames.
1294 * 1: Use rate scale table (see C_TX_LINK_QUALITY_CMD).
1295 * Tx command's initial_rate_idx indicates first rate to try;
1297 * 0: Use Tx rate/MCS from Tx command's rate_n_flags field.
1298 * This rate will be used for all Tx attempts; it will not be scaled. */
1301 /* 1: Expect immediate block-ack.
1302 * Set when Txing a block-ack request frame. Also set TX_CMD_FLG_ACK_MSK. */
1306 * 1: Frame requires full Tx-Op protection.
1319 * Set this for management frames, non-QOS data frames, non-unicast frames,
1323 /* 1: This frame is non-last MPDU; more fragments are coming.
1341 * 0 - no CCMP encryption; 1 - CCMP encryption */
1344 /* HCCA-AP - disable duration overwriting. */
1369 * + 8-byte MIC (not used for CCM/WEP)
1370 * NOTE: Does not include Tx command bytes, post-MAC pad bytes,
1372 * Range: 14-2342 bytes.
1385 u8 rate;
1411 * Duration of EDCA burst Tx Opportunity, in 32-usec units.
1433 u8 rate; member
1440 * Used for managing Tx retries when expecting block-acks.
1457 * + 8-byte MIC (not used for CCM/WEP)
1458 * NOTE: Does not include Tx command bytes, post-MAC pad bytes,
1460 * Range: 14-2342 bytes.
1477 /* Rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is cleared. */
1487 * Index into rate table (see C_TX_LINK_QUALITY_CMD) for initial
1490 * rate (via non-0 value) for special frames (e.g. management), while
1491 * still supporting rate scaling for all frames.
1517 * Duration of EDCA burst Tx Opportunity, in 32-usec units.
1673 * a single frame. Multiple attempts, at various bit rates, may have
1677 * 2 or more frames that used block-acknowledge. All frames were
1678 * transmitted at same rate. Rate scaling may have been used if first
1681 * Note that, for aggregation, ACK (block-ack) status is not delivered here;
1682 * block-ack has not been received by the time the 4965 device records
1699 /* For non-agg: Rate at which frame was successful.
1700 * For agg: Rate at which all frames were transmitted. */
1703 /* For non-agg: RTS + CTS + frame tx attempts time + ACK.
1704 * For agg: RTS + CTS + aggregation tx time + block-ack time. */
1712 * For non-agg: frame status TX_STATUS_*
1715 * Bit fields:
1716 * 11- 0: AGG_TX_STATE_* status code
1717 * 15-12: Retry count for 1st frame in aggregation (retries
1719 * member of a previous aggregation block). If rate
1720 * scaling is used, retry count indicates the rate
1722 * 31-16: Sequence # for this frame's Tx cmd (not SSN!)
1733 * Reports Block-Acknowledge from recipient station
1740 /* Index of recipient (BA-sending) station in uCode's station table */
1770 * struct il3945_rate_scaling_cmd - Rate Scaling Command & Response
1776 * rates used for all related commands, including rate
1780 * rate in the rate table, the bit mask for that rate
1782 * command would be bit 0 (1 << 0)
1796 /*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */
1802 /* # entries in rate scale table to support Tx retries */
1829 * EDCA QOS access categories (as implemented by tx fifos 0-3),
1831 * rs_table[LINK_QUAL_MAX_RETRY_NUM] rate table at which to start.
1877 * Other values = max # frames in aggregation.
1898 * The rate scaling procedures described below work well. Of course, other
1902 * FILLING THE RATE TBL
1904 * Given a particular initial rate and mode, as determined by the rate
1906 * formula to fill the rs_table[LINK_QUAL_MAX_RETRY_NUM] rate table in the
1910 * 1) If using High-throughput (HT) (SISO or MIMO) initial rate:
1911 * a) Use this same initial rate for first 3 entries.
1912 * b) Find next lower available rate using same mode (SISO or MIMO),
1913 * use for next 3 entries. If no lower rate available, switch to
1918 * no MIMO, no short guard interval), at the next lower bit rate
1919 * (e.g. if second HT bit rate was 54, try 48 legacy), and follow
1922 * 2) If using legacy initial rate:
1923 * a) Use the initial rate for only one entry.
1924 * b) For each following entry, reduce the rate to next lower available
1925 * rate, until reaching the lowest available rate.
1926 * c) When reducing rate, also switch antenna selection.
1927 * d) Once lowest available rate is reached, repeat this rate until
1928 * rate table is filled (16 entries), switching antenna each entry.
1933 * The rate scaling algorithm for 4965 devices, as implemented in Linux driver,
1937 * actual transfer rate is better), then the driver continues to use the
1940 * Each history set contains, separately for each possible rate, data for a
1941 * sliding win of the 62 most recent tx attempts at that rate. The data
1945 * (attempted - success), and control the size of the win (attempted).
1946 * The driver uses the bit map to remove successes from the success sum, as
1950 * attempt might be at a different rate, and have different modulation
1952 * up in the rate scaling table in the Link Quality command. The driver must
1953 * determine which rate table entry was used for each tx attempt, to determine
1954 * which rate-specific history to update, and record only those attempts that
1957 * When using block-ack (aggregation), all frames are transmitted at the same
1958 * rate, since there is no per-attempt acknowledgment from the destination
1959 * station. The Tx response struct il_tx_resp indicates the Tx rate in
1960 * rate_n_flags field. After receiving a block-ack, the driver can update
1964 * FINDING BEST STARTING RATE:
1967 * driver attempts to find a best initial rate. The initial rate is the
1968 * first entry in the Link Quality command's rate table.
1971 * table below) for current initial rate. Do this only if enough frames
1973 * tx attempts, or at least 8 successes. If not enough, don't try rate
1976 * 2) Find available rates adjacent to current initial rate. Available means:
1985 * 4) Try decreasing rate if, for current rate:
1987 * b) lower adjacent rate has better measured throughput ||
1988 * c) higher adjacent rate has worse throughput, and lower is unmeasured
1990 * As a sanity check, if decrease was determined above, leave rate
1992 * a) lower rate unavailable
1993 * b) success ratio at current rate > 85% (very good)
1995 * of lower rate (under perfect 100% tx conditions, see table below)
1997 * 5) Try increasing rate if, for current rate:
2000 * b) higher adjacent rate has better measured throughput ||
2001 * c) lower adjacent rate has worse throughput, and higher is unmeasured
2003 * As a sanity check, if increase was determined above, leave rate
2005 * a) success ratio at current rate < 70%. This is not particularly
2006 * good performance; higher rate is sure to have poorer success.
2008 * 6) Re-evaluate the rate after each tx frame. If working with block-
2011 * before re-evaluation.
2015 * After working with a modulation mode for a "while" (and doing rate scaling),
2021 * For high-throughput modes (SISO or MIMO), search for new mode after:
2033 * When trying a new mode, use the same bit rate as the old/current mode when
2035 * SISO from MIMO or legacy, or to MIMO from SISO or legacy, use a rate
2047 * RATE: 1 2 5 11 6 9 12 18 24 36 48 54 60
2082 * Rate info; when using rate-scaling, Tx command's initial_rate_idx
2083 * specifies 1st Tx rate attempted, via idx into this table.
2094 * bit 0 - 1: BT channel announcement enabled
2096 * bit 1 - 1: priority of BT device enabled
2100 #define BT_ENABLE_CHANNEL_ANNOUNCE BIT(0)
2101 #define BT_ENABLE_PRIORITY BIT(1)
2156 u8 id; /* measurement id -- 0 or 1 */
2175 __le16 status; /* 0 - command will be handled
2176 * 1 - cannot handle (conflicts with another
2190 /* 4-5 reserved */
2223 u8 id; /* measurement id -- 0 or 1 */
2226 u8 state; /* 0 - start, 1 - stop */
2227 __le32 start_time; /* lower 32-bits of TSF */
2228 u8 band; /* 0 - 5.2GHz, 1 - 2.4GHz */
2237 u8 basic_type; /* 0 - bss, 1 - ofdm preamble, 2 -
2241 __le32 stop_time; /* lower 32-bits of TSF */
2252 * struct il_powertable_cmd - Power Table Command
2258 * bit 0 - '0' Driver not allow power management
2262 * bit 1 - '0' Don't send sleep notification
2266 * bit 2 - '0' PM have to walk up every DTIM
2270 * bit 3 - '0' (PCI_CFG_LINK_CTRL & 0x1)
2274 * bit 4 - '1' Put radio to sleep when receiving frame for others
2277 * bit 31/30- '00' use both mac/xtal sleeps
2282 * NOTE: if sleep_interval[SLEEP_INTRVL_TBL_SIZE-1] > DTIM period then
2288 #define IL_POWER_DRIVER_ALLOW_SLEEP_MSK cpu_to_le16(BIT(0))
2289 #define IL_POWER_SLEEP_OVER_DTIM_MSK cpu_to_le16(BIT(2))
2290 #define IL_POWER_PCI_PM_MSK cpu_to_le16(BIT(3))
2366 * struct il_scan_channel - entry in C_SCAN channel table
2371 * 2) Txpower setting (for rate specified within Tx command)
2372 * 3) How long to stay on-channel (behavior may be modified by quiet_time,
2380 * 3) If restricting off-channel time (i.e. max_out_time !=0):
2388 * 1:4 SSID direct bit map; if a bit is set, then corresponding
2395 __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */
2396 __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */
2400 #define IL39_SCAN_PROBE_MASK(n) ((BIT(n) | (BIT(n) - BIT(1))))
2406 * 1:20 SSID direct bit map; if a bit is set, then corresponding
2414 __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */
2415 __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */
2419 #define IL_SCAN_PROBE_MASK(n) cpu_to_le32((BIT(n) | (BIT(n) - BIT(1))))
2422 * struct il_ssid_ie - directed scan network information element
2425 * 3945 SCAN api), selected by "type" bit field in struct il_scan_channel;
2454 * max_out_time is the max time off-channel (in usec), and suspend_time
2466 * 3) Sends NULL packet, with power-save (PS) bit set to 1,
2467 * to tell AP that we're going off-channel
2471 * 7) Repeats 4-6 until it no longer has time to scan the next channel
2476 * 11) Repeats entire process 2-10 until list is complete
2504 __le16 good_CRC_th; /* passive -> active promotion threshold */
2506 __le32 max_out_time; /* max usec to be away from associated (service)
2516 /* For active scans (set to all-0s for passive scans).
2517 * Does not include payload. Must specify Tx rate; no rate scaling. */
2520 /* For directed active scans (set to all-0s otherwise) */
2548 __le16 good_CRC_th; /* passive -> active promotion threshold */
2550 __le32 max_out_time; /* max usec to be away from associated (service)
2560 /* For active scans (set to all-0s for passive scans).
2561 * Does not include payload. Must specify Tx rate; no rate scaling. */
2564 /* For directed active scans (set to all-0s otherwise) */
2614 #define IL_PROBE_STATUS_TX_FAILED BIT(0)
2616 #define IL_PROBE_STATUS_FAIL_TTL BIT(1)
2617 #define IL_PROBE_STATUS_FAIL_BT BIT(2)
2705 /* Used for passing to driver number of successes and failures per rate */
2871 * struct stats_tx_power - current tx power
2937 * count the number of times we have to re-tune
2983 * 0x9c with CLEAR_STATS bit set (see above).
3069 * other non-associated-network source. Pertinent stats include:
3087 * Signal locks abandoned early (before phy-level header).
3090 * Signal locks abandoned late (during phy-level header).
3095 * after counting up to 2^32 - 1. Driver must differentiate vs.
3105 * START / MIN / MAX
3111 * If actual rate of OFDM false alarms (+ plcp_errors) is too high
3113 * by *adding* 1 to all 4 of the table entries above, up to the max for
3114 * each entry. Conversely, if false alarm rate is too low (less than 5
3120 * 1). 20-beacon history of maximum background noise, indicated by
3125 * 2). 10-beacon history of strongest signal level, as indicated
3129 * for stronger signals, so max energy will be *minimum* value.
3134 * "Max cck energy" is the maximum (higher value means lower energy!)
3145 * START / MIN / MAX
3150 * If actual rate of CCK false alarms (+ plcp_errors) is too high
3155 * up to max 400.
3159 * a moderate 161. Otherwise, *add* 3, up to max 200.
3169 * If actual rate of CCK false alarms (+ plcp_errors) is too low
3175 * "silence reference" (prev - current) is 2 or more,
3176 * OR 2) 100 or more consecutive beacon periods have had rate of
3187 * 3) *Add* 2 to value in HD_MIN_ENERGY_CCK_DET_IDX, up to max 100.
3189 * If actual rate of CCK false alarms (+ plcp_errors) is within good range
3200 * detection over the past 10 beacon periods, the "Max cck energy".
3202 * in HD_MIN_ENERGY_CCK_DET_IDX is at or *above* "Max cck energy".
3246 * in from scanning, or any other non-network source).
3280 * (accum_noise[i] - accum_noise[reference]) / 30
3284 * driver should limit the difference results to a range of 0-3 (0-4.5 dB),
3285 * and set bit 2 to indicate "reduce gain". The value for the reference
3288 * diff_gain_[abc] bit fields:
3290 * 1-0: amount of gain, units of 1.5 dB
3354 * Bit fields:
3358 * 28-14: Reserved
3359 * 13-00: RX frame size