This commit was generated by cvs2svn to compensate for changes in r165182,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Sam Leffler 2006-12-13 19:26:37 +00:00
commit 8b33360649
35 changed files with 118415 additions and 123863 deletions

View File

@ -33,7 +33,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*
* $Id: //depot/sw/branches/sam_hal/ah.h#10 $
* $Id: //depot/sw/branches/sam_hal/ah.h#19 $
*/
#ifndef _ATH_AH_H_
@ -131,6 +131,8 @@ typedef enum {
HAL_CAP_TPC_CTS = 27, /* cts txpower with per-packet tpc */
HAL_CAP_11D = 28, /* 11d beacon support for changing cc */
HAL_CAP_INTMIT = 29, /* interference mitigation */
HAL_CAP_RXORN_FATAL = 30, /* HAL_INT_RXORN treated as fatal */
HAL_CAP_RXTSTAMP_PREC = 34, /* rx desc tstamp precision (bits) */
} HAL_CAPABILITY_TYPE;
/*
@ -286,8 +288,6 @@ typedef struct {
/* compression definitions */
#define HAL_COMP_BUF_MAX_SIZE 9216 /* 9K */
#define HAL_COMP_BUF_ALIGN_SIZE 512
#define HAL_DECOMP_MASK_SIZE 128
/*
* Transmit packet types. This belongs in ah_desc.h, but
@ -358,7 +358,7 @@ typedef enum {
HAL_INT_GPIO = 0x01000000,
HAL_INT_CABEND = 0x02000000, /* Non-common mapping */
HAL_INT_FATAL = 0x40000000, /* Non-common mapping */
HAL_INT_GLOBAL = 0x80000000, /* Set/clear IER */
#define HAL_INT_GLOBAL 0x80000000 /* Set/clear IER */
HAL_INT_BMISC = HAL_INT_TIM
| HAL_INT_DTIM
| HAL_INT_DTIMSYNC
@ -377,7 +377,6 @@ typedef enum {
| HAL_INT_SWBA
| HAL_INT_BMISS
| HAL_INT_GPIO,
HAL_INT_NOCARD = 0xffffffff /* To signal the card was removed */
} HAL_INT;
typedef enum {
@ -525,6 +524,7 @@ typedef struct {
u_int16_t kv_len; /* length in bits */
u_int8_t kv_val[16]; /* enough for 128-bit keys */
u_int8_t kv_mic[8]; /* TKIP MIC key */
u_int8_t kv_txmic[8]; /* TKIP TX MIC key (optional) */
} HAL_KEYVAL;
typedef enum {
@ -592,6 +592,8 @@ typedef struct {
#define HAL_RSSI_EP_MULTIPLIER (1<<7) /* pow2 to optimize out * and / */
struct ath_desc;
struct ath_tx_status;
struct ath_rx_status;
/*
* Hardware Access Layer (HAL) API.
@ -606,7 +608,7 @@ struct ath_desc;
struct ath_hal {
u_int32_t ah_magic; /* consistency check magic number */
u_int32_t ah_abi; /* HAL ABI version */
#define HAL_ABI_VERSION 0x06052200 /* YYMMDDnn */
#define HAL_ABI_VERSION 0x06102600 /* YYMMDDnn */
u_int16_t ah_devid; /* PCI device ID */
u_int16_t ah_subvendorid; /* PCI subvendor ID */
HAL_SOFTC ah_sc; /* back pointer to driver/os state */
@ -620,7 +622,7 @@ struct ath_hal {
/* NB: when only one radio is present the rev is in 5Ghz */
u_int16_t ah_analog5GhzRev;/* 5GHz radio revision */
u_int16_t ah_analog2GhzRev;/* 2GHz radio revision */
u_int8_t ah_decompMask[HAL_DECOMP_MASK_SIZE]; /* decomp mask array */
const HAL_RATE_TABLE *__ahdecl(*ah_getRateTable)(struct ath_hal *,
u_int mode);
void __ahdecl(*ah_detach)(struct ath_hal*);
@ -635,12 +637,7 @@ struct ath_hal {
HAL_BOOL __ahdecl(*ah_perCalibration)(struct ath_hal*, HAL_CHANNEL *, HAL_BOOL *);
HAL_BOOL __ahdecl(*ah_setTxPowerLimit)(struct ath_hal *, u_int32_t);
void __ahdecl(*ah_arEnable)(struct ath_hal *);
void __ahdecl(*ah_arDisable)(struct ath_hal *);
void __ahdecl(*ah_arReset)(struct ath_hal *);
HAL_BOOL __ahdecl(*ah_radarHaveEvent)(struct ath_hal *);
HAL_BOOL __ahdecl(*ah_processDfs)(struct ath_hal *, HAL_CHANNEL *);
u_int32_t __ahdecl(*ah_dfsNolCheck)(struct ath_hal *, HAL_CHANNEL *, u_int32_t);
/* DFS support */
HAL_BOOL __ahdecl(*ah_radarWait)(struct ath_hal *, HAL_CHANNEL *);
/* Transmit functions */
@ -674,7 +671,8 @@ struct ath_hal {
HAL_BOOL __ahdecl(*ah_fillTxDesc)(struct ath_hal *, struct ath_desc *,
u_int segLen, HAL_BOOL firstSeg,
HAL_BOOL lastSeg, const struct ath_desc *);
HAL_STATUS __ahdecl(*ah_procTxDesc)(struct ath_hal *, struct ath_desc*);
HAL_STATUS __ahdecl(*ah_procTxDesc)(struct ath_hal *,
struct ath_desc *, struct ath_tx_status *);
void __ahdecl(*ah_getTxIntrQueue)(struct ath_hal *, u_int32_t *);
void __ahdecl(*ah_reqTxIntrDesc)(struct ath_hal *, struct ath_desc*);
@ -695,9 +693,10 @@ struct ath_hal {
void __ahdecl(*ah_setRxFilter)(struct ath_hal*, u_int32_t);
HAL_BOOL __ahdecl(*ah_setupRxDesc)(struct ath_hal *, struct ath_desc *,
u_int32_t size, u_int flags);
HAL_STATUS __ahdecl(*ah_procRxDesc)(struct ath_hal *, struct ath_desc *,
u_int32_t phyAddr, struct ath_desc *next,
u_int64_t tsf);
HAL_STATUS __ahdecl(*ah_procRxDesc)(struct ath_hal *,
struct ath_desc *, u_int32_t phyAddr,
struct ath_desc *next, u_int64_t tsf,
struct ath_rx_status *);
void __ahdecl(*ah_rxMonitor)(struct ath_hal *,
const HAL_NODE_STATS *, HAL_CHANNEL *);
void __ahdecl(*ah_procMibEvent)(struct ath_hal *,

View File

@ -33,7 +33,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*
* $Id: //depot/sw/branches/sam_hal/ah_desc.h#2 $
* $Id: //depot/sw/branches/sam_hal/ah_desc.h#5 $
*/
#ifndef _DEV_ATH_DESC_H
@ -59,6 +59,7 @@ struct ath_tx_status {
u_int8_t ts_longretry; /* # long retries */
u_int8_t ts_virtcol; /* virtual collision count */
u_int8_t ts_antenna; /* antenna information */
u_int8_t ts_finaltsi; /* final transmit series index */
};
#define HAL_TXERR_XRETRY 0x01 /* excessive retries */
@ -153,17 +154,14 @@ struct ath_desc {
u_int32_t ds_ctl0; /* opaque DMA control 0 */
u_int32_t ds_ctl1; /* opaque DMA control 1 */
u_int32_t ds_hw[4]; /* opaque h/w region */
/*
* The remaining definitions are managed by software;
* these are valid only after the rx/tx process descriptor
* methods return a non-EINPROGRESS code.
*/
};
struct ath_desc_status {
union {
struct ath_tx_status tx;/* xmit status */
struct ath_rx_status rx;/* recv status */
} ds_us;
void *ds_vdata; /* virtual addr of data buffer */
} __packed;
};
#define ds_txstat ds_us.tx
#define ds_rxstat ds_us.rx
@ -180,4 +178,4 @@ struct ath_desc {
/* flags passed to rx descriptor setup methods */
#define HAL_RXDESC_INTREQ 0x0020 /* enable per-descriptor interrupt */
#endif /* _DEV_ATH_AR521XDMA_H */
#endif /* _DEV_ATH_DESC_H */

View File

@ -33,7 +33,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*
* $Id: //depot/sw/branches/sam_hal/ah_devid.h#1 $
* $Id: //depot/sw/branches/sam_hal/ah_devid.h#2 $
*/
#ifndef _DEV_ATH_DEVID_H_
@ -88,6 +88,12 @@
#define AR5213_SREV_1_0 0x0055
#define AR5213_SREV_REG 0x4020
/* AR5416 */
#define AR5416_DEVID_EMU_PCI 0xff1d /* PCI Owl Emulation*/
#define AR5416_DEVID_EMU_PCIE 0xff1c /* PCIe Owl Emulation*/
#define AR5416_DEVID 0x0023 /* PCI (MB/CB) */
#define AR5418_DEVID 0x0024 /* PCI Express (XB) */
#define AR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */
#define AR_SUBVENDOR_ID_NEW_A 0x7065 /* Update device to new RD */
#endif /* _DEV_ATH_DEVID_H */

File diff suppressed because it is too large Load Diff

View File

@ -69,3 +69,8 @@ NM= ${TOOLPREFIX}nm
AH_REGOPS_FUNC=1
COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
#
# NB: this should come from inttypes.h but can't until we cleanp
# the definition of va_list on linux
#
COPTS+= -DAH_WORDSIZE=64

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: //depot/sw/branches/sam_hal/public/arm9-le-thumb-elf.inc#2 $
# $Id: //depot/sw/branches/sam_hal/public/arm9-le-thumb-elf.inc#3 $
#
#
@ -74,5 +74,5 @@ NM= ${TOOLPREFIX}nm
LDOPTS= -EL
COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
COPTS+= -mthumb -mlittle-endian -mcpu=arm9 -msoft-float \
COPTS+= -mthumb -mlittle-endian -mcpu=arm9 \
-ffunction-sections -fdata-sections

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: //depot/sw/branches/sam_hal/public/armv4-be-elf.inc#3 $
# $Id: //depot/sw/branches/sam_hal/public/armv4-be-elf.inc#4 $
#
#
@ -70,5 +70,5 @@ AH_REGOPS_FUNC=1
LDOPTS= -EB
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
COPTS+= -march=armv4 -mbig-endian -msoft-float \
COPTS+= -march=armv4 -mbig-endian \
-fno-strict-aliasing -fno-common

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: //depot/sw/branches/sam_hal/public/armv4-le-elf.inc#3 $
# $Id: //depot/sw/branches/sam_hal/public/armv4-le-elf.inc#4 $
#
#
@ -70,5 +70,5 @@ AH_REGOPS_FUNC=1
LDOPTS= -EL
COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
COPTS+= -march=armv4 -mlittle-endian -msoft-float \
COPTS+= -march=armv4 -mlittle-endian \
-fno-strict-aliasing -fno-common

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,121 @@
/*-
* Copyright (c) 2006 Sam Leffler, Errno Consulting
* Copyright (c) 2006 Atheros Communications, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following NO
* ''WARRANTY'' disclaimer below (''Disclaimer''), without
* modification.
* 2. Redistributions in binary form must reproduce at minimum a
* disclaimer similar to the Disclaimer below and any redistribution
* must be conditioned upon including a substantially similar
* Disclaimer requirement for further binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the
* names of any contributors may be used to endorse or promote
* product derived from this software without specific prior written
* permission.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT,
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
* FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*
* $Id: //depot/sw/branches/sam_hal/public/wackelf.c#3 $
*/
/*
* Program to zap flags field in the ELF header of an object
* file so that it appears to use VFP soft floating point.
* This is done because there is no standard way to specify
* this on the command line to gcc/binutils.
*
* Derived from code by Olivier Houchard <cognet@freebsd.org>
*/
#include <stdio.h>
#include <stdlib.h>
#include <elf.h>
#include <fcntl.h>
#include <err.h>
#ifdef __linux__
#include <endian.h>
#include <byteswap.h>
#define _LITTLE_ENDIAN __LITTLE_ENDIAN
#define _BIG_ENDIAN __BIG_ENDIAN
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobe16(x) __bswap_16((x))
#define htobe32(x) __bswap_32((x))
#define htole16(x) ((uint16_t)(x))
#define htole32(x) ((uint32_t)(x))
#else /* _BYTE_ORDER != _LITTLE_ENDIAN */
#define htobe16(x) ((uint16_t)(x))
#define htobe32(x) ((uint32_t)(x))
#define htole16(x) __bswap_16((x))
#define htole32(x) __bswap_32((x))
#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */
#else
#include <sys/endian.h>
#endif
int
main(int argc, char *argv[])
{
int fd, endian, oflags;
int format = 0x400; /* default to VFP */
Elf32_Ehdr ehdr;
if (argc > 2) {
if (strcmp(argv[1], "-fpa") == 0) {
format = 0x200;
argc--, argv++;
} else if (strcmp(argv[1], "-vfp") == 0) {
format = 0x400;
argc--, argv++;
} else if (strcmp(argv[1], "-none") == 0) {
format = 0;
argc--, argv++;
}
}
if (argc != 2) {
fprintf(stderr, "usage: %s [-fpa|-vfp|-none] file\n", argv[0]);
exit(-1);
}
fd = open(argv[1], O_RDWR);
if (fd < 0)
err(1, "could not open %s", argv[1]);
if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
err(1, "could not read the ELF header");
if (ehdr.e_machine == htole16(EM_ARM))
endian = _LITTLE_ENDIAN;
else if (ehdr.e_machine == htobe16(EM_ARM))
endian = _BIG_ENDIAN;
else
errx(1, "not an ARM ELF object (machine 0x%x)", ehdr.e_machine);
oflags = ehdr.e_flags;
if (endian == _BIG_ENDIAN) {
ehdr.e_flags &= ~htobe32(0x600); /* Remove FPA Soft float */
ehdr.e_flags |= htobe32(format); /* VFP Soft Float */
} else {
ehdr.e_flags &= ~htole32(0x600); /* Remove FPA Soft float */
ehdr.e_flags |= htole32(format); /* VFP Soft Float */
}
printf("%s: e_flags 0x%x => 0x%x\n", argv[1], oflags, ehdr.e_flags);
if (lseek(fd, (off_t) 0, SEEK_SET) != 0)
err(1, "lseek");
if (write(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
err(1, "yow, elf header write failed");
close(fd);
return 0;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: //depot/sw/branches/sam_hal/public/xscale-be-elf.inc#2 $
# $Id: //depot/sw/branches/sam_hal/public/xscale-be-elf.inc#3 $
#
#
@ -78,4 +78,4 @@ AH_REGOPS_FUNC=1
LDOPTS= -EB
COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \
-mtune=xscale -mshort-load-bytes -msoft-float -mfp=2
-mtune=xscale -mshort-load-bytes

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGES.
#
# $Id: //depot/sw/branches/sam_hal/public/xscale-le-elf.inc#2 $
# $Id: //depot/sw/branches/sam_hal/public/xscale-le-elf.inc#3 $
#
#
@ -79,4 +79,4 @@ AH_REGOPS_FUNC=1
LDOPTS= -EL
COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
COPTS+= -march=armv4 -mlittle-endian -fno-strict-aliasing -fno-common \
-mapcs-32 -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2
-mapcs-32 -mtune=xscale -mshort-load-bytes

View File

@ -33,6 +33,6 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/sw/branches/sam_hal/version.h#14 $
* $Id: //depot/sw/branches/sam_hal/version.h#35 $
*/
#define ATH_HAL_VERSION "0.9.17.2"
#define ATH_HAL_VERSION "0.9.20.3"