linux/drivers/net/wireless/admtek/adm8211.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ADM8211_H
#define ADM8211_H

/* ADM8211 Registers */

/* CR32 (SIG) signature */
#define ADM8211_SIG1
#define ADM8211_SIG2

#define ADM8211_CSR_READ(r)
#define ADM8211_CSR_WRITE(r, val)

/* CSR (Host Control and Status Registers) */
struct adm8211_csr {} __packed;

/* CSR0 - PAR (PCI Address Register) */
#define ADM8211_PAR_MWIE
#define ADM8211_PAR_MRLE
#define ADM8211_PAR_MRME
#define ADM8211_PAR_RAP
#define ADM8211_PAR_CAL
#define ADM8211_PAR_PBL
#define ADM8211_PAR_BLE
#define ADM8211_PAR_DSL
#define ADM8211_PAR_BAR
#define ADM8211_PAR_SWR

/* CSR1 - FRCTL (Frame Control Register) */
#define ADM8211_FRCTL_PWRMGT
#define ADM8211_FRCTL_MAXPSP
#define ADM8211_FRCTL_DRVPRSP
#define ADM8211_FRCTL_DRVBCON
#define ADM8211_FRCTL_AID
#define ADM8211_FRCTL_AID_ON

/* CSR5 - STSR (Status Register) */
#define ADM8211_STSR_PCF
#define ADM8211_STSR_BCNTC
#define ADM8211_STSR_GPINT
#define ADM8211_STSR_LinkOff
#define ADM8211_STSR_ATIMTC
#define ADM8211_STSR_TSFTF
#define ADM8211_STSR_TSCZ
#define ADM8211_STSR_LinkOn
#define ADM8211_STSR_SQL
#define ADM8211_STSR_WEPTD
#define ADM8211_STSR_ATIME
#define ADM8211_STSR_TBTT
#define ADM8211_STSR_NISS
#define ADM8211_STSR_AISS
#define ADM8211_STSR_TEIS
#define ADM8211_STSR_FBE
#define ADM8211_STSR_REIS
#define ADM8211_STSR_GPTT
#define ADM8211_STSR_RPS
#define ADM8211_STSR_RDU
#define ADM8211_STSR_RCI
#define ADM8211_STSR_TUF
#define ADM8211_STSR_TRT
#define ADM8211_STSR_TLT
#define ADM8211_STSR_TDU
#define ADM8211_STSR_TPS
#define ADM8211_STSR_TCI

/* CSR6 - NAR (Network Access Register) */
#define ADM8211_NAR_TXCF
#define ADM8211_NAR_HF
#define ADM8211_NAR_UTR
#define ADM8211_NAR_SQ
#define ADM8211_NAR_CFP
#define ADM8211_NAR_SF
#define ADM8211_NAR_TR
#define ADM8211_NAR_ST
#define ADM8211_NAR_OM
#define ADM8211_NAR_MM
#define ADM8211_NAR_PR
#define ADM8211_NAR_EA
#define ADM8211_NAR_PB
#define ADM8211_NAR_STPDMA
#define ADM8211_NAR_SR
#define ADM8211_NAR_CTX

#define ADM8211_IDLE()

#define ADM8211_IDLE_RX()

#define ADM8211_RESTORE()

/* CSR7 - IER (Interrupt Enable Register) */
#define ADM8211_IER_PCFIE
#define ADM8211_IER_BCNTCIE
#define ADM8211_IER_GPIE
#define ADM8211_IER_LinkOffIE
#define ADM8211_IER_ATIMTCIE
#define ADM8211_IER_TSFTFIE
#define ADM8211_IER_TSCZE
#define ADM8211_IER_LinkOnIE
#define ADM8211_IER_SQLIE
#define ADM8211_IER_WEPIE
#define ADM8211_IER_ATIMEIE
#define ADM8211_IER_TBTTIE
#define ADM8211_IER_NIE
#define ADM8211_IER_AIE
#define ADM8211_IER_TEIE
#define ADM8211_IER_FBEIE
#define ADM8211_IER_REIE
#define ADM8211_IER_GPTIE
#define ADM8211_IER_RSIE
#define ADM8211_IER_RUIE
#define ADM8211_IER_RCIE
#define ADM8211_IER_TUIE
#define ADM8211_IER_TRTIE
#define ADM8211_IER_TLTTIE
#define ADM8211_IER_TDUIE
#define ADM8211_IER_TPSIE
#define ADM8211_IER_TCIE

/* CSR9 - SPR (Serial Port Register) */
#define ADM8211_SPR_SRS
#define ADM8211_SPR_SDO
#define ADM8211_SPR_SDI
#define ADM8211_SPR_SCLK
#define ADM8211_SPR_SCS

/* CSR9A - CSR_TEST0 */
#define ADM8211_CSR_TEST0_EPNE
#define ADM8211_CSR_TEST0_EPSNM
#define ADM8211_CSR_TEST0_EPTYP
#define ADM8211_CSR_TEST0_EPRLD

/* CSR10 - WCSR (Wake-up Control/Status Register) */
#define ADM8211_WCSR_CRCT
#define ADM8211_WCSR_TSFTWE
#define ADM8211_WCSR_TIMWE
#define ADM8211_WCSR_ATIMWE
#define ADM8211_WCSR_KEYWE
#define ADM8211_WCSR_MPRE
#define ADM8211_WCSR_LSOE
#define ADM8211_WCSR_KEYUP
#define ADM8211_WCSR_TSFTW
#define ADM8211_WCSR_TIMW
#define ADM8211_WCSR_ATIMW
#define ADM8211_WCSR_MPR
#define ADM8211_WCSR_LSO

/* CSR11A - GPIO */
#define ADM8211_CSR_GPIO_EN5
#define ADM8211_CSR_GPIO_EN4
#define ADM8211_CSR_GPIO_EN3
#define ADM8211_CSR_GPIO_EN2
#define ADM8211_CSR_GPIO_EN1
#define ADM8211_CSR_GPIO_EN0
#define ADM8211_CSR_GPIO_O5
#define ADM8211_CSR_GPIO_O4
#define ADM8211_CSR_GPIO_O3
#define ADM8211_CSR_GPIO_O2
#define ADM8211_CSR_GPIO_O1
#define ADM8211_CSR_GPIO_O0
#define ADM8211_CSR_GPIO_IN

/* CSR12 - BBPCTL (BBP Control port) */
#define ADM8211_BBPCTL_MMISEL
#define ADM8211_BBPCTL_SPICADD
#define ADM8211_BBPCTL_RF3000
#define ADM8211_BBPCTL_TXCE
#define ADM8211_BBPCTL_RXCE
#define ADM8211_BBPCTL_CCAP
#define ADM8211_BBPCTL_TYPE
#define ADM8211_BBPCTL_WR
#define ADM8211_BBPCTL_RD
#define ADM8211_BBPCTL_ADDR
#define ADM8211_BBPCTL_DATA

/* CSR12A - SYNCTL (Synthesizer Control port) */
#define ADM8211_SYNCTL_WR
#define ADM8211_SYNCTL_RD
#define ADM8211_SYNCTL_CS0
#define ADM8211_SYNCTL_CS1
#define ADM8211_SYNCTL_CAL
#define ADM8211_SYNCTL_SELCAL
#define ADM8211_SYNCTL_RFtype
#define ADM8211_SYNCTL_RFMD
#define ADM8211_SYNCTL_GENERAL
/* SYNCTL 21:0 Data (Si4126: 18-bit data, 4-bit address) */

/* CSR18 - CMDR (Command Register) */
#define ADM8211_CMDR_PM
#define ADM8211_CMDR_APM
#define ADM8211_CMDR_RTE
#define ADM8211_CMDR_DRT
#define ADM8211_CMDR_DRT_8DW
#define ADM8211_CMDR_DRT_16DW
#define ADM8211_CMDR_DRT_SF

/* CSR33 - SYNRF (SYNRF direct control) */
#define ADM8211_SYNRF_SELSYN
#define ADM8211_SYNRF_SELRF
#define ADM8211_SYNRF_LERF
#define ADM8211_SYNRF_LEIF
#define ADM8211_SYNRF_SYNCLK
#define ADM8211_SYNRF_SYNDATA
#define ADM8211_SYNRF_PE1
#define ADM8211_SYNRF_PE2
#define ADM8211_SYNRF_PA_PE
#define ADM8211_SYNRF_TR_SW
#define ADM8211_SYNRF_TR_SWN
#define ADM8211_SYNRF_RADIO
#define ADM8211_SYNRF_CAL_EN
#define ADM8211_SYNRF_PHYRST

#define ADM8211_SYNRF_IF_SELECT_0
#define ADM8211_SYNRF_IF_SELECT_1
#define ADM8211_SYNRF_WRITE_SYNDATA_0
#define ADM8211_SYNRF_WRITE_SYNDATA_1
#define ADM8211_SYNRF_WRITE_CLOCK_0
#define ADM8211_SYNRF_WRITE_CLOCK_1

/* CSR44 - WEPCTL (WEP Control) */
#define ADM8211_WEPCTL_WEPENABLE
#define ADM8211_WEPCTL_WPAENABLE
#define ADM8211_WEPCTL_CURRENT_TABLE
#define ADM8211_WEPCTL_TABLE_WR
#define ADM8211_WEPCTL_TABLE_RD
#define ADM8211_WEPCTL_WEPRXBYP
#define ADM8211_WEPCTL_SEL_WEPTABLE
#define ADM8211_WEPCTL_ADDR

/* CSR45 - WESK (Data Entry for Share/Individual Key) */
#define ADM8211_WESK_DATA

/* FER (Function Event Register) */
#define ADM8211_FER_INTR_EV_ENT


/* Si4126 RF Synthesizer - Control Registers */
#define SI4126_MAIN_CONF
#define SI4126_PHASE_DET_GAIN
#define SI4126_POWERDOWN
#define SI4126_RF1_N_DIV
#define SI4126_RF2_N_DIV
#define SI4126_IF_N_DIV
#define SI4126_RF1_R_DIV
#define SI4126_RF2_R_DIV
#define SI4126_IF_R_DIV

/* Main Configuration */
#define SI4126_MAIN_XINDIV2
#define SI4126_MAIN_IFDIV
/* Powerdown */
#define SI4126_POWERDOWN_PDIB
#define SI4126_POWERDOWN_PDRB


/* RF3000 BBP - Control Port Registers */
/* 0x00 - reserved */
#define RF3000_MODEM_CTRL__RX_STATUS
#define RF3000_CCA_CTRL
#define RF3000_DIVERSITY__RSSI
#define RF3000_RX_SIGNAL_FIELD
#define RF3000_RX_LEN_MSB
#define RF3000_RX_LEN_LSB
#define RF3000_RX_SERVICE_FIELD
#define RF3000_TX_VAR_GAIN__TX_LEN_EXT
#define RF3000_TX_LEN_MSB
#define RF3000_TX_LEN_LSB
#define RF3000_LOW_GAIN_CALIB
#define RF3000_HIGH_GAIN_CALIB

/* ADM8211 revisions */
#define ADM8211_REV_AB
#define ADM8211_REV_AF
#define ADM8211_REV_BA
#define ADM8211_REV_CA

struct adm8211_desc {};

#define RDES0_STATUS_OWN
#define RDES0_STATUS_ES
#define RDES0_STATUS_SQL
#define RDES0_STATUS_DE
#define RDES0_STATUS_FS
#define RDES0_STATUS_LS
#define RDES0_STATUS_PCF
#define RDES0_STATUS_SFDE
#define RDES0_STATUS_SIGE
#define RDES0_STATUS_CRC16E
#define RDES0_STATUS_RXTOE
#define RDES0_STATUS_CRC32E
#define RDES0_STATUS_ICVE
#define RDES0_STATUS_DA1
#define RDES0_STATUS_DA0
#define RDES0_STATUS_RXDR
#define RDES0_STATUS_FL

#define RDES1_CONTROL_RER
#define RDES1_CONTROL_RCH
#define RDES1_CONTROL_RBS2
#define RDES1_CONTROL_RBS1

#define RDES1_STATUS_RSSI


#define TDES0_CONTROL_OWN
#define TDES0_CONTROL_DONE
#define TDES0_CONTROL_TXDR

#define TDES0_STATUS_OWN
#define TDES0_STATUS_DONE
#define TDES0_STATUS_ES
#define TDES0_STATUS_TLT
#define TDES0_STATUS_TRT
#define TDES0_STATUS_TUF
#define TDES0_STATUS_TRO
#define TDES0_STATUS_SOFBR
#define TDES0_STATUS_ACR

#define TDES1_CONTROL_IC
#define TDES1_CONTROL_LS
#define TDES1_CONTROL_FS
#define TDES1_CONTROL_TER
#define TDES1_CONTROL_TCH
#define TDES1_CONTROL_RBS2
#define TDES1_CONTROL_RBS1

/* SRAM offsets */
#define ADM8211_SRAM(x)

#define ADM8211_SRAM_INDIV_KEY
#define ADM8211_SRAM_A_SHARE_KEY
#define ADM8211_SRAM_B_SHARE_KEY

#define ADM8211_SRAM_A_SSID
#define ADM8211_SRAM_B_SSID
#define ADM8211_SRAM_SSID

#define ADM8211_SRAM_A_SUPP_RATE
#define ADM8211_SRAM_B_SUPP_RATE
#define ADM8211_SRAM_SUPP_RATE

#define ADM8211_SRAM_A_SIZE
#define ADM8211_SRAM_B_SIZE
#define ADM8211_SRAM_SIZE

struct adm8211_rx_ring_info {};

struct adm8211_tx_ring_info {};

#define PLCP_SIGNAL_1M
#define PLCP_SIGNAL_2M
#define PLCP_SIGNAL_5M5
#define PLCP_SIGNAL_11M

struct adm8211_tx_hdr {} __packed;


#define RX_COPY_BREAK
#define RX_PKT_SIZE

struct adm8211_eeprom {} __packed;

struct adm8211_priv {};

struct ieee80211_chan_range {};

static const struct ieee80211_chan_range cranges[] =;

#endif /* ADM8211_H */