diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 448 |
1 files changed, 427 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 8b2d7012a2a0..958c4a70d515 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
| @@ -225,6 +225,37 @@ struct iwl_cmd_header { | |||
| 225 | u8 data[0]; | 225 | u8 data[0]; |
| 226 | } __attribute__ ((packed)); | 226 | } __attribute__ ((packed)); |
| 227 | 227 | ||
| 228 | |||
| 229 | /** | ||
| 230 | * struct iwl3945_tx_power | ||
| 231 | * | ||
| 232 | * Used in REPLY_TX_PWR_TABLE_CMD, REPLY_SCAN_CMD, REPLY_CHANNEL_SWITCH | ||
| 233 | * | ||
| 234 | * Each entry contains two values: | ||
| 235 | * 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained | ||
| 236 | * linear value that multiplies the output of the digital signal processor, | ||
| 237 | * before being sent to the analog radio. | ||
| 238 | * 2) Radio gain. This sets the analog gain of the radio Tx path. | ||
| 239 | * It is a coarser setting, and behaves in a logarithmic (dB) fashion. | ||
| 240 | * | ||
| 241 | * Driver obtains values from struct iwl3945_tx_power power_gain_table[][]. | ||
| 242 | */ | ||
| 243 | struct iwl3945_tx_power { | ||
| 244 | u8 tx_gain; /* gain for analog radio */ | ||
| 245 | u8 dsp_atten; /* gain for DSP */ | ||
| 246 | } __attribute__ ((packed)); | ||
| 247 | |||
| 248 | /** | ||
| 249 | * struct iwl3945_power_per_rate | ||
| 250 | * | ||
| 251 | * Used in REPLY_TX_PWR_TABLE_CMD, REPLY_CHANNEL_SWITCH | ||
| 252 | */ | ||
| 253 | struct iwl3945_power_per_rate { | ||
| 254 | u8 rate; /* plcp */ | ||
| 255 | struct iwl3945_tx_power tpc; | ||
| 256 | u8 reserved; | ||
| 257 | } __attribute__ ((packed)); | ||
| 258 | |||
| 228 | /** | 259 | /** |
| 229 | * iwlagn rate_n_flags bit fields | 260 | * iwlagn rate_n_flags bit fields |
| 230 | * | 261 | * |
| @@ -499,8 +530,6 @@ struct iwl_alive_resp { | |||
| 499 | __le32 is_valid; | 530 | __le32 is_valid; |
| 500 | } __attribute__ ((packed)); | 531 | } __attribute__ ((packed)); |
| 501 | 532 | ||
| 502 | |||
| 503 | |||
| 504 | /* | 533 | /* |
| 505 | * REPLY_ERROR = 0x2 (response only, not a command) | 534 | * REPLY_ERROR = 0x2 (response only, not a command) |
| 506 | */ | 535 | */ |
| @@ -618,6 +647,26 @@ enum { | |||
| 618 | * issue a new REPLY_TX_PWR_TABLE_CMD after each REPLY_RXON (0x10), | 647 | * issue a new REPLY_TX_PWR_TABLE_CMD after each REPLY_RXON (0x10), |
| 619 | * regardless of whether RXON_FILTER_ASSOC_MSK is set. | 648 | * regardless of whether RXON_FILTER_ASSOC_MSK is set. |
| 620 | */ | 649 | */ |
| 650 | |||
| 651 | struct iwl3945_rxon_cmd { | ||
| 652 | u8 node_addr[6]; | ||
| 653 | __le16 reserved1; | ||
| 654 | u8 bssid_addr[6]; | ||
| 655 | __le16 reserved2; | ||
| 656 | u8 wlap_bssid_addr[6]; | ||
| 657 | __le16 reserved3; | ||
| 658 | u8 dev_type; | ||
| 659 | u8 air_propagation; | ||
| 660 | __le16 reserved4; | ||
| 661 | u8 ofdm_basic_rates; | ||
| 662 | u8 cck_basic_rates; | ||
| 663 | __le16 assoc_id; | ||
| 664 | __le32 flags; | ||
| 665 | __le32 filter_flags; | ||
| 666 | __le16 channel; | ||
| 667 | __le16 reserved5; | ||
| 668 | } __attribute__ ((packed)); | ||
| 669 | |||
| 621 | struct iwl4965_rxon_cmd { | 670 | struct iwl4965_rxon_cmd { |
| 622 | u8 node_addr[6]; | 671 | u8 node_addr[6]; |
| 623 | __le16 reserved1; | 672 | __le16 reserved1; |
| @@ -663,33 +712,41 @@ struct iwl_rxon_cmd { | |||
| 663 | __le16 reserved6; | 712 | __le16 reserved6; |
| 664 | } __attribute__ ((packed)); | 713 | } __attribute__ ((packed)); |
| 665 | 714 | ||
| 666 | struct iwl5000_rxon_assoc_cmd { | 715 | /* |
| 716 | * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response) | ||
| 717 | */ | ||
| 718 | struct iwl3945_rxon_assoc_cmd { | ||
| 719 | __le32 flags; | ||
| 720 | __le32 filter_flags; | ||
| 721 | u8 ofdm_basic_rates; | ||
| 722 | u8 cck_basic_rates; | ||
| 723 | __le16 reserved; | ||
| 724 | } __attribute__ ((packed)); | ||
| 725 | |||
| 726 | struct iwl4965_rxon_assoc_cmd { | ||
| 667 | __le32 flags; | 727 | __le32 flags; |
| 668 | __le32 filter_flags; | 728 | __le32 filter_flags; |
| 669 | u8 ofdm_basic_rates; | 729 | u8 ofdm_basic_rates; |
| 670 | u8 cck_basic_rates; | 730 | u8 cck_basic_rates; |
| 671 | __le16 reserved1; | ||
| 672 | u8 ofdm_ht_single_stream_basic_rates; | 731 | u8 ofdm_ht_single_stream_basic_rates; |
| 673 | u8 ofdm_ht_dual_stream_basic_rates; | 732 | u8 ofdm_ht_dual_stream_basic_rates; |
| 674 | u8 ofdm_ht_triple_stream_basic_rates; | ||
| 675 | u8 reserved2; | ||
| 676 | __le16 rx_chain_select_flags; | 733 | __le16 rx_chain_select_flags; |
| 677 | __le16 acquisition_data; | 734 | __le16 reserved; |
| 678 | __le32 reserved3; | ||
| 679 | } __attribute__ ((packed)); | 735 | } __attribute__ ((packed)); |
| 680 | 736 | ||
| 681 | /* | 737 | struct iwl5000_rxon_assoc_cmd { |
| 682 | * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response) | ||
| 683 | */ | ||
| 684 | struct iwl4965_rxon_assoc_cmd { | ||
| 685 | __le32 flags; | 738 | __le32 flags; |
| 686 | __le32 filter_flags; | 739 | __le32 filter_flags; |
| 687 | u8 ofdm_basic_rates; | 740 | u8 ofdm_basic_rates; |
| 688 | u8 cck_basic_rates; | 741 | u8 cck_basic_rates; |
| 742 | __le16 reserved1; | ||
| 689 | u8 ofdm_ht_single_stream_basic_rates; | 743 | u8 ofdm_ht_single_stream_basic_rates; |
| 690 | u8 ofdm_ht_dual_stream_basic_rates; | 744 | u8 ofdm_ht_dual_stream_basic_rates; |
| 745 | u8 ofdm_ht_triple_stream_basic_rates; | ||
| 746 | u8 reserved2; | ||
| 691 | __le16 rx_chain_select_flags; | 747 | __le16 rx_chain_select_flags; |
| 692 | __le16 reserved; | 748 | __le16 acquisition_data; |
| 749 | __le32 reserved3; | ||
| 693 | } __attribute__ ((packed)); | 750 | } __attribute__ ((packed)); |
| 694 | 751 | ||
| 695 | #define IWL_CONN_MAX_LISTEN_INTERVAL 10 | 752 | #define IWL_CONN_MAX_LISTEN_INTERVAL 10 |
| @@ -709,6 +766,16 @@ struct iwl_rxon_time_cmd { | |||
| 709 | /* | 766 | /* |
| 710 | * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response) | 767 | * REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response) |
| 711 | */ | 768 | */ |
| 769 | struct iwl3945_channel_switch_cmd { | ||
| 770 | u8 band; | ||
| 771 | u8 expect_beacon; | ||
| 772 | __le16 channel; | ||
| 773 | __le32 rxon_flags; | ||
| 774 | __le32 rxon_filter_flags; | ||
| 775 | __le32 switch_time; | ||
| 776 | struct iwl3945_power_per_rate power[IWL_MAX_RATES]; | ||
| 777 | } __attribute__ ((packed)); | ||
| 778 | |||
| 712 | struct iwl_channel_switch_cmd { | 779 | struct iwl_channel_switch_cmd { |
| 713 | u8 band; | 780 | u8 band; |
| 714 | u8 expect_beacon; | 781 | u8 expect_beacon; |
| @@ -912,6 +979,35 @@ struct sta_id_modify { | |||
| 912 | * used as AP, or in an IBSS network, driver must set up station table | 979 | * used as AP, or in an IBSS network, driver must set up station table |
| 913 | * entries for all STAs in network, starting with index IWL_STA_ID. | 980 | * entries for all STAs in network, starting with index IWL_STA_ID. |
| 914 | */ | 981 | */ |
| 982 | |||
| 983 | struct iwl3945_addsta_cmd { | ||
| 984 | u8 mode; /* 1: modify existing, 0: add new station */ | ||
| 985 | u8 reserved[3]; | ||
| 986 | struct sta_id_modify sta; | ||
| 987 | struct iwl4965_keyinfo key; | ||
| 988 | __le32 station_flags; /* STA_FLG_* */ | ||
| 989 | __le32 station_flags_msk; /* STA_FLG_* */ | ||
| 990 | |||
| 991 | /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID) | ||
| 992 | * corresponding to bit (e.g. bit 5 controls TID 5). | ||
| 993 | * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */ | ||
| 994 | __le16 tid_disable_tx; | ||
| 995 | |||
| 996 | __le16 rate_n_flags; | ||
| 997 | |||
| 998 | /* TID for which to add block-ack support. | ||
| 999 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | ||
| 1000 | u8 add_immediate_ba_tid; | ||
| 1001 | |||
| 1002 | /* TID for which to remove block-ack support. | ||
| 1003 | * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */ | ||
| 1004 | u8 remove_immediate_ba_tid; | ||
| 1005 | |||
| 1006 | /* Starting Sequence Number for added block-ack support. | ||
| 1007 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | ||
| 1008 | __le16 add_immediate_ba_ssn; | ||
| 1009 | } __attribute__ ((packed)); | ||
| 1010 | |||
| 915 | struct iwl4965_addsta_cmd { | 1011 | struct iwl4965_addsta_cmd { |
| 916 | u8 mode; /* 1: modify existing, 0: add new station */ | 1012 | u8 mode; /* 1: modify existing, 0: add new station */ |
| 917 | u8 reserved[3]; | 1013 | u8 reserved[3]; |
| @@ -1065,6 +1161,48 @@ struct iwl_wep_cmd { | |||
| 1065 | #define RX_MPDU_RES_STATUS_TTAK_OK (1 << 7) | 1161 | #define RX_MPDU_RES_STATUS_TTAK_OK (1 << 7) |
| 1066 | #define RX_MPDU_RES_STATUS_DEC_DONE_MSK (0x800) | 1162 | #define RX_MPDU_RES_STATUS_DEC_DONE_MSK (0x800) |
| 1067 | 1163 | ||
| 1164 | |||
| 1165 | struct iwl3945_rx_frame_stats { | ||
| 1166 | u8 phy_count; | ||
| 1167 | u8 id; | ||
| 1168 | u8 rssi; | ||
| 1169 | u8 agc; | ||
| 1170 | __le16 sig_avg; | ||
| 1171 | __le16 noise_diff; | ||
| 1172 | u8 payload[0]; | ||
| 1173 | } __attribute__ ((packed)); | ||
| 1174 | |||
| 1175 | struct iwl3945_rx_frame_hdr { | ||
| 1176 | __le16 channel; | ||
| 1177 | __le16 phy_flags; | ||
| 1178 | u8 reserved1; | ||
| 1179 | u8 rate; | ||
| 1180 | __le16 len; | ||
| 1181 | u8 payload[0]; | ||
| 1182 | } __attribute__ ((packed)); | ||
| 1183 | |||
| 1184 | struct iwl3945_rx_frame_end { | ||
| 1185 | __le32 status; | ||
| 1186 | __le64 timestamp; | ||
| 1187 | __le32 beacon_timestamp; | ||
| 1188 | } __attribute__ ((packed)); | ||
| 1189 | |||
| 1190 | /* | ||
| 1191 | * REPLY_3945_RX = 0x1b (response only, not a command) | ||
| 1192 | * | ||
| 1193 | * NOTE: DO NOT dereference from casts to this structure | ||
| 1194 | * It is provided only for calculating minimum data set size. | ||
| 1195 | * The actual offsets of the hdr and end are dynamic based on | ||
| 1196 | * stats.phy_count | ||
| 1197 | */ | ||
| 1198 | struct iwl3945_rx_frame { | ||
| 1199 | struct iwl3945_rx_frame_stats stats; | ||
| 1200 | struct iwl3945_rx_frame_hdr hdr; | ||
| 1201 | struct iwl3945_rx_frame_end end; | ||
| 1202 | } __attribute__ ((packed)); | ||
| 1203 | |||
| 1204 | #define IWL39_RX_FRAME_SIZE (4 + sizeof(struct iwl3945_rx_frame)) | ||
| 1205 | |||
| 1068 | /* Fixed (non-configurable) rx data from phy */ | 1206 | /* Fixed (non-configurable) rx data from phy */ |
| 1069 | 1207 | ||
| 1070 | #define IWL49_RX_RES_PHY_CNT 14 | 1208 | #define IWL49_RX_RES_PHY_CNT 14 |
| @@ -1245,6 +1383,84 @@ struct iwl4965_rx_mpdu_res_start { | |||
| 1245 | #define TKIP_ICV_LEN 4 | 1383 | #define TKIP_ICV_LEN 4 |
| 1246 | 1384 | ||
| 1247 | /* | 1385 | /* |
| 1386 | * REPLY_TX = 0x1c (command) | ||
| 1387 | */ | ||
| 1388 | |||
| 1389 | struct iwl3945_tx_cmd { | ||
| 1390 | /* | ||
| 1391 | * MPDU byte count: | ||
| 1392 | * MAC header (24/26/30/32 bytes) + 2 bytes pad if 26/30 header size, | ||
| 1393 | * + 8 byte IV for CCM or TKIP (not used for WEP) | ||
| 1394 | * + Data payload | ||
| 1395 | * + 8-byte MIC (not used for CCM/WEP) | ||
| 1396 | * NOTE: Does not include Tx command bytes, post-MAC pad bytes, | ||
| 1397 | * MIC (CCM) 8 bytes, ICV (WEP/TKIP/CKIP) 4 bytes, CRC 4 bytes.i | ||
| 1398 | * Range: 14-2342 bytes. | ||
| 1399 | */ | ||
| 1400 | __le16 len; | ||
| 1401 | |||
| 1402 | /* | ||
| 1403 | * MPDU or MSDU byte count for next frame. | ||
| 1404 | * Used for fragmentation and bursting, but not 11n aggregation. | ||
| 1405 | * Same as "len", but for next frame. Set to 0 if not applicable. | ||
| 1406 | */ | ||
| 1407 | __le16 next_frame_len; | ||
| 1408 | |||
| 1409 | __le32 tx_flags; /* TX_CMD_FLG_* */ | ||
| 1410 | |||
| 1411 | u8 rate; | ||
| 1412 | |||
| 1413 | /* Index of recipient station in uCode's station table */ | ||
| 1414 | u8 sta_id; | ||
| 1415 | u8 tid_tspec; | ||
| 1416 | u8 sec_ctl; | ||
| 1417 | u8 key[16]; | ||
| 1418 | union { | ||
| 1419 | u8 byte[8]; | ||
| 1420 | __le16 word[4]; | ||
| 1421 | __le32 dw[2]; | ||
| 1422 | } tkip_mic; | ||
| 1423 | __le32 next_frame_info; | ||
| 1424 | union { | ||
| 1425 | __le32 life_time; | ||
| 1426 | __le32 attempt; | ||
| 1427 | } stop_time; | ||
| 1428 | u8 supp_rates[2]; | ||
| 1429 | u8 rts_retry_limit; /*byte 50 */ | ||
| 1430 | u8 data_retry_limit; /*byte 51 */ | ||
| 1431 | union { | ||
| 1432 | __le16 pm_frame_timeout; | ||
| 1433 | __le16 attempt_duration; | ||
| 1434 | } timeout; | ||
| 1435 | |||
| 1436 | /* | ||
| 1437 | * Duration of EDCA burst Tx Opportunity, in 32-usec units. | ||
| 1438 | * Set this if txop time is not specified by HCCA protocol (e.g. by AP). | ||
| 1439 | */ | ||
| 1440 | __le16 driver_txop; | ||
| 1441 | |||
| 1442 | /* | ||
| 1443 | * MAC header goes here, followed by 2 bytes padding if MAC header | ||
| 1444 | * length is 26 or 30 bytes, followed by payload data | ||
| 1445 | */ | ||
| 1446 | u8 payload[0]; | ||
| 1447 | struct ieee80211_hdr hdr[0]; | ||
| 1448 | } __attribute__ ((packed)); | ||
| 1449 | |||
| 1450 | /* | ||
| 1451 | * REPLY_TX = 0x1c (response) | ||
| 1452 | */ | ||
| 1453 | struct iwl3945_tx_resp { | ||
| 1454 | u8 failure_rts; | ||
| 1455 | u8 failure_frame; | ||
| 1456 | u8 bt_kill_count; | ||
| 1457 | u8 rate; | ||
| 1458 | __le32 wireless_media_time; | ||
| 1459 | __le32 status; /* TX status */ | ||
| 1460 | } __attribute__ ((packed)); | ||
| 1461 | |||
| 1462 | |||
| 1463 | /* | ||
| 1248 | * 4965 uCode updates these Tx attempt count values in host DRAM. | 1464 | * 4965 uCode updates these Tx attempt count values in host DRAM. |
| 1249 | * Used for managing Tx retries when expecting block-acks. | 1465 | * Used for managing Tx retries when expecting block-acks. |
| 1250 | * Driver should set these fields to 0. | 1466 | * Driver should set these fields to 0. |
| @@ -1255,9 +1471,6 @@ struct iwl_dram_scratch { | |||
| 1255 | __le16 reserved; | 1471 | __le16 reserved; |
| 1256 | } __attribute__ ((packed)); | 1472 | } __attribute__ ((packed)); |
| 1257 | 1473 | ||
| 1258 | /* | ||
| 1259 | * REPLY_TX = 0x1c (command) | ||
| 1260 | */ | ||
| 1261 | struct iwl_tx_cmd { | 1474 | struct iwl_tx_cmd { |
| 1262 | /* | 1475 | /* |
| 1263 | * MPDU byte count: | 1476 | * MPDU byte count: |
| @@ -1595,6 +1808,14 @@ struct iwl_compressed_ba_resp { | |||
| 1595 | * | 1808 | * |
| 1596 | * See details under "TXPOWER" in iwl-4965-hw.h. | 1809 | * See details under "TXPOWER" in iwl-4965-hw.h. |
| 1597 | */ | 1810 | */ |
| 1811 | |||
| 1812 | struct iwl3945_txpowertable_cmd { | ||
| 1813 | u8 band; /* 0: 5 GHz, 1: 2.4 GHz */ | ||
| 1814 | u8 reserved; | ||
| 1815 | __le16 channel; | ||
| 1816 | struct iwl3945_power_per_rate power[IWL_MAX_RATES]; | ||
| 1817 | } __attribute__ ((packed)); | ||
| 1818 | |||
| 1598 | struct iwl4965_txpowertable_cmd { | 1819 | struct iwl4965_txpowertable_cmd { |
| 1599 | u8 band; /* 0: 5 GHz, 1: 2.4 GHz */ | 1820 | u8 band; /* 0: 5 GHz, 1: 2.4 GHz */ |
| 1600 | u8 reserved; | 1821 | u8 reserved; |
| @@ -1602,6 +1823,35 @@ struct iwl4965_txpowertable_cmd { | |||
| 1602 | struct iwl4965_tx_power_db tx_power; | 1823 | struct iwl4965_tx_power_db tx_power; |
| 1603 | } __attribute__ ((packed)); | 1824 | } __attribute__ ((packed)); |
| 1604 | 1825 | ||
| 1826 | |||
| 1827 | /** | ||
| 1828 | * struct iwl3945_rate_scaling_cmd - Rate Scaling Command & Response | ||
| 1829 | * | ||
| 1830 | * REPLY_RATE_SCALE = 0x47 (command, has simple generic response) | ||
| 1831 | * | ||
| 1832 | * NOTE: The table of rates passed to the uCode via the | ||
| 1833 | * RATE_SCALE command sets up the corresponding order of | ||
| 1834 | * rates used for all related commands, including rate | ||
| 1835 | * masks, etc. | ||
| 1836 | * | ||
| 1837 | * For example, if you set 9MB (PLCP 0x0f) as the first | ||
| 1838 | * rate in the rate table, the bit mask for that rate | ||
| 1839 | * when passed through ofdm_basic_rates on the REPLY_RXON | ||
| 1840 | * command would be bit 0 (1 << 0) | ||
| 1841 | */ | ||
| 1842 | struct iwl3945_rate_scaling_info { | ||
| 1843 | __le16 rate_n_flags; | ||
| 1844 | u8 try_cnt; | ||
| 1845 | u8 next_rate_index; | ||
| 1846 | } __attribute__ ((packed)); | ||
| 1847 | |||
| 1848 | struct iwl3945_rate_scaling_cmd { | ||
| 1849 | u8 table_id; | ||
| 1850 | u8 reserved[3]; | ||
| 1851 | struct iwl3945_rate_scaling_info table[IWL_MAX_RATES]; | ||
| 1852 | } __attribute__ ((packed)); | ||
| 1853 | |||
| 1854 | |||
| 1605 | /*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */ | 1855 | /*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */ |
| 1606 | #define LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK (1 << 0) | 1856 | #define LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK (1 << 0) |
| 1607 | 1857 | ||
| @@ -2162,6 +2412,23 @@ struct iwl_ct_kill_config { | |||
| 2162 | * passive_dwell < max_out_time | 2412 | * passive_dwell < max_out_time |
| 2163 | * active_dwell < max_out_time | 2413 | * active_dwell < max_out_time |
| 2164 | */ | 2414 | */ |
| 2415 | |||
| 2416 | /* FIXME: rename to AP1, remove tpc */ | ||
| 2417 | struct iwl3945_scan_channel { | ||
| 2418 | /* | ||
| 2419 | * type is defined as: | ||
| 2420 | * 0:0 1 = active, 0 = passive | ||
| 2421 | * 1:4 SSID direct bit map; if a bit is set, then corresponding | ||
| 2422 | * SSID IE is transmitted in probe request. | ||
| 2423 | * 5:7 reserved | ||
| 2424 | */ | ||
| 2425 | u8 type; | ||
| 2426 | u8 channel; /* band is selected by iwl3945_scan_cmd "flags" field */ | ||
| 2427 | struct iwl3945_tx_power tpc; | ||
| 2428 | __le16 active_dwell; /* in 1024-uSec TU (time units), typ 5-50 */ | ||
| 2429 | __le16 passive_dwell; /* in 1024-uSec TU (time units), typ 20-500 */ | ||
| 2430 | } __attribute__ ((packed)); | ||
| 2431 | |||
| 2165 | struct iwl_scan_channel { | 2432 | struct iwl_scan_channel { |
| 2166 | /* | 2433 | /* |
| 2167 | * type is defined as: | 2434 | * type is defined as: |
| @@ -2249,6 +2516,51 @@ struct iwl_ssid_ie { | |||
| 2249 | * To avoid uCode errors, see timing restrictions described under | 2516 | * To avoid uCode errors, see timing restrictions described under |
| 2250 | * struct iwl_scan_channel. | 2517 | * struct iwl_scan_channel. |
| 2251 | */ | 2518 | */ |
| 2519 | |||
| 2520 | struct iwl3945_scan_cmd { | ||
| 2521 | __le16 len; | ||
| 2522 | u8 reserved0; | ||
| 2523 | u8 channel_count; /* # channels in channel list */ | ||
| 2524 | __le16 quiet_time; /* dwell only this # millisecs on quiet channel | ||
| 2525 | * (only for active scan) */ | ||
| 2526 | __le16 quiet_plcp_th; /* quiet chnl is < this # pkts (typ. 1) */ | ||
| 2527 | __le16 good_CRC_th; /* passive -> active promotion threshold */ | ||
| 2528 | __le16 reserved1; | ||
| 2529 | __le32 max_out_time; /* max usec to be away from associated (service) | ||
| 2530 | * channel */ | ||
| 2531 | __le32 suspend_time; /* pause scan this long (in "extended beacon | ||
| 2532 | * format") when returning to service channel: | ||
| 2533 | * 3945; 31:24 # beacons, 19:0 additional usec, | ||
| 2534 | * 4965; 31:22 # beacons, 21:0 additional usec. | ||
| 2535 | */ | ||
| 2536 | __le32 flags; /* RXON_FLG_* */ | ||
| 2537 | __le32 filter_flags; /* RXON_FILTER_* */ | ||
| 2538 | |||
| 2539 | /* For active scans (set to all-0s for passive scans). | ||
| 2540 | * Does not include payload. Must specify Tx rate; no rate scaling. */ | ||
| 2541 | struct iwl3945_tx_cmd tx_cmd; | ||
| 2542 | |||
| 2543 | /* For directed active scans (set to all-0s otherwise) */ | ||
| 2544 | struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX_API1]; | ||
| 2545 | |||
| 2546 | /* | ||
| 2547 | * Probe request frame, followed by channel list. | ||
| 2548 | * | ||
| 2549 | * Size of probe request frame is specified by byte count in tx_cmd. | ||
| 2550 | * Channel list follows immediately after probe request frame. | ||
| 2551 | * Number of channels in list is specified by channel_count. | ||
| 2552 | * Each channel in list is of type: | ||
| 2553 | * | ||
| 2554 | * struct iwl3945_scan_channel channels[0]; | ||
| 2555 | * | ||
| 2556 | * NOTE: Only one band of channels can be scanned per pass. You | ||
| 2557 | * must not mix 2.4GHz channels and 5.2GHz channels, and you must wait | ||
| 2558 | * for one scan to complete (i.e. receive SCAN_COMPLETE_NOTIFICATION) | ||
| 2559 | * before requesting another scan. | ||
| 2560 | */ | ||
| 2561 | u8 data[0]; | ||
| 2562 | } __attribute__ ((packed)); | ||
| 2563 | |||
| 2252 | struct iwl_scan_cmd { | 2564 | struct iwl_scan_cmd { |
| 2253 | __le16 len; | 2565 | __le16 len; |
| 2254 | u8 reserved0; | 2566 | u8 reserved0; |
| @@ -2356,6 +2668,14 @@ struct iwl_scancomplete_notification { | |||
| 2356 | /* | 2668 | /* |
| 2357 | * BEACON_NOTIFICATION = 0x90 (notification only, not a command) | 2669 | * BEACON_NOTIFICATION = 0x90 (notification only, not a command) |
| 2358 | */ | 2670 | */ |
| 2671 | |||
| 2672 | struct iwl3945_beacon_notif { | ||
| 2673 | struct iwl3945_tx_resp beacon_notify_hdr; | ||
| 2674 | __le32 low_tsf; | ||
| 2675 | __le32 high_tsf; | ||
| 2676 | __le32 ibss_mgr_status; | ||
| 2677 | } __attribute__ ((packed)); | ||
| 2678 | |||
| 2359 | struct iwl4965_beacon_notif { | 2679 | struct iwl4965_beacon_notif { |
| 2360 | struct iwl4965_tx_resp beacon_notify_hdr; | 2680 | struct iwl4965_tx_resp beacon_notify_hdr; |
| 2361 | __le32 low_tsf; | 2681 | __le32 low_tsf; |
| @@ -2366,6 +2686,15 @@ struct iwl4965_beacon_notif { | |||
| 2366 | /* | 2686 | /* |
| 2367 | * REPLY_TX_BEACON = 0x91 (command, has simple generic response) | 2687 | * REPLY_TX_BEACON = 0x91 (command, has simple generic response) |
| 2368 | */ | 2688 | */ |
| 2689 | |||
| 2690 | struct iwl3945_tx_beacon_cmd { | ||
| 2691 | struct iwl3945_tx_cmd tx; | ||
| 2692 | __le16 tim_idx; | ||
| 2693 | u8 tim_size; | ||
| 2694 | u8 reserved1; | ||
| 2695 | struct ieee80211_hdr frame[0]; /* beacon frame */ | ||
| 2696 | } __attribute__ ((packed)); | ||
| 2697 | |||
| 2369 | struct iwl_tx_beacon_cmd { | 2698 | struct iwl_tx_beacon_cmd { |
| 2370 | struct iwl_tx_cmd tx; | 2699 | struct iwl_tx_cmd tx; |
| 2371 | __le16 tim_idx; | 2700 | __le16 tim_idx; |
| @@ -2402,6 +2731,76 @@ struct rate_histogram { | |||
| 2402 | 2731 | ||
| 2403 | /* statistics command response */ | 2732 | /* statistics command response */ |
| 2404 | 2733 | ||
| 2734 | struct iwl39_statistics_rx_phy { | ||
| 2735 | __le32 ina_cnt; | ||
| 2736 | __le32 fina_cnt; | ||
| 2737 | __le32 plcp_err; | ||
| 2738 | __le32 crc32_err; | ||
| 2739 | __le32 overrun_err; | ||
| 2740 | __le32 early_overrun_err; | ||
| 2741 | __le32 crc32_good; | ||
| 2742 | __le32 false_alarm_cnt; | ||
| 2743 | __le32 fina_sync_err_cnt; | ||
| 2744 | __le32 sfd_timeout; | ||
| 2745 | __le32 fina_timeout; | ||
| 2746 | __le32 unresponded_rts; | ||
| 2747 | __le32 rxe_frame_limit_overrun; | ||
| 2748 | __le32 sent_ack_cnt; | ||
| 2749 | __le32 sent_cts_cnt; | ||
| 2750 | } __attribute__ ((packed)); | ||
| 2751 | |||
| 2752 | struct iwl39_statistics_rx_non_phy { | ||
| 2753 | __le32 bogus_cts; /* CTS received when not expecting CTS */ | ||
| 2754 | __le32 bogus_ack; /* ACK received when not expecting ACK */ | ||
| 2755 | __le32 non_bssid_frames; /* number of frames with BSSID that | ||
| 2756 | * doesn't belong to the STA BSSID */ | ||
| 2757 | __le32 filtered_frames; /* count frames that were dumped in the | ||
| 2758 | * filtering process */ | ||
| 2759 | __le32 non_channel_beacons; /* beacons with our bss id but not on | ||
| 2760 | * our serving channel */ | ||
| 2761 | } __attribute__ ((packed)); | ||
| 2762 | |||
| 2763 | struct iwl39_statistics_rx { | ||
| 2764 | struct iwl39_statistics_rx_phy ofdm; | ||
| 2765 | struct iwl39_statistics_rx_phy cck; | ||
| 2766 | struct iwl39_statistics_rx_non_phy general; | ||
| 2767 | } __attribute__ ((packed)); | ||
| 2768 | |||
| 2769 | struct iwl39_statistics_tx { | ||
| 2770 | __le32 preamble_cnt; | ||
| 2771 | __le32 rx_detected_cnt; | ||
| 2772 | __le32 bt_prio_defer_cnt; | ||
| 2773 | __le32 bt_prio_kill_cnt; | ||
| 2774 | __le32 few_bytes_cnt; | ||
| 2775 | __le32 cts_timeout; | ||
| 2776 | __le32 ack_timeout; | ||
| 2777 | __le32 expected_ack_cnt; | ||
| 2778 | __le32 actual_ack_cnt; | ||
| 2779 | } __attribute__ ((packed)); | ||
| 2780 | |||
| 2781 | struct statistics_dbg { | ||
| 2782 | __le32 burst_check; | ||
| 2783 | __le32 burst_count; | ||
| 2784 | __le32 reserved[4]; | ||
| 2785 | } __attribute__ ((packed)); | ||
| 2786 | |||
| 2787 | struct iwl39_statistics_div { | ||
| 2788 | __le32 tx_on_a; | ||
| 2789 | __le32 tx_on_b; | ||
| 2790 | __le32 exec_time; | ||
| 2791 | __le32 probe_time; | ||
| 2792 | } __attribute__ ((packed)); | ||
| 2793 | |||
| 2794 | struct iwl39_statistics_general { | ||
| 2795 | __le32 temperature; | ||
| 2796 | struct statistics_dbg dbg; | ||
| 2797 | __le32 sleep_time; | ||
| 2798 | __le32 slots_out; | ||
| 2799 | __le32 slots_idle; | ||
| 2800 | __le32 ttl_timestamp; | ||
| 2801 | struct iwl39_statistics_div div; | ||
| 2802 | } __attribute__ ((packed)); | ||
| 2803 | |||
| 2405 | struct statistics_rx_phy { | 2804 | struct statistics_rx_phy { |
| 2406 | __le32 ina_cnt; | 2805 | __le32 ina_cnt; |
| 2407 | __le32 fina_cnt; | 2806 | __le32 fina_cnt; |
| @@ -2513,11 +2912,6 @@ struct statistics_tx { | |||
| 2513 | struct statistics_tx_non_phy_agg agg; | 2912 | struct statistics_tx_non_phy_agg agg; |
| 2514 | } __attribute__ ((packed)); | 2913 | } __attribute__ ((packed)); |
| 2515 | 2914 | ||
| 2516 | struct statistics_dbg { | ||
| 2517 | __le32 burst_check; | ||
| 2518 | __le32 burst_count; | ||
| 2519 | __le32 reserved[4]; | ||
| 2520 | } __attribute__ ((packed)); | ||
| 2521 | 2915 | ||
| 2522 | struct statistics_div { | 2916 | struct statistics_div { |
| 2523 | __le32 tx_on_a; | 2917 | __le32 tx_on_a; |
| @@ -2581,6 +2975,14 @@ struct iwl_statistics_cmd { | |||
| 2581 | */ | 2975 | */ |
| 2582 | #define STATISTICS_REPLY_FLG_BAND_24G_MSK cpu_to_le32(0x2) | 2976 | #define STATISTICS_REPLY_FLG_BAND_24G_MSK cpu_to_le32(0x2) |
| 2583 | #define STATISTICS_REPLY_FLG_FAT_MODE_MSK cpu_to_le32(0x8) | 2977 | #define STATISTICS_REPLY_FLG_FAT_MODE_MSK cpu_to_le32(0x8) |
| 2978 | |||
| 2979 | struct iwl3945_notif_statistics { | ||
| 2980 | __le32 flag; | ||
| 2981 | struct iwl39_statistics_rx rx; | ||
| 2982 | struct iwl39_statistics_tx tx; | ||
| 2983 | struct iwl39_statistics_general general; | ||
| 2984 | } __attribute__ ((packed)); | ||
| 2985 | |||
| 2584 | struct iwl_notif_statistics { | 2986 | struct iwl_notif_statistics { |
| 2585 | __le32 flag; | 2987 | __le32 flag; |
| 2586 | struct statistics_rx rx; | 2988 | struct statistics_rx rx; |
| @@ -3032,6 +3434,10 @@ struct iwl_rx_packet { | |||
| 3032 | __le32 len; | 3434 | __le32 len; |
| 3033 | struct iwl_cmd_header hdr; | 3435 | struct iwl_cmd_header hdr; |
| 3034 | union { | 3436 | union { |
| 3437 | struct iwl3945_rx_frame rx_frame; | ||
| 3438 | struct iwl3945_tx_resp tx_resp; | ||
| 3439 | struct iwl3945_beacon_notif beacon_status; | ||
| 3440 | |||
| 3035 | struct iwl_alive_resp alive_frame; | 3441 | struct iwl_alive_resp alive_frame; |
| 3036 | struct iwl_spectrum_notification spectrum_notif; | 3442 | struct iwl_spectrum_notification spectrum_notif; |
| 3037 | struct iwl_csa_notification csa_notif; | 3443 | struct iwl_csa_notification csa_notif; |
