Deleted Added
full compact
if_athvar.h (184368) if_athvar.h (184369)
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * 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

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * 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

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
29 * $FreeBSD: head/sys/dev/ath/if_athvar.h 184368 2008-10-27 18:22:44Z sam $
29 * $FreeBSD: head/sys/dev/ath/if_athvar.h 184369 2008-10-27 18:30:33Z sam $
30 */
31
32/*
33 * Defintions for the Atheros Wireless LAN controller driver.
34 */
35#ifndef _DEV_ATH_ATHVAR_H
36#define _DEV_ATH_ATHVAR_H
37

--- 463 unchanged lines hidden (view full) ---

501#define ath_hal_getcapability(_ah, _cap, _param, _result) \
502 ((*(_ah)->ah_getCapability)((_ah), (_cap), (_param), (_result)))
503#define ath_hal_setcapability(_ah, _cap, _param, _v, _status) \
504 ((*(_ah)->ah_setCapability)((_ah), (_cap), (_param), (_v), (_status)))
505#define ath_hal_ciphersupported(_ah, _cipher) \
506 (ath_hal_getcapability(_ah, HAL_CAP_CIPHER, _cipher, NULL) == HAL_OK)
507#define ath_hal_getregdomain(_ah, _prd) \
508 (ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK)
30 */
31
32/*
33 * Defintions for the Atheros Wireless LAN controller driver.
34 */
35#ifndef _DEV_ATH_ATHVAR_H
36#define _DEV_ATH_ATHVAR_H
37

--- 463 unchanged lines hidden (view full) ---

501#define ath_hal_getcapability(_ah, _cap, _param, _result) \
502 ((*(_ah)->ah_getCapability)((_ah), (_cap), (_param), (_result)))
503#define ath_hal_setcapability(_ah, _cap, _param, _v, _status) \
504 ((*(_ah)->ah_setCapability)((_ah), (_cap), (_param), (_v), (_status)))
505#define ath_hal_ciphersupported(_ah, _cipher) \
506 (ath_hal_getcapability(_ah, HAL_CAP_CIPHER, _cipher, NULL) == HAL_OK)
507#define ath_hal_getregdomain(_ah, _prd) \
508 (ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK)
509#if HAL_ABI_VERSION < 0x08090100
510/* XXX wrong for anything but amd64 and i386 */
509#if defined(__LP64__)
510#define ath_hal_setregdomain(_ah, _rd) \
511 (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 176) = (_rd))
512#else
513#define ath_hal_setregdomain(_ah, _rd) \
514 (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 128) = (_rd))
515#endif
511#if defined(__LP64__)
512#define ath_hal_setregdomain(_ah, _rd) \
513 (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 176) = (_rd))
514#else
515#define ath_hal_setregdomain(_ah, _rd) \
516 (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 128) = (_rd))
517#endif
518#else
519#define ath_hal_setregdomain(_ah, _rd) \
520 ath_hal_setcapability(_ah, HAL_CAP_REG_DMN, 0, _rd, NULL)
521#endif
516#define ath_hal_getcountrycode(_ah, _pcc) \
517 (*(_pcc) = (_ah)->ah_countryCode)
518#define ath_hal_gettkipmic(_ah) \
519 (ath_hal_getcapability(_ah, HAL_CAP_TKIP_MIC, 1, NULL) == HAL_OK)
520#define ath_hal_settkipmic(_ah, _v) \
521 ath_hal_setcapability(_ah, HAL_CAP_TKIP_MIC, 1, _v, NULL)
522#define ath_hal_hastkipsplit(_ah) \
523 (ath_hal_getcapability(_ah, HAL_CAP_TKIP_SPLIT, 0, NULL) == HAL_OK)

--- 150 unchanged lines hidden ---
522#define ath_hal_getcountrycode(_ah, _pcc) \
523 (*(_pcc) = (_ah)->ah_countryCode)
524#define ath_hal_gettkipmic(_ah) \
525 (ath_hal_getcapability(_ah, HAL_CAP_TKIP_MIC, 1, NULL) == HAL_OK)
526#define ath_hal_settkipmic(_ah, _v) \
527 ath_hal_setcapability(_ah, HAL_CAP_TKIP_MIC, 1, _v, NULL)
528#define ath_hal_hastkipsplit(_ah) \
529 (ath_hal_getcapability(_ah, HAL_CAP_TKIP_SPLIT, 0, NULL) == HAL_OK)

--- 150 unchanged lines hidden ---