diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2008-01-14 20:46:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:56 -0500 |
commit | 3058f02137359efb412975cf94a9fa7c25413387 (patch) | |
tree | 673e1c9a579dce85f09cae8af577af61f54d4ef6 /drivers/net/wireless/iwlwifi/iwl-4965-commands.h | |
parent | 87e4f7dfe56dbaa5470e047d991c077f8e479d21 (diff) |
iwlwifi: document scan command
Document scan command.
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-commands.h | 147 |
1 files changed, 118 insertions, 29 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h index 7988c752a669..9237f8b3bb88 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-commands.h | |||
@@ -1615,6 +1615,10 @@ struct iwl4965_link_quality_cmd { | |||
1615 | 1615 | ||
1616 | /* | 1616 | /* |
1617 | * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) | 1617 | * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) |
1618 | * | ||
1619 | * 3945 and 4965 support hardware handshake with Bluetooth device on | ||
1620 | * same platform. Bluetooth device alerts wireless device when it will Tx; | ||
1621 | * wireless device can delay or kill its own Tx to accomodate. | ||
1618 | */ | 1622 | */ |
1619 | struct iwl4965_bt_cmd { | 1623 | struct iwl4965_bt_cmd { |
1620 | u8 flags; | 1624 | u8 flags; |
@@ -1857,20 +1861,47 @@ struct iwl4965_ct_kill_config { | |||
1857 | * | 1861 | * |
1858 | *****************************************************************************/ | 1862 | *****************************************************************************/ |
1859 | 1863 | ||
1864 | /** | ||
1865 | * struct iwl4965_scan_channel - entry in REPLY_SCAN_CMD channel table | ||
1866 | * | ||
1867 | * One for each channel in the scan list. | ||
1868 | * Each channel can independently select: | ||
1869 | * 1) SSID for directed active scans | ||
1870 | * 2) Txpower setting (for rate specified within Tx command) | ||
1871 | * 3) How long to stay on-channel (behavior may be modified by quiet_time, | ||
1872 | * quiet_plcp_th, good_CRC_th) | ||
1873 | * | ||
1874 | * To avoid uCode errors, make sure the following are true (see comments | ||
1875 | * under struct iwl4965_scan_cmd about max_out_time and quiet_time): | ||
1876 | * 1) If using passive_dwell (i.e. passive_dwell != 0): | ||
1877 | * active_dwell <= passive_dwell (< max_out_time if max_out_time != 0) | ||
1878 | * 2) quiet_time <= active_dwell | ||
1879 | * 3) If restricting off-channel time (i.e. max_out_time !=0): | ||
1880 | * passive_dwell < max_out_time | ||
1881 | * active_dwell < max_out_time | ||
1882 | */ | ||
1860 | struct iwl4965_scan_channel { | 1883 | struct iwl4965_scan_channel { |
1861 | /* type is defined as: | 1884 | /* |
1862 | * 0:0 active (0 - passive) | 1885 | * type is defined as: |
1863 | * 1:4 SSID direct | 1886 | * 0:0 1 = active, 0 = passive |
1864 | * If 1 is set then corresponding SSID IE is transmitted in probe | 1887 | * 1:4 SSID direct bit map; if a bit is set, then corresponding |
1888 | * SSID IE is transmitted in probe request. | ||
1865 | * 5:7 reserved | 1889 | * 5:7 reserved |
1866 | */ | 1890 | */ |
1867 | u8 type; | 1891 | u8 type; |
1868 | u8 channel; | 1892 | u8 channel; /* band is selected by iwl4965_scan_cmd "flags" field */ |
1869 | struct iwl4965_tx_power tpc; | 1893 | struct iwl4965_tx_power tpc; |
1870 | __le16 active_dwell; | 1894 | __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */ |
1871 | __le16 passive_dwell; | 1895 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ |
1872 | } __attribute__ ((packed)); | 1896 | } __attribute__ ((packed)); |
1873 | 1897 | ||
1898 | /** | ||
1899 | * struct iwl4965_ssid_ie - directed scan network information element | ||
1900 | * | ||
1901 | * Up to 4 of these may appear in REPLY_SCAN_CMD, selected by "type" field | ||
1902 | * in struct iwl4965_scan_channel; each channel may select different ssids from | ||
1903 | * among the 4 entries. SSID IEs get transmitted in reverse order of entry. | ||
1904 | */ | ||
1874 | struct iwl4965_ssid_ie { | 1905 | struct iwl4965_ssid_ie { |
1875 | u8 id; | 1906 | u8 id; |
1876 | u8 len; | 1907 | u8 len; |
@@ -1884,40 +1915,98 @@ struct iwl4965_ssid_ie { | |||
1884 | 1915 | ||
1885 | /* | 1916 | /* |
1886 | * REPLY_SCAN_CMD = 0x80 (command) | 1917 | * REPLY_SCAN_CMD = 0x80 (command) |
1918 | * | ||
1919 | * The hardware scan command is very powerful; the driver can set it up to | ||
1920 | * maintain (relatively) normal network traffic while doing a scan in the | ||
1921 | * background. The max_out_time and suspend_time control the ratio of how | ||
1922 | * long the device stays on an associated network channel ("service channel") | ||
1923 | * vs. how long it's away from the service channel, i.e. tuned to other channels | ||
1924 | * for scanning. | ||
1925 | * | ||
1926 | * max_out_time is the max time off-channel (in usec), and suspend_time | ||
1927 | * is how long (in "extended beacon" format) that the scan is "suspended" | ||
1928 | * after returning to the service channel. That is, suspend_time is the | ||
1929 | * time that we stay on the service channel, doing normal work, between | ||
1930 | * scan segments. The driver may set these parameters differently to support | ||
1931 | * scanning when associated vs. not associated, and light vs. heavy traffic | ||
1932 | * loads when associated. | ||
1933 | * | ||
1934 | * After receiving this command, the device's scan engine does the following; | ||
1935 | * | ||
1936 | * 1) Sends SCAN_START notification to driver | ||
1937 | * 2) Checks to see if it has time to do scan for one channel | ||
1938 | * 3) Sends NULL packet, with power-save (PS) bit set to 1, | ||
1939 | * to tell AP that we're going off-channel | ||
1940 | * 4) Tunes to first channel in scan list, does active or passive scan | ||
1941 | * 5) Sends SCAN_RESULT notification to driver | ||
1942 | * 6) Checks to see if it has time to do scan on *next* channel in list | ||
1943 | * 7) Repeats 4-6 until it no longer has time to scan the next channel | ||
1944 | * before max_out_time expires | ||
1945 | * 8) Returns to service channel | ||
1946 | * 9) Sends NULL packet with PS=0 to tell AP that we're back | ||
1947 | * 10) Stays on service channel until suspend_time expires | ||
1948 | * 11) Repeats entire process 2-10 until list is complete | ||
1949 | * 12) Sends SCAN_COMPLETE notification | ||
1950 | * | ||
1951 | * For fast, efficient scans, the scan command also has support for staying on | ||
1952 | * a channel for just a short time, if doing active scanning and getting no | ||
1953 | * responses to the transmitted probe request. This time is controlled by | ||
1954 | * quiet_time, and the number of received packets below which a channel is | ||
1955 | * considered "quiet" is controlled by quiet_plcp_threshold. | ||
1956 | * | ||
1957 | * For active scanning on channels that have regulatory restrictions against | ||
1958 | * blindly transmitting, the scan can listen before transmitting, to make sure | ||
1959 | * that there is already legitimate activity on the channel. If enough | ||
1960 | * packets are cleanly received on the channel (controlled by good_CRC_th, | ||
1961 | * typical value 1), the scan engine starts transmitting probe requests. | ||
1962 | * | ||
1963 | * Driver must use separate scan commands for 2.4 vs. 5 GHz bands. | ||
1964 | * | ||
1965 | * To avoid uCode errors, see timing restrictions described under | ||
1966 | * struct iwl4965_scan_channel. | ||
1887 | */ | 1967 | */ |
1888 | struct iwl4965_scan_cmd { | 1968 | struct iwl4965_scan_cmd { |
1889 | __le16 len; | 1969 | __le16 len; |
1890 | u8 reserved0; | 1970 | u8 reserved0; |
1891 | u8 channel_count; | 1971 | u8 channel_count; /* # channels in channel list */ |
1892 | __le16 quiet_time; /* dwell only this long on quiet chnl | 1972 | __le16 quiet_time; /* dwell only this # millisecs on quiet channel |
1893 | * (active scan) */ | 1973 | * (only for active scan) */ |
1894 | __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */ | 1974 | __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */ |
1895 | __le16 good_CRC_th; /* passive -> active promotion threshold */ | 1975 | __le16 good_CRC_th; /* passive -> active promotion threshold */ |
1896 | __le16 rx_chain; | 1976 | __le16 rx_chain; /* RXON_RX_CHAIN_* */ |
1897 | __le32 max_out_time; /* max usec to be out of associated (service) | 1977 | __le32 max_out_time; /* max usec to be away from associated (service) |
1898 | * chnl */ | 1978 | * channel */ |
1899 | __le32 suspend_time; /* pause scan this long when returning to svc | 1979 | __le32 suspend_time; /* pause scan this long (in "extended beacon |
1900 | * chnl. | 1980 | * format") when returning to service chnl: |
1901 | * 3945 -- 31:24 # beacons, 19:0 additional usec, | 1981 | * 3945; 31:24 # beacons, 19:0 additional usec, |
1902 | * 4965 -- 31:22 # beacons, 21:0 additional usec. | 1982 | * 4965; 31:22 # beacons, 21:0 additional usec. |
1903 | */ | 1983 | */ |
1904 | __le32 flags; | 1984 | __le32 flags; /* RXON_FLG_* */ |
1905 | __le32 filter_flags; | 1985 | __le32 filter_flags; /* RXON_FILTER_* */ |
1906 | 1986 | ||
1987 | /* For active scans (set to all-0s for passive scans). | ||
1988 | * Does not include payload. Must specify Tx rate; no rate scaling. */ | ||
1907 | struct iwl4965_tx_cmd tx_cmd; | 1989 | struct iwl4965_tx_cmd tx_cmd; |
1990 | |||
1991 | /* For directed active scans (set to all-0s otherwise) */ | ||
1908 | struct iwl4965_ssid_ie direct_scan[PROBE_OPTION_MAX]; | 1992 | struct iwl4965_ssid_ie direct_scan[PROBE_OPTION_MAX]; |
1909 | 1993 | ||
1910 | u8 data[0]; | ||
1911 | /* | 1994 | /* |
1912 | * The channels start after the probe request payload and are of type: | 1995 | * Probe request frame, followed by channel list. |
1996 | * | ||
1997 | * Size of probe request frame is specified by byte count in tx_cmd. | ||
1998 | * Channel list follows immediately after probe request frame. | ||
1999 | * Number of channels in list is specified by channel_count. | ||
2000 | * Each channel in list is of type: | ||
1913 | * | 2001 | * |
1914 | * struct iwl4965_scan_channel channels[0]; | 2002 | * struct iwl4965_scan_channel channels[0]; |
1915 | * | 2003 | * |
1916 | * NOTE: Only one band of channels can be scanned per pass. You | 2004 | * NOTE: Only one band of channels can be scanned per pass. You |
1917 | * can not mix 2.4GHz channels and 5.2GHz channels and must | 2005 | * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait |
1918 | * request a scan multiple times (not concurrently) | 2006 | * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION) |
1919 | * | 2007 | * before requesting another scan. |
1920 | */ | 2008 | */ |
2009 | u8 data[0]; | ||
1921 | } __attribute__ ((packed)); | 2010 | } __attribute__ ((packed)); |
1922 | 2011 | ||
1923 | /* Can abort will notify by complete notification with abort status. */ | 2012 | /* Can abort will notify by complete notification with abort status. */ |
@@ -2087,7 +2176,7 @@ struct statistics_rx_non_phy { | |||
2087 | __le32 interference_data_flag; /* flag for interference data | 2176 | __le32 interference_data_flag; /* flag for interference data |
2088 | * availability. 1 when data is | 2177 | * availability. 1 when data is |
2089 | * available. */ | 2178 | * available. */ |
2090 | __le32 channel_load; /* counts RX Enable time */ | 2179 | __le32 channel_load; /* counts RX Enable time in uSec */ |
2091 | __le32 dsp_false_alarms; /* DSP false alarm (both OFDM | 2180 | __le32 dsp_false_alarms; /* DSP false alarm (both OFDM |
2092 | * and CCK) counter */ | 2181 | * and CCK) counter */ |
2093 | __le32 beacon_rssi_a; | 2182 | __le32 beacon_rssi_a; |