Deleted Added
full compact
ar5416_attach.c (188972) ar5416_attach.c (188973)
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 188972 2009-02-23 23:58:37Z sam $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c 188973 2009-02-24 00:03:14Z 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 "ar5416/ar5416.h"

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

239 int rows, cols;
240 };
241 /* override CLKDRV value */
242 OS_MEMCPY(&AH5416(ah)[1], ar5416Addac, sizeof(ar5416Addac));
243 AH5416(ah)->ah_ini_addac.data = (uint32_t *) &AH5416(ah)[1];
244 HAL_INI_VAL((struct ini *)&AH5416(ah)->ah_ini_addac, 31, 1) = 0;
245 }
246
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23#include "ah_devid.h"
24
25#include "ar5416/ar5416.h"

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

239 int rows, cols;
240 };
241 /* override CLKDRV value */
242 OS_MEMCPY(&AH5416(ah)[1], ar5416Addac, sizeof(ar5416Addac));
243 AH5416(ah)->ah_ini_addac.data = (uint32_t *) &AH5416(ah)[1];
244 HAL_INI_VAL((struct ini *)&AH5416(ah)->ah_ini_addac, 31, 1) = 0;
245 }
246
247 ecode = ath_hal_v14EepromAttach(ah);
248 if (ecode != HAL_OK)
249 goto bad;
250
247 if (!ar5416ChipReset(ah, AH_NULL)) { /* reset chip */
248 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n",
249 __func__);
250 ecode = HAL_EIO;
251 goto bad;
252 }
253
254 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID);

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

292 "%s: 5G Radio Chip Rev 0x%02X is not supported by "
293 "this driver\n", __func__,
294 AH_PRIVATE(ah)->ah_analog5GhzRev);
295 ecode = HAL_ENOTSUPP;
296 goto bad;
297#endif
298 }
299
251 if (!ar5416ChipReset(ah, AH_NULL)) { /* reset chip */
252 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n",
253 __func__);
254 ecode = HAL_EIO;
255 goto bad;
256 }
257
258 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID);

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

296 "%s: 5G Radio Chip Rev 0x%02X is not supported by "
297 "this driver\n", __func__,
298 AH_PRIVATE(ah)->ah_analog5GhzRev);
299 ecode = HAL_ENOTSUPP;
300 goto bad;
301#endif
302 }
303
300 ecode = ath_hal_v14EepromAttach(ah);
301 if (ecode != HAL_OK)
302 goto bad;
303
304 /*
305 * Got everything we need now to setup the capabilities.
306 */
307 if (!ar5416FillCapabilityInfo(ah)) {
308 ecode = HAL_EEREAD;
309 goto bad;
310 }
311

--- 185 unchanged lines hidden ---
304 /*
305 * Got everything we need now to setup the capabilities.
306 */
307 if (!ar5416FillCapabilityInfo(ah)) {
308 ecode = HAL_EEREAD;
309 goto bad;
310 }
311

--- 185 unchanged lines hidden ---