linux/drivers/staging/rtl8712/rtl871x_mp.h

/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
 *
 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
 *
 * Modifications for inclusion into the Linux staging tree are
 * Copyright(c) 2010 Larry Finger. All rights reserved.
 *
 * Contact information:
 * WLAN FAE <[email protected]>
 * Larry Finger <[email protected]>
 *
 ******************************************************************************/
#ifndef __RTL871X_MP_H_
#define __RTL871X_MP_H_

#define MPT_NOOP
#define MPT_READ_MAC_1BYTE
#define MPT_READ_MAC_2BYTE
#define MPT_READ_MAC_4BYTE
#define MPT_WRITE_MAC_1BYTE
#define MPT_WRITE_MAC_2BYTE
#define MPT_WRITE_MAC_4BYTE
#define MPT_READ_BB_CCK
#define MPT_WRITE_BB_CCK
#define MPT_READ_BB_OFDM
#define MPT_WRITE_BB_OFDM
#define MPT_READ_RF
#define MPT_WRITE_RF
#define MPT_READ_EEPROM_1BYTE
#define MPT_WRITE_EEPROM_1BYTE
#define MPT_READ_EEPROM_2BYTE
#define MPT_WRITE_EEPROM_2BYTE
#define MPT_SET_CSTHRESHOLD
#define MPT_SET_INITGAIN
#define MPT_SWITCH_BAND
#define MPT_SWITCH_CHANNEL
#define MPT_SET_DATARATE
#define MPT_SWITCH_ANTENNA
#define MPT_SET_TX_POWER
#define MPT_SET_CONT_TX
#define MPT_SET_SINGLE_CARRIER
#define MPT_SET_CARRIER_SUPPRESSION
#define MPT_GET_RATE_TABLE
#define MPT_READ_TSSI
#define MPT_GET_THERMAL_METER
#define MAX_MP_XMITBUF_SZ
#define NR_MP_XMITFRAME

struct mp_xmit_frame {};

struct mp_wiparam {};

struct mp_priv {};

struct IOCMD_STRUCT {};

struct rf_reg_param {};

struct bb_reg_param {};

/* ======================================================================= */

#define LOWER
#define RAISE
#define IOCMD_CTRL_REG
#define IOCMD_DATA_REG
#define IOCMD_GET_THERMAL_METER
#define IOCMD_CLASS_BB_RF
#define IOCMD_BB_READ_IDX
#define IOCMD_BB_WRITE_IDX
#define IOCMD_RF_READ_IDX
#define IOCMD_RF_WRIT_IDX
#define BB_REG_BASE_ADDR
#define RF_PATH_A
#define RF_PATH_B
#define RF_PATH_C
#define RF_PATH_D
#define MAX_RF_PATH_NUMS
#define _2MAC_MODE_
#define _LOOPBOOK_MODE_

/* MP set force data rate base on the definition. */
enum {};

/* Represent Channel Width in HT Capabilities */
enum HT_CHANNEL_WIDTH {};

#define MAX_TX_PWR_INDEX_N_MODE

enum POWER_MODE {};

#define RX_PKT_BROADCAST
#define RX_PKT_DEST_ADDR
#define RX_PKT_PHY_MATCH

#define RPTMaxCount

/* parameter 1 : BitMask
 *	bit 0  : OFDM PPDU
 *	bit 1  : OFDM False Alarm
 *	bit 2  : OFDM MPDU OK
 *	bit 3  : OFDM MPDU Fail
 *	bit 4  : CCK PPDU
 *	bit 5  : CCK False Alarm
 *	bit 6  : CCK MPDU ok
 *	bit 7  : CCK MPDU fail
 *	bit 8  : HT PPDU counter
 *	bit 9  : HT false alarm
 *	bit 10 : HT MPDU total
 *	bit 11 : HT MPDU OK
 *	bit 12 : HT MPDU fail
 *	bit 15 : RX full drop
 */
enum RXPHY_BITMASK {};

enum ENCRY_CTRL_STATE {};

/* Bandwidth Offset */
#define HAL_PRIME_CHNL_OFFSET_DONT_CARE
#define HAL_PRIME_CHNL_OFFSET_LOWER
#define HAL_PRIME_CHNL_OFFSET_UPPER
/*=======================================================================*/
void mp871xinit(struct _adapter *padapter);
void mp871xdeinit(struct _adapter *padapter);
u32 r8712_bb_reg_read(struct _adapter *Adapter, u16 offset);
u8 r8712_bb_reg_write(struct _adapter *Adapter, u16 offset, u32 value);
u32 r8712_rf_reg_read(struct _adapter *Adapter, u8 path, u8 offset);
u8 r8712_rf_reg_write(struct _adapter *Adapter, u8 path,
		      u8 offset, u32 value);
u32 r8712_get_bb_reg(struct _adapter *Adapter, u16 offset, u32 bitmask);
u8 r8712_set_bb_reg(struct _adapter *Adapter, u16 offset,
		    u32 bitmask, u32 value);
u32 r8712_get_rf_reg(struct _adapter *Adapter, u8 path, u8 offset,
		     u32 bitmask);
u8 r8712_set_rf_reg(struct _adapter *Adapter, u8 path, u8 offset,
		    u32 bitmask, u32 value);

void r8712_SetChannel(struct _adapter *pAdapter);
void r8712_SetTxPower(struct _adapter *pAdapte);
void r8712_SetTxAGCOffset(struct _adapter *pAdapter, u32 ulTxAGCOffset);
void r8712_SetDataRate(struct _adapter *pAdapter);
void r8712_SwitchBandwidth(struct _adapter *pAdapter);
void r8712_SwitchAntenna(struct _adapter *pAdapter);
void r8712_GetThermalMeter(struct _adapter *pAdapter, u32 *value);
void r8712_SetContinuousTx(struct _adapter *pAdapter, u8 bStart);
void r8712_SetSingleCarrierTx(struct _adapter *pAdapter, u8 bStart);
void r8712_SetSingleToneTx(struct _adapter *pAdapter, u8 bStart);
void r8712_SetCarrierSuppressionTx(struct _adapter *pAdapter, u8 bStart);
void r8712_ResetPhyRxPktCount(struct _adapter *pAdapter);
u32 r8712_GetPhyRxPktReceived(struct _adapter *pAdapter);
u32 r8712_GetPhyRxPktCRC32Error(struct _adapter *pAdapter);

#endif /*__RTL871X_MP_H_*/