FreeBSD kernel MWL device code
if_mwlioctl.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
5 * Copyright (c) 2007-2009 Marvell Semiconductor, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
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.
18 *
19 * NO WARRANTY
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.
31 *
32 * $FreeBSD$
33 */
34
35/*
36 * Ioctl-related defintions for the Marvel Wireless LAN controller driver.
37 */
38#ifndef _DEV_MWL_MVIOCTL_H
39#define _DEV_MWL_MVIOCTL_H
40
41struct mwl_stats {
42 struct mwl_hal_hwstats hw_stats; /* XXX tied to h/w defs */
43 uint32_t mst_failure; /* generic hardware failure */
46 uint32_t mst_tx_qstop;
47 uint32_t mst_tx_encap;
48 uint32_t mst_tx_mgmt;
49 uint32_t mst_rx_nombuf;
50 uint32_t mst_rx_busdma;
52 uint32_t mst_tx_busdma;
53 uint32_t mst_tx_linear;
54 uint32_t mst_tx_nombuf;
55 uint32_t mst_tx_nodata;
61 uint32_t mst_tx_aging;
62 uint32_t mst_tx_qdrop;
63 uint32_t mst_ff_txerr;
64 uint32_t mst_watchdog;
69 uint8_t mst_tx_rate;
70 uint32_t mst_ant_tx[4];
71 uint32_t mst_ant_rx[4];
72 uint32_t mst_tx_tso;
74 uint32_t mst_tso_nohdr;
76 uint32_t mst_rx_crypto;
92 uint32_t mst_pad[31];
93};
94
95#define SIOCGMVSTATS _IOWR('i', 137, struct ifreq)
96
97/*
98 * Radio capture format.
99 */
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) | \
107 0)
108
110 struct ieee80211_radiotap_header wr_ihdr;
111 u_int8_t wr_flags;
112 u_int8_t wr_rate;
113 u_int16_t wr_chan_freq;
114 u_int16_t wr_chan_flags;
117 u_int8_t wr_antenna;
119
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) | \
126 0)
127
129 struct ieee80211_radiotap_header wt_ihdr;
130 u_int8_t wt_flags;
131 u_int8_t wt_rate;
132 u_int16_t wt_chan_freq;
133 u_int16_t wt_chan_flags;
134 u_int8_t wt_txpower;
135 u_int8_t wt_antenna;
137
138#endif /* _DEV_MWL_MVIOCTL_H */
struct mwl_rx_radiotap_header __aligned(8)
struct mwl_tx_radiotap_header __packed
struct ieee80211_radiotap_header wr_ihdr
Definition: if_mwlioctl.h:110
uint8_t mst_tx_rate
Definition: if_mwlioctl.h:69
uint32_t mst_tx_packets
Definition: if_mwlioctl.h:65
uint32_t mst_tx_badframetype
Definition: if_mwlioctl.h:80
uint32_t mst_rx_nodmabuf
Definition: if_mwlioctl.h:78
uint32_t mst_rx_tooshort
Definition: if_mwlioctl.h:51
struct mwl_hal_hwstats hw_stats
Definition: if_mwlioctl.h:42
uint32_t mst_watchdog
Definition: if_mwlioctl.h:64
uint32_t mst_rx_badtkipicv
Definition: if_mwlioctl.h:44
uint32_t mst_rx_tkipmic
Definition: if_mwlioctl.h:77
uint32_t mst_tx_discard
Definition: if_mwlioctl.h:45
uint32_t mst_rx_dmabufmissing
Definition: if_mwlioctl.h:87
uint32_t mst_tx_nodata
Definition: if_mwlioctl.h:55
uint32_t mst_rx_nombuf
Definition: if_mwlioctl.h:49
uint32_t mst_ampdu_reject
Definition: if_mwlioctl.h:82
uint32_t mst_rx_busdma
Definition: if_mwlioctl.h:50
uint32_t mst_tx_linkerror
Definition: if_mwlioctl.h:59
uint32_t mst_radardetect
Definition: if_mwlioctl.h:86
uint32_t mst_pad[31]
Definition: if_mwlioctl.h:92
uint32_t mst_tso_nohdr
Definition: if_mwlioctl.h:74
uint32_t mst_ant_rx[4]
Definition: if_mwlioctl.h:71
uint32_t mst_tx_noheadroom
Definition: if_mwlioctl.h:79
uint32_t mst_tx_qdrop
Definition: if_mwlioctl.h:62
uint32_t mst_tx_linear
Definition: if_mwlioctl.h:53
uint32_t mst_ant_tx[4]
Definition: if_mwlioctl.h:70
int8_t mst_rx_rssi
Definition: if_mwlioctl.h:67
uint32_t mst_rx_packets
Definition: if_mwlioctl.h:66
uint32_t mst_tx_shortpre
Definition: if_mwlioctl.h:56
uint32_t mst_ampdu_nostream
Definition: if_mwlioctl.h:81
uint32_t mst_tx_tso
Definition: if_mwlioctl.h:72
uint32_t mst_bacreate_failed
Definition: if_mwlioctl.h:84
uint32_t mst_tx_busdma
Definition: if_mwlioctl.h:52
uint32_t mst_tx_xretries
Definition: if_mwlioctl.h:60
uint32_t mst_addba_nostream
Definition: if_mwlioctl.h:83
uint32_t mst_bawatchdog_empty
Definition: if_mwlioctl.h:89
uint32_t mst_tso_badsplit
Definition: if_mwlioctl.h:75
uint32_t mst_tso_badeth
Definition: if_mwlioctl.h:73
int8_t mst_rx_noise
Definition: if_mwlioctl.h:68
uint32_t mst_tx_encap
Definition: if_mwlioctl.h:47
uint32_t mst_rx_crypto
Definition: if_mwlioctl.h:76
uint32_t mst_bawatchdog_notfound
Definition: if_mwlioctl.h:88
uint32_t mst_ff_txerr
Definition: if_mwlioctl.h:63
uint32_t mst_tx_retries
Definition: if_mwlioctl.h:57
uint32_t mst_tx_mgmt
Definition: if_mwlioctl.h:48
uint32_t mst_tx_aging
Definition: if_mwlioctl.h:61
uint32_t mst_rxbuf_failed
Definition: if_mwlioctl.h:91
uint32_t mst_bawatchdog_failed
Definition: if_mwlioctl.h:90
uint32_t mst_failure
Definition: if_mwlioctl.h:43
uint32_t mst_tx_mretries
Definition: if_mwlioctl.h:58
uint32_t mst_tx_nombuf
Definition: if_mwlioctl.h:54
uint32_t mst_tx_qstop
Definition: if_mwlioctl.h:46
uint32_t mst_bawatchdog
Definition: if_mwlioctl.h:85
struct ieee80211_radiotap_header wt_ihdr
Definition: if_mwlioctl.h:129