/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright(c) 2004
* Damien Bergamini <damien.bergamini@free.fr>. 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 unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE.
*/
#ifndef _SYS_IPW2100_IMPL_H
#define _SYS_IPW2100_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Intel Wireless PRO/2100 mini-PCI adapter driver
* ipw2100_impl.h includes:
* . implementation of ipw2100
* . hardware operation and interface define for ipw2100
* . firmware operation and interface define for ipw2100
*/
#include <sys/net80211.h>
/*
* Implementation of ipw2100
*/
struct dma_region {
const char *dr_name;
};
struct ipw2100_firmware {
};
/*
* per-instance soft-state structure
*/
struct ipw2100_softc {
enum ieee80211_state, int);
int sc_authmode;
int sc_suspended;
/* CSR */
/* interrupt */
/* soft interrupt */
/* link state */
/* mutex to protect interrupt handler */
/* flags */
/* command */
/* reschedule lock */
/* tx ring, bd->hdr&buf */
/* rx ring, status, bd->buf */
/* DMA resources */
/* hw configuration values */
/* MAC address string */
/* tables */
/* firmware */
/* mfthread related */
int if_flags;
};
/*
* RING_BACKWARD - move 'x' backward 's' steps in a 'b'-sized ring
* RING_FORWARD - move 'x' forward 's' steps in a 'b'-sized ring
*
* note that there must be 0 <= 'x' < 'b' && 0 <= 's' < 'b'
*/
#define RING_FLEN(x, y, b) ((((x) > (y)) ? ((b)+(y)-(x)) : ((y)-(x))))
#define RING_FORWARD(x, s, b) (((x)+(s))%(b))
/*
* field_offset
*/
/*
* Below structure and functions will be used for statistic
*/
struct statistic {
int index;
const char *desc;
int unit;
};
/*
* Hardware related definations and interfaces.
*/
/*
* tx-rd-index the entry to be processed by HW, i.e. empty tx buffer
* tx-wr-index the entry just being filled by SW with new data to transmit
*/
/*
* rx-rd-index the entry just being processed by HW, i.e. new received data
* rx-wr-index the entry just being set by SW to empty buffer to receive
*/
/*
* CSR flags: IPW2100_CSR_INTR
* The interrupt register is used to indicate the h/w status
*/
/*
* CSR flags: IPW2100_CSR_RST
* The reset register is used to reset hardware
*/
/*
* CSR flags: IPW2100_CSR_CTL
*/
/*
* CSR flags: IPW2100_CSR_IO
*/
/*
* States code
*/
/*
* table1 offsets
*/
/*
* table2 offsets
*/
/*
* supported rates
*/
/* hw structures, packed */
#pragma pack(1)
/*
* firmware binary image header
*/
struct ipw2100_firmware_hdr {
};
/*
* buffer descriptor
*/
struct ipw2100_bd {
/* flags */
/* data content */
/* number of fragments, only 1st BD is needed */
};
/*
* status descriptor
*/
struct ipw2100_status {
#define IPW2100_STATUS_CODE_COMMAND (0)
/* received signal strength indicator */
};
/*
* data header
*/
struct ipw2100_hdr {
};
/*
* command
*/
struct ipw2100_cmd {
};
/*
* IPW2100_CMD_SET_POWER_MODE
*/
#define IPW2100_POWER_MODE_CAM (0)
/*
* IPW2100_CMD_SET_MODE
*/
#define IPW2100_MODE_BSS (0)
/*
* structure for IPW2100_CMD_SET_WEP_KEY
*/
struct ipw2100_wep_key {
};
/*
* structure for IPW2100_CMD_SET_SECURITY_INFORMATION
*/
struct ipw2100_security {
#define IPW2100_AUTH_OPEN (0)
};
/*
* structure for IPW2100_CMD_SET_SCAN_OPTIONS
*/
struct ipw2100_scan_options {
};
/*
* structure for IPW2100_CMD_SET_CONFIGURATION
*/
struct ipw2100_configuration {
};
/*
* element in AP table
*/
struct ipw2100_node {
};
#pragma pack()
/*
* transmit buffer block
*/
struct ipw2100_txb {
};
/*
* maximum frame header lenght: 4 MAC addresses + 1 fc + 1 id + 1 seqctl
*/
/*
* receive buffer block
*/
struct ipw2100_rxb {
+ IEEE80211_MAX_LEN /* payload */
+ IEEE80211_CRC_LEN]; /* FCS */
};
/*
* ROM entries
*/
/*
* EEPROM controls
*/
/*
* CSR access routines
*/
/*
* Firmware related definations and interfaces.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IPW2100_IMPL_H */