Deleted Added
full compact
ar9130_attach.c (223466) ar9130_attach.c (225883)
1/*
2 * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
3 * Copyright (c) 2008 Sam Leffler, Errno Consulting
4 * Copyright (c) 2008 Atheros Communications, Inc.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
1/*
2 * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
3 * Copyright (c) 2008 Sam Leffler, Errno Consulting
4 * Copyright (c) 2008 Atheros Communications, Inc.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $FreeBSD: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c 223466 2011-06-23 06:55:29Z adrian $
18 * $FreeBSD: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c 225883 2011-09-30 05:17:57Z adrian $
19 */
20#include "opt_ah.h"
21
22#include "ah.h"
23#include "ah_internal.h"
24#include "ah_devid.h"
25
26#include "ar5416/ar5416.h"

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

73{
74 struct ath_hal_5416 *ahp5416;
75 struct ath_hal_5212 *ahp;
76 struct ath_hal *ah;
77 uint32_t val;
78 HAL_STATUS ecode;
79 HAL_BOOL rfStatus;
80
19 */
20#include "opt_ah.h"
21
22#include "ah.h"
23#include "ah_internal.h"
24#include "ah_devid.h"
25
26#include "ar5416/ar5416.h"

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

73{
74 struct ath_hal_5416 *ahp5416;
75 struct ath_hal_5212 *ahp;
76 struct ath_hal *ah;
77 uint32_t val;
78 HAL_STATUS ecode;
79 HAL_BOOL rfStatus;
80
81 HALDEBUG_G(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n",
81 HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n",
82 __func__, sc, (void*) st, (void*) sh);
83
84 /* NB: memory is returned zero'd */
85 ahp5416 = ath_hal_malloc(sizeof (struct ath_hal_5416));
86 if (ahp5416 == AH_NULL) {
82 __func__, sc, (void*) st, (void*) sh);
83
84 /* NB: memory is returned zero'd */
85 ahp5416 = ath_hal_malloc(sizeof (struct ath_hal_5416));
86 if (ahp5416 == AH_NULL) {
87 HALDEBUG_G(AH_NULL, HAL_DEBUG_ANY,
87 HALDEBUG(AH_NULL, HAL_DEBUG_ANY,
88 "%s: cannot allocate memory for state block\n", __func__);
89 *status = HAL_ENOMEM;
90 return AH_NULL;
91 }
92 ar5416InitState(ahp5416, devid, sc, st, sh, status);
93 ahp = &ahp5416->ah_5212;
94 ah = &ahp->ah_priv.h;
95

--- 217 unchanged lines hidden ---
88 "%s: cannot allocate memory for state block\n", __func__);
89 *status = HAL_ENOMEM;
90 return AH_NULL;
91 }
92 ar5416InitState(ahp5416, devid, sc, st, sh, status);
93 ahp = &ahp5416->ah_5212;
94 ah = &ahp->ah_priv.h;
95

--- 217 unchanged lines hidden ---