if_maloioctl.h revision 302408
12061Sjkh/*- 250479Speter * Copyright (c) 2007 Marvell Semiconductor, Inc. 32061Sjkh * Copyright (c) 2007 Sam Leffler, Errno Consulting 438666Sjb * Copyright (c) 2008 Weongyo Jeong <weongyo@freebsd.org> 532427Sjb * All rights reserved. 6111131Sru * 7111131Sru * Redistribution and use in source and binary forms, with or without 8217733Sbz * modification, are permitted provided that the following conditions 9217733Sbz * are met: 1038666Sjb * 1. Redistributions of source code must retain the above copyright 1138666Sjb * notice, this list of conditions and the following disclaimer, 1238666Sjb * without modification. 13159363Strhodes * 2. Redistributions in binary form must reproduce at minimum a disclaimer 1464049Salex * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 1564049Salex * redistribution must be conditioned upon including a substantially 16116679Ssimokawa * similar Disclaimer requirement for further binary redistribution. 1766071Smarkm * 18116679Ssimokawa * NO WARRANTY 1973504Sobrien * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20204661Simp * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21232907Sjmallett * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 22158962Snetchild * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23223148Sru * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 24169597Sdes * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25169597Sdes * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26169597Sdes * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27169597Sdes * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28231821Spluknet * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29169597Sdes * THE POSSIBILITY OF SUCH DAMAGES. 30169597Sdes * 31169597Sdes * $FreeBSD: stable/11/sys/dev/malo/if_maloioctl.h 177595 2008-03-25 06:32:33Z weongyo $ 32217815Sbz */ 33217815Sbz 34218524Sjhb/* 35264811Sbrueffer * Ioctl-related defintions for the Marvel Wireless LAN controller driver. 36264811Sbrueffer */ 37264811Sbrueffer#ifndef _DEV_MALO_MVIOCTL_H 38264811Sbrueffer#define _DEV_MALO_MVIOCTL_H 39281836Sgarga 40281836Sgargastruct malo_stats { 41253002Salfred struct malo_hal_hwstats hw_stats; /* XXX tied to h/w defs */ 42253002Salfred uint32_t mst_failure; /* generic hardware failure */ 43253002Salfred uint32_t mst_rx_badtkipicv; 44253002Salfred uint32_t mst_tx_discard; 45253002Salfred uint32_t mst_tx_qstop; 46253003Salfred uint32_t mst_tx_encap; 4732427Sjb uint32_t mst_tx_mgmt; 4838666Sjb uint32_t mst_rx_nombuf; 49108451Sschweikh uint32_t mst_rx_busdma; 5038666Sjb uint32_t mst_rx_tooshort; 5138666Sjb uint32_t mst_tx_busdma; 5238666Sjb uint32_t mst_tx_linear; 5338666Sjb uint32_t mst_tx_nombuf; 5417308Speter uint32_t mst_tx_nodata; 55217273Simp uint32_t mst_tx_shortpre; 56217294Simp uint32_t mst_tx_retries; 5719175Sbde uint32_t mst_tx_mretries; 5896205Sjwd uint32_t mst_tx_linkerror; 59217297Simp uint32_t mst_tx_xretries; 60217297Simp uint32_t mst_tx_aging; 6138042Sbde uint32_t mst_watchdog; 6296205Sjwd uint32_t mst_tx_packets; 6396205Sjwd uint32_t mst_rx_packets; 6438042Sbde int8_t mst_rx_rssi; 6596205Sjwd int8_t mst_rx_noise; 66159363Strhodes uint8_t mst_tx_rate; 67159363Strhodes uint32_t mst_ant_tx[4]; 6817308Speter uint32_t mst_ant_rx[4]; 6996205Sjwd}; 7096205Sjwd 7117308Speter#define SIOCGMVSTATS _IOWR('i', 137, struct ifreq) 72148330Snetchild 73148330Snetchild/* 74148330Snetchild * Radio capture format. 75148330Snetchild */ 76159831Sobrien#define MALO_RX_RADIOTAP_PRESENT ( \ 77148330Snetchild (1 << IEEE80211_RADIOTAP_FLAGS) | \ 78148330Snetchild (1 << IEEE80211_RADIOTAP_RATE) | \ 79148330Snetchild (1 << IEEE80211_RADIOTAP_CHANNEL) | \ 80251107Screes (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 81251107Screes (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 82148330Snetchild (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \ 83148330Snetchild 0) 8496205Sjwd 8596205Sjwdstruct malo_rx_radiotap_header { 8696205Sjwd struct ieee80211_radiotap_header wr_ihdr; 87162147Sru u_int8_t wr_flags; 88162147Sru u_int8_t wr_rate; 8998723Sdillon u_int16_t wr_chan_freq; 9098723Sdillon u_int16_t wr_chan_flags; 9198723Sdillon int8_t wr_antsignal; 9238666Sjb int8_t wr_antnoise; 9338666Sjb u_int8_t wr_antenna; 9417308Speter}; 95123311Speter 96123311Speter#define MALO_TX_RADIOTAP_PRESENT ( \ 97123311Speter (1 << IEEE80211_RADIOTAP_FLAGS) | \ 98123311Speter (1 << IEEE80211_RADIOTAP_RATE) | \ 99175833Sjhb (1 << IEEE80211_RADIOTAP_CHANNEL) | \ 100175833Sjhb (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ 101169597Sdes (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 102169597Sdes 0) 103169597Sdes 104169597Sdesstruct malo_tx_radiotap_header { 105219177Snwhitehorn struct ieee80211_radiotap_header wt_ihdr; 106219177Snwhitehorn u_int8_t wt_flags; 107238051Sobrien u_int8_t wt_rate; 108219177Snwhitehorn u_int16_t wt_chan_freq; 109219177Snwhitehorn u_int16_t wt_chan_flags; 110158962Snetchild u_int8_t wt_txpower; 111156840Sru u_int8_t wt_antenna; 112123311Speter}; 113137288Speter 114209128Sraj#endif /* _DEV_MALO_MVIOCTL_H */ 115281836Sgarga