linux/drivers/staging/vt6656/device.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * Purpose: MAC Data structure
 *
 * Author: Tevin Chen
 *
 * Date: Mar 17, 1997
 *
 */

#ifndef __DEVICE_H__
#define __DEVICE_H__

#include <linux/bits.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/suspend.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
#include <linux/timer.h>
#include <linux/usb.h>
#include <linux/crc32.h>
#include <net/mac80211.h>

#ifdef SIOCETHTOOL
#define DEVICE_ETHTOOL_IOCTL_SUPPORT
#include <linux/ethtool.h>
#else
#undef DEVICE_ETHTOOL_IOCTL_SUPPORT
#endif

#define RATE_1M
#define RATE_2M
#define RATE_5M
#define RATE_11M
#define RATE_6M
#define RATE_9M
#define RATE_12M
#define RATE_18M
#define RATE_24M
#define RATE_36M
#define RATE_48M
#define RATE_54M
#define RATE_AUTO

#define MAX_RATE
#define VNT_B_RATES

/*
 * device specific
 */

#include "wcmd.h"
#include "desc.h"
#include "key.h"
#include "card.h"

#define VNT_USB_VENDOR_ID
#define VNT_USB_PRODUCT_ID

#define DEVICE_NAME
#define DEVICE_FULL_DRV_NAM

#define DEVICE_VERSION

#define FIRMWARE_VERSION
#define FIRMWARE_NAME
#define FIRMWARE_CHUNK_SIZE

#define MAX_UINTS
#define OPTION_DEFAULT

#define DUPLICATE_RX_CACHE_LENGTH

#define AUTO_FB_NONE
#define AUTO_FB_0
#define AUTO_FB_1

#define FB_RATE0
#define FB_RATE1

/* Antenna Mode */
#define ANT_A
#define ANT_B
#define ANT_DIVERSITY
#define ANT_RXD_TXA
#define ANT_RXD_TXB
#define ANT_UNKNOWN
#define ANT_TXA
#define ANT_TXB
#define ANT_RXA
#define ANT_RXB

#define BB_VGA_LEVEL
#define BB_VGA_CHANGE_THRESHOLD

#define EEP_MAX_CONTEXT_SIZE

/* Contents in the EEPROM */
#define EEP_OFS_PAR
#define EEP_OFS_ANTENNA
#define EEP_OFS_RADIOCTL
#define EEP_OFS_RFTYPE
#define EEP_OFS_MINCHANNEL
#define EEP_OFS_MAXCHANNEL
#define EEP_OFS_SIGNATURE
#define EEP_OFS_ZONETYPE
#define EEP_OFS_RFTABLE
#define EEP_OFS_PWR_CCK
#define EEP_OFS_SETPT_CCK
#define EEP_OFS_PWR_OFDMG

#define EEP_OFS_CALIB_TX_IQ
#define EEP_OFS_CALIB_TX_DC
#define EEP_OFS_CALIB_RX_IQ

#define EEP_OFS_MAJOR_VER
#define EEP_OFS_MINOR_VER

#define EEP_OFS_CCK_PWR_TBL
#define EEP_OFS_OFDM_PWR_TBL
#define EEP_OFS_OFDMA_PWR_TBL

/* Bits in EEP_OFS_ANTENNA */
#define EEP_ANTENNA_MAIN
#define EEP_ANTENNA_AUX
#define EEP_ANTINV

/* Bits in EEP_OFS_RADIOCTL */
#define EEP_RADIOCTL_ENABLE

/* control commands */
#define MESSAGE_TYPE_READ
#define MESSAGE_TYPE_WRITE
#define MESSAGE_TYPE_LOCK_OR
#define MESSAGE_TYPE_LOCK_AND
#define MESSAGE_TYPE_WRITE_MASK
#define MESSAGE_TYPE_CARDINIT
#define MESSAGE_TYPE_INIT_RSP
#define MESSAGE_TYPE_MACSHUTDOWN
#define MESSAGE_TYPE_SETKEY
#define MESSAGE_TYPE_CLRKEYENTRY
#define MESSAGE_TYPE_WRITE_MISCFF
#define MESSAGE_TYPE_SET_ANTMD
#define MESSAGE_TYPE_SELECT_CHANNEL
#define MESSAGE_TYPE_SET_TSFTBTT
#define MESSAGE_TYPE_SET_SSTIFS
#define MESSAGE_TYPE_CHANGE_BBTYPE
#define MESSAGE_TYPE_DISABLE_PS
#define MESSAGE_TYPE_WRITE_IFRF

/* command read/write(index) */
#define MESSAGE_REQUEST_MEM
#define MESSAGE_REQUEST_BBREG
#define MESSAGE_REQUEST_MACREG
#define MESSAGE_REQUEST_EEPROM
#define MESSAGE_REQUEST_TSF
#define MESSAGE_REQUEST_TBTT
#define MESSAGE_REQUEST_BBAGC
#define MESSAGE_REQUEST_VERSION
#define MESSAGE_REQUEST_RF_INIT
#define MESSAGE_REQUEST_RF_INIT2
#define MESSAGE_REQUEST_RF_CH0
#define MESSAGE_REQUEST_RF_CH1
#define MESSAGE_REQUEST_RF_CH2

/* USB registers */
#define USB_REG4

#define DEVICE_INIT_COLD
#define DEVICE_INIT_RESET
#define DEVICE_INIT_DXPL

/* Device init */
struct vnt_cmd_card_init {};

struct vnt_rsp_card_init {};

/* USB */

/*
 * Enum of context types for SendPacket
 */
enum {};

struct vnt_rx_header {} __packed;

struct vnt_rx_tail {} __packed;

/* RCB (Receive Control Block) */
struct vnt_rcb {};

/* used to track bulk out irps */
struct vnt_usb_send_context {};

/*
 * Structure to keep track of USB interrupt packets
 */
struct vnt_interrupt_buffer {};

/* flags for options */
#define DEVICE_FLAGS_UNPLUG
#define DEVICE_FLAGS_DISCONNECTED

struct vnt_private {};

int vnt_init(struct vnt_private *priv);

#endif