/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2007-2009 Marvell Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
* redistribution must be conditioned upon including a substantially
* similar Disclaimer requirement for further binary redistribution.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*/
/*
* Definitions for the Marvell 88W8363 Wireless LAN controller.
*/
#ifndef _MWL_VAR_H
#define _MWL_VAR_H
#ifdef __cplusplus
extern "C" {
#endif
#include "mwl_reg.h"
#ifndef MWL_AGGR_SIZE
#endif
/*
* Define total number of TX queues in the shared memory.
* This count includes the EDCA queues, Block Ack queues, and HCCA queues
* In addition to this, there could be a management packet queue some
* time in the future
*/
#define MWL_NUM_HCCA_QUEUES 0
#define MWL_NUM_BA_QUEUES 0
#define MWL_NUM_MGMT_QUEUES 0
#define MWL_NUM_ACK_QUEUES 0
#define MWL_NUM_TX_QUEUES \
#define IEEE80211_CHAN_FHSS \
#define IEEE80211_CHAN_A \
#define IEEE80211_CHAN_B \
#define IEEE80211_CHAN_PUREG \
#define IEEE80211_CHAN_G \
#define IEEE80211_CHAN_HT40 \
#define IEEE80211_CHAN_HT \
#define IEEE80211_CHAN_108A \
#define IEEE80211_CHAN_108G \
#define IEEE80211_CHAN_ST \
(IEEE80211_IS_CHAN_5GHZ_F(_c) && \
(IEEE80211_IS_CHAN_2GHZ_F(_c) && \
/* WME stream classes */
/*
* Transmit queue assignment.
*/
enum {
};
const char *mwl_wme_acnames[] = {
"WME_AC_BE",
"WME_AC_BK",
"WME_AC_VI",
"WME_AC_VO",
"WME_UPSD",
};
/*
* Set Antenna Configuration (legacy operation).
*
* The RX antenna can be selected using the the bitmask
* ant (bit 0 = antenna 1, bit 1 = antenna 2, etc.)
* (diversity?XXX)
*/
typedef enum {
/*
* Set Radio Configuration.
*
* onoff != 0 turns radio on; otherwise off.
* if radio is enabled, the preamble is set too.
*/
typedef enum {
/*
* Transmit rate control. Rate codes with bit 0x80 set are
* interpreted as MCS codes (this limits us to 0-127). The
* transmit rate can be set to a single fixed rate or can
* be configured to start at an initial rate and drop based
* on retry counts.
*/
typedef enum {
typedef enum {
CSMODE_CONSERVATIVE = 0,
#pragma pack(1)
/*
* Device revision information.
*/
typedef struct {
typedef struct {
int nchannels;
struct mwl_hal_channel {
typedef struct {
: 19; /* reserved */
typedef struct {
/*
* Channels are specified by frequency and attributes.
*/
struct mwl_channel {
};
/*
* Regulatory Information.
*/
struct mwl_regdomain {
};
/*
*/
struct mwl_hal_hwspec {
};
/*
* Crypto Configuration.
*/
typedef struct {
#define KEY_TYPE_ID_WEP 0
union { /* key material, keyLen gives size */
struct {
/* NB: group or pairwise key is determined by keyFlags */
struct {
} rsc;
struct {
} tsc;
} tkip;
} key;
/*
*/
struct mwl_hal_txrxdma {
};
/*
* Inform the firmware of a new association station.
* The address is the MAC address of the peer station.
* The AID is supplied sans the 0xc000 bits. The station
* ID is defined by the caller. The peer information must
* be supplied.
*
* NB: All values are in host byte order; any byte swapping
* is handled by the hal.
*/
typedef struct {
struct {
} AddHtInfo;
typedef struct {
struct {
#pragma pack()
/* driver-specific node state */
struct mwl_node {
};
/*
*/
/*
* the software state out of the h/w descriptor structure
* so that may be allocated in uncached memory w/o paying
* performance hit.
*/
struct dma_area {
};
struct mwl_rxbuf {
void *bf_desc;
};
struct mwl_rx_ring {
int count;
int cur;
int next;
};
struct mwl_txbuf {
int bf_nseg;
};
struct mwl_tx_ring {
int count;
int queued;
int cur;
int next;
int stat;
};
struct mwl_softc {
/* ddi reg handler */
/* bar0 handler */
/* bar1 handler */
int sc_hw_flags;
/* SDRAM addr in the chipset */
int sc_SDRAMSIZE_Addr;
/* interrupt */
/* mutex lock */
/* kstats */
enum ieee80211_state, int);
};
} while (0)
} while (0)
/*
* 802.11 regulatory domain definitions.
*/
enum ISOCountryCode {
/* XXX correct remainder */
/* NB: from here down not listed in 3166; they come from Atheros */
};
enum RegdomainCode {
/* NB: from here down private */
};
/*
* Set regdomain code (IEEE SKU).
*/
enum {
};
#ifdef __cplusplus
}
#endif
#endif /* _MWL_VAR_H */