1138569Ssam/*-
2170375Ssam * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
3138569Ssam * All rights reserved.
4138569Ssam *
5138569Ssam * Redistribution and use in source and binary forms, with or without
6138569Ssam * modification, are permitted provided that the following conditions
7138569Ssam * are met:
8138569Ssam * 1. Redistributions of source code must retain the above copyright
9138569Ssam *    notice, this list of conditions and the following disclaimer,
10170375Ssam *    without modification.
11138569Ssam * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12138569Ssam *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13138569Ssam *    redistribution must be conditioned upon including a substantially
14138569Ssam *    similar Disclaimer requirement for further binary redistribution.
15138569Ssam *
16138569Ssam * NO WARRANTY
17138569Ssam * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18138569Ssam * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19138569Ssam * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20138569Ssam * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21138569Ssam * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22138569Ssam * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23138569Ssam * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24138569Ssam * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25138569Ssam * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26138569Ssam * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27138569Ssam * THE POSSIBILITY OF SUCH DAMAGES.
28138569Ssam *
29138569Ssam * $FreeBSD$
30138569Ssam */
31138569Ssam
32138569Ssam/*
33138569Ssam * Defintions for the Atheros Wireless LAN controller driver.
34138569Ssam */
35138569Ssam#ifndef _DEV_ATH_RATE_ONOE_H
36138569Ssam#define _DEV_ATH_RATE_ONOE_H
37138569Ssam
38138569Ssam/* per-device state */
39138569Ssamstruct onoe_softc {
40138569Ssam	struct ath_ratectrl arc;	/* base state */
41138569Ssam};
42138569Ssam
43138569Ssam/* per-node state */
44138569Ssamstruct onoe_node {
45178354Ssam	int		on_rix;		/* current rate index */
46178354Ssam	int		on_ticks;	/* time of last update */
47178354Ssam	int		on_interval;	/* update interval (ticks) */
48178354Ssam
49138569Ssam	u_int		on_tx_ok;	/* tx ok pkt */
50138569Ssam	u_int		on_tx_err;	/* tx !ok pkt */
51138569Ssam	u_int		on_tx_retr;	/* tx retry count */
52138569Ssam	int		on_tx_upper;	/* tx upper rate req cnt */
53138569Ssam	u_int8_t	on_tx_rix0;	/* series 0 rate index */
54138569Ssam	u_int8_t	on_tx_try0;	/* series 0 try count */
55138569Ssam	u_int8_t	on_tx_rate0;	/* series 0 h/w rate */
56138569Ssam	u_int8_t	on_tx_rate1;	/* series 1 h/w rate */
57138569Ssam	u_int8_t	on_tx_rate2;	/* series 2 h/w rate */
58138569Ssam	u_int8_t	on_tx_rate3;	/* series 3 h/w rate */
59138569Ssam	u_int8_t	on_tx_rate0sp;	/* series 0 short preamble h/w rate */
60138569Ssam	u_int8_t	on_tx_rate1sp;	/* series 1 short preamble h/w rate */
61138569Ssam	u_int8_t	on_tx_rate2sp;	/* series 2 short preamble h/w rate */
62138569Ssam	u_int8_t	on_tx_rate3sp;	/* series 3 short preamble h/w rate */
63138569Ssam};
64138569Ssam#define	ATH_NODE_ONOE(an)	((struct onoe_node *)&an[1])
65138569Ssam#endif /* _DEV_ATH_RATE_ONOE_H */
66