if_ath.c (222585) | if_ath.c (222668) |
---|---|
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 222585 2011-06-01 20:09:49Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 222668 2011-06-04 04:14:59Z 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 --- 1216 unchanged lines hidden (view full) --- 1256 /* 1257 * Must reset the chip before we reload the 1258 * keycache as we were powered down on suspend. 1259 */ 1260 ath_hal_reset(ah, sc->sc_opmode, 1261 sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan, 1262 AH_FALSE, &status); 1263 ath_reset_keycache(sc); | 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 --- 1216 unchanged lines hidden (view full) --- 1256 /* 1257 * Must reset the chip before we reload the 1258 * keycache as we were powered down on suspend. 1259 */ 1260 ath_hal_reset(ah, sc->sc_opmode, 1261 sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan, 1262 AH_FALSE, &status); 1263 ath_reset_keycache(sc); |
1264 1265 /* Let DFS at it in case it's a DFS channel */ 1266 ath_dfs_radar_enable(sc, ic->ic_curchan); 1267 |
|
1264 if (sc->sc_resume_up) { 1265 if (ic->ic_opmode == IEEE80211_M_STA) { 1266 ath_init(sc); 1267 /* 1268 * Program the beacon registers using the last rx'd 1269 * beacon frame and enable sync on the next beacon 1270 * we see. This should handle the case where we 1271 * wakeup and find the same AP and also the case where --- 736 unchanged lines hidden (view full) --- 2008 if (sc->sc_hasbmatch) 2009 rfilt |= HAL_RX_FILTER_BSSID; 2010 else 2011 rfilt |= HAL_RX_FILTER_PROM; 2012 } 2013 if (ic->ic_opmode == IEEE80211_M_MONITOR) 2014 rfilt |= HAL_RX_FILTER_CONTROL; 2015 | 1268 if (sc->sc_resume_up) { 1269 if (ic->ic_opmode == IEEE80211_M_STA) { 1270 ath_init(sc); 1271 /* 1272 * Program the beacon registers using the last rx'd 1273 * beacon frame and enable sync on the next beacon 1274 * we see. This should handle the case where we 1275 * wakeup and find the same AP and also the case where --- 736 unchanged lines hidden (view full) --- 2012 if (sc->sc_hasbmatch) 2013 rfilt |= HAL_RX_FILTER_BSSID; 2014 else 2015 rfilt |= HAL_RX_FILTER_PROM; 2016 } 2017 if (ic->ic_opmode == IEEE80211_M_MONITOR) 2018 rfilt |= HAL_RX_FILTER_CONTROL; 2019 |
2020 if (sc->sc_dodfs) { 2021 rfilt |= HAL_RX_FILTER_PHYRADAR; 2022 } 2023 |
|
2016 /* 2017 * Enable RX of compressed BAR frames only when doing 2018 * 802.11n. Required for A-MPDU. 2019 */ 2020 if (IEEE80211_IS_CHAN_HT(ic->ic_curchan)) 2021 rfilt |= HAL_RX_FILTER_COMPBAR; 2022 2023 DPRINTF(sc, ATH_DEBUG_MODE, "%s: RX filter 0x%x, %s if_flags 0x%x\n", --- 1436 unchanged lines hidden (view full) --- 3460 if (rs->rs_status != 0) { 3461 if (rs->rs_status & HAL_RXERR_CRC) 3462 sc->sc_stats.ast_rx_crcerr++; 3463 if (rs->rs_status & HAL_RXERR_FIFO) 3464 sc->sc_stats.ast_rx_fifoerr++; 3465 if (rs->rs_status & HAL_RXERR_PHY) { 3466 sc->sc_stats.ast_rx_phyerr++; 3467 /* Process DFS radar events */ | 2024 /* 2025 * Enable RX of compressed BAR frames only when doing 2026 * 802.11n. Required for A-MPDU. 2027 */ 2028 if (IEEE80211_IS_CHAN_HT(ic->ic_curchan)) 2029 rfilt |= HAL_RX_FILTER_COMPBAR; 2030 2031 DPRINTF(sc, ATH_DEBUG_MODE, "%s: RX filter 0x%x, %s if_flags 0x%x\n", --- 1436 unchanged lines hidden (view full) --- 3468 if (rs->rs_status != 0) { 3469 if (rs->rs_status & HAL_RXERR_CRC) 3470 sc->sc_stats.ast_rx_crcerr++; 3471 if (rs->rs_status & HAL_RXERR_FIFO) 3472 sc->sc_stats.ast_rx_fifoerr++; 3473 if (rs->rs_status & HAL_RXERR_PHY) { 3474 sc->sc_stats.ast_rx_phyerr++; 3475 /* Process DFS radar events */ |
3468 ath_dfs_process_phy_err(sc, ds, tsf, rs); | 3476 ath_dfs_process_phy_err(sc, mtod(m, char *), tsf, rs); |
3469 3470 /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ 3471 if (rs->rs_phyerr < 64) 3472 sc->sc_stats.ast_rx_phy[rs->rs_phyerr]++; 3473 goto rx_error; /* NB: don't count in ierrors */ 3474 } 3475 if (rs->rs_status & HAL_RXERR_DECRYPT) { 3476 /* --- 2244 unchanged lines hidden --- | 3477 3478 /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ 3479 if (rs->rs_phyerr < 64) 3480 sc->sc_stats.ast_rx_phy[rs->rs_phyerr]++; 3481 goto rx_error; /* NB: don't count in ierrors */ 3482 } 3483 if (rs->rs_status & HAL_RXERR_DECRYPT) { 3484 /* --- 2244 unchanged lines hidden --- |