2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
5 * Copyright (c) 2007-2009 Marvell Semiconductor, Inc.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer,
13 * without modification.
14 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
15 * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
16 * redistribution must be conditioned upon including a substantially
17 * similar Disclaimer requirement for further binary redistribution.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
23 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
24 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
25 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGES.
36 * Ioctl-related defintions for the Marvel Wireless LAN controller driver.
38 #ifndef _DEV_MWL_MVIOCTL_H
39 #define _DEV_MWL_MVIOCTL_H
42 struct mwl_hal_hwstats hw_stats; /* XXX tied to h/w defs */
43 uint32_t mst_failure; /* generic hardware failure */
44 uint32_t mst_rx_badtkipicv;
45 uint32_t mst_tx_discard;
46 uint32_t mst_tx_qstop;
47 uint32_t mst_tx_encap;
49 uint32_t mst_rx_nombuf;
50 uint32_t mst_rx_busdma;
51 uint32_t mst_rx_tooshort;
52 uint32_t mst_tx_busdma;
53 uint32_t mst_tx_linear;
54 uint32_t mst_tx_nombuf;
55 uint32_t mst_tx_nodata;
56 uint32_t mst_tx_shortpre;
57 uint32_t mst_tx_retries;
58 uint32_t mst_tx_mretries;
59 uint32_t mst_tx_linkerror;
60 uint32_t mst_tx_xretries;
61 uint32_t mst_tx_aging;
62 uint32_t mst_tx_qdrop;
63 uint32_t mst_ff_txerr;
64 uint32_t mst_watchdog;
65 uint32_t mst_tx_packets;
66 uint32_t mst_rx_packets;
70 uint32_t mst_ant_tx[4];
71 uint32_t mst_ant_rx[4];
73 uint32_t mst_tso_badeth;
74 uint32_t mst_tso_nohdr;
75 uint32_t mst_tso_badsplit;
76 uint32_t mst_rx_crypto;
77 uint32_t mst_rx_tkipmic;
78 uint32_t mst_rx_nodmabuf;
79 uint32_t mst_tx_noheadroom;
80 uint32_t mst_tx_badframetype;
81 uint32_t mst_ampdu_nostream;
82 uint32_t mst_ampdu_reject;
83 uint32_t mst_addba_nostream;
84 uint32_t mst_bacreate_failed;
85 uint32_t mst_bawatchdog;
86 uint32_t mst_radardetect;
87 uint32_t mst_rx_dmabufmissing;
88 uint32_t mst_bawatchdog_notfound;
89 uint32_t mst_bawatchdog_empty;
90 uint32_t mst_bawatchdog_failed;
91 uint32_t mst_rxbuf_failed;
95 #define SIOCGMVSTATS _IOWR('i', 137, struct ifreq)
98 * Radio capture format.
100 #define MWL_RX_RADIOTAP_PRESENT ( \
101 (1 << IEEE80211_RADIOTAP_FLAGS) | \
102 (1 << IEEE80211_RADIOTAP_RATE) | \
103 (1 << IEEE80211_RADIOTAP_CHANNEL) | \
104 (1 << IEEE80211_RADIOTAP_ANTENNA) | \
105 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \
106 (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \
109 struct mwl_rx_radiotap_header {
110 struct ieee80211_radiotap_header wr_ihdr;
113 u_int16_t wr_chan_freq;
114 u_int16_t wr_chan_flags;
120 #define MWL_TX_RADIOTAP_PRESENT ( \
121 (1 << IEEE80211_RADIOTAP_FLAGS) | \
122 (1 << IEEE80211_RADIOTAP_RATE) | \
123 (1 << IEEE80211_RADIOTAP_CHANNEL) | \
124 (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \
125 (1 << IEEE80211_RADIOTAP_ANTENNA) | \
128 struct mwl_tx_radiotap_header {
129 struct ieee80211_radiotap_header wt_ihdr;
132 u_int16_t wt_chan_freq;
133 u_int16_t wt_chan_flags;
138 #endif /* _DEV_MWL_MVIOCTL_H */