ar9160_attach.c (188971) | ar9160_attach.c (188972) |
---|---|
1/* 2 * Copyright (c) 2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 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. 16 * | 1/* 2 * Copyright (c) 2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 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. 16 * |
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c 188971 2009-02-23 23:54:08Z sam $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c 188972 2009-02-23 23:58:37Z sam $ |
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ar5416/ar5416.h" --- 26 unchanged lines hidden (view full) --- 52static const HAL_PERCAL_DATA ar9160_adc_init_dc_cal = { 53 .calName = "ADC Init DC", .calType = ADC_DC_INIT_CAL, 54 .calNumSamples = MIN_CAL_SAMPLES, 55 .calCountMax = INIT_LOG_COUNT, 56 .calCollect = ar5416AdcDcCalCollect, 57 .calPostProc = ar5416AdcDcCalibration 58}; 59 | 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ar5416/ar5416.h" --- 26 unchanged lines hidden (view full) --- 52static const HAL_PERCAL_DATA ar9160_adc_init_dc_cal = { 53 .calName = "ADC Init DC", .calType = ADC_DC_INIT_CAL, 54 .calNumSamples = MIN_CAL_SAMPLES, 55 .calCountMax = INIT_LOG_COUNT, 56 .calCollect = ar5416AdcDcCalCollect, 57 .calPostProc = ar5416AdcDcCalibration 58}; 59 |
60struct ath_hal *ar9160Attach(uint16_t devid, HAL_SOFTC sc, 61 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status); | |
62static void ar9160Detach(struct ath_hal *); 63static HAL_BOOL ar9160FillCapabilityInfo(struct ath_hal *ah); 64 65static void 66ar9160AniSetup(struct ath_hal *ah) 67{ 68 static const struct ar5212AniParams aniparams = { 69 .maxNoiseImmunityLevel = 4, /* levels 0..4 */ --- 15 unchanged lines hidden (view full) --- 85 }; 86 /* NB: ANI is not enabled yet */ 87 ar5212AniAttach(ah, &aniparams, &aniparams, AH_FALSE); 88} 89 90/* 91 * Attach for an AR9160 part. 92 */ | 60static void ar9160Detach(struct ath_hal *); 61static HAL_BOOL ar9160FillCapabilityInfo(struct ath_hal *ah); 62 63static void 64ar9160AniSetup(struct ath_hal *ah) 65{ 66 static const struct ar5212AniParams aniparams = { 67 .maxNoiseImmunityLevel = 4, /* levels 0..4 */ --- 15 unchanged lines hidden (view full) --- 83 }; 84 /* NB: ANI is not enabled yet */ 85 ar5212AniAttach(ah, &aniparams, &aniparams, AH_FALSE); 86} 87 88/* 89 * Attach for an AR9160 part. 90 */ |
93struct ath_hal * | 91static struct ath_hal * |
94ar9160Attach(uint16_t devid, HAL_SOFTC sc, 95 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status) 96{ 97 struct ath_hal_5416 *ahp5416; 98 struct ath_hal_5212 *ahp; 99 struct ath_hal *ah; 100 uint32_t val; 101 HAL_STATUS ecode; --- 206 unchanged lines hidden --- | 92ar9160Attach(uint16_t devid, HAL_SOFTC sc, 93 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status) 94{ 95 struct ath_hal_5416 *ahp5416; 96 struct ath_hal_5212 *ahp; 97 struct ath_hal *ah; 98 uint32_t val; 99 HAL_STATUS ecode; --- 206 unchanged lines hidden --- |