Deleted Added
full compact
ar2133.c (221163) ar2133.c (221483)
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 221163 2011-04-28 12:47:40Z adrian $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar2133.c 221483 2011-05-05 04:43:05Z 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

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

160 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
161 txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
162 } else {
163 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
164 txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN);
165 }
166 } else if ((freq % 20) == 0 && freq >= 5120) {
167 channelSel = ath_hal_reverseBits(((freq - 4800) / 20 << 2), 8);
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23
24#include "ah_eeprom_v14.h"
25

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

160 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
161 txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
162 } else {
163 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
164 txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN);
165 }
166 } else if ((freq % 20) == 0 && freq >= 5120) {
167 channelSel = ath_hal_reverseBits(((freq - 4800) / 20 << 2), 8);
168 if (AR_SREV_SOWL_10_OR_LATER(ah))
168 if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah))
169 aModeRefSel = ath_hal_reverseBits(3, 2);
170 else
171 aModeRefSel = ath_hal_reverseBits(1, 2);
172 } else if ((freq % 10) == 0) {
173 channelSel = ath_hal_reverseBits(((freq - 4800) / 10 << 1), 8);
174 if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah))
175 aModeRefSel = ath_hal_reverseBits(2, 2);
176 else

--- 375 unchanged lines hidden ---
169 aModeRefSel = ath_hal_reverseBits(3, 2);
170 else
171 aModeRefSel = ath_hal_reverseBits(1, 2);
172 } else if ((freq % 10) == 0) {
173 channelSel = ath_hal_reverseBits(((freq - 4800) / 10 << 1), 8);
174 if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah))
175 aModeRefSel = ath_hal_reverseBits(2, 2);
176 else

--- 375 unchanged lines hidden ---