PERFORCE change 87661 for review
Sam Leffler
sam at FreeBSD.org
Fri Dec 2 23:12:49 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=87661
Change 87661 by sam at sam_ebb on 2005/12/02 23:12:18
allow tx+rx buffer counts to be specified with options
Affected files ...
.. //depot/projects/wifi/sys/conf/options#22 edit
.. //depot/projects/wifi/sys/dev/ath/if_ath.c#120 edit
.. //depot/projects/wifi/sys/dev/ath/if_athvar.h#47 edit
Differences ...
==== //depot/projects/wifi/sys/conf/options#22 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.513 2005/07/27 21:47:55 pjd Exp $
+# $FreeBSD: src/sys/conf/options,v 1.517 2005/10/14 18:24:58 jhb Exp $
#
# On the handling of kernel options
#
@@ -327,7 +327,7 @@
BOOTP_NFSROOT opt_bootp.h
BOOTP_NFSV3 opt_bootp.h
BOOTP_WIRED_TO opt_bootp.h
-BRIDGE opt_bdg.h
+DEVICE_POLLING
DEV_PF opt_pf.h
DEV_PFLOG opt_pf.h
DEV_PFSYNC opt_pf.h
@@ -478,7 +478,6 @@
LOCKF_DEBUG opt_debug_lockf.h
NETATALKDEBUG opt_atalk.h
SI_DEBUG opt_debug_si.h
-SX_DEBUG opt_debug_sx.h
# Fb options
FB_DEBUG opt_fb.h
@@ -623,7 +622,6 @@
EISA_SLOTS opt_eisa.h
# ed driver
-ED_NO_MIIBUS opt_ed.h
ED_HPP opt_ed.h
ED_3C503 opt_ed.h
ED_SIC opt_ed.h
@@ -634,9 +632,6 @@
# wi driver
WI_SYMBOL_FIRMWARE opt_wi.h
-# XXX bogusly global.
-DEVICE_POLLING opt_global.h
-
SOCKBUF_DEBUG opt_global.h
# options for ubsec driver
@@ -692,9 +687,21 @@
AH_SUPPORT_5111 opt_ah.h
AH_SUPPORT_5112 opt_ah.h
AH_SUPPORT_2413 opt_ah.h
+AH_SUPPORT_2316 opt_ah.h
+AH_SUPPORT_5413 opt_ah.h
AH_DEBUG opt_ah.h
AH_DEBUG_ALQ opt_ah.h
+AH_DEBUG_COUNTRY opt_ah.h
AH_ASSERT opt_ah.h
+AH_SUPPORT_DFS opt_ah.h
+AH_SUPPORT_XR opt_ah.h
+AH_RADAR_CALIBRATE opt_ah.h
+AH_NEED_DESC_SWAP opt_ah.h
+AH_PRIVATE_DIAG opt_ah.h
+
+# options for the ath driver
+ATH_TXBUF opt_ath.h
+ATH_RXBUF opt_ath.h
# dcons options
DCONS_BUF_SIZE opt_dcons.h
==== //depot/projects/wifi/sys/dev/ath/if_ath.c#120 (text+ko) ====
@@ -48,6 +48,7 @@
#include "opt_device_polling.h"
#endif
#include "opt_inet.h"
+#include "opt_ath.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -212,6 +213,15 @@
SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain,
0, "regulatory domain");
+static int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */
+SYSCTL_INT(_hw_ath, OID_AUTO, rxbuf, CTLFLAG_RD, &ath_rxbuf,
+ 0, "rx buffers allocated");
+TUNABLE_INT("hw.ath.rxbuf", &ath_rxbuf);
+static int ath_txbuf = ATH_TXBUF; /* # tx buffers to allocate */
+SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTLFLAG_RD, &ath_txbuf,
+ 0, "tx buffers allocated");
+TUNABLE_INT("hw.ath.txbuf", &ath_txbuf);
+
#ifdef AR_DEBUG
static int ath_debug = 0;
SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug,
@@ -2941,12 +2951,12 @@
int error;
error = ath_descdma_setup(sc, &sc->sc_rxdma, &sc->sc_rxbuf,
- "rx", ATH_RXBUF, 1);
+ "rx", ath_rxbuf, 1);
if (error != 0)
return error;
error = ath_descdma_setup(sc, &sc->sc_txdma, &sc->sc_txbuf,
- "tx", ATH_TXBUF, ATH_TXDESC);
+ "tx", ath_txbuf, ATH_TXDESC);
if (error != 0) {
ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf);
return error;
==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#47 (text+ko) ====
@@ -49,8 +49,12 @@
#define ATH_TIMEOUT 1000
+#ifndef ATH_RXBUF
#define ATH_RXBUF 40 /* number of RX buffers */
+#endif
+#ifndef ATH_TXBUF
#define ATH_TXBUF 200 /* number of TX buffers */
+#endif
#define ATH_TXDESC 10 /* number of descriptors per buffer */
#define ATH_TXMAXTRY 11 /* max number of transmit attempts */
#define ATH_TXMGTTRY 4 /* xmit attempts for mgt/ctl frames */
More information about the p4-projects
mailing list