Deleted Added
full compact
ar5416_attach.c (218763) ar5416_attach.c (219393)
1/*
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * Copyright (c) 2002-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) 2002-2008 Sam Leffler, Errno Consulting
3 * Copyright (c) 2002-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/ar5416_attach.c 218763 2011-02-17 05:52:53Z adrian $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c 219393 2011-03-08 06:59:59Z adrian $
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"

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

57 .rssiThrLow = 7,
58 .period = 100,
59 };
60 /* NB: ANI is not enabled yet */
61 ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE);
62}
63
64/*
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"

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

57 .rssiThrLow = 7,
58 .period = 100,
59 };
60 /* NB: ANI is not enabled yet */
61 ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE);
62}
63
64/*
65 * AR5416 doesn't do OLC or temperature compensation.
66 */
67static void
68ar5416olcInit(struct ath_hal *ah)
69{
70}
71
72static void
73ar5416olcTempCompensation(struct ath_hal *ah)
74{
75}
76
77/*
65 * Attach for an AR5416 part.
66 */
67void
68ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
69 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
70{
71 struct ath_hal_5212 *ahp;
72 struct ath_hal *ah;

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

156
157 ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes;
158 ahp->ah_priv.ah_eepromRead = ar5416EepromRead;
159#ifdef AH_SUPPORT_WRITE_EEPROM
160 ahp->ah_priv.ah_eepromWrite = ar5416EepromWrite;
161#endif
162 ahp->ah_priv.ah_getChipPowerLimits = ar5416GetChipPowerLimits;
163
78 * Attach for an AR5416 part.
79 */
80void
81ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
82 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
83{
84 struct ath_hal_5212 *ahp;
85 struct ath_hal *ah;

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

169
170 ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes;
171 ahp->ah_priv.ah_eepromRead = ar5416EepromRead;
172#ifdef AH_SUPPORT_WRITE_EEPROM
173 ahp->ah_priv.ah_eepromWrite = ar5416EepromWrite;
174#endif
175 ahp->ah_priv.ah_getChipPowerLimits = ar5416GetChipPowerLimits;
176
177 /* Internal ops */
164 AH5416(ah)->ah_writeIni = ar5416WriteIni;
165 AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate;
178 AH5416(ah)->ah_writeIni = ar5416WriteIni;
179 AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate;
180
181 /* Internal TX power control related operations */
182 AH5416(ah)->ah_olcInit = ar5416olcInit;
183 AH5416(ah)->ah_olcTempCompensation = ar5416olcTempCompensation;
184 AH5416(ah)->ah_setPowerCalTable = ar5416SetPowerCalTable;
185
166 /*
167 * Start by setting all Owl devices to 2x2
168 */
169 AH5416(ah)->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK;
170 AH5416(ah)->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK;
171
172 /* Enable all ANI functions to begin with */
173 AH5416(ah)->ah_ani_function = HAL_ANI_ALL;

--- 682 unchanged lines hidden ---
186 /*
187 * Start by setting all Owl devices to 2x2
188 */
189 AH5416(ah)->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK;
190 AH5416(ah)->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK;
191
192 /* Enable all ANI functions to begin with */
193 AH5416(ah)->ah_ani_function = HAL_ANI_ALL;

--- 682 unchanged lines hidden ---