Changeset 3881
- Timestamp:
- 12/17/08 18:50:08 (3 years ago)
- Files:
-
- madwifi/branches/madwifi-free (copied) (copied from madwifi/branches/madwifi-hal-0.10.5.6) (1 prop)
- madwifi/branches/madwifi-free/hal/ah.h (modified) (34 diffs)
- madwifi/branches/madwifi-free/hal/ah_desc.h (modified) (7 diffs)
- madwifi/branches/madwifi-free/hal/ah_devid.h (modified) (2 diffs)
- madwifi/branches/madwifi-free/hal/ah_soc.h (modified) (3 diffs)
- madwifi/branches/madwifi-free/hal/ar5210 (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210.h (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_attach.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_beacon.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_interrupts.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_keycache.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_misc.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_phy.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_power.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_recv.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_reset.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210_xmit.c (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210desc.h (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210phy.h (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5210reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5210/ar5k_0007.ini (added)
- madwifi/branches/madwifi-free/hal/ar5211 (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211.h (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_attach.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_beacon.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_interrupts.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_keycache.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_misc.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_phy.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_power.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_recv.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_reset.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211_xmit.c (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211desc.h (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211phy.h (added)
- madwifi/branches/madwifi-free/hal/ar5211/ar5211reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5211/boss.ini (added)
- madwifi/branches/madwifi-free/hal/ar5212 (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar2316.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar2317.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar2413.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar2425.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5111.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5112.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212.h (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212.ini (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_ani.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_attach.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_beacon.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_eeprom.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_gpio.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_interrupts.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_keycache.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_misc.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_phy.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_power.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_recv.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_reset.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_rfgain.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212_xmit.c (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212desc.h (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212phy.h (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5212reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5311reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5212/ar5413.c (added)
- madwifi/branches/madwifi-free/hal/ar5312 (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312.h (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_attach.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_eeprom.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_gpio.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_interrupts.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_misc.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_power.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312_reset.c (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312phy.h (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5312reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5312/ar5315_gpio.c (added)
- madwifi/branches/madwifi-free/hal/ar5416 (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar2133.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416.h (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416.ini (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_ani.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_attach.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_beacon.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_cal.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_cal.h (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_cal_adcdc.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_cal_adcgain.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_cal_iq.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_eeprom.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_gpio.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_interrupts.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_keycache.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_misc.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_phy.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_power.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_recv.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_reset.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416_xmit.c (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416desc.h (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416phy.h (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar5416reg.h (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar9160.ini (added)
- madwifi/branches/madwifi-free/hal/ar5416/ar9160_attach.c (added)
- madwifi/branches/madwifi-hal-0.10.5.6/hal/public (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/branches/madwifi-free
- Property svn:mergeinfo set
madwifi/branches/madwifi-free/hal/ah.h
r3698 r3881 1 /* -2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting , Atheros3 * Co mmunications, Inc. All rights reserved.1 /* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the following conditions are met: 7 * 1. The materials contained herein are unmodified and are used 8 * unmodified. 9 * 2. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following NO 11 * ''WARRANTY'' disclaimer below (''Disclaimer''), without 12 * modification. 13 * 3. Redistributions in binary form must reproduce at minimum a 14 * disclaimer similar to the Disclaimer below and any redistribution 15 * must be conditioned upon including a substantially similar 16 * Disclaimer requirement for further binary redistribution. 17 * 4. Neither the names of the above-listed copyright holders nor the 18 * names of any contributors may be used to endorse or promote 19 * product derived from this software without specific prior written 20 * permission. 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 21 8 * 22 * NO WARRANTY 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, 26 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 28 * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGES. 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 35 16 * 36 17 * $Id$ … … 47 28 * reference as the first parameter. 48 29 */ 49 50 /*51 * Bus i/o type definitions. We define a platform-independent52 * set of types that are mapped to platform-dependent data for53 * register read/write operations. We use types that are large54 * enough to hold a pointer; smaller data should fit and only55 * require type coercion to work. Larger data can be stored56 * elsewhere and a reference passed for the bus tag and/or handle.57 */58 typedef void* HAL_SOFTC; /* pointer to driver/OS state */59 typedef void* HAL_BUS_TAG; /* opaque bus i/o id tag */60 typedef void* HAL_BUS_HANDLE; /* opaque bus i/o handle */61 30 62 31 #include "ah_osdep.h" … … 123 92 HAL_CAP_MCAST_KEYSRCH = 19, /* hardware has multicast key search */ 124 93 HAL_CAP_TSF_ADJUST = 20, /* hardware has beacon tsf adjust */ 125 HAL_CAP_XR = 21, /* hardware has XR support*/94 /* 21 was HAL_CAP_XR */ 126 95 HAL_CAP_WME_TKIPMIC = 22, /* hardware can support TKIP MIC when WMM is turned on */ 127 HAL_CAP_CHAN_HALFRATE = 23, /* hardware can support half rate channels*/128 HAL_CAP_CHAN_QUARTERRATE = 24, /* hardware can support quarter rate channels*/96 /* 23 was HAL_CAP_CHAN_HALFRATE */ 97 /* 24 was HAL_CAP_CHAN_QUARTERRATE */ 129 98 HAL_CAP_RFSILENT = 25, /* hardware has rfsilent support */ 130 99 HAL_CAP_TPC_ACK = 26, /* ack txpower with per-packet tpc */ … … 134 103 HAL_CAP_RXORN_FATAL = 30, /* HAL_INT_RXORN treated as fatal */ 135 104 HAL_CAP_HT = 31, /* hardware can support HT */ 136 HAL_CAP_ NUMTXCHAIN = 32, /* #TX chains supported */137 HAL_CAP_ NUMRXCHAIN = 33, /* #RX chains supported */105 HAL_CAP_TX_CHAINMASK = 32, /* mask of TX chains supported */ 106 HAL_CAP_RX_CHAINMASK = 33, /* mask of RX chains supported */ 138 107 HAL_CAP_RXTSTAMP_PREC = 34, /* rx desc tstamp precision (bits) */ 108 HAL_CAP_BB_HANG = 35, /* can baseband hang */ 109 HAL_CAP_MAC_HANG = 36, /* can MAC hang */ 139 110 } HAL_CAPABILITY_TYPE; 140 111 … … 180 151 HAL_WME_AC_VO = 3, /* voice access category */ 181 152 HAL_WME_UPSD = 4, /* uplink power save */ 182 HAL_XR_DATA = 5, /* uplink power save */183 153 } HAL_TX_QUEUE_SUBTYPE; 184 154 … … 268 238 269 239 typedef struct { 270 u _int32_t tqi_ver; /* hal TXQ version */240 uint32_t tqi_ver; /* hal TXQ version */ 271 241 HAL_TX_QUEUE_SUBTYPE tqi_subtype; /* subtype if applicable */ 272 242 HAL_TX_QUEUE_FLAGS tqi_qflags; /* flags (see above) */ 273 u _int32_t tqi_priority; /* (not used) */274 u _int32_t tqi_aifs; /* aifs */275 u _int32_t tqi_cwmin; /* cwMin */276 u _int32_t tqi_cwmax; /* cwMax */277 u _int16_t tqi_shretry; /* rts retry limit */278 u _int16_t tqi_lgretry; /* long retry limit (not used)*/279 u _int32_t tqi_cbrPeriod; /* CBR period (us) */280 u _int32_t tqi_cbrOverflowLimit; /* threshold for CBROVF int */281 u _int32_t tqi_burstTime; /* max burst duration (us) */282 u _int32_t tqi_readyTime; /* frame schedule time (us) */283 u _int32_t tqi_compBuf; /* comp buffer phys addr */243 uint32_t tqi_priority; /* (not used) */ 244 uint32_t tqi_aifs; /* aifs */ 245 uint32_t tqi_cwmin; /* cwMin */ 246 uint32_t tqi_cwmax; /* cwMax */ 247 uint16_t tqi_shretry; /* rts retry limit */ 248 uint16_t tqi_lgretry; /* long retry limit (not used)*/ 249 uint32_t tqi_cbrPeriod; /* CBR period (us) */ 250 uint32_t tqi_cbrOverflowLimit; /* threshold for CBROVF int */ 251 uint32_t tqi_burstTime; /* max burst duration (us) */ 252 uint32_t tqi_readyTime; /* frame schedule time (us) */ 253 uint32_t tqi_compBuf; /* comp buffer phys addr */ 284 254 } HAL_TXQ_INFO; 285 255 … … 287 257 288 258 /* token to use for aifs, cwmin, cwmax */ 289 #define HAL_TXQ_USEDEFAULT ((u _int32_t) -1)259 #define HAL_TXQ_USEDEFAULT ((uint32_t) -1) 290 260 291 261 /* compression definitions */ … … 320 290 HAL_RX_FILTER_BEACON = 0x00000010, /* Allow beacon frames */ 321 291 HAL_RX_FILTER_PROM = 0x00000020, /* Promiscuous mode */ 322 HAL_RX_FILTER_XRPOLL = 0x00000040, /* Allow XR poll frmae */323 292 HAL_RX_FILTER_PROBEREQ = 0x00000080, /* Allow probe request frames */ 324 293 HAL_RX_FILTER_PHYERR = 0x00000100, /* Allow phy errors */ … … 363 332 HAL_INT_GPIO = 0x01000000, 364 333 HAL_INT_CABEND = 0x02000000, /* Non-common mapping */ 334 HAL_INT_TSFOOR = 0x04000000, /* Non-common mapping */ 365 335 HAL_INT_CST = 0x10000000, /* Non-common mapping */ 366 336 HAL_INT_GTT = 0x20000000, /* Non-common mapping */ … … 397 367 */ 398 368 typedef struct { 399 u _int32_t channelFlags; /* see below */400 u _int16_t channel; /* setting in Mhz */401 u _int8_tprivFlags;369 uint32_t channelFlags; /* see below */ 370 uint16_t channel; /* setting in Mhz */ 371 uint8_t privFlags; 402 372 int8_t maxRegTxPower; /* max regulatory tx power in dBm */ 403 373 int8_t maxTxPower; /* max true tx power in 0.5 dBm */ … … 414 384 #define CHANNEL_PASSIVE 0x00200 /* Only passive scan allowed in the channel */ 415 385 #define CHANNEL_DYN 0x00400 /* dynamic CCK-OFDM channel */ 416 #define CHANNEL_XR 0x00800 /* XR channel */417 386 #define CHANNEL_STURBO 0x02000 /* Static turbo, no 11a-only usage */ 418 387 #define CHANNEL_HALF 0x04000 /* Half rate channel */ … … 442 411 #define CHANNEL_108G (CHANNEL_2GHZ|CHANNEL_OFDM|CHANNEL_TURBO) 443 412 #define CHANNEL_108A CHANNEL_T 444 #define CHANNEL_X (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_XR)445 413 #define CHANNEL_G_HT20 (CHANNEL_G|CHANNEL_HT20) 446 414 #define CHANNEL_A_HT20 (CHANNEL_A|CHANNEL_HT20) … … 460 428 461 429 typedef struct { 462 u _int32_t ackrcv_bad;463 u _int32_t rts_bad;464 u _int32_t rts_good;465 u _int32_t fcs_bad;466 u _int32_t beacons;430 uint32_t ackrcv_bad; 431 uint32_t rts_bad; 432 uint32_t rts_good; 433 uint32_t fcs_bad; 434 uint32_t beacons; 467 435 } HAL_MIB_STATS; 468 436 469 typedef u _int16_t HAL_CTRY_CODE; /* country code */470 typedef u _int16_t HAL_REG_DOMAIN; /* regulatory domain code */437 typedef uint16_t HAL_CTRY_CODE; /* country code */ 438 typedef uint16_t HAL_REG_DOMAIN; /* regulatory domain code */ 471 439 472 440 enum { … … 485 453 HAL_MODE_11G = 0x008, /* XXX historical */ 486 454 #endif 487 HAL_MODE_108G = 0x020, /* 11a+Turbo channels */ 488 HAL_MODE_108A = 0x040, /* 11g+Turbo channels */ 489 HAL_MODE_XR = 0x100, /* XR channels */ 490 HAL_MODE_11A_HALF_RATE = 0x200, /* 11A half rate channels */ 491 HAL_MODE_11A_QUARTER_RATE = 0x400, /* 11A quarter rate channels */ 455 HAL_MODE_108G = 0x020, /* 11g+Turbo channels */ 456 HAL_MODE_108A = 0x040, /* 11a+Turbo channels */ 457 HAL_MODE_11A_HALF_RATE = 0x200, /* 11a half width channels */ 458 HAL_MODE_11A_QUARTER_RATE = 0x400, /* 11a quarter width channels */ 459 HAL_MODE_11G_HALF_RATE = 0x800, /* 11g half width channels */ 460 HAL_MODE_11G_QUARTER_RATE = 0x1000, /* 11g quarter width channels */ 492 461 HAL_MODE_11NG_HT20 = 0x008000, 493 462 HAL_MODE_11NA_HT20 = 0x010000, … … 501 470 typedef struct { 502 471 int rateCount; /* NB: for proper padding */ 503 u _int8_trateCodeToIndex[144]; /* back mapping */472 uint8_t rateCodeToIndex[144]; /* back mapping */ 504 473 struct { 505 u _int8_t valid; /* valid for rate control use */506 u _int8_t phy; /* CCK/OFDM/XR */507 u _int32_t rateKbps; /* transfer rate in kbs */508 u _int8_trateCode; /* rate for h/w descriptors */509 u _int8_tshortPreamble; /* mask for enabling short474 uint8_t valid; /* valid for rate control use */ 475 uint8_t phy; /* CCK/OFDM/XR */ 476 uint32_t rateKbps; /* transfer rate in kbs */ 477 uint8_t rateCode; /* rate for h/w descriptors */ 478 uint8_t shortPreamble; /* mask for enabling short 510 479 * preamble in CCK rate code */ 511 u _int8_tdot11Rate; /* value for supported rates480 uint8_t dot11Rate; /* value for supported rates 512 481 * info element of MLME */ 513 u _int8_tcontrolRate; /* index of next lower basic482 uint8_t controlRate; /* index of next lower basic 514 483 * rate; used for dur. calcs */ 515 u _int16_t lpAckDuration; /* long preamble ACK duration */516 u _int16_t spAckDuration; /* short preamble ACK duration*/484 uint16_t lpAckDuration; /* long preamble ACK duration */ 485 uint16_t spAckDuration; /* short preamble ACK duration*/ 517 486 } info[32]; 518 487 } HAL_RATE_TABLE; … … 520 489 typedef struct { 521 490 u_int rs_count; /* number of valid entries */ 522 u _int8_t rs_rates[32]; /* rates */491 uint8_t rs_rates[32]; /* rates */ 523 492 } HAL_RATE_SET; 524 493 … … 583 552 584 553 typedef struct { 585 u _int8_tkv_type; /* one of HAL_CIPHER */586 u _int8_tkv_pad;587 u _int16_t kv_len; /* length in bits */588 u _int8_tkv_val[16]; /* enough for 128-bit keys */589 u _int8_tkv_mic[8]; /* TKIP MIC key */590 u _int8_tkv_txmic[8]; /* TKIP TX MIC key (optional) */554 uint8_t kv_type; /* one of HAL_CIPHER */ 555 uint8_t kv_pad; 556 uint16_t kv_len; /* length in bits */ 557 uint8_t kv_val[16]; /* enough for 128-bit keys */ 558 uint8_t kv_mic[8]; /* TKIP MIC key */ 559 uint8_t kv_txmic[8]; /* TKIP TX MIC key (optional) */ 591 560 } HAL_KEYVAL; 592 561 … … 616 585 */ 617 586 typedef struct { 618 u _int32_t bs_nexttbtt; /* next beacon in TU */619 u _int32_t bs_nextdtim; /* next DTIM in TU */620 u _int32_t bs_intval; /* beacon interval+flags */587 uint32_t bs_nexttbtt; /* next beacon in TU */ 588 uint32_t bs_nextdtim; /* next DTIM in TU */ 589 uint32_t bs_intval; /* beacon interval+flags */ 621 590 #define HAL_BEACON_PERIOD 0x0000ffff /* beacon interval period */ 622 591 #define HAL_BEACON_ENA 0x00800000 /* beacon xmit enable */ 623 592 #define HAL_BEACON_RESET_TSF 0x01000000 /* clear TSF */ 624 u _int32_t bs_dtimperiod;625 u _int16_t bs_cfpperiod; /* CFP period in TU */626 u _int16_t bs_cfpmaxduration; /* max CFP duration in TU */627 u _int32_t bs_cfpnext; /* next CFP in TU */628 u _int16_t bs_timoffset; /* byte offset to TIM bitmap */629 u _int16_t bs_bmissthreshold; /* beacon miss threshold */630 u _int32_t bs_sleepduration; /* max sleep duration */593 uint32_t bs_dtimperiod; 594 uint16_t bs_cfpperiod; /* CFP period in TU */ 595 uint16_t bs_cfpmaxduration; /* max CFP duration in TU */ 596 uint32_t bs_cfpnext; /* next CFP in TU */ 597 uint16_t bs_timoffset; /* byte offset to TIM bitmap */ 598 uint16_t bs_bmissthreshold; /* beacon miss threshold */ 599 uint32_t bs_sleepduration; /* max sleep duration */ 631 600 } HAL_BEACON_STATE; 632 601 … … 636 605 */ 637 606 typedef struct { 638 u _int32_t bt_intval; /* beacon interval+flags */639 u _int32_t bt_nexttbtt; /* next beacon in TU */640 u _int32_t bt_nextatim; /* next ATIM in TU */641 u _int32_t bt_nextdba; /* next DBA in 1/8th TU */642 u _int32_t bt_nextswba; /* next SWBA in 1/8th TU */643 u _int32_t bt_flags; /* timer enables */607 uint32_t bt_intval; /* beacon interval+flags */ 608 uint32_t bt_nexttbtt; /* next beacon in TU */ 609 uint32_t bt_nextatim; /* next ATIM in TU */ 610 uint32_t bt_nextdba; /* next DBA in 1/8th TU */ 611 uint32_t bt_nextswba; /* next SWBA in 1/8th TU */ 612 uint32_t bt_flags; /* timer enables */ 644 613 #define HAL_BEACON_TBTT_EN 0x00000001 645 614 #define HAL_BEACON_DBA_EN 0x00000002 … … 652 621 */ 653 622 typedef struct { 654 u _int32_t ns_avgbrssi; /* average beacon rssi */655 u _int32_t ns_avgrssi; /* average data rssi */656 u _int32_t ns_avgtxrssi; /* average tx rssi */623 uint32_t ns_avgbrssi; /* average beacon rssi */ 624 uint32_t ns_avgrssi; /* average data rssi */ 625 uint32_t ns_avgtxrssi; /* average tx rssi */ 657 626 } HAL_NODE_STATS; 658 627 … … 674 643 */ 675 644 struct ath_hal { 676 u _int32_t ah_magic; /* consistency check magic number */677 u _int32_t ah_abi; /* HAL ABI version */678 #define HAL_ABI_VERSION 0x08 052700 /* YYMMDDnn */679 u _int16_t ah_devid; /* PCI device ID */680 u _int16_t ah_subvendorid; /* PCI subvendor ID */645 uint32_t ah_magic; /* consistency check magic number */ 646 uint32_t ah_abi; /* HAL ABI version */ 647 #define HAL_ABI_VERSION 0x08112800 /* YYMMDDnn */ 648 uint16_t ah_devid; /* PCI device ID */ 649 uint16_t ah_subvendorid; /* PCI subvendor ID */ 681 650 HAL_SOFTC ah_sc; /* back pointer to driver/os state */ 682 651 HAL_BUS_TAG ah_st; /* params for register r+w */ … … 684 653 HAL_CTRY_CODE ah_countryCode; 685 654 686 u _int32_t ah_macVersion; /* MAC version id */687 u _int16_t ah_macRev; /* MAC revision */688 u _int16_t ah_phyRev; /* PHY revision */655 uint32_t ah_macVersion; /* MAC version id */ 656 uint16_t ah_macRev; /* MAC revision */ 657 uint16_t ah_phyRev; /* PHY revision */ 689 658 /* NB: when only one radio is present the rev is in 5Ghz */ 690 u _int16_t ah_analog5GhzRev;/* 5GHz radio revision */691 u _int16_t ah_analog2GhzRev;/* 2GHz radio revision */659 uint16_t ah_analog5GhzRev;/* 5GHz radio revision */ 660 uint16_t ah_analog2GhzRev;/* 2GHz radio revision */ 692 661 693 662 const HAL_RATE_TABLE *__ahdecl(*ah_getRateTable)(struct ath_hal *, … … 702 671 HAL_BOOL __ahdecl(*ah_disable)(struct ath_hal *); 703 672 void __ahdecl(*ah_setPCUConfig)(struct ath_hal *); 704 HAL_BOOL __ahdecl(*ah_perCalibration)(struct ath_hal*, HAL_CHANNEL *, HAL_BOOL *); 705 HAL_BOOL __ahdecl(*ah_setTxPowerLimit)(struct ath_hal *, u_int32_t); 706 707 /* DFS support */ 708 HAL_BOOL __ahdecl(*ah_radarWait)(struct ath_hal *, HAL_CHANNEL *); 673 HAL_BOOL __ahdecl(*ah_perCalibration)(struct ath_hal*, HAL_CHANNEL *, 674 HAL_BOOL *); 675 HAL_BOOL __ahdecl(*ah_perCalibrationN)(struct ath_hal *, HAL_CHANNEL *, 676 u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone); 677 HAL_BOOL __ahdecl(*ah_resetCalValid)(struct ath_hal *, HAL_CHANNEL *); 678 HAL_BOOL __ahdecl(*ah_setTxPowerLimit)(struct ath_hal *, uint32_t); 709 679 710 680 /* Transmit functions */ … … 719 689 HAL_BOOL __ahdecl(*ah_releaseTxQueue)(struct ath_hal *ah, u_int q); 720 690 HAL_BOOL __ahdecl(*ah_resetTxQueue)(struct ath_hal *ah, u_int q); 721 u _int32_t __ahdecl(*ah_getTxDP)(struct ath_hal*, u_int);722 HAL_BOOL __ahdecl(*ah_setTxDP)(struct ath_hal*, u_int, u _int32_t txdp);723 u _int32_t __ahdecl(*ah_numTxPending)(struct ath_hal *, u_int q);691 uint32_t __ahdecl(*ah_getTxDP)(struct ath_hal*, u_int); 692 HAL_BOOL __ahdecl(*ah_setTxDP)(struct ath_hal*, u_int, uint32_t txdp); 693 uint32_t __ahdecl(*ah_numTxPending)(struct ath_hal *, u_int q); 724 694 HAL_BOOL __ahdecl(*ah_startTxDma)(struct ath_hal*, u_int); 725 695 HAL_BOOL __ahdecl(*ah_stopTxDma)(struct ath_hal*, u_int); … … 741 711 HAL_STATUS __ahdecl(*ah_procTxDesc)(struct ath_hal *, 742 712 struct ath_desc *, struct ath_tx_status *); 743 void __ahdecl(*ah_getTxIntrQueue)(struct ath_hal *, u _int32_t *);713 void __ahdecl(*ah_getTxIntrQueue)(struct ath_hal *, uint32_t *); 744 714 void __ahdecl(*ah_reqTxIntrDesc)(struct ath_hal *, struct ath_desc*); 745 715 746 716 /* Receive Functions */ 747 u _int32_t __ahdecl(*ah_getRxDP)(struct ath_hal*);748 void __ahdecl(*ah_setRxDP)(struct ath_hal*, u _int32_t rxdp);717 uint32_t __ahdecl(*ah_getRxDP)(struct ath_hal*); 718 void __ahdecl(*ah_setRxDP)(struct ath_hal*, uint32_t rxdp); 749 719 void __ahdecl(*ah_enableReceive)(struct ath_hal*); 750 720 HAL_BOOL __ahdecl(*ah_stopDmaReceive)(struct ath_hal*); … … 752 722 void __ahdecl(*ah_stopPcuReceive)(struct ath_hal*); 753 723 void __ahdecl(*ah_setMulticastFilter)(struct ath_hal*, 754 u _int32_t filter0, u_int32_t filter1);724 uint32_t filter0, uint32_t filter1); 755 725 HAL_BOOL __ahdecl(*ah_setMulticastFilterIndex)(struct ath_hal*, 756 u _int32_t index);726 uint32_t index); 757 727 HAL_BOOL __ahdecl(*ah_clrMulticastFilterIndex)(struct ath_hal*, 758 u _int32_t index);759 u _int32_t __ahdecl(*ah_getRxFilter)(struct ath_hal*);760 void __ahdecl(*ah_setRxFilter)(struct ath_hal*, u _int32_t);728 uint32_t index); 729 uint32_t __ahdecl(*ah_getRxFilter)(struct ath_hal*); 730 void __ahdecl(*ah_setRxFilter)(struct ath_hal*, uint32_t); 761 731 HAL_BOOL __ahdecl(*ah_setupRxDesc)(struct ath_hal *, struct ath_desc *, 762 u _int32_t size, u_int flags);732 uint32_t size, u_int flags); 763 733 HAL_STATUS __ahdecl(*ah_procRxDesc)(struct ath_hal *, 764 struct ath_desc *, u _int32_t phyAddr,765 struct ath_desc *next, u _int64_t tsf,734 struct ath_desc *, uint32_t phyAddr, 735 struct ath_desc *next, uint64_t tsf, 766 736 struct ath_rx_status *); 767 737 void __ahdecl(*ah_rxMonitor)(struct ath_hal *, … … 772 742 /* Misc Functions */ 773 743 HAL_STATUS __ahdecl(*ah_getCapability)(struct ath_hal *, 774 HAL_CAPABILITY_TYPE, u _int32_t capability,775 u _int32_t *result);744 HAL_CAPABILITY_TYPE, uint32_t capability, 745 uint32_t *result); 776 746 HAL_BOOL __ahdecl(*ah_setCapability)(struct ath_hal *, 777 HAL_CAPABILITY_TYPE, u _int32_t capability,778 u _int32_t setting, HAL_STATUS *);747 HAL_CAPABILITY_TYPE, uint32_t capability, 748 uint32_t setting, HAL_STATUS *); 779 749 HAL_BOOL __ahdecl(*ah_getDiagState)(struct ath_hal *, int request, 780 const void *args, u _int32_t argsize,781 void **result, u _int32_t *resultsize);782 void __ahdecl(*ah_getMacAddress)(struct ath_hal *, u _int8_t *);783 HAL_BOOL __ahdecl(*ah_setMacAddress)(struct ath_hal *, const u _int8_t*);784 void __ahdecl(*ah_getBssIdMask)(struct ath_hal *, u _int8_t *);785 HAL_BOOL __ahdecl(*ah_setBssIdMask)(struct ath_hal *, const u _int8_t*);750 const void *args, uint32_t argsize, 751 void **result, uint32_t *resultsize); 752 void __ahdecl(*ah_getMacAddress)(struct ath_hal *, uint8_t *); 753 HAL_BOOL __ahdecl(*ah_setMacAddress)(struct ath_hal *, const uint8_t*); 754 void __ahdecl(*ah_getBssIdMask)(struct ath_hal *, uint8_t *); 755 HAL_BOOL __ahdecl(*ah_setBssIdMask)(struct ath_hal *, const uint8_t*); 786 756 HAL_BOOL __ahdecl(*ah_setRegulatoryDomain)(struct ath_hal*, 787 u _int16_t, HAL_STATUS *);757 uint16_t, HAL_STATUS *); 788 758 void __ahdecl(*ah_setLedState)(struct ath_hal*, HAL_LED_STATE); 789 759 void __ahdecl(*ah_writeAssocid)(struct ath_hal*, 790 const u _int8_t *bssid, u_int16_t assocId);791 HAL_BOOL __ahdecl(*ah_gpioCfgOutput)(struct ath_hal *, u _int32_t gpio);792 HAL_BOOL __ahdecl(*ah_gpioCfgInput)(struct ath_hal *, u _int32_t gpio);793 u _int32_t __ahdecl(*ah_gpioGet)(struct ath_hal *, u_int32_t gpio);760 const uint8_t *bssid, uint16_t assocId); 761 HAL_BOOL __ahdecl(*ah_gpioCfgOutput)(struct ath_hal *, uint32_t gpio); 762 HAL_BOOL __ahdecl(*ah_gpioCfgInput)(struct ath_hal *, uint32_t gpio); 763 uint32_t __ahdecl(*ah_gpioGet)(struct ath_hal *, uint32_t gpio); 794 764 HAL_BOOL __ahdecl(*ah_gpioSet)(struct ath_hal *, 795 u _int32_t gpio, u_int32_t val);796 void __ahdecl(*ah_gpioSetIntr)(struct ath_hal*, u_int, u _int32_t);797 u _int32_t __ahdecl(*ah_getTsf32)(struct ath_hal*);798 u _int64_t __ahdecl(*ah_getTsf64)(struct ath_hal*);765 uint32_t gpio, uint32_t val); 766 void __ahdecl(*ah_gpioSetIntr)(struct ath_hal*, u_int, uint32_t); 767 uint32_t __ahdecl(*ah_getTsf32)(struct ath_hal*); 768 uint64_t __ahdecl(*ah_getTsf64)(struct ath_hal*); 799 769 void __ahdecl(*ah_resetTsf)(struct ath_hal*); 800 770 HAL_BOOL __ahdecl(*ah_detectCardPresent)(struct ath_hal*); … … 817 787 HAL_BOOL __ahdecl(*ah_setCTSTimeout)(struct ath_hal*, u_int); 818 788 u_int __ahdecl(*ah_getCTSTimeout)(struct ath_hal*); 819 HAL_BOOL __ahdecl(*ah_setDecompMask)(struct ath_hal*, u _int16_t, int);820 void __ahdecl(*ah_setCoverageClass)(struct ath_hal*, u _int8_t, int);789 HAL_BOOL __ahdecl(*ah_setDecompMask)(struct ath_hal*, uint16_t, int); 790 void __ahdecl(*ah_setCoverageClass)(struct ath_hal*, uint8_t, int); 821 791 822 792 /* Key Cache Functions */ 823 u _int32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*);824 HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, u _int16_t);793 uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*); 794 HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, uint16_t); 825 795 HAL_BOOL __ahdecl(*ah_isKeyCacheEntryValid)(struct ath_hal *, 826 u _int16_t);796 uint16_t); 827 797 HAL_BOOL __ahdecl(*ah_setKeyCacheEntry)(struct ath_hal*, 828 u _int16_t, const HAL_KEYVAL *,829 const u _int8_t *, int);798 uint16_t, const HAL_KEYVAL *, 799 const uint8_t *, int); 830 800 HAL_BOOL __ahdecl(*ah_setKeyCacheEntryMac)(struct ath_hal*, 831 u _int16_t, const u_int8_t *);801 uint16_t, const uint8_t *); 832 802 833 803 /* Power Management Functions */ … … 842 812 /* NB: deprecated, use ah_setBeaconTimers instead */ 843 813 void __ahdecl(*ah_beaconInit)(struct ath_hal *, 844 u _int32_t nexttbtt, u_int32_t intval);814 uint32_t nexttbtt, uint32_t intval); 845 815 void __ahdecl(*ah_setStationBeaconTimers)(struct ath_hal*, 846 816 const HAL_BEACON_STATE *); … … 859 829 * AH_NULL is returned if the ID's do not describe Atheros hardware. 860 830 */ 861 extern const char *__ahdecl ath_hal_probe(u _int16_t vendorid, u_int16_t devid);831 extern const char *__ahdecl ath_hal_probe(uint16_t vendorid, uint16_t devid); 862 832 863 833 /* … … 874 844 * be returned if the status parameter is non-zero. 875 845 */ 876 extern struct ath_hal * __ahdecl ath_hal_attach(u _int16_t devid, HAL_SOFTC,846 extern struct ath_hal * __ahdecl ath_hal_attach(uint16_t devid, HAL_SOFTC, 877 847 HAL_BUS_TAG, HAL_BUS_HANDLE, HAL_STATUS* status); 878 879 /*880 * Set the Vendor ID for Vendor SKU's which can modify the881 * channel properties returned by ath_hal_init_channels.882 */883 extern HAL_BOOL __ahdecl ath_hal_setvendor(struct ath_hal *, u_int32_t );884 848 885 849 /* … … 896 860 extern HAL_BOOL __ahdecl ath_hal_init_channels(struct ath_hal *, 897 861 HAL_CHANNEL *chans, u_int maxchans, u_int *nchans, 898 u _int8_t *regclassids, u_int maxregids, u_int *nregids,862 uint8_t *regclassids, u_int maxregids, u_int *nregids, 899 863 HAL_CTRY_CODE cc, u_int modeSelect, 900 864 HAL_BOOL enableOutdoor, HAL_BOOL enableExtendedChannels); … … 914 878 * Calculate the transmit duration of a frame. 915 879 */ 916 extern u _int16_t __ahdecl ath_hal_computetxtime(struct ath_hal *,917 const HAL_RATE_TABLE *rates, u _int32_t frameLen,918 u _int16_t rateix, HAL_BOOL shortPreamble);880 extern uint16_t __ahdecl ath_hal_computetxtime(struct ath_hal *, 881 const HAL_RATE_TABLE *rates, uint32_t frameLen, 882 uint16_t rateix, HAL_BOOL shortPreamble); 919 883 920 884 /* … … 933 897 */ 934 898 extern int __ahdecl ath_hal_mhz2ieee(struct ath_hal *, u_int mhz, u_int flags); 935 936 /*937 * Return a version string for the HAL release.938 */939 extern char ath_hal_version[];940 /*941 * Return a NULL-terminated array of build/configuration options.942 */943 extern const char* ath_hal_buildopts[];944 899 #endif /* _ATH_AH_H_ */ madwifi/branches/madwifi-free/hal/ah_desc.h
r3698 r3881 1 /*- 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting, Atheros 3 * Communications, Inc. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the following conditions are met: 7 * 1. The materials contained herein are unmodified and are used 8 * unmodified. 9 * 2. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following NO 11 * ''WARRANTY'' disclaimer below (''Disclaimer''), without 12 * modification. 13 * 3. Redistributions in binary form must reproduce at minimum a 14 * disclaimer similar to the Disclaimer below and any redistribution 15 * must be conditioned upon including a substantially similar 16 * Disclaimer requirement for further binary redistribution. 17 * 4. Neither the names of the above-listed copyright holders nor the 18 * names of any contributors may be used to endorse or promote 19 * product derived from this software without specific prior written 20 * permission. 21 * 22 * NO WARRANTY 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, 26 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 28 * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGES. 1 /* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 35 16 * 36 17 * $Id$ … … 52 33 */ 53 34 struct ath_tx_status { 54 u _int16_t ts_seqnum; /* h/w assigned sequence number */55 u _int16_t ts_tstamp; /* h/w assigned timestamp */56 u _int8_tts_status; /* frame status, 0 => xmit ok */57 u _int8_tts_rate; /* h/w transmit rate index */35 uint16_t ts_seqnum; /* h/w assigned sequence number */ 36 uint16_t ts_tstamp; /* h/w assigned timestamp */ 37 uint8_t ts_status; /* frame status, 0 => xmit ok */ 38 uint8_t ts_rate; /* h/w transmit rate index */ 58 39 #define HAL_TXSTAT_ALTRATE 0x80 /* alternate xmit rate used */ 59 40 int8_t ts_rssi; /* tx ack RSSI */ 60 u _int8_tts_shortretry; /* # short retries */61 u _int8_tts_longretry; /* # long retries */62 u _int8_tts_virtcol; /* virtual collision count */63 u _int8_tts_antenna; /* antenna information */64 u _int8_tts_finaltsi; /* final transmit series index */41 uint8_t ts_shortretry; /* # short retries */ 42 uint8_t ts_longretry; /* # long retries */ 43 uint8_t ts_virtcol; /* virtual collision count */ 44 uint8_t ts_antenna; /* antenna information */ 45 uint8_t ts_finaltsi; /* final transmit series index */ 65 46 #ifdef AH_SUPPORT_AR5416 66 47 /* 802.11n status */ 67 u _int8_t ts_flags; /* misc flags */48 uint8_t ts_flags; /* misc flags */ 68 49 int8_t ts_rssi_ctl[3]; /* tx ack RSSI [ctl, chain 0-2] */ 69 50 int8_t ts_rssi_ext[3]; /* tx ack RSSI [ext, chain 0-2] */ 70 51 /* #define ts_rssi ts_rssi_combined */ 71 u _int32_t ts_ba_low; /* blockack bitmap low */72 u _int32_t ts_ba_high; /* blockack bitmap high */73 u _int32_t ts_evm0; /* evm bytes */74 u _int32_t ts_evm1;75 u _int32_t ts_evm2;52 uint32_t ts_ba_low; /* blockack bitmap low */ 53 uint32_t ts_ba_high; /* blockack bitmap high */ 54 uint32_t ts_evm0; /* evm bytes */ 55 uint32_t ts_evm1; 56 uint32_t ts_evm2; 76 57 #endif /* AH_SUPPORT_AR5416 */ 77 58 }; … … 82 63 #define HAL_TXERR_FIFO 0x04 /* fifo underrun */ 83 64 #define HAL_TXERR_XTXOP 0x08 /* txop exceeded */ 84 #define HAL_TXERR_DESC_CFG_ERR 0x10 /* Error in 20/40 desc config */ 85 #define HAL_TXERR_DATA_UNDERRUN 0x20 /* Tx buffer underrun */ 86 #define HAL_TXERR_DELIM_UNDERRUN 0x40 /* Tx delimiter underrun */ 65 #define HAL_TXERR_TIMER_EXPIRED 0x10 /* Tx timer expired */ 87 66 88 67 /* bits found in ts_flags */ 89 68 #define HAL_TX_BA 0x01 /* Block Ack seen */ 90 69 #define HAL_TX_AGGR 0x02 /* Aggregate */ 70 #define HAL_TX_DESC_CFG_ERR 0x10 /* Error in 20/40 desc config */ 71 #define HAL_TX_DATA_UNDERRUN 0x20 /* Tx buffer underrun */ 72 #define HAL_TX_DELIM_UNDERRUN 0x40 /* Tx delimiter underrun */ 91 73 92 74 /* … … 113 95 */ 114 96 struct ath_rx_status { 115 u _int16_t rs_datalen; /* rx frame length */116 u _int8_trs_status; /* rx status, 0 => recv ok */117 u _int8_trs_phyerr; /* phy error code */97 uint16_t rs_datalen; /* rx frame length */ 98 uint8_t rs_status; /* rx status, 0 => recv ok */ 99 uint8_t rs_phyerr; /* phy error code */ 118 100 int8_t rs_rssi; /* rx frame RSSI (combined for 11n) */ 119 u _int8_trs_keyix; /* key cache index */120 u _int8_trs_rate; /* h/w receive rate index */121 u _int8_trs_more; /* more descriptors follow */122 u _int32_t rs_tstamp; /* h/w assigned timestamp */123 u _int32_t rs_antenna; /* antenna information */101 uint8_t rs_keyix; /* key cache index */ 102 uint8_t rs_rate; /* h/w receive rate index */ 103 uint8_t rs_more; /* more descriptors follow */ 104 uint32_t rs_tstamp; /* h/w assigned timestamp */ 105 uint32_t rs_antenna; /* antenna information */ 124 106 #ifdef AH_SUPPORT_AR5416 125 107 /* 802.11n status */ 126 108 int8_t rs_rssi_ctl[3]; /* rx frame RSSI [ctl, chain 0-2] */ 127 109 int8_t rs_rssi_ext[3]; /* rx frame RSSI [ext, chain 0-2] */ 128 u _int8_trs_isaggr; /* is part of the aggregate */129 u _int8_trs_moreaggr; /* more frames in aggr to follow */130 u _int8_trs_num_delims; /* number of delims in aggr */131 u _int8_trs_flags; /* misc flags */132 u _int32_t rs_evm0; /* evm bytes */133 u _int32_t rs_evm1;134 u _int32_t rs_evm2;110 uint8_t rs_isaggr; /* is part of the aggregate */ 111 uint8_t rs_moreaggr; /* more frames in aggr to follow */ 112 uint8_t rs_num_delims; /* number of delims in aggr */ 113 uint8_t rs_flags; /* misc flags */ 114 uint32_t rs_evm0; /* evm bytes */ 115 uint32_t rs_evm1; 116 uint32_t rs_evm2; 135 117 #endif /* AH_SUPPORT_AR5416 */ 136 118 }; … … 151 133 #define HAL_RX_DELIM_CRC_POST 0x20 /* crc error in delim after */ 152 134 #define HAL_RX_DECRYPT_BUSY 0x40 /* decrypt was too slow */ 153 #define HAL_RX_ DUP_FRAME 0x80 /* Dup frame rx'd on control channel */135 #define HAL_RX_HI_RX_CHAIN 0x80 /* SM power save: hi Rx chain control */ 154 136 155 137 enum { … … 178 160 179 161 /* value found in rs_keyix to mark invalid entries */ 180 #define HAL_RXKEYIX_INVALID ((u _int8_t) -1)162 #define HAL_RXKEYIX_INVALID ((uint8_t) -1) 181 163 /* value used to specify no encryption key for xmit */ 182 164 #define HAL_TXKEYIX_INVALID ((u_int) -1) … … 204 186 * should not touch those elements marked opaque. 205 187 */ 206 u _int32_t ds_link; /* phys address of next descriptor */207 u _int32_t ds_data; /* phys address of data buffer */208 u _int32_t ds_ctl0; /* opaque DMA control 0 */209 u _int32_t ds_ctl1; /* opaque DMA control 1 */210 u _int32_t ds_hw[HAL_DESC_HW_SIZE]; /* opaque h/w region */188 uint32_t ds_link; /* phys address of next descriptor */ 189 uint32_t ds_data; /* phys address of data buffer */ 190 uint32_t ds_ctl0; /* opaque DMA control 0 */ 191 uint32_t ds_ctl1; /* opaque DMA control 1 */ 192 uint32_t ds_hw[HAL_DESC_HW_SIZE]; /* opaque h/w region */ 211 193 }; 212 194 madwifi/branches/madwifi-free/hal/ah_devid.h
r3698 r3881 1 /* -2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting , Atheros3 * Co mmunications, Inc. All rights reserved.1 /* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the following conditions are met: 7 * 1. The materials contained herein are unmodified and are used 8 * unmodified. 9 * 2. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following NO 11 * ''WARRANTY'' disclaimer below (''Disclaimer''), without 12 * modification. 13 * 3. Redistributions in binary form must reproduce at minimum a 14 * disclaimer similar to the Disclaimer below and any redistribution 15 * must be conditioned upon including a substantially similar 16 * Disclaimer requirement for further binary redistribution. 17 * 4. Neither the names of the above-listed copyright holders nor the 18 * names of any contributors may be used to endorse or promote 19 * product derived from this software without specific prior written 20 * permission. 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 21 8 * 22 * NO WARRANTY 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, 26 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 28 * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGES. 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 35 16 * 36 17 * $Id$ … … 91 72 #define AR5213_SREV_REG 0x4020 92 73 93 /* AR5416 */ 94 #define AR5416_DEVID_EMU_PCI 0xff1d /* PCI Owl Emulation*/ 95 #define AR5416_DEVID_EMU_PCIE 0xff1c /* PCIe Owl Emulation*/ 96 #define AR5416_DEVID 0x0023 /* PCI (MB/CB) */ 97 #define AR5418_DEVID 0x0024 /* PCI Express (XB) */ 74 /* AR5416 compatible devid's */ 75 #define AR5416_DEVID_PCI 0x0023 /* AR5416 PCI (MB/CB) Owl */ 76 #define AR5416_DEVID_PCIE 0x0024 /* AR5416 PCI-E (XB) Owl */ 77 #define AR9160_DEVID_PCI 0x0027 /* AR9160 PCI Sowl */ 78 #define AR9280_DEVID_PCI 0x0029 /* AR9280 PCI Merlin */ 79 #define AR9280_DEVID_PCIE 0x002a /* AR9280 PCI-E Merlin */ 80 #define AR9285_DEVID_PCIE 0x002b /* AR9285 PCI-E Kite */ 98 81 99 82 #define AR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */ madwifi/branches/madwifi-free/hal/ah_soc.h
r3698 r3881 1 /* -2 * Copyright (c) 200 6-2008 Sam Leffler, Errno Consulting, Atheros3 * Co mmunications, Inc. All rights reserved.1 /* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the following conditions are met: 7 * 1. The materials contained herein are unmodified and are used 8 * unmodified. 9 * 2. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following NO 11 * ''WARRANTY'' disclaimer below (''Disclaimer''), without 12 * modification. 13 * 3. Redistributions in binary form must reproduce at minimum a 14 * disclaimer similar to the Disclaimer below and any redistribution 15 * must be conditioned upon including a substantially similar 16 * Disclaimer requirement for further binary redistribution. 17 * 4. Neither the names of the above-listed copyright holders nor the 18 * names of any contributors may be used to endorse or promote 19 * product derived from this software without specific prior written 20 * permission. 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 21 8 * 22 * NO WARRANTY 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, 26 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE 28 * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 30 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 33 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGES. 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 35 16 * 36 * $Id: //depot/sw/branches/sam_hal/ah_soc.h#4$17 * $Id: ah_soc.h,v 1.4 2008/11/10 04:08:00 sam Exp $ 37 18 */ 38 19 #ifndef _ATH_AH_SOC_H_ … … 51 32 */ 52 33 struct ar531x_boarddata { 53 u _int32_t magic; /* board data is valid */34 uint32_t magic; /* board data is valid */ 54 35 #define AR531X_BD_MAGIC 0x35333131 /* "5311", for all 531x platforms */ 55 u _int16_t cksum; /* checksum (starting with BD_REV 2) */56 u _int16_t rev; /* revision of this struct */36 uint16_t cksum; /* checksum (starting with BD_REV 2) */ 37 uint16_t rev; /* revision of this struct */ 57 38 #define BD_REV 4 58 39 char boardName[64]; /* Name of board */ 59 u _int16_t major; /* Board major number */60 u _int16_t minor; /* Board minor number */61 u _int32_t config; /* Board configuration */40 uint16_t major; /* Board major number */ 41 uint16_t minor; /* Board minor number */ 42 uint32_t config; /* Board configuration */ 62 43 #define BD_ENET0 0x00000001 /* ENET0 is stuffed */ 63 44 #define BD_ENET1 0x00000002 /* ENET1 is stuffed */ … … 78 59 #define BD_WLAN1_2G_EN 0x00020000 /* FLAG for radio0_2G */ 79 60 #define BD_WLAN1_5G_EN 0x00040000 /* FLAG for radio0_2G */ 80 u _int16_t resetConfigGpio; /* Reset factory GPIO pin */81 u _int16_t sysLedGpio; /* System LED GPIO pin */61 uint16_t resetConfigGpio; /* Reset factory GPIO pin */ 62 uint16_t sysLedGpio; /* System LED GPIO pin */ 82 63 83 u _int32_t cpuFreq; /* CPU core frequency in Hz */84 u _int32_t sysFreq; /* System frequency in Hz */85 u _int32_t cntFreq; /* Calculated C0_COUNT frequency */64 uint32_t cpuFreq; /* CPU core frequency in Hz */ 65 uint32_t sysFreq; /* System frequency in Hz */ 66 uint32_t cntFreq; /* Calculated C0_COUNT frequency */ 86 67 87 u _int8_t wlan0Mac[6];88 u _int8_t enet0Mac[6];89 u _int8_t enet1Mac[6];68 uint8_t wlan0Mac[6]; 69 uint8_t enet0Mac[6]; 70 uint8_t enet1Mac[6]; 90 71 91 u _int16_t pciId; /* Pseudo PCIID for common code */92 u _int16_t memCap; /* cap bank1 in MB */72 uint16_t pciId; /* Pseudo PCIID for common code */ 73 uint16_t memCap; /* cap bank1 in MB */ 93 74 94 75 /* version 3 */ 95 u _int8_t wlan1Mac[6]; /* (ar5212) */76 uint8_t wlan1Mac[6]; /* (ar5212) */ 96 77 }; 97 78
