Deleted Added
full compact
ar2133.c (219605) ar2133.c (219942)
1/*
2 * Copyright (c) 2002-2009 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-2009 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/ar2133.c 219605 2011-03-13 13:00:45Z adrian $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar2133.c 219942 2011-03-23 23:48:44Z adrian $
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23
24#include "ah_eeprom_v14.h"
25

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

180 aModeRefSel = ath_hal_reverseBits(1, 2);
181 } else {
182 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: invalid channel %u MHz\n",
183 __func__, freq);
184 return AH_FALSE;
185 }
186
187 /* Workaround for hw bug - AR5416 specific */
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23
24#include "ah_eeprom_v14.h"
25

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

180 aModeRefSel = ath_hal_reverseBits(1, 2);
181 } else {
182 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: invalid channel %u MHz\n",
183 __func__, freq);
184 return AH_FALSE;
185 }
186
187 /* Workaround for hw bug - AR5416 specific */
188 if (AR_SREV_OWL(ah))
188 if (AR_SREV_OWL(ah) && ath_hal_ar5416_biasadj)
189 ar2133ForceBias(ah, freq);
190
191 reg32 = (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) |
192 (1 << 5) | 0x1;
193
194 OS_REG_WRITE(ah, AR_PHY(0x37), reg32);
195
196 AH_PRIVATE(ah)->ah_curchan = chan;

--- 347 unchanged lines hidden ---
189 ar2133ForceBias(ah, freq);
190
191 reg32 = (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) |
192 (1 << 5) | 0x1;
193
194 OS_REG_WRITE(ah, AR_PHY(0x37), reg32);
195
196 AH_PRIVATE(ah)->ah_curchan = chan;

--- 347 unchanged lines hidden ---