if_ath.c (155480) | if_ath.c (155481) |
---|---|
1/*- 2 * Copyright (c) 2002-2005 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 --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2005 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 --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 155480 2006-02-09 20:57:48Z sam $"); | 38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 155481 2006-02-09 21:03:25Z sam $"); |
39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 148 unchanged lines hidden (view full) --- 195static int ath_countrycode = CTRY_DEFAULT; /* country code */ 196SYSCTL_INT(_hw_ath, OID_AUTO, countrycode, CTLFLAG_RD, &ath_countrycode, 197 0, "country code"); 198TUNABLE_INT("hw.ath.countrycode", &ath_countrycode); 199static int ath_regdomain = 0; /* regulatory domain */ 200SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain, 201 0, "regulatory domain"); 202 | 39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 148 unchanged lines hidden (view full) --- 195static int ath_countrycode = CTRY_DEFAULT; /* country code */ 196SYSCTL_INT(_hw_ath, OID_AUTO, countrycode, CTLFLAG_RD, &ath_countrycode, 197 0, "country code"); 198TUNABLE_INT("hw.ath.countrycode", &ath_countrycode); 199static int ath_regdomain = 0; /* regulatory domain */ 200SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain, 201 0, "regulatory domain"); 202 |
203static int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */ 204SYSCTL_INT(_hw_ath, OID_AUTO, rxbuf, CTLFLAG_RD, &ath_rxbuf, 205 0, "rx buffers allocated"); 206TUNABLE_INT("hw.ath.rxbuf", &ath_rxbuf); 207static int ath_txbuf = ATH_TXBUF; /* # tx buffers to allocate */ 208SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTLFLAG_RD, &ath_txbuf, 209 0, "tx buffers allocated"); 210TUNABLE_INT("hw.ath.txbuf", &ath_txbuf); 211 |
|
203#ifdef AR_DEBUG 204static int ath_debug = 0; 205SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, 206 0, "control debugging printfs"); 207TUNABLE_INT("hw.ath.debug", &ath_debug); 208enum { 209 ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ 210 ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ --- 2162 unchanged lines hidden (view full) --- 2373} 2374 2375static int 2376ath_desc_alloc(struct ath_softc *sc) 2377{ 2378 int error; 2379 2380 error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, | 212#ifdef AR_DEBUG 213static int ath_debug = 0; 214SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, 215 0, "control debugging printfs"); 216TUNABLE_INT("hw.ath.debug", &ath_debug); 217enum { 218 ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ 219 ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ --- 2162 unchanged lines hidden (view full) --- 2382} 2383 2384static int 2385ath_desc_alloc(struct ath_softc *sc) 2386{ 2387 int error; 2388 2389 error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf, |
2381 "rx", ATH_RXBUF, 1); | 2390 "rx", ath_rxbuf, 1); |
2382 if (error != 0) 2383 return error; 2384 2385 error = ath_descdma_setup(sc, &sc->sc_txdma, &sc->sc_txbuf, | 2391 if (error != 0) 2392 return error; 2393 2394 error = ath_descdma_setup(sc, &sc->sc_txdma, &sc->sc_txbuf, |
2386 "tx", ATH_TXBUF, ATH_TXDESC); | 2395 "tx", ath_txbuf, ATH_TXDESC); |
2387 if (error != 0) { 2388 ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); 2389 return error; 2390 } 2391 2392 error = ath_descdma_setup(sc, &sc->sc_bdma, &sc->sc_bbuf, 2393 "beacon", 1, 1); 2394 if (error != 0) { --- 2581 unchanged lines hidden (view full) --- 4976 struct ath_txq *txq = sc->sc_ac2q[i]; 4977 if_printf(ifp, "Use hw queue %u for %s traffic\n", 4978 txq->axq_qnum, ieee80211_wme_acnames[i]); 4979 } 4980 if_printf(ifp, "Use hw queue %u for CAB traffic\n", 4981 sc->sc_cabq->axq_qnum); 4982 if_printf(ifp, "Use hw queue %u for beacons\n", sc->sc_bhalq); 4983 } | 2396 if (error != 0) { 2397 ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); 2398 return error; 2399 } 2400 2401 error = ath_descdma_setup(sc, &sc->sc_bdma, &sc->sc_bbuf, 2402 "beacon", 1, 1); 2403 if (error != 0) { --- 2581 unchanged lines hidden (view full) --- 4985 struct ath_txq *txq = sc->sc_ac2q[i]; 4986 if_printf(ifp, "Use hw queue %u for %s traffic\n", 4987 txq->axq_qnum, ieee80211_wme_acnames[i]); 4988 } 4989 if_printf(ifp, "Use hw queue %u for CAB traffic\n", 4990 sc->sc_cabq->axq_qnum); 4991 if_printf(ifp, "Use hw queue %u for beacons\n", sc->sc_bhalq); 4992 } |
4993 if (ath_rxbuf != ATH_RXBUF) 4994 if_printf(ifp, "using %u rx buffers\n", ath_rxbuf); 4995 if (ath_txbuf != ATH_TXBUF) 4996 if_printf(ifp, "using %u tx buffers\n", ath_txbuf); |
|
4984#undef HAL_MODE_DUALBAND 4985} | 4997#undef HAL_MODE_DUALBAND 4998} |