if_aironet_ieee.h (103870) | if_aironet_ieee.h (108401) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/dev/an/if_aironet_ieee.h 103870 2002-09-23 18:54:32Z alfred $ | 32 * $FreeBSD: head/sys/dev/an/if_aironet_ieee.h 108401 2002-12-29 19:22:07Z ambrisko $ |
33 */ 34 35#ifndef _IF_AIRONET_IEEE_H 36#define _IF_AIRONET_IEEE_H 37 38/* 39 * This header defines a simple command interface to the FreeBSD 40 * Aironet driver (an) driver, which is used to set certain --- 86 unchanged lines hidden (view full) --- 127 char macsrc[6]; /* unique MAC address for entry */ 128 int ipsrc; /* ip address associated with packet */ 129 int signal; /* signal strength of the packet */ 130 int noise; /* noise value */ 131 int quality; /* quality of the packet */ 132}; 133#endif 134 | 33 */ 34 35#ifndef _IF_AIRONET_IEEE_H 36#define _IF_AIRONET_IEEE_H 37 38/* 39 * This header defines a simple command interface to the FreeBSD 40 * Aironet driver (an) driver, which is used to set certain --- 86 unchanged lines hidden (view full) --- 127 char macsrc[6]; /* unique MAC address for entry */ 128 int ipsrc; /* ip address associated with packet */ 129 int signal; /* signal strength of the packet */ 130 int noise; /* noise value */ 131 int quality; /* quality of the packet */ 132}; 133#endif 134 |
135/* 136 * The card provides an 8-bit signal strength value (RSSI), which can 137 * be converted to a dBm power value (or a percent) using a table in 138 * the card's firmware (when available). The tables are slightly 139 * different in individual cards, even of the same model. If the 140 * table is not available, the mapping can be approximated by dBm = 141 * RSSI - 100. This approximation can be seen by plotting a few 142 * tables, and also matches some info on the Intersil web site (I 143 * think they make the RF front end for the cards. However, the linux 144 * driver uses the approximation dBm = RSSI/2 - 95. I think that is 145 * just wrong. 146 */ 147 148struct an_rssi_entry { 149 u_int8_t an_rss_pct; 150 u_int8_t an_rss_dbm; 151}; 152 153 |
|
135struct an_ltv_key { 136 u_int16_t an_len; 137 u_int16_t an_type; 138 u_int16_t kindex; 139 u_int8_t mac[6]; 140 u_int16_t klen; 141 u_int8_t key[16]; /* 128-bit keys */ 142}; --- 187 unchanged lines hidden (view full) --- 330 331#define AN_RXMODE_BC_MC_ADDR 0x0000 332#define AN_RXMODE_BC_ADDR 0x0001 333#define AN_RXMODE_ADDR 0x0002 334#define AN_RXMODE_80211_MONITOR_CURBSS 0x0003 335#define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004 336#define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005 337#define AN_RXMODE_NO_8023_HEADER 0x0100 | 154struct an_ltv_key { 155 u_int16_t an_len; 156 u_int16_t an_type; 157 u_int16_t kindex; 158 u_int8_t mac[6]; 159 u_int16_t klen; 160 u_int8_t key[16]; /* 128-bit keys */ 161}; --- 187 unchanged lines hidden (view full) --- 349 350#define AN_RXMODE_BC_MC_ADDR 0x0000 351#define AN_RXMODE_BC_ADDR 0x0001 352#define AN_RXMODE_ADDR 0x0002 353#define AN_RXMODE_80211_MONITOR_CURBSS 0x0003 354#define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004 355#define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005 356#define AN_RXMODE_NO_8023_HEADER 0x0100 |
357#define AN_RXMODE_NORMALIZED_RSSI 0x0200 |
|
338 339#define AN_RATE_1MBPS 0x0002 340#define AN_RATE_2MBPS 0x0004 341#define AN_RATE_5_5MBPS 0x000B 342#define AN_RATE_11MBPS 0x0016 343 344#define AN_DEVTYPE_PC4500 0x0065 345#define AN_DEVTYPE_PC4800 0x006D --- 152 unchanged lines hidden (view full) --- 498 * Radio info (read only). 499 */ 500struct an_ltv_radioinfo { 501 u_int16_t an_len; 502 u_int16_t an_type; 503 /* ??? */ 504}; 505 | 358 359#define AN_RATE_1MBPS 0x0002 360#define AN_RATE_2MBPS 0x0004 361#define AN_RATE_5_5MBPS 0x000B 362#define AN_RATE_11MBPS 0x0016 363 364#define AN_DEVTYPE_PC4500 0x0065 365#define AN_DEVTYPE_PC4800 0x006D --- 152 unchanged lines hidden (view full) --- 518 * Radio info (read only). 519 */ 520struct an_ltv_radioinfo { 521 u_int16_t an_len; 522 u_int16_t an_type; 523 /* ??? */ 524}; 525 |
526/* 527 * RSSI map. If available in the card's firmware, this can be used to 528 * convert the 8-bit RSSI values from the card into dBm. 529 */ 530struct an_ltv_rssi_map { 531 u_int16_t an_len; 532 u_int16_t an_type; 533 struct an_rssi_entry an_entries[256]; 534}; 535 |
|
506/* 507 * Status (read only). Note: the manual claims this RID is 108 bytes 508 * long (0x6A is the last datum, which is 2 bytes long) however when 509 * this RID is read from the NIC, it returns a length of 110. To be 510 * on the safe side, this structure is padded with an extra 16-bit 511 * word. (There is a misprint in the manual which says the macaddr 512 * field is 8 bytes long.) 513 * 514 * Also, the channel_set and current_channel fields appear to be 515 * reversed. Either that, or the hop_period field is unused. 516 */ 517struct an_ltv_status { 518 u_int16_t an_len; /* 0x00 */ 519 u_int16_t an_type; /* 0xXX */ 520 u_int8_t an_macaddr[6]; /* 0x02 */ 521 u_int16_t an_opmode; /* 0x08 */ 522 u_int16_t an_errcode; /* 0x0A */ | 536/* 537 * Status (read only). Note: the manual claims this RID is 108 bytes 538 * long (0x6A is the last datum, which is 2 bytes long) however when 539 * this RID is read from the NIC, it returns a length of 110. To be 540 * on the safe side, this structure is padded with an extra 16-bit 541 * word. (There is a misprint in the manual which says the macaddr 542 * field is 8 bytes long.) 543 * 544 * Also, the channel_set and current_channel fields appear to be 545 * reversed. Either that, or the hop_period field is unused. 546 */ 547struct an_ltv_status { 548 u_int16_t an_len; /* 0x00 */ 549 u_int16_t an_type; /* 0xXX */ 550 u_int8_t an_macaddr[6]; /* 0x02 */ 551 u_int16_t an_opmode; /* 0x08 */ 552 u_int16_t an_errcode; /* 0x0A */ |
523 u_int16_t an_cur_signal_strength; /* 0x0C */ | 553 u_int16_t an_signal_quality; /* 0x0C */ |
524 u_int16_t an_ssidlen; /* 0x0E */ 525 u_int8_t an_ssid[32]; /* 0x10 */ 526 u_int8_t an_ap_name[16]; /* 0x30 */ 527 u_int8_t an_cur_bssid[6]; /* 0x40 */ 528 u_int8_t an_prev_bssid1[6]; /* 0x46 */ 529 u_int8_t an_prev_bssid2[6]; /* 0x4C */ 530 u_int8_t an_prev_bssid3[6]; /* 0x52 */ 531 u_int16_t an_beacon_period; /* 0x58 */ --- 4 unchanged lines hidden (view full) --- 536 u_int16_t an_channel_set; /* 0x60 */ 537 u_int16_t an_hops_to_backbone; /* 0x64 */ 538 u_int16_t an_ap_total_load; /* 0x66 */ 539 u_int16_t an_our_generated_load; /* 0x68 */ 540 u_int16_t an_accumulated_arl; /* 0x6A */ 541 u_int16_t an_cur_signal_quality; /* 0x6C */ 542 u_int16_t an_current_tx_rate; /* 0x6E */ 543 u_int16_t an_ap_device; /* 0x70 */ | 554 u_int16_t an_ssidlen; /* 0x0E */ 555 u_int8_t an_ssid[32]; /* 0x10 */ 556 u_int8_t an_ap_name[16]; /* 0x30 */ 557 u_int8_t an_cur_bssid[6]; /* 0x40 */ 558 u_int8_t an_prev_bssid1[6]; /* 0x46 */ 559 u_int8_t an_prev_bssid2[6]; /* 0x4C */ 560 u_int8_t an_prev_bssid3[6]; /* 0x52 */ 561 u_int16_t an_beacon_period; /* 0x58 */ --- 4 unchanged lines hidden (view full) --- 566 u_int16_t an_channel_set; /* 0x60 */ 567 u_int16_t an_hops_to_backbone; /* 0x64 */ 568 u_int16_t an_ap_total_load; /* 0x66 */ 569 u_int16_t an_our_generated_load; /* 0x68 */ 570 u_int16_t an_accumulated_arl; /* 0x6A */ 571 u_int16_t an_cur_signal_quality; /* 0x6C */ 572 u_int16_t an_current_tx_rate; /* 0x6E */ 573 u_int16_t an_ap_device; /* 0x70 */ |
544 u_int16_t an_normalized_rssi; /* 0x72 */ | 574 u_int16_t an_normalized_strength; /* 0x72 */ |
545 u_int16_t an_short_pre_in_use; /* 0x74 */ 546 u_int8_t an_ap_ip_addr[4]; /* 0x76 */ | 575 u_int16_t an_short_pre_in_use; /* 0x74 */ 576 u_int8_t an_ap_ip_addr[4]; /* 0x76 */ |
547 u_int16_t an_max_noise_prev_sec; /* 0x7A */ 548 u_int16_t an_avg_noise_prev_min; /* 0x7C */ 549 u_int16_t an_max_noise_prev_min; /* 0x7E */ | 577 u_int8_t an_noise_prev_sec_pc; /* 0x7A */ 578 u_int8_t an_noise_prev_sec_db; /* 0x7B */ 579 u_int8_t an_avg_noise_prev_min_pc; /* 0x7C */ 580 u_int8_t an_avg_noise_prev_min_db; /* 0x7D */ 581 u_int8_t an_max_noise_prev_min_pc; /* 0x7E */ 582 u_int8_t an_max_noise_prev_min_db; /* 0x7F */ |
550 u_int16_t an_spare[5]; 551}; 552 553#define AN_STATUS_OPMODE_CONFIGURED 0x0001 554#define AN_STATUS_OPMODE_MAC_ENABLED 0x0002 555#define AN_STATUS_OPMODE_RX_ENABLED 0x0004 556#define AN_STATUS_OPMODE_IN_SYNC 0x0010 557#define AN_STATUS_OPMODE_ASSOCIATED 0x0020 --- 80 unchanged lines hidden (view full) --- 638#define AN_RID_ACTUALCFG 0xFF20 /* Current configuration settings */ 639 640/* 641 * Reporting (read only) 642 */ 643#define AN_RID_CAPABILITIES 0xFF00 /* PC 4500/4800 capabilities */ 644#define AN_RID_AP_INFO 0xFF01 /* Access point info */ 645#define AN_RID_RADIO_INFO 0xFF02 /* Radio info */ | 583 u_int16_t an_spare[5]; 584}; 585 586#define AN_STATUS_OPMODE_CONFIGURED 0x0001 587#define AN_STATUS_OPMODE_MAC_ENABLED 0x0002 588#define AN_STATUS_OPMODE_RX_ENABLED 0x0004 589#define AN_STATUS_OPMODE_IN_SYNC 0x0010 590#define AN_STATUS_OPMODE_ASSOCIATED 0x0020 --- 80 unchanged lines hidden (view full) --- 671#define AN_RID_ACTUALCFG 0xFF20 /* Current configuration settings */ 672 673/* 674 * Reporting (read only) 675 */ 676#define AN_RID_CAPABILITIES 0xFF00 /* PC 4500/4800 capabilities */ 677#define AN_RID_AP_INFO 0xFF01 /* Access point info */ 678#define AN_RID_RADIO_INFO 0xFF02 /* Radio info */ |
679#define AN_RID_RSSI_MAP 0xFF04 /* RSSI <-> dBm table */ |
|
646#define AN_RID_STATUS 0xFF50 /* Current status info */ 647#define AN_RID_BEACONS_HST 0xFF51 648#define AN_RID_BUSY_HST 0xFF52 649#define AN_RID_RETRIES_HST 0xFF53 650 651/* 652 * Statistics 653 */ --- 98 unchanged lines hidden --- | 680#define AN_RID_STATUS 0xFF50 /* Current status info */ 681#define AN_RID_BEACONS_HST 0xFF51 682#define AN_RID_BUSY_HST 0xFF52 683#define AN_RID_RETRIES_HST 0xFF53 684 685/* 686 * Statistics 687 */ --- 98 unchanged lines hidden --- |