ar9280_attach.c (203882) | ar9280_attach.c (203930) |
---|---|
1/* 2 * Copyright (c) 2008-2009 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-2009 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/ar9280_attach.c 203882 2010-02-14 16:26:32Z rpaulo $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c 203930 2010-02-15 17:49:49Z rpaulo $ |
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ah_eeprom_v14.h" /* XXX for tx/rx gain */ --- 33 unchanged lines hidden (view full) --- 59 .calCollect = ar5416AdcDcCalCollect, 60 .calPostProc = ar5416AdcDcCalibration 61}; 62 63static void ar9280ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); 64static HAL_BOOL ar9280FillCapabilityInfo(struct ath_hal *ah); 65static void ar9280WriteIni(struct ath_hal *ah, 66 const struct ieee80211_channel *chan); | 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ah_eeprom_v14.h" /* XXX for tx/rx gain */ --- 33 unchanged lines hidden (view full) --- 59 .calCollect = ar5416AdcDcCalCollect, 60 .calPostProc = ar5416AdcDcCalibration 61}; 62 63static void ar9280ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); 64static HAL_BOOL ar9280FillCapabilityInfo(struct ath_hal *ah); 65static void ar9280WriteIni(struct ath_hal *ah, 66 const struct ieee80211_channel *chan); |
67static void ar9280SpurMitigate(struct ath_hal *ah, 68 const struct ieee80211_channel *chan); | |
69 70static void 71ar9280AniSetup(struct ath_hal *ah) 72{ 73 /* NB: disable ANI for reliable RIFS rx */ 74 ar5212AniAttach(ah, AH_NULL, AH_NULL, AH_FALSE); 75} 76 --- 278 unchanged lines hidden (view full) --- 355 } 356} 357 358#define AR_BASE_FREQ_2GHZ 2300 359#define AR_BASE_FREQ_5GHZ 4900 360#define AR_SPUR_FEEQ_BOUND_HT40 19 361#define AR_SPUR_FEEQ_BOUND_HT20 10 362 | 67 68static void 69ar9280AniSetup(struct ath_hal *ah) 70{ 71 /* NB: disable ANI for reliable RIFS rx */ 72 ar5212AniAttach(ah, AH_NULL, AH_NULL, AH_FALSE); 73} 74 --- 278 unchanged lines hidden (view full) --- 353 } 354} 355 356#define AR_BASE_FREQ_2GHZ 2300 357#define AR_BASE_FREQ_5GHZ 4900 358#define AR_SPUR_FEEQ_BOUND_HT40 19 359#define AR_SPUR_FEEQ_BOUND_HT20 10 360 |
363static void | 361void |
364ar9280SpurMitigate(struct ath_hal *ah, const struct ieee80211_channel *chan) 365{ 366 static const int pilot_mask_reg[4] = { AR_PHY_TIMING7, AR_PHY_TIMING8, 367 AR_PHY_PILOT_MASK_01_30, AR_PHY_PILOT_MASK_31_60 }; 368 static const int chan_mask_reg[4] = { AR_PHY_TIMING9, AR_PHY_TIMING10, 369 AR_PHY_CHANNEL_MASK_01_30, AR_PHY_CHANNEL_MASK_31_60 }; 370 static int inc[4] = { 0, 100, 0, 0 }; 371 --- 367 unchanged lines hidden --- | 362ar9280SpurMitigate(struct ath_hal *ah, const struct ieee80211_channel *chan) 363{ 364 static const int pilot_mask_reg[4] = { AR_PHY_TIMING7, AR_PHY_TIMING8, 365 AR_PHY_PILOT_MASK_01_30, AR_PHY_PILOT_MASK_31_60 }; 366 static const int chan_mask_reg[4] = { AR_PHY_TIMING9, AR_PHY_TIMING10, 367 AR_PHY_CHANNEL_MASK_01_30, AR_PHY_CHANNEL_MASK_31_60 }; 368 static int inc[4] = { 0, 100, 0, 0 }; 369 --- 367 unchanged lines hidden --- |