rt2860_var.h revision 8a3c961b6b8e22607c570d092514b791eb1519e9
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2007, 2008
* Damien Bergamini <damien.bergamini@free.fr>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _RT2860_VAR_H
#define _RT2860_VAR_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* EDCA Access Categories.
*/
enum ieee80211_edca_ac {
EDCA_AC_BE = 0, /* Best Effort */
};
#define EDCA_NUM_AC 4
#define RT2860_SUCCESS 0
#define RT2860_TX_RING_COUNT 64
#define RT2860_RX_RING_COUNT 128
/* HW supports up to 255 STAs */
#define RT2860_WCID_MAX 254
struct dma_area {
};
struct rt2860_txd;
struct rt2860_tx_data {
struct rt2860_txwi *txwi;
struct ieee80211_node *ni;
};
struct rt2860_tx_ring {
struct dma_area txdesc_dma;
struct rt2860_txd *txd;
int cur;
int next;
int queued;
};
struct rt2860_rx_data {
};
struct rt2860_rx_ring {
struct dma_area rxdesc_dma;
struct rt2860_rxd *rxd;
unsigned int cur; /* must be unsigned */
};
struct rt2860_amrr {
};
struct rt2860_amrr_node {
int amn_success;
int amn_recovery;
int amn_txcnt;
int amn_retrycnt;
};
struct rt2860_softc {
struct ieee80211com sc_ic;
/* ddi reg handler */
/* ddi i/o handler */
/* interrupt */
struct rt2860_amrr amrr;
enum ieee80211_state sc_ostate;
#define RT2860_ENABLED (1 << 0)
struct rt2860_rx_ring rxq;
struct dma_area txpool_dma;
struct rt2860_txwi *txwi;
int sc_tx_timer;
int mgtqid;
int sifs;
/* firmware related info */
/* RT2860 RCR */
struct {
} bbp[8];
int led_mode;
int hw_radio;
int rx_ant;
int tx_ant;
int nb_ant;
int dwelltime;
/* kstats */
int (*sc_newstate)(struct ieee80211com *,
enum ieee80211_state, int);
};
#ifdef __cplusplus
}
#endif
#endif /* _RT2860_VAR_H */