if_ath.c (224550) | if_ath.c (224588) |
---|---|
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 224550 2011-07-31 16:16:25Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 224588 2011-08-02 02:46:03Z 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 --- 1344 unchanged lines hidden (view full) --- 1384 * traffic so any frames held on the staging 1385 * queue are aged and potentially flushed. 1386 */ 1387 taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); 1388#endif 1389 } 1390 } 1391 if (status & HAL_INT_RXEOL) { | 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 --- 1344 unchanged lines hidden (view full) --- 1384 * traffic so any frames held on the staging 1385 * queue are aged and potentially flushed. 1386 */ 1387 taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); 1388#endif 1389 } 1390 } 1391 if (status & HAL_INT_RXEOL) { |
1392 int imask = sc->sc_imask; |
|
1392 /* 1393 * NB: the hardware should re-read the link when 1394 * RXE bit is written, but it doesn't work at 1395 * least on older hardware revs. 1396 */ 1397 sc->sc_stats.ast_rxeol++; 1398 /* 1399 * Disable RXEOL/RXORN - prevent an interrupt 1400 * storm until the PCU logic can be reset. | 1393 /* 1394 * NB: the hardware should re-read the link when 1395 * RXE bit is written, but it doesn't work at 1396 * least on older hardware revs. 1397 */ 1398 sc->sc_stats.ast_rxeol++; 1399 /* 1400 * Disable RXEOL/RXORN - prevent an interrupt 1401 * storm until the PCU logic can be reset. |
1402 * In case the interface is reset some other 1403 * way before "sc_kickpcu" is called, don't 1404 * modify sc_imask - that way if it is reset 1405 * by a call to ath_reset() somehow, the 1406 * interrupt mask will be correctly reprogrammed. |
|
1401 */ | 1407 */ |
1402 sc->sc_imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN); 1403 ath_hal_intrset(ah, sc->sc_imask); | 1408 imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN); 1409 ath_hal_intrset(ah, imask); 1410 /* 1411 * Enqueue an RX proc, to handled whatever 1412 * is in the RX queue. 1413 * This will then kick the PCU. 1414 */ 1415 taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); |
1404 sc->sc_rxlink = NULL; | 1416 sc->sc_rxlink = NULL; |
1417 sc->sc_kickpcu = 1; |
|
1405 } 1406 if (status & HAL_INT_TXURN) { 1407 sc->sc_stats.ast_txurn++; 1408 /* bump tx trigger level */ 1409 ath_hal_updatetxtriglevel(ah, AH_TRUE); 1410 } 1411 if (status & HAL_INT_RX) 1412 taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); --- 2358 unchanged lines hidden (view full) --- 3771 ath_hal_rxmonitor(ah, &sc->sc_halstats, sc->sc_curchan); 3772 if (ngood) 3773 sc->sc_lastrx = tsf; 3774 3775 /* Queue DFS tasklet if needed */ 3776 if (ath_dfs_tasklet_needed(sc, sc->sc_curchan)) 3777 taskqueue_enqueue(sc->sc_tq, &sc->sc_dfstask); 3778 | 1418 } 1419 if (status & HAL_INT_TXURN) { 1420 sc->sc_stats.ast_txurn++; 1421 /* bump tx trigger level */ 1422 ath_hal_updatetxtriglevel(ah, AH_TRUE); 1423 } 1424 if (status & HAL_INT_RX) 1425 taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); --- 2358 unchanged lines hidden (view full) --- 3784 ath_hal_rxmonitor(ah, &sc->sc_halstats, sc->sc_curchan); 3785 if (ngood) 3786 sc->sc_lastrx = tsf; 3787 3788 /* Queue DFS tasklet if needed */ 3789 if (ath_dfs_tasklet_needed(sc, sc->sc_curchan)) 3790 taskqueue_enqueue(sc->sc_tq, &sc->sc_dfstask); 3791 |
3792 /* 3793 * Now that all the RX frames were handled that 3794 * need to be handled, kick the PCU if there's 3795 * been an RXEOL condition. 3796 */ 3797 if (sc->sc_kickpcu) { 3798 sc->sc_kickpcu = 0; 3799 ath_stoprecv(sc); 3800 sc->sc_imask |= (HAL_INT_RXEOL | HAL_INT_RXORN); 3801 if (ath_startrecv(sc) != 0) { 3802 if_printf(ifp, 3803 "%s: couldn't restart RX after RXEOL; resetting\n", 3804 __func__); 3805 ath_reset(ifp); 3806 return; 3807 } 3808 ath_hal_intrset(ah, sc->sc_imask); 3809 } 3810 |
|
3779 if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { 3780#ifdef IEEE80211_SUPPORT_SUPERG 3781 ieee80211_ff_age_all(ic, 100); 3782#endif 3783 if (!IFQ_IS_EMPTY(&ifp->if_snd)) 3784 ath_start(ifp); 3785 } 3786#undef PA2DESC --- 2024 unchanged lines hidden --- | 3811 if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { 3812#ifdef IEEE80211_SUPPORT_SUPERG 3813 ieee80211_ff_age_all(ic, 100); 3814#endif 3815 if (!IFQ_IS_EMPTY(&ifp->if_snd)) 3816 ath_start(ifp); 3817 } 3818#undef PA2DESC --- 2024 unchanged lines hidden --- |