Deleted Added
full compact
ar5416_attach.c (227372) ar5416_attach.c (227410)
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 227372 2011-11-09 04:35:33Z adrian $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c 227410 2011-11-09 22:39:44Z 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 "ah_eeprom_v14.h"

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

903
904 if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) &&
905 ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) {
906 /* NB: enabled by default */
907 ahpriv->ah_rfkillEnabled = AH_TRUE;
908 pCap->halRfSilentSupport = AH_TRUE;
909 }
910
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23#include "ah_devid.h"
24
25#include "ah_eeprom_v14.h"

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

903
904 if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) &&
905 ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) {
906 /* NB: enabled by default */
907 ahpriv->ah_rfkillEnabled = AH_TRUE;
908 pCap->halRfSilentSupport = AH_TRUE;
909 }
910
911 /*
912 * The MAC will mark frames as RXed if there's a descriptor
913 * to write them to. So if it hits a self-linked final descriptor,
914 * it'll keep ACKing frames even though they're being silently
915 * dropped. Thus, this particular feature of the driver can't
916 * be used for 802.11n devices.
917 */
911 ahpriv->ah_rxornIsFatal = AH_FALSE;
912
918 ahpriv->ah_rxornIsFatal = AH_FALSE;
919
920 /*
921 * If it's a PCI NIC, ask the HAL OS layer to serialise
922 * register access, or SMP machines may cause the hardware
923 * to hang. This is applicable to AR5416 and AR9220; I'm not
924 * sure about AR9160 or AR9227.
925 */
926 if (! AH_PRIVATE(ah)->ah_ispcie)
927 pCap->halSerialiseRegWar = 1;
928
913 return AH_TRUE;
914}
915
916static const char*
917ar5416Probe(uint16_t vendorid, uint16_t devid)
918{
919 if (vendorid == ATHEROS_VENDOR_ID) {
920 if (devid == AR5416_DEVID_PCI)
921 return "Atheros 5416";
922 if (devid == AR5416_DEVID_PCIE)
923 return "Atheros 5418";
924 }
925 return AH_NULL;
926}
927AH_CHIP(AR5416, ar5416Probe, ar5416Attach);
929 return AH_TRUE;
930}
931
932static const char*
933ar5416Probe(uint16_t vendorid, uint16_t devid)
934{
935 if (vendorid == ATHEROS_VENDOR_ID) {
936 if (devid == AR5416_DEVID_PCI)
937 return "Atheros 5416";
938 if (devid == AR5416_DEVID_PCIE)
939 return "Atheros 5418";
940 }
941 return AH_NULL;
942}
943AH_CHIP(AR5416, ar5416Probe, ar5416Attach);