if_ath.c (234089) | if_ath.c (234090) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 234089 2012-04-10 07:16:28Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 234090 2012-04-10 07:23:37Z adrian $"); |
32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 1450 unchanged lines hidden (view full) --- 1490 CTR5(ATH_KTR_INTR, 1491 "ath_intr: ISR=0x%.8x, ISR_S0=0x%.8x, ISR_S1=0x%.8x, ISR_S2=0x%.8x, ISR_S5=0x%.8x", 1492 ah->ah_intrstate[0], 1493 ah->ah_intrstate[1], 1494 ah->ah_intrstate[2], 1495 ah->ah_intrstate[3], 1496 ah->ah_intrstate[6]); 1497#endif | 32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 1450 unchanged lines hidden (view full) --- 1490 CTR5(ATH_KTR_INTR, 1491 "ath_intr: ISR=0x%.8x, ISR_S0=0x%.8x, ISR_S1=0x%.8x, ISR_S2=0x%.8x, ISR_S5=0x%.8x", 1492 ah->ah_intrstate[0], 1493 ah->ah_intrstate[1], 1494 ah->ah_intrstate[2], 1495 ah->ah_intrstate[3], 1496 ah->ah_intrstate[6]); 1497#endif |
1498 1499 /* Squirrel away SYNC interrupt debugging */ 1500 if (ah->ah_syncstate != 0) { 1501 int i; 1502 for (i = 0; i < 32; i++) 1503 if (ah->ah_syncstate & (i << i)) 1504 sc->sc_intr_stats.sync_intr[i]++; 1505 } 1506 |
|
1498 status &= sc->sc_imask; /* discard unasked for bits */ 1499 1500 /* Short-circuit un-handled interrupts */ 1501 if (status == 0x0) { 1502 ATH_PCU_UNLOCK(sc); 1503 return; 1504 } 1505 --- 4965 unchanged lines hidden (view full) --- 6471 sc->sc_stats.ast_tx_rate = 6472 rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC; 6473 if (rt->info[sc->sc_txrix].phy & IEEE80211_T_HT) 6474 sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS; 6475 return copyout(&sc->sc_stats, 6476 ifr->ifr_data, sizeof (sc->sc_stats)); 6477 case SIOCZATHSTATS: 6478 error = priv_check(curthread, PRIV_DRIVER); | 1507 status &= sc->sc_imask; /* discard unasked for bits */ 1508 1509 /* Short-circuit un-handled interrupts */ 1510 if (status == 0x0) { 1511 ATH_PCU_UNLOCK(sc); 1512 return; 1513 } 1514 --- 4965 unchanged lines hidden (view full) --- 6480 sc->sc_stats.ast_tx_rate = 6481 rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC; 6482 if (rt->info[sc->sc_txrix].phy & IEEE80211_T_HT) 6483 sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS; 6484 return copyout(&sc->sc_stats, 6485 ifr->ifr_data, sizeof (sc->sc_stats)); 6486 case SIOCZATHSTATS: 6487 error = priv_check(curthread, PRIV_DRIVER); |
6479 if (error == 0) | 6488 if (error == 0) { |
6480 memset(&sc->sc_stats, 0, sizeof(sc->sc_stats)); | 6489 memset(&sc->sc_stats, 0, sizeof(sc->sc_stats)); |
6490 memset(&sc->sc_intr_stats, 0, 6491 sizeof(sc->sc_intr_stats)); 6492 } |
|
6481 break; 6482#ifdef ATH_DIAGAPI 6483 case SIOCGATHDIAG: 6484 error = ath_ioctl_diag(sc, (struct ath_diag *) ifr); 6485 break; 6486 case SIOCGATHPHYERR: 6487 error = ath_ioctl_phyerr(sc,(struct ath_diag*) ifr); 6488 break; --- 426 unchanged lines hidden --- | 6493 break; 6494#ifdef ATH_DIAGAPI 6495 case SIOCGATHDIAG: 6496 error = ath_ioctl_diag(sc, (struct ath_diag *) ifr); 6497 break; 6498 case SIOCGATHPHYERR: 6499 error = ath_ioctl_phyerr(sc,(struct ath_diag*) ifr); 6500 break; --- 426 unchanged lines hidden --- |