1177595Sweongyo/*- 2177595Sweongyo * Copyright (c) 2007 Marvell Semiconductor, Inc. 3177595Sweongyo * Copyright (c) 2007 Sam Leffler, Errno Consulting 4177595Sweongyo * Copyright (c) 2008 Weongyo Jeong <weongyo@freebsd.org> 5177595Sweongyo * All rights reserved. 6177595Sweongyo * 7177595Sweongyo * Redistribution and use in source and binary forms, with or without 8177595Sweongyo * modification, are permitted provided that the following conditions 9177595Sweongyo * are met: 10177595Sweongyo * 1. Redistributions of source code must retain the above copyright 11177595Sweongyo * notice, this list of conditions and the following disclaimer, 12177595Sweongyo * without modification. 13177595Sweongyo * 2. Redistributions in binary form must reproduce at minimum a disclaimer 14177595Sweongyo * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 15177595Sweongyo * redistribution must be conditioned upon including a substantially 16177595Sweongyo * similar Disclaimer requirement for further binary redistribution. 17177595Sweongyo * 18177595Sweongyo * NO WARRANTY 19177595Sweongyo * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20177595Sweongyo * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21177595Sweongyo * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 22177595Sweongyo * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23177595Sweongyo * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 24177595Sweongyo * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25177595Sweongyo * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26177595Sweongyo * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27177595Sweongyo * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28177595Sweongyo * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29177595Sweongyo * THE POSSIBILITY OF SUCH DAMAGES. 30177595Sweongyo * 31177595Sweongyo * $FreeBSD$ 32177595Sweongyo */ 33177595Sweongyo 34177595Sweongyo/* 35177595Sweongyo * Ioctl-related defintions for the Marvel Wireless LAN controller driver. 36177595Sweongyo */ 37177595Sweongyo#ifndef _DEV_MALO_MVIOCTL_H 38177595Sweongyo#define _DEV_MALO_MVIOCTL_H 39177595Sweongyo 40177595Sweongyostruct malo_stats { 41177595Sweongyo struct malo_hal_hwstats hw_stats; /* XXX tied to h/w defs */ 42177595Sweongyo uint32_t mst_failure; /* generic hardware failure */ 43177595Sweongyo uint32_t mst_rx_badtkipicv; 44177595Sweongyo uint32_t mst_tx_discard; 45177595Sweongyo uint32_t mst_tx_qstop; 46177595Sweongyo uint32_t mst_tx_encap; 47177595Sweongyo uint32_t mst_tx_mgmt; 48177595Sweongyo uint32_t mst_rx_nombuf; 49177595Sweongyo uint32_t mst_rx_busdma; 50177595Sweongyo uint32_t mst_rx_tooshort; 51177595Sweongyo uint32_t mst_tx_busdma; 52177595Sweongyo uint32_t mst_tx_linear; 53177595Sweongyo uint32_t mst_tx_nombuf; 54177595Sweongyo uint32_t mst_tx_nodata; 55177595Sweongyo uint32_t mst_tx_shortpre; 56177595Sweongyo uint32_t mst_tx_retries; 57177595Sweongyo uint32_t mst_tx_mretries; 58177595Sweongyo uint32_t mst_tx_linkerror; 59177595Sweongyo uint32_t mst_tx_xretries; 60177595Sweongyo uint32_t mst_tx_aging; 61177595Sweongyo uint32_t mst_watchdog; 62177595Sweongyo uint32_t mst_tx_packets; 63177595Sweongyo uint32_t mst_rx_packets; 64177595Sweongyo int8_t mst_rx_rssi; 65177595Sweongyo int8_t mst_rx_noise; 66177595Sweongyo uint8_t mst_tx_rate; 67177595Sweongyo uint32_t mst_ant_tx[4]; 68177595Sweongyo uint32_t mst_ant_rx[4]; 69177595Sweongyo}; 70177595Sweongyo 71177595Sweongyo#define SIOCGMVSTATS _IOWR('i', 137, struct ifreq) 72177595Sweongyo 73177595Sweongyo/* 74177595Sweongyo * Radio capture format. 75177595Sweongyo */ 76177595Sweongyo#define MALO_RX_RADIOTAP_PRESENT ( \ 77177595Sweongyo (1 << IEEE80211_RADIOTAP_FLAGS) | \ 78177595Sweongyo (1 << IEEE80211_RADIOTAP_RATE) | \ 79177595Sweongyo (1 << IEEE80211_RADIOTAP_CHANNEL) | \ 80177595Sweongyo (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 81177595Sweongyo (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 82177595Sweongyo (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \ 83177595Sweongyo 0) 84177595Sweongyo 85177595Sweongyostruct malo_rx_radiotap_header { 86177595Sweongyo struct ieee80211_radiotap_header wr_ihdr; 87177595Sweongyo u_int8_t wr_flags; 88177595Sweongyo u_int8_t wr_rate; 89177595Sweongyo u_int16_t wr_chan_freq; 90177595Sweongyo u_int16_t wr_chan_flags; 91177595Sweongyo int8_t wr_antsignal; 92177595Sweongyo int8_t wr_antnoise; 93177595Sweongyo u_int8_t wr_antenna; 94177595Sweongyo}; 95177595Sweongyo 96177595Sweongyo#define MALO_TX_RADIOTAP_PRESENT ( \ 97177595Sweongyo (1 << IEEE80211_RADIOTAP_FLAGS) | \ 98177595Sweongyo (1 << IEEE80211_RADIOTAP_RATE) | \ 99177595Sweongyo (1 << IEEE80211_RADIOTAP_CHANNEL) | \ 100177595Sweongyo (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ 101177595Sweongyo (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 102177595Sweongyo 0) 103177595Sweongyo 104177595Sweongyostruct malo_tx_radiotap_header { 105177595Sweongyo struct ieee80211_radiotap_header wt_ihdr; 106177595Sweongyo u_int8_t wt_flags; 107177595Sweongyo u_int8_t wt_rate; 108177595Sweongyo u_int16_t wt_chan_freq; 109177595Sweongyo u_int16_t wt_chan_flags; 110177595Sweongyo u_int8_t wt_txpower; 111177595Sweongyo u_int8_t wt_antenna; 112177595Sweongyo}; 113177595Sweongyo 114177595Sweongyo#endif /* _DEV_MALO_MVIOCTL_H */ 115