aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2008-01-14 20:46:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:56 -0500
commit3058f02137359efb412975cf94a9fa7c25413387 (patch)
tree673e1c9a579dce85f09cae8af577af61f54d4ef6 /drivers/net/wireless/iwlwifi/iwl-3945-commands.h
parent87e4f7dfe56dbaa5470e047d991c077f8e479d21 (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-3945-commands.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-commands.h143
1 files changed, 116 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
index 3cac2c8ccf60..0c80ed5d7ea6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h
@@ -1020,6 +1020,10 @@ struct iwl3945_rate_scaling_cmd {
1020 1020
1021/* 1021/*
1022 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) 1022 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
1023 *
1024 * 3945 and 4965 support hardware handshake with Bluetooth device on
1025 * same platform. Bluetooth device alerts wireless device when it will Tx;
1026 * wireless device can delay or kill its own Tx to accomodate.
1023 */ 1027 */
1024struct iwl3945_bt_cmd { 1028struct iwl3945_bt_cmd {
1025 u8 flags; 1029 u8 flags;
@@ -1258,20 +1262,47 @@ struct iwl3945_ct_kill_config {
1258 * 1262 *
1259 *****************************************************************************/ 1263 *****************************************************************************/
1260 1264
1265/**
1266 * struct iwl3945_scan_channel - entry in REPLY_SCAN_CMD channel table
1267 *
1268 * One for each channel in the scan list.
1269 * Each channel can independently select:
1270 * 1) SSID for directed active scans
1271 * 2) Txpower setting (for rate specified within Tx command)
1272 * 3) How long to stay on-channel (behavior may be modified by quiet_time,
1273 * quiet_plcp_th, good_CRC_th)
1274 *
1275 * To avoid uCode errors, make sure the following are true (see comments
1276 * under struct iwl3945_scan_cmd about max_out_time and quiet_time):
1277 * 1) If using passive_dwell (i.e. passive_dwell != 0):
1278 * active_dwell <= passive_dwell (< max_out_time if max_out_time != 0)
1279 * 2) quiet_time <= active_dwell
1280 * 3) If restricting off-channel time (i.e. max_out_time !=0):
1281 * passive_dwell < max_out_time
1282 * active_dwell < max_out_time
1283 */
1261struct iwl3945_scan_channel { 1284struct iwl3945_scan_channel {
1262 /* type is defined as: 1285 /*
1263 * 0:0 active (0 - passive) 1286 * type is defined as:
1264 * 1:4 SSID direct 1287 * 0:0 1 = active, 0 = passive
1265 * If 1 is set then corresponding SSID IE is transmitted in probe 1288 * 1:4 SSID direct bit map; if a bit is set, then corresponding
1289 * SSID IE is transmitted in probe request.
1266 * 5:7 reserved 1290 * 5:7 reserved
1267 */ 1291 */
1268 u8 type; 1292 u8 type;
1269 u8 channel; 1293 u8 channel; /* band is selected by iwl3945_scan_cmd "flags" field */
1270 struct iwl3945_tx_power tpc; 1294 struct iwl3945_tx_power tpc;
1271 __le16 active_dwell; 1295 __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */
1272 __le16 passive_dwell; 1296 __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */
1273} __attribute__ ((packed)); 1297} __attribute__ ((packed));
1274 1298
1299/**
1300 * struct iwl3945_ssid_ie - directed scan network information element
1301 *
1302 * Up to 4 of these may appear in REPLY_SCAN_CMD, selected by "type" field
1303 * in struct iwl3945_scan_channel; each channel may select different ssids from
1304 * among the 4 entries. SSID IEs get transmitted in reverse order of entry.
1305 */
1275struct iwl3945_ssid_ie { 1306struct iwl3945_ssid_ie {
1276 u8 id; 1307 u8 id;
1277 u8 len; 1308 u8 len;
@@ -1285,40 +1316,98 @@ struct iwl3945_ssid_ie {
1285 1316
1286/* 1317/*
1287 * REPLY_SCAN_CMD = 0x80 (command) 1318 * REPLY_SCAN_CMD = 0x80 (command)
1319 *
1320 * The hardware scan command is very powerful; the driver can set it up to
1321 * maintain (relatively) normal network traffic while doing a scan in the
1322 * background. The max_out_time and suspend_time control the ratio of how
1323 * long the device stays on an associated network channel ("service channel")
1324 * vs. how long it's away from the service channel, tuned to other channels
1325 * for scanning.
1326 *
1327 * max_out_time is the max time off-channel (in usec), and suspend_time
1328 * is how long (in "extended beacon" format) that the scan is "suspended"
1329 * after returning to the service channel. That is, suspend_time is the
1330 * time that we stay on the service channel, doing normal work, between
1331 * scan segments. The driver may set these parameters differently to support
1332 * scanning when associated vs. not associated, and light vs. heavy traffic
1333 * loads when associated.
1334 *
1335 * After receiving this command, the device's scan engine does the following;
1336 *
1337 * 1) Sends SCAN_START notification to driver
1338 * 2) Checks to see if it has time to do scan for one channel
1339 * 3) Sends NULL packet, with power-save (PS) bit set to 1,
1340 * to tell AP that we're going off-channel
1341 * 4) Tunes to first channel in scan list, does active or passive scan
1342 * 5) Sends SCAN_RESULT notification to driver
1343 * 6) Checks to see if it has time to do scan on *next* channel in list
1344 * 7) Repeats 4-6 until it no longer has time to scan the next channel
1345 * before max_out_time expires
1346 * 8) Returns to service channel
1347 * 9) Sends NULL packet with PS=0 to tell AP that we're back
1348 * 10) Stays on service channel until suspend_time expires
1349 * 11) Repeats entire process 2-10 until list is complete
1350 * 12) Sends SCAN_COMPLETE notification
1351 *
1352 * For fast, efficient scans, the scan command also has support for staying on
1353 * a channel for just a short time, if doing active scanning and getting no
1354 * responses to the transmitted probe request. This time is controlled by
1355 * quiet_time, and the number of received packets below which a channel is
1356 * considered "quiet" is controlled by quiet_plcp_threshold.
1357 *
1358 * For active scanning on channels that have regulatory restrictions against
1359 * blindly transmitting, the scan can listen before transmitting, to make sure
1360 * that there is already legitimate activity on the channel. If enough
1361 * packets are cleanly received on the channel (controlled by good_CRC_th,
1362 * typical value 1), the scan engine starts transmitting probe requests.
1363 *
1364 * Driver must use separate scan commands for 2.4 vs. 5 GHz bands.
1365 *
1366 * To avoid uCode errors, see timing restrictions described under
1367 * struct iwl3945_scan_channel.
1288 */ 1368 */
1289struct iwl3945_scan_cmd { 1369struct iwl3945_scan_cmd {
1290 __le16 len; 1370 __le16 len;
1291 u8 reserved0; 1371 u8 reserved0;
1292 u8 channel_count; 1372 u8 channel_count; /* # channels in channel list */
1293 __le16 quiet_time; /* dwell only this long on quiet chnl 1373 __le16 quiet_time; /* dwell only this # millisecs on quiet channel
1294 * (active scan) */ 1374 * (only for active scan) */
1295 __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */ 1375 __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */
1296 __le16 good_CRC_th; /* passive -> active promotion threshold */ 1376 __le16 good_CRC_th; /* passive -> active promotion threshold */
1297 __le16 reserved1; 1377 __le16 reserved1;
1298 __le32 max_out_time; /* max usec to be out of associated (service) 1378 __le32 max_out_time; /* max usec to be away from associated (service)
1299 * chnl */ 1379 * channel */
1300 __le32 suspend_time; /* pause scan this long when returning to svc 1380 __le32 suspend_time; /* pause scan this long (in "extended beacon
1301 * chnl. 1381 * format") when returning to service channel:
1302 * 3945 -- 31:24 # beacons, 19:0 additional usec, 1382 * 3945; 31:24 # beacons, 19:0 additional usec,
1303 * 4965 -- 31:22 # beacons, 21:0 additional usec. 1383 * 4965; 31:22 # beacons, 21:0 additional usec.
1304 */ 1384 */
1305 __le32 flags; 1385 __le32 flags; /* RXON_FLG_* */
1306 __le32 filter_flags; 1386 __le32 filter_flags; /* RXON_FILTER_* */
1307 1387
1388 /* For active scans (set to all-0s for passive scans).
1389 * Does not include payload. Must specify Tx rate; no rate scaling. */
1308 struct iwl3945_tx_cmd tx_cmd; 1390 struct iwl3945_tx_cmd tx_cmd;
1391
1392 /* For directed active scans (set to all-0s otherwise) */
1309 struct iwl3945_ssid_ie direct_scan[PROBE_OPTION_MAX]; 1393 struct iwl3945_ssid_ie direct_scan[PROBE_OPTION_MAX];
1310 1394
1311 u8 data[0];
1312 /* 1395 /*
1313 * The channels start after the probe request payload and are of type: 1396 * Probe request frame, followed by channel list.
1397 *
1398 * Size of probe request frame is specified by byte count in tx_cmd.
1399 * Channel list follows immediately after probe request frame.
1400 * Number of channels in list is specified by channel_count.
1401 * Each channel in list is of type:
1314 * 1402 *
1315 * struct iwl3945_scan_channel channels[0]; 1403 * struct iwl3945_scan_channel channels[0];
1316 * 1404 *
1317 * NOTE: Only one band of channels can be scanned per pass. You 1405 * NOTE: Only one band of channels can be scanned per pass. You
1318 * can not mix 2.4GHz channels and 5.2GHz channels and must 1406 * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait
1319 * request a scan multiple times (not concurrently) 1407 * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION)
1320 * 1408 * before requesting another scan.
1321 */ 1409 */
1410 u8 data[0];
1322} __attribute__ ((packed)); 1411} __attribute__ ((packed));
1323 1412
1324/* Can abort will notify by complete notification with abort status. */ 1413/* Can abort will notify by complete notification with abort status. */