Fix the build of the new HAL:
- constify link-set iterator - do RF lookup only if any RF has been built - fix global symbols shadowing - const static -> static const - don't redefine `uintptr_t' - use `unsigned long' in __DECONST() - fix AH_RF() macros - __va_list -> va_list - add missing struct trailing element - add a few #ifdef AH_DEBUG block to avoid empty if() statement - some other nits...
This commit is contained in:
parent
31f44cb2ed
commit
a9d4fb0bb4
10
sys/external/isc/atheros_hal/dist/ah.c
vendored
10
sys/external/isc/atheros_hal/dist/ah.c
vendored
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah.c,v 1.1.1.1 2008/12/11 04:46:22 alc Exp $
|
||||
* $Id: ah.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -32,7 +32,7 @@ OS_SET_DECLARE(ah_chips, struct ath_hal_chip);
|
||||
const char*
|
||||
ath_hal_probe(uint16_t vendorid, uint16_t devid)
|
||||
{
|
||||
struct ath_hal_chip **pchip;
|
||||
struct ath_hal_chip * const *pchip;
|
||||
|
||||
OS_SET_FOREACH(pchip, ah_chips) {
|
||||
const char *name = (*pchip)->probe(vendorid, devid);
|
||||
@ -53,7 +53,7 @@ struct ath_hal*
|
||||
ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
|
||||
HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *error)
|
||||
{
|
||||
struct ath_hal_chip **pchip;
|
||||
struct ath_hal_chip * const *pchip;
|
||||
|
||||
OS_SET_FOREACH(pchip, ah_chips) {
|
||||
struct ath_hal_chip *chip = *pchip;
|
||||
@ -88,7 +88,8 @@ OS_SET_DECLARE(ah_rfs, struct ath_hal_rf);
|
||||
struct ath_hal_rf *
|
||||
ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode)
|
||||
{
|
||||
struct ath_hal_rf **prf;
|
||||
#ifdef AH_HAS_RF
|
||||
struct ath_hal_rf * const *prf;
|
||||
|
||||
OS_SET_FOREACH(prf, ah_rfs) {
|
||||
struct ath_hal_rf *rf = *prf;
|
||||
@ -96,6 +97,7 @@ ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode)
|
||||
return rf;
|
||||
}
|
||||
*ecode = HAL_ENOTSUPP;
|
||||
#endif
|
||||
return AH_NULL;
|
||||
}
|
||||
|
||||
|
5
sys/external/isc/atheros_hal/dist/ah_desc.h
vendored
5
sys/external/isc/atheros_hal/dist/ah_desc.h
vendored
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_desc.h,v 1.1.1.1 2008/12/11 04:46:23 alc Exp $
|
||||
* $Id: ah_desc.h,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DEV_ATH_DESC_H
|
||||
@ -190,9 +190,6 @@ struct ath_desc {
|
||||
uint32_t ds_ctl0; /* opaque DMA control 0 */
|
||||
uint32_t ds_ctl1; /* opaque DMA control 1 */
|
||||
uint32_t ds_hw[HAL_DESC_HW_SIZE]; /* opaque h/w region */
|
||||
};
|
||||
|
||||
struct ath_desc_status {
|
||||
union {
|
||||
struct ath_tx_status tx;/* xmit status */
|
||||
struct ath_rx_status rx;/* recv status */
|
||||
|
12
sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c
vendored
12
sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c
vendored
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_eeprom_v1.c,v 1.1.1.1 2008/12/11 04:46:23 alc Exp $
|
||||
* $Id: ah_eeprom_v1.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -112,7 +112,7 @@ ath_hal_v1EepromAttach(struct ath_hal *ah)
|
||||
{
|
||||
HAL_EEPROM_v1 *ee = AH_PRIVATE(ah)->ah_eeprom;
|
||||
uint16_t athvals[AR_EEPROM_ATHEROS_MAX]; /* XXX off stack */
|
||||
uint16_t protect, version, eeval;
|
||||
uint16_t protect, eeprom_version, eeval;
|
||||
uint32_t sum;
|
||||
int i, loc;
|
||||
|
||||
@ -138,12 +138,12 @@ ath_hal_v1EepromAttach(struct ath_hal *ah)
|
||||
HALDEBUG(ah, HAL_DEBUG_ATTACH, "EEPROM protect 0x%x\n", protect);
|
||||
/* XXX check proper access before continuing */
|
||||
|
||||
if (!ath_hal_eepromRead(ah, AR_EEPROM_VERSION, &version)) {
|
||||
if (!ath_hal_eepromRead(ah, AR_EEPROM_VERSION, &eeprom_version)) {
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY,
|
||||
"%s: unable to read EEPROM version\n", __func__);
|
||||
return HAL_EEREAD;
|
||||
}
|
||||
if (((version>>12) & 0xf) != 1) {
|
||||
if (((eeprom_version>>12) & 0xf) != 1) {
|
||||
/*
|
||||
* This code only groks the version 1 EEPROM layout.
|
||||
*/
|
||||
@ -183,7 +183,7 @@ ath_hal_v1EepromAttach(struct ath_hal *ah)
|
||||
return HAL_ENOMEM;
|
||||
}
|
||||
|
||||
ee->ee_version = version;
|
||||
ee->ee_version = eeprom_version;
|
||||
ee->ee_protect = protect;
|
||||
ee->ee_antenna = athvals[2];
|
||||
ee->ee_biasCurrents = athvals[3];
|
||||
@ -243,7 +243,7 @@ ath_hal_v1EepromAttach(struct ath_hal *ah)
|
||||
}
|
||||
|
||||
AH_PRIVATE(ah)->ah_eeprom = ee;
|
||||
AH_PRIVATE(ah)->ah_eeversion = version;
|
||||
AH_PRIVATE(ah)->ah_eeversion = eeprom_version;
|
||||
AH_PRIVATE(ah)->ah_eepromDetach = v1EepromDetach;
|
||||
AH_PRIVATE(ah)->ah_eepromGet = v1EepromGet;
|
||||
AH_PRIVATE(ah)->ah_eepromSet = v1EepromSet;
|
||||
|
@ -14,8 +14,9 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_eeprom_v14.c,v 1.1.1.1 2008/12/11 04:46:24 alc Exp $
|
||||
* $Id: ah_eeprom_v14.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include <sys/endian.h>
|
||||
#include "opt_ah.h"
|
||||
|
||||
#include "ah.h"
|
||||
@ -159,6 +160,7 @@ v14EepromDiag(struct ath_hal *ah, int request,
|
||||
return AH_FALSE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* XXX conditionalize by target byte order */
|
||||
#ifndef bswap16
|
||||
static __inline__ uint16_t
|
||||
@ -170,6 +172,7 @@ __bswap16(uint16_t _x)
|
||||
);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Do structure specific swaps if Eeprom format is non native to host */
|
||||
static void
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_eeprom_v3.c,v 1.1.1.1 2008/12/11 04:46:25 alc Exp $
|
||||
* $Id: ah_eeprom_v3.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -26,9 +26,9 @@ static void
|
||||
getPcdacInterceptsFromPcdacMinMax(HAL_EEPROM *ee,
|
||||
uint16_t pcdacMin, uint16_t pcdacMax, uint16_t *vp)
|
||||
{
|
||||
const static uint16_t intercepts3[] =
|
||||
static const uint16_t intercepts3[] =
|
||||
{ 0, 5, 10, 20, 30, 50, 70, 85, 90, 95, 100 };
|
||||
const static uint16_t intercepts3_2[] =
|
||||
static const uint16_t intercepts3_2[] =
|
||||
{ 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
|
||||
const uint16_t *ip = ee->ee_version < AR_EEPROM_VER3_2 ?
|
||||
intercepts3 : intercepts3_2;
|
||||
|
19
sys/external/isc/atheros_hal/dist/ah_internal.h
vendored
19
sys/external/isc/atheros_hal/dist/ah_internal.h
vendored
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_internal.h,v 1.1.1.1 2008/12/11 04:46:25 alc Exp $
|
||||
* $Id: ah_internal.h,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#ifndef _ATH_AH_INTERAL_H_
|
||||
#define _ATH_AH_INTERAL_H_
|
||||
@ -49,14 +49,7 @@
|
||||
* Note that uintptr_t is C99.
|
||||
*/
|
||||
#ifndef __DECONST
|
||||
#ifndef _UINTPTR_T
|
||||
#if AH_WORDSIZE == 64
|
||||
typedef unsigned long int uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
|
||||
#define __DECONST(type, var) ((type)(unsigned long)(const void *)(var))
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@ -114,12 +107,12 @@ struct ath_hal_rf {
|
||||
};
|
||||
#ifndef AH_RF
|
||||
#define AH_RF(_name, _probe, _attach) \
|
||||
static struct ath_hal_rf name##_rf = { \
|
||||
.name = #_name, \
|
||||
static struct ath_hal_rf _name##_rf = { \
|
||||
.name = __STRING(_name), \
|
||||
.probe = _probe, \
|
||||
.attach = _attach \
|
||||
}; \
|
||||
OS_DATA_SET(ah_rfs, name##_rf)
|
||||
OS_DATA_SET(ah_rfs, _name##_rf)
|
||||
#endif
|
||||
|
||||
struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode);
|
||||
@ -549,7 +542,7 @@ extern uint32_t ath_hal_reverseBits(uint32_t val, uint32_t n);
|
||||
/* printf interfaces */
|
||||
extern void ath_hal_printf(struct ath_hal *, const char*, ...)
|
||||
__printflike(2,3);
|
||||
extern void ath_hal_vprintf(struct ath_hal *, const char*, __va_list)
|
||||
extern void ath_hal_vprintf(struct ath_hal *, const char*, va_list)
|
||||
__printflike(2, 0);
|
||||
extern const char* ath_hal_ether_sprintf(const uint8_t *mac);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ah_regdomain.c,v 1.1.1.1 2008/12/11 04:46:26 alc Exp $
|
||||
* $Id: ah_regdomain.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -523,7 +523,7 @@ static REG_DMN_PAIR_MAPPING regDomainPairs[] = {
|
||||
{APL3_FCCA, APL3, FCCA, NO_REQ, NO_REQ, PSCAN_DEFER, 0 },
|
||||
{APL1_ETSIC, APL1, ETSIC, NO_REQ, NO_REQ, PSCAN_DEFER, 0 },
|
||||
{APL2_ETSIC, APL2, ETSIC, NO_REQ, NO_REQ, PSCAN_DEFER, 0 },
|
||||
{APL2_APLD, APL2, APLD, NO_REQ, NO_REQ, PSCAN_DEFER, },
|
||||
{APL2_APLD, APL2, APLD, NO_REQ, NO_REQ, PSCAN_DEFER, 0 },
|
||||
|
||||
{MKK1_MKKA, MKK1, MKKA, DISALLOW_ADHOC_11A_TURB | NEED_NFC | LIMIT_FRAME_4MS, NEED_NFC, PSCAN_MKK1 | PSCAN_MKKA, CTRY_JAPAN },
|
||||
{MKK1_MKKB, MKK1, MKKA, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB | NEED_NFC| LIMIT_FRAME_4MS, NEED_NFC, PSCAN_MKK1 | PSCAN_MKKA | PSCAN_MKKA_G, CTRY_JAPAN1 },
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5210_phy.c,v 1.1.1.1 2008/12/11 04:46:27 alc Exp $
|
||||
* $Id: ar5210_phy.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -33,14 +33,14 @@ HAL_RATE_TABLE ar5210_11a_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -50,14 +50,14 @@ HAL_RATE_TABLE ar5210_turbo_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5210_reset.c,v 1.1.1.1 2008/12/11 04:46:28 alc Exp $
|
||||
* $Id: ar5210_reset.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -54,7 +54,7 @@ static const uint8_t ar5k0007_pwrSettings[17] = {
|
||||
#define AR_RC_SETTLE_TIME 20000
|
||||
|
||||
static HAL_BOOL ar5210SetResetReg(struct ath_hal *,
|
||||
uint32_t resetMask, u_int delay);
|
||||
uint32_t resetMask, u_int waitTime);
|
||||
static HAL_BOOL ar5210SetChannel(struct ath_hal *, HAL_CHANNEL_INTERNAL *);
|
||||
static void ar5210SetOperatingMode(struct ath_hal *, int opmode);
|
||||
|
||||
@ -531,9 +531,11 @@ ar5210PerCalibrationN(struct ath_hal *ah, HAL_CHANNEL *chan, u_int chainMask,
|
||||
/* AGC calibration (this was added to make the NF threshold check work) */
|
||||
OS_REG_WRITE(ah, AR_PHY_AGCCTL,
|
||||
OS_REG_READ(ah, AR_PHY_AGCCTL) | AR_PHY_AGC_CAL);
|
||||
#ifdef AH_DEBUG
|
||||
if (!ath_hal_wait(ah, AR_PHY_AGCCTL, AR_PHY_AGC_CAL, 0))
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: AGC calibration timeout\n",
|
||||
__func__);
|
||||
#endif
|
||||
|
||||
/* Rewrite our AGC values we stored off earlier (return AGC to normal operation) */
|
||||
OS_REG_WRITE(ah, 0x9858, reg9858);
|
||||
@ -582,14 +584,14 @@ ar5210ResetCalValid(struct ath_hal *ah, HAL_CHANNEL *chan)
|
||||
* Writes the given reset bit mask into the reset register
|
||||
*/
|
||||
static HAL_BOOL
|
||||
ar5210SetResetReg(struct ath_hal *ah, uint32_t resetMask, u_int delay)
|
||||
ar5210SetResetReg(struct ath_hal *ah, uint32_t resetMask, u_int waitTime)
|
||||
{
|
||||
uint32_t mask = resetMask ? resetMask : ~0;
|
||||
HAL_BOOL rt;
|
||||
|
||||
OS_REG_WRITE(ah, AR_RC, resetMask);
|
||||
/* need to wait at least 128 clocks when reseting PCI before read */
|
||||
OS_DELAY(delay);
|
||||
OS_DELAY(waitTime);
|
||||
|
||||
resetMask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC;
|
||||
mask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5211_phy.c,v 1.1.1.1 2008/12/11 04:46:32 alc Exp $
|
||||
* $Id: ar5211_phy.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -34,14 +34,14 @@ HAL_RATE_TABLE ar5211_11a_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -51,14 +51,14 @@ HAL_RATE_TABLE ar5211_turbo_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -68,10 +68,10 @@ HAL_RATE_TABLE ar5211_11b_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x0b, 0x00, (0x80| 2), 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x0a, 0x04, (0x80| 4), 1 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x09, 0x04, (0x80|11), 1 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x08, 0x04, (0x80|22), 1 }
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x0b, 0x00, (0x80| 2), 0, 0, 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x0a, 0x04, (0x80| 4), 1, 0, 0 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x09, 0x04, (0x80|11), 1, 0, 0 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x08, 0x04, (0x80|22), 1, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5211_reset.c,v 1.1.1.1 2008/12/11 04:46:34 alc Exp $
|
||||
* $Id: ar5211_reset.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -46,7 +46,7 @@ typedef struct {
|
||||
} CHAN_INFO_2GHZ;
|
||||
|
||||
#define CI_2GHZ_INDEX_CORRECTION 19
|
||||
const static CHAN_INFO_2GHZ chan2GHzData[] = {
|
||||
static const CHAN_INFO_2GHZ chan2GHzData[] = {
|
||||
{ 1, 0x46, 96 }, /* 2312 -19 */
|
||||
{ 1, 0x46, 97 }, /* 2317 -18 */
|
||||
{ 1, 0x46, 98 }, /* 2322 -17 */
|
||||
@ -951,9 +951,11 @@ ar5211IsNfGood(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *chan)
|
||||
|
||||
if (!getNoiseFloorThresh(ah, chan, &nfThresh))
|
||||
return AH_FALSE;
|
||||
#ifdef AH_DEBUG
|
||||
if (OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF)
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY,
|
||||
"%s: NF did not complete in calibration window\n", __func__);
|
||||
#endif
|
||||
nf = ar5211GetNoiseFloor(ah);
|
||||
if (nf > nfThresh) {
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY,
|
||||
|
@ -14,11 +14,12 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar2317.c,v 1.1.1.1 2008/12/11 04:46:36 alc Exp $
|
||||
* $Id: ar2317.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
#include "ah.h"
|
||||
#include "ah_devid.h"
|
||||
#include "ah_internal.h"
|
||||
|
||||
#include "ar5212/ar5212.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5111.c,v 1.1.1.1 2008/12/11 04:46:37 alc Exp $
|
||||
* $Id: ar5111.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -90,7 +90,7 @@ ar5111SetChannel(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *chan)
|
||||
uint16_t channel5111; /* 11a channel for 5111 */
|
||||
} CHAN_INFO_2GHZ;
|
||||
|
||||
const static CHAN_INFO_2GHZ chan2GHzData[] = {
|
||||
static const CHAN_INFO_2GHZ chan2GHzData[] = {
|
||||
{ 1, 0x46, 96 }, /* 2312 -19 */
|
||||
{ 1, 0x46, 97 }, /* 2317 -18 */
|
||||
{ 1, 0x46, 98 }, /* 2322 -17 */
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5212_phy.c,v 1.1.1.1 2008/12/11 04:46:41 alc Exp $
|
||||
* $Id: ar5212_phy.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -34,14 +34,14 @@ HAL_RATE_TABLE ar5212_11a_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -51,14 +51,14 @@ HAL_RATE_TABLE ar5212_half_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 3000, 0x0b, 0x00, (0x80|6), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 4500, 0x0f, 0x00, 9, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 6000, 0x0a, 0x00, (0x80|12), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 9000, 0x0e, 0x00, 18, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 12000, 0x09, 0x00, (0x80|24), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 18000, 0x0d, 0x00, 36, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 24000, 0x08, 0x00, 48, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 27000, 0x0c, 0x00, 54, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 3000, 0x0b, 0x00, (0x80|6), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 4500, 0x0f, 0x00, 9, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 6000, 0x0a, 0x00, (0x80|12), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 9000, 0x0e, 0x00, 18, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 12000, 0x09, 0x00, (0x80|24), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 18000, 0x0d, 0x00, 36, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 24000, 0x08, 0x00, 48, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 27000, 0x0c, 0x00, 54, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -68,14 +68,14 @@ HAL_RATE_TABLE ar5212_quarter_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 1500, 0x0b, 0x00, (0x80|3), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 2250, 0x0f, 0x00, 4, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 3000, 0x0a, 0x00, (0x80|6), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 4500, 0x0e, 0x00, 9, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 6000, 0x09, 0x00, (0x80|12), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 9000, 0x0d, 0x00, 18, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 12000, 0x08, 0x00, 24, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 13500, 0x0c, 0x00, 27, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 1500, 0x0b, 0x00, (0x80|3), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 2250, 0x0f, 0x00, 4, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 3000, 0x0a, 0x00, (0x80|6), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 4500, 0x0e, 0x00, 9, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 6000, 0x09, 0x00, (0x80|12), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 9000, 0x0d, 0x00, 18, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 12000, 0x08, 0x00, 24, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 13500, 0x0c, 0x00, 27, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -85,13 +85,13 @@ HAL_RATE_TABLE ar5212_turbog_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 3 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 3 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 3 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 3 }
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 3, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 3, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 3, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 3, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -101,14 +101,14 @@ HAL_RATE_TABLE ar5212_turboa_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4 }
|
||||
/* 6 Mb */ { AH_TRUE, TURBO, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, TURBO, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, TURBO, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, TURBO, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, TURBO, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, TURBO, 36000, 0x0d, 0x00, 72, 4, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, TURBO, 48000, 0x08, 0x00, 96, 4, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, TURBO, 54000, 0x0c, 0x00, 108, 4, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -118,10 +118,10 @@ HAL_RATE_TABLE ar5212_11b_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 1 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 1 }
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0, 0, 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1, 0, 0 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 1, 0, 0 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 1, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -136,19 +136,19 @@ HAL_RATE_TABLE ar5212_11g_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 2 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 3 },
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0, 0, 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1, 0, 0 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 2, 0, 0 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 3, 0, 0 },
|
||||
/* remove rates 6, 9 from rate ctrl */
|
||||
/* 6 Mb */ { AH_FALSE, OFDM, 6000, 0x0b, 0x00, 12, 4 },
|
||||
/* 9 Mb */ { AH_FALSE, OFDM, 9000, 0x0f, 0x00, 18, 4 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, 24, 6 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 6 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, 48, 8 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8 }
|
||||
/* 6 Mb */ { AH_FALSE, OFDM, 6000, 0x0b, 0x00, 12, 4, 0, 0 },
|
||||
/* 9 Mb */ { AH_FALSE, OFDM, 9000, 0x0f, 0x00, 18, 4, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, 24, 6, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 6, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, 48, 8, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8, 0, 0 }
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5312.h,v 1.1.1.1 2008/12/11 04:46:44 alc Exp $
|
||||
* $Id: ar5312.h,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#ifndef _ATH_AR5312_H_
|
||||
#define _ATH_AR5312_H_
|
||||
@ -38,8 +38,6 @@
|
||||
AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV1 || \
|
||||
AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV2)
|
||||
|
||||
extern struct ath_hal * ar5312Attach(uint16_t devid, HAL_SOFTC sc,
|
||||
HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);
|
||||
extern HAL_BOOL ar5312IsInterruptPending(struct ath_hal *ah);
|
||||
|
||||
/* AR5312 */
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5312_attach.c,v 1.1.1.1 2008/12/11 04:46:45 alc Exp $
|
||||
* $Id: ar5312_attach.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -318,7 +318,6 @@ ar5312Probe(uint16_t vendorid, uint16_t devid)
|
||||
case AR5212_AR2313_REV8:
|
||||
return "Atheros 2313 WiSoC";
|
||||
case AR5212_AR2315_REV6:
|
||||
case AR5212_AR2315_REV6:
|
||||
case AR5212_AR2315_REV7:
|
||||
return "Atheros 2315 WiSoC";
|
||||
case AR5212_AR2317_REV1:
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ar5416_phy.c,v 1.1.1.1 2008/12/11 04:46:48 alc Exp $
|
||||
* $Id: ar5416_phy.c,v 1.2 2008/12/11 05:30:29 alc Exp $
|
||||
*/
|
||||
#include "opt_ah.h"
|
||||
|
||||
@ -34,35 +34,35 @@ HAL_RATE_TABLE ar5416_11ng_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 2 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 3 },
|
||||
/* 1 Mb */ { AH_TRUE, CCK, 1000, 0x1b, 0x00, (0x80| 2), 0, 0, 0 },
|
||||
/* 2 Mb */ { AH_TRUE, CCK, 2000, 0x1a, 0x04, (0x80| 4), 1, 0, 0 },
|
||||
/* 5.5 Mb */ { AH_TRUE, CCK, 5500, 0x19, 0x04, (0x80|11), 2, 0, 0 },
|
||||
/* 11 Mb */ { AH_TRUE, CCK, 11000, 0x18, 0x04, (0x80|22), 3, 0, 0 },
|
||||
/* Remove rates 6, 9 from rate ctrl */
|
||||
/* 6 Mb */ { AH_FALSE, OFDM, 6000, 0x0b, 0x00, 12, 4 },
|
||||
/* 9 Mb */ { AH_FALSE, OFDM, 9000, 0x0f, 0x00, 18, 4 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, 24, 6 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 6 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, 48, 8 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8 },
|
||||
/* 6.5 Mb */ { AH_TRUE, HT, 6500, 0x80, 0x00, 0, 8 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x81, 0x00, 1, 8 },
|
||||
/*19.5 Mb */ { AH_TRUE, HT, 19500, 0x82, 0x00, 2, 8 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x83, 0x00, 3, 8 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x84, 0x00, 4, 8 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x85, 0x00, 5, 8 },
|
||||
/*58.5 Mb */ { AH_TRUE, HT, 58500, 0x86, 0x00, 6, 8 },
|
||||
/* 65 Mb */ { AH_TRUE, HT, 65000, 0x87, 0x00, 7, 8 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x88, 0x00, 8, 8 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x89, 0x00, 9, 8 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x8a, 0x00, 10, 8 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x8b, 0x00, 11, 8 },
|
||||
/* 78 Mb */ { AH_TRUE, HT, 78000, 0x8c, 0x00, 12, 8 },
|
||||
/* 104 Mb */ { AH_TRUE, HT, 104000, 0x8d, 0x00, 13, 8 },
|
||||
/* 117 Mb */ { AH_TRUE, HT, 117000, 0x8e, 0x00, 14, 8 },
|
||||
/* 130 Mb */ { AH_TRUE, HT, 130000, 0x8f, 0x00, 15, 8 },
|
||||
/* 6 Mb */ { AH_FALSE, OFDM, 6000, 0x0b, 0x00, 12, 4, 0, 0 },
|
||||
/* 9 Mb */ { AH_FALSE, OFDM, 9000, 0x0f, 0x00, 18, 4, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, 24, 6, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 6, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, 48, 8, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8, 0, 0 },
|
||||
/* 6.5 Mb */ { AH_TRUE, HT, 6500, 0x80, 0x00, 0, 8, 0, 0 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x81, 0x00, 1, 8, 0, 0 },
|
||||
/*19.5 Mb */ { AH_TRUE, HT, 19500, 0x82, 0x00, 2, 8, 0, 0 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x83, 0x00, 3, 8, 0, 0 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x84, 0x00, 4, 8, 0, 0 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x85, 0x00, 5, 8, 0, 0 },
|
||||
/*58.5 Mb */ { AH_TRUE, HT, 58500, 0x86, 0x00, 6, 8, 0, 0 },
|
||||
/* 65 Mb */ { AH_TRUE, HT, 65000, 0x87, 0x00, 7, 8, 0, 0 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x88, 0x00, 8, 8, 0, 0 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x89, 0x00, 9, 8, 0, 0 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x8a, 0x00, 10, 8, 0, 0 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x8b, 0x00, 11, 8, 0, 0 },
|
||||
/* 78 Mb */ { AH_TRUE, HT, 78000, 0x8c, 0x00, 12, 8, 0, 0 },
|
||||
/* 104 Mb */ { AH_TRUE, HT, 104000, 0x8d, 0x00, 13, 8, 0, 0 },
|
||||
/* 117 Mb */ { AH_TRUE, HT, 117000, 0x8e, 0x00, 14, 8, 0, 0 },
|
||||
/* 130 Mb */ { AH_TRUE, HT, 130000, 0x8f, 0x00, 15, 8, 0, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
@ -72,30 +72,30 @@ static HAL_RATE_TABLE ar5416_11na_table = {
|
||||
{
|
||||
/* short ctrl */
|
||||
/* valid rateCode Preamble dot11Rate Rate */
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8 },
|
||||
/* 6.5 Mb */ { AH_TRUE, HT, 6500, 0x80, 0x00, 0, 8 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x81, 0x00, 1, 8 },
|
||||
/*19.5 Mb */ { AH_TRUE, HT, 19500, 0x82, 0x00, 2, 8 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x83, 0x00, 3, 8 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x84, 0x00, 4, 8 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x85, 0x00, 5, 8 },
|
||||
/*58.5 Mb */ { AH_TRUE, HT, 58500, 0x86, 0x00, 6, 8 },
|
||||
/* 65 Mb */ { AH_TRUE, HT, 65000, 0x87, 0x00, 7, 8 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x88, 0x00, 8, 8 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x89, 0x00, 9, 8 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x8a, 0x00, 10, 8 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x8b, 0x00, 11, 8 },
|
||||
/* 78 Mb */ { AH_TRUE, HT, 78000, 0x8c, 0x00, 12, 8 },
|
||||
/* 104 Mb */ { AH_TRUE, HT, 104000, 0x8d, 0x00, 13, 8 },
|
||||
/* 117 Mb */ { AH_TRUE, HT, 117000, 0x8e, 0x00, 14, 8 },
|
||||
/* 130 Mb */ { AH_TRUE, HT, 130000, 0x8f, 0x00, 15, 8 },
|
||||
/* 6 Mb */ { AH_TRUE, OFDM, 6000, 0x0b, 0x00, (0x80|12), 0, 0, 0 },
|
||||
/* 9 Mb */ { AH_TRUE, OFDM, 9000, 0x0f, 0x00, 18, 0, 0, 0 },
|
||||
/* 12 Mb */ { AH_TRUE, OFDM, 12000, 0x0a, 0x00, (0x80|24), 2, 0, 0 },
|
||||
/* 18 Mb */ { AH_TRUE, OFDM, 18000, 0x0e, 0x00, 36, 2, 0, 0 },
|
||||
/* 24 Mb */ { AH_TRUE, OFDM, 24000, 0x09, 0x00, (0x80|48), 4, 0, 0 },
|
||||
/* 36 Mb */ { AH_TRUE, OFDM, 36000, 0x0d, 0x00, 72, 8, 0, 0 },
|
||||
/* 48 Mb */ { AH_TRUE, OFDM, 48000, 0x08, 0x00, 96, 8, 0, 0 },
|
||||
/* 54 Mb */ { AH_TRUE, OFDM, 54000, 0x0c, 0x00, 108, 8, 0, 0 },
|
||||
/* 6.5 Mb */ { AH_TRUE, HT, 6500, 0x80, 0x00, 0, 8, 0, 0 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x81, 0x00, 1, 8, 0, 0 },
|
||||
/*19.5 Mb */ { AH_TRUE, HT, 19500, 0x82, 0x00, 2, 8, 0, 0 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x83, 0x00, 3, 8, 0, 0 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x84, 0x00, 4, 8, 0, 0 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x85, 0x00, 5, 8, 0, 0 },
|
||||
/*58.5 Mb */ { AH_TRUE, HT, 58500, 0x86, 0x00, 6, 8, 0, 0 },
|
||||
/* 65 Mb */ { AH_TRUE, HT, 65000, 0x87, 0x00, 7, 8, 0, 0 },
|
||||
/* 13 Mb */ { AH_TRUE, HT, 13000, 0x88, 0x00, 8, 8, 0, 0 },
|
||||
/* 26 Mb */ { AH_TRUE, HT, 26000, 0x89, 0x00, 9, 8, 0, 0 },
|
||||
/* 39 Mb */ { AH_TRUE, HT, 39000, 0x8a, 0x00, 10, 8, 0, 0 },
|
||||
/* 52 Mb */ { AH_TRUE, HT, 52000, 0x8b, 0x00, 11, 8, 0, 0 },
|
||||
/* 78 Mb */ { AH_TRUE, HT, 78000, 0x8c, 0x00, 12, 8, 0, 0 },
|
||||
/* 104 Mb */ { AH_TRUE, HT, 104000, 0x8d, 0x00, 13, 8, 0, 0 },
|
||||
/* 117 Mb */ { AH_TRUE, HT, 117000, 0x8e, 0x00, 14, 8, 0, 0 },
|
||||
/* 130 Mb */ { AH_TRUE, HT, 130000, 0x8f, 0x00, 15, 8, 0, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user