Deleted Added
full compact
ar5211_attach.c (188970) ar5211_attach.c (188972)
1/*
2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3 * Copyright (c) 2002-2006 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-2006 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/ar5211/ar5211_attach.c 188970 2009-02-23 23:48:17Z sam $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5211/ar5211_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 "ar5211/ar5211.h"

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

177 val = (OS_REG_READ(ah, AR_PHY_BASE + (256 << 2)) >> 24) & 0xff;
178 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
179 return ath_hal_reverseBits(val, 8);
180}
181
182/*
183 * Attach for an AR5211 part.
184 */
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23#include "ah_devid.h"
24
25#include "ar5211/ar5211.h"

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

177 val = (OS_REG_READ(ah, AR_PHY_BASE + (256 << 2)) >> 24) & 0xff;
178 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
179 return ath_hal_reverseBits(val, 8);
180}
181
182/*
183 * Attach for an AR5211 part.
184 */
185struct ath_hal *
185static struct ath_hal *
186ar5211Attach(uint16_t devid, HAL_SOFTC sc,
187 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
188{
189#define N(a) (sizeof(a)/sizeof(a[0]))
190 struct ath_hal_5211 *ahp;
191 struct ath_hal *ah;
192 uint32_t val;
193 uint16_t eeval;

--- 312 unchanged lines hidden ---
186ar5211Attach(uint16_t devid, HAL_SOFTC sc,
187 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
188{
189#define N(a) (sizeof(a)/sizeof(a[0]))
190 struct ath_hal_5211 *ahp;
191 struct ath_hal *ah;
192 uint32_t val;
193 uint16_t eeval;

--- 312 unchanged lines hidden ---