ar5210_attach.c (225444) | ar5210_attach.c (225883) |
---|---|
1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2004 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-2004 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/ar5210/ar5210_attach.c 225444 2011-09-08 01:23:05Z adrian $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c 225883 2011-09-30 05:17:57Z adrian $ |
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ar5210/ar5210.h" --- 151 unchanged lines hidden (view full) --- 177#define N(a) (sizeof(a)/sizeof(a[0])) 178 struct ath_hal_5210 *ahp; 179 struct ath_hal *ah; 180 uint32_t revid, pcicfg; 181 uint16_t eeval; 182 HAL_STATUS ecode; 183 int i; 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 "ar5210/ar5210.h" --- 151 unchanged lines hidden (view full) --- 177#define N(a) (sizeof(a)/sizeof(a[0])) 178 struct ath_hal_5210 *ahp; 179 struct ath_hal *ah; 180 uint32_t revid, pcicfg; 181 uint16_t eeval; 182 HAL_STATUS ecode; 183 int i; 184 |
185 HALDEBUG_G(AH_NULL, HAL_DEBUG_ATTACH, | 185 HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, |
186 "%s: devid 0x%x sc %p st %p sh %p\n", __func__, devid, 187 sc, (void*) st, (void*) sh); 188 189 /* NB: memory is returned zero'd */ 190 ahp = ath_hal_malloc(sizeof (struct ath_hal_5210)); 191 if (ahp == AH_NULL) { | 186 "%s: devid 0x%x sc %p st %p sh %p\n", __func__, devid, 187 sc, (void*) st, (void*) sh); 188 189 /* NB: memory is returned zero'd */ 190 ahp = ath_hal_malloc(sizeof (struct ath_hal_5210)); 191 if (ahp == AH_NULL) { |
192 HALDEBUG_G(AH_NULL, HAL_DEBUG_ANY, | 192 HALDEBUG(AH_NULL, HAL_DEBUG_ANY, |
193 "%s: no memory for state block\n", __func__); 194 ecode = HAL_ENOMEM; 195 goto bad; 196 } 197 ah = &ahp->ah_priv.h; 198 /* set initial values */ 199 OS_MEMCPY(&ahp->ah_priv, &ar5210hal, sizeof(struct ath_hal_private)); 200 ah->ah_sc = sc; --- 196 unchanged lines hidden --- | 193 "%s: no memory for state block\n", __func__); 194 ecode = HAL_ENOMEM; 195 goto bad; 196 } 197 ah = &ahp->ah_priv.h; 198 /* set initial values */ 199 OS_MEMCPY(&ahp->ah_priv, &ar5210hal, sizeof(struct ath_hal_private)); 200 ah->ah_sc = sc; --- 196 unchanged lines hidden --- |