if_athioctl.h revision 119147
137535Sdes/*-
2226537Sdes * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
337535Sdes * All rights reserved.
437535Sdes *
537535Sdes * Redistribution and use in source and binary forms, with or without
637535Sdes * modification, are permitted provided that the following conditions
737535Sdes * are met:
837535Sdes * 1. Redistributions of source code must retain the above copyright
937535Sdes *    notice, this list of conditions and the following disclaimer,
1037535Sdes *    without modification.
1137535Sdes * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1237535Sdes *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
1337535Sdes *    redistribution must be conditioned upon including a substantially
1437535Sdes *    similar Disclaimer requirement for further binary redistribution.
1537535Sdes * 3. Neither the names of the above-listed copyright holders nor the names
1637535Sdes *    of any contributors may be used to endorse or promote products derived
1737535Sdes *    from this software without specific prior written permission.
1837535Sdes *
1937535Sdes * Alternatively, this software may be distributed under the terms of the
2037535Sdes * GNU General Public License ("GPL") version 2 as published by the Free
2137535Sdes * Software Foundation.
2237535Sdes *
2337535Sdes * NO WARRANTY
2437535Sdes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2537535Sdes * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2637535Sdes * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
2737535Sdes * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
2837535Sdes * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
2984203Sdillon * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3084203Sdillon * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3184203Sdillon * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
3237535Sdes * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3340975Sdes * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3437535Sdes * THE POSSIBILITY OF SUCH DAMAGES.
3537535Sdes *
3637535Sdes * $FreeBSD: head/sys/dev/ath/if_athioctl.h 119147 2003-08-19 21:35:08Z sam $
3737535Sdes */
3837535Sdes
3937535Sdes/*
4037535Sdes * Ioctl-related defintions for the Atheros Wireless LAN controller driver.
4140975Sdes */
4237535Sdes#ifndef _DEV_ATH_ATHIOCTL_H
4377238Sdes#define _DEV_ATH_ATHIOCTL_H
4460924Sdes
4560924Sdesstruct ath_stats {
4660924Sdes	u_int32_t	ast_watchdog;	/* device reset by watchdog */
4763334Sdes	u_int32_t	ast_hardware;	/* fatal hardware error interrupts */
4887560Sdes	u_int32_t	ast_bmiss;	/* beacon miss interrupts */
4941862Sdes	u_int32_t	ast_rxorn;	/* rx overrun interrupts */
5041862Sdes	u_int32_t	ast_rxeol;	/* rx eol interrupts */
5140975Sdes	u_int32_t	ast_txurn;	/* tx underrun interrupts */
5237535Sdes	u_int32_t	ast_intrcoal;	/* interrupts coalesced */
5340939Sdes	u_int32_t	ast_tx_mgmt;	/* management frames transmitted */
5440975Sdes	u_int32_t	ast_tx_discard;	/* frames discarded prior to assoc */
5540975Sdes	u_int32_t	ast_tx_qstop;	/* output stopped 'cuz no buffer */
5640975Sdes	u_int32_t	ast_tx_encap;	/* tx encapsulation failed */
5740975Sdes	u_int32_t	ast_tx_nonode;	/* tx failed 'cuz no node */
5840975Sdes	u_int32_t	ast_tx_nombuf;	/* tx failed 'cuz no mbuf */
59174588Sdes	u_int32_t	ast_tx_nomcl;	/* tx failed 'cuz no cluster */
6090267Sdes	u_int32_t	ast_tx_linear;	/* tx linearized to cluster */
6190267Sdes	u_int32_t	ast_tx_nodata;	/* tx discarded empty frame */
6290267Sdes	u_int32_t	ast_tx_busdma;	/* tx failed for dma resrcs */
6390267Sdes	u_int32_t	ast_tx_xretries;/* tx failed 'cuz too many retries */
6440975Sdes	u_int32_t	ast_tx_fifoerr;	/* tx failed 'cuz FIFO underrun */
6540975Sdes	u_int32_t	ast_tx_filtered;/* tx failed 'cuz xmit filtered */
6640975Sdes	u_int32_t	ast_tx_shortretry;/* tx on-chip retries (short) */
6740975Sdes	u_int32_t	ast_tx_longretry;/* tx on-chip retries (long) */
6840975Sdes	u_int32_t	ast_tx_badrate;	/* tx failed 'cuz bogus xmit rate */
6940975Sdes	u_int32_t	ast_tx_noack;	/* tx frames with no ack marked */
7040939Sdes	u_int32_t	ast_tx_rts;	/* tx frames with rts enabled */
7140939Sdes	u_int32_t	ast_tx_cts;	/* tx frames with cts enabled */
7263340Sdes	u_int32_t	ast_tx_shortpre;/* tx frames with short preamble */
7340939Sdes	u_int32_t	ast_rx_nombuf;	/* rx setup failed 'cuz no mbuf */
7438394Sdes	u_int32_t	ast_rx_busdma;	/* rx setup failed for dma resrcs */
7575891Sarchie	u_int32_t	ast_rx_orn;	/* rx failed 'cuz of desc overrun */
7638394Sdes	u_int32_t	ast_rx_crcerr;	/* rx failed 'cuz of bad CRC */
7760587Sume	u_int32_t	ast_rx_fifoerr;	/* rx failed 'cuz of FIFO overrun */
78109694Sdes	u_int32_t	ast_rx_badcrypt;/* rx failed 'cuz decryption */
79109694Sdes	u_int32_t	ast_rx_phyerr;	/* rx failed 'cuz of PHY err */
80109694Sdes	u_int32_t	ast_rx_phy[32];	/* rx PHY error per-code counts */
81109694Sdes	u_int32_t	ast_rx_tooshort;/* rx discarded 'cuz frame too short */
8290267Sdes	u_int32_t	ast_rx_ctl;	/* rx discarded 'cuz ctl frame */
8390267Sdes	u_int32_t	ast_be_nombuf;	/* beacon setup failed 'cuz no mbuf */
8497868Sdes	u_int32_t	ast_per_cal;	/* periodic calibration calls */
8597868Sdes	u_int32_t	ast_per_calfail;/* periodic calibration failed */
8690267Sdes	u_int32_t	ast_per_rfgain;	/* periodic calibration rfgain reset */
8790267Sdes	u_int32_t	ast_rate_calls;	/* rate control checks */
8897868Sdes	u_int32_t	ast_rate_raise;	/* rate control raised xmit rate */
8997868Sdes	u_int32_t	ast_rate_drop;	/* rate control dropped xmit rate */
90174588Sdes};
9197868Sdes
9238394Sdes#define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)
9338394Sdes
9440939Sdes#endif /* _DEV_ATH_ATHIOCTL_H */
9540939Sdes