Main Page | Data Structures | Directories | File List | Data Fields | Globals

if_ath_ioctl.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer,
00010  *    without modification.
00011  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
00012  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
00013  *    redistribution must be conditioned upon including a substantially
00014  *    similar Disclaimer requirement for further binary redistribution.
00015  * 3. Neither the names of the above-listed copyright holders nor the names
00016  *    of any contributors may be used to endorse or promote products derived
00017  *    from this software without specific prior written permission.
00018  *
00019  * Alternatively, this software may be distributed under the terms of the
00020  * GNU General Public License ("GPL") version 2 as published by the Free
00021  * Software Foundation.
00022  *
00023  * NO WARRANTY
00024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00026  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
00027  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
00028  * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
00029  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00030  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00031  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
00032  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00033  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
00034  * THE POSSIBILITY OF SUCH DAMAGES.
00035  *
00036  * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.5 2003/12/28 07:00:32 sam Exp $
00037  */
00038 
00039 /*
00040  * Ioctl-related defintions for the Atheros Wireless LAN controller driver.
00041  */
00042 #ifndef _DEV_ATH_ATHIOCTL_H
00043 #define _DEV_ATH_ATHIOCTL_H
00044 
00045 struct ath_stats {
00046         u_int32_t       ast_watchdog;   /* device reset by watchdog */
00047         u_int32_t       ast_hardware;   /* fatal hardware error interrupts */
00048         u_int32_t       ast_bmiss;      /* beacon miss interrupts */
00049         u_int32_t       ast_rxorn;      /* rx overrun interrupts */
00050         u_int32_t       ast_rxeol;      /* rx eol interrupts */
00051         u_int32_t       ast_txurn;      /* tx underrun interrupts */
00052         u_int32_t       ast_tx_mgmt;    /* management frames transmitted */
00053         u_int32_t       ast_tx_discard; /* frames discarded prior to assoc */
00054         u_int32_t       ast_tx_invalid; /* frames discarded 'cuz device gone */
00055         u_int32_t       ast_tx_qstop;   /* tx queue stopped 'cuz full */
00056         u_int32_t       ast_tx_encap;   /* tx encapsulation failed */
00057         u_int32_t       ast_tx_nonode;  /* tx failed 'cuz no node */
00058         u_int32_t       ast_tx_nobuf;   /* tx failed 'cuz no tx buffer (data) */
00059         u_int32_t       ast_tx_nobufmgt;/* tx failed 'cuz no tx buffer (mgmt)*/
00060         u_int32_t       ast_tx_xretries;/* tx failed 'cuz too many retries */
00061         u_int32_t       ast_tx_fifoerr; /* tx failed 'cuz FIFO underrun */
00062         u_int32_t       ast_tx_filtered;/* tx failed 'cuz xmit filtered */
00063         u_int32_t       ast_tx_shortretry;/* tx on-chip retries (short) */
00064         u_int32_t       ast_tx_longretry;/* tx on-chip retries (long) */
00065         u_int32_t       ast_tx_badrate; /* tx failed 'cuz bogus xmit rate */
00066         u_int32_t       ast_tx_noack;   /* tx frames with no ack marked */
00067         u_int32_t       ast_tx_rts;     /* tx frames with rts enabled */
00068         u_int32_t       ast_tx_cts;     /* tx frames with cts enabled */
00069         u_int32_t       ast_tx_shortpre;/* tx frames with short preamble */
00070         u_int32_t       ast_tx_altrate; /* tx frames with alternate rate */
00071         u_int32_t       ast_tx_protect; /* tx frames with protection */
00072         int16_t         ast_tx_rssi;    /* tx rssi of last ack */
00073         int16_t         ast_tx_rssidelta;/* tx rssi delta */
00074         u_int32_t       ast_rx_orn;     /* rx failed 'cuz of desc overrun */
00075         u_int32_t       ast_rx_crcerr;  /* rx failed 'cuz of bad CRC */
00076         u_int32_t       ast_rx_fifoerr; /* rx failed 'cuz of FIFO overrun */
00077         u_int32_t       ast_rx_badcrypt;/* rx failed 'cuz decryption */
00078         u_int32_t       ast_rx_phyerr;  /* rx PHY error summary count */
00079         u_int32_t       ast_rx_phy[32]; /* rx PHY error per-code counts */
00080         u_int32_t       ast_rx_tooshort;/* rx discarded 'cuz frame too short */
00081         u_int32_t       ast_rx_nobuf;   /* rx setup failed 'cuz no skbuff */
00082         u_int8_t        ast_rx_mgt;     /* management frames received */
00083         u_int8_t        ast_rx_ctl;     /* control frames received */
00084         u_int8_t        ast_rx_rssi;    /* rx rssi from histogram */
00085         u_int32_t       ast_be_nobuf;   /* no skbuff available for beacon */
00086         u_int32_t       ast_per_cal;    /* periodic calibration calls */
00087         u_int32_t       ast_per_calfail;/* periodic calibration failed */
00088         u_int32_t       ast_per_rfgain; /* periodic calibration rfgain reset */
00089         u_int32_t       ast_rate_calls; /* rate control checks */
00090         u_int32_t       ast_rate_raise; /* rate control raised xmit rate */
00091         u_int32_t       ast_rate_drop;  /* rate control dropped xmit rate */
00092 };
00093 
00094 #define SIOCGATHSTATS   (SIOCDEVPRIVATE+0)
00095 
00096 
00097 
00098 /*
00099  * Wireless Extensions API, private ioctl interfaces.
00100  *
00101  * NB: Even ioctl numbers are privileged!
00102  */
00103 #define IEEE80211_IOCTL_SETPARAM        (SIOCIWFIRSTPRIV+0)
00104 #define IEEE80211_IOCTL_GETPARAM        (SIOCIWFIRSTPRIV+1)
00105 #define IEEE80211_IOCTL_SETREG  (SIOCIWFIRSTPRIV+2)
00106 #define IEEE80211_IOCTL_GETREG  (SIOCIWFIRSTPRIV+3)
00107 #define IEEE80211_IOCTL_SETRXHDR        (SIOCIWFIRSTPRIV+4)
00108 #define IEEE80211_IOCTL_GETRXHDR        (SIOCIWFIRSTPRIV+5)
00109 enum {
00110         IEEE80211_PARAM_TURBO   = 1,    /* turbo mode */
00111         IEEE80211_PARAM_MODE    = 2     /* phy mode (11a, 11b, etc.) */
00112 };
00113 
00114 struct ath_diag {
00115         char    ad_name[IFNAMSIZ];      /* if name, e.g. "ath0" */
00116         u_int16_t ad_id;
00117 #define ATH_DIAG_DYN    0x8000          /* allocate buffer in caller */
00118 #define ATH_DIAG_IN     0x4000          /* copy in parameters */
00119 #define ATH_DIAG_OUT    0x0000          /* copy out results (always) */
00120 #define ATH_DIAG_ID     0x0fff
00121         u_int16_t ad_in_size;           /* pack to fit, yech */
00122         caddr_t ad_in_data;
00123         caddr_t ad_out_data;
00124         u_int   ad_out_size;
00125 
00126 };
00127 
00128 #ifdef __linux__
00129 #define SIOCGATHSTATS   (SIOCDEVPRIVATE+0)
00130 #define SIOCGATHDIAG    (SIOCDEVPRIVATE+1)
00131 #else
00132 #define SIOCGATHSTATS   _IOWR('i', 137, struct ifreq)
00133 #define SIOCGATHDIAG    _IOWR('i', 138, struct ath_diag)
00134 #endif
00135 #endif /* _DEV_ATH_ATHIOCTL_H */

Generated on Mon Nov 21 15:58:10 2005 for openwifi by  doxygen 1.4.1