Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9f08d70 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Add files for new driver - part 24



This commit adds files include/odm.h, include/odm_HWConfig.h,
include/odm_RTL8188E.h, include/odm_RegConfig8188E.h, include/odm_RegDefine11AC.h,
include/odm_RegDefine11N.h, include/odm_debug.h, include/odm_interface.h,
include/odm_precomp.h, include/odm_reg.h, include/odm_types.h,
include/osdep_intf.h, and include/osdep_service.h.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe223017
Loading
Loading
Loading
Loading
+1198 −0

File added.

Preview size limit exceeded, changes collapsed.

+132 −0
Original line number Diff line number Diff line
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/

#ifndef	__HALHWOUTSRC_H__
#define __HALHWOUTSRC_H__

/*  Definition */
/*  CCK Rates, TxHT = 0 */
#define DESC92C_RATE1M				0x00
#define DESC92C_RATE2M				0x01
#define DESC92C_RATE5_5M			0x02
#define DESC92C_RATE11M				0x03

/*  OFDM Rates, TxHT = 0 */
#define DESC92C_RATE6M				0x04
#define DESC92C_RATE9M				0x05
#define DESC92C_RATE12M				0x06
#define DESC92C_RATE18M				0x07
#define DESC92C_RATE24M				0x08
#define DESC92C_RATE36M				0x09
#define DESC92C_RATE48M				0x0a
#define DESC92C_RATE54M				0x0b

/*  MCS Rates, TxHT = 1 */
#define DESC92C_RATEMCS0			0x0c
#define DESC92C_RATEMCS1			0x0d
#define DESC92C_RATEMCS2			0x0e
#define DESC92C_RATEMCS3			0x0f
#define DESC92C_RATEMCS4			0x10
#define DESC92C_RATEMCS5			0x11
#define DESC92C_RATEMCS6			0x12
#define DESC92C_RATEMCS7			0x13
#define DESC92C_RATEMCS8			0x14
#define DESC92C_RATEMCS9			0x15
#define DESC92C_RATEMCS10			0x16
#define DESC92C_RATEMCS11			0x17
#define DESC92C_RATEMCS12			0x18
#define DESC92C_RATEMCS13			0x19
#define DESC92C_RATEMCS14			0x1a
#define DESC92C_RATEMCS15			0x1b
#define DESC92C_RATEMCS15_SG			0x1c
#define DESC92C_RATEMCS32			0x20

/*  structure and define */

struct phy_rx_agc_info {
	#ifdef __LITTLE_ENDIAN
		u8	gain:7, trsw:1;
	#else
		u8	trsw:1, gain:7;
	#endif
};

struct phy_status_rpt {
	struct phy_rx_agc_info path_agc[2];
	u8	ch_corr[2];
	u8	cck_sig_qual_ofdm_pwdb_all;
	u8	cck_agc_rpt_ofdm_cfosho_a;
	u8	cck_rpt_b_ofdm_cfosho_b;
	u8	rsvd_1;/* ch_corr_msb; */
	u8	noise_power_db_msb;
	u8	path_cfotail[2];
	u8	pcts_mask[2];
	s8	stream_rxevm[2];
	u8	path_rxsnr[2];
	u8	noise_power_db_lsb;
	u8	rsvd_2[3];
	u8	stream_csi[2];
	u8	stream_target_csi[2];
	s8	sig_evm;
	u8	rsvd_3;

#ifdef __LITTLE_ENDIAN
	u8	antsel_rx_keep_2:1;	/* ex_intf_flg:1; */
	u8	sgi_en:1;
	u8	rxsc:2;
	u8	idle_long:1;
	u8	r_ant_train_en:1;
	u8	ant_sel_b:1;
	u8	ant_sel:1;
#else	/*  _BIG_ENDIAN_ */
	u8	ant_sel:1;
	u8	ant_sel_b:1;
	u8	r_ant_train_en:1;
	u8	idle_long:1;
	u8	rxsc:2;
	u8	sgi_en:1;
	u8	antsel_rx_keep_2:1;	/* ex_intf_flg:1; */
#endif
};

void odm_Init_RSSIForDM(struct odm_dm_struct *pDM_Odm);

void ODM_PhyStatusQuery(struct odm_dm_struct *pDM_Odm,
			struct odm_phy_status_info *pPhyInfo,
			u8 *pPhyStatus,
			struct odm_per_pkt_info *pPktinfo);

void ODM_MacStatusQuery(struct odm_dm_struct *pDM_Odm,
			u8 *pMacStatus,
			u8	MacID,
			bool	bPacketMatchBSSID,
			bool	bPacketToSelf,
			bool	bPacketBeacon);

enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *pDM_Odm,
					   enum ODM_RF_RADIO_PATH Content,
					   enum ODM_RF_RADIO_PATH eRFPath);

enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *pDM_Odm,
					   enum odm_bb_config_type ConfigType);

enum HAL_STATUS ODM_ConfigMACWithHeaderFile(struct odm_dm_struct *pDM_Odm);

#endif
+56 −0
Original line number Diff line number Diff line
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/
#ifndef	__ODM_RTL8188E_H__
#define __ODM_RTL8188E_H__

#define	MAIN_ANT	0
#define	AUX_ANT	1
#define	MAIN_ANT_CG_TRX	1
#define	AUX_ANT_CG_TRX	0
#define	MAIN_ANT_CGCS_RX	0
#define	AUX_ANT_CGCS_RX	1

void ODM_DIG_LowerBound_88E(struct odm_dm_struct *pDM_Odm);

void ODM_AntennaDiversityInit_88E(struct odm_dm_struct *pDM_Odm);

void ODM_AntennaDiversity_88E(struct odm_dm_struct *pDM_Odm);

void ODM_SetTxAntByTxInfo_88E(struct odm_dm_struct *pDM_Odm, u8 *pDesc,
			      u8 macId);

void ODM_UpdateRxIdleAnt_88E(struct odm_dm_struct *pDM_Odm, u8 Ant);

void ODM_AntselStatistics_88E(struct odm_dm_struct *pDM_Odm, u8	antsel_tr_mux,
			      u32 MacId, u8 RxPWDBAll);

void odm_FastAntTraining(struct odm_dm_struct *pDM_Odm);

void odm_FastAntTrainingCallback(struct odm_dm_struct *pDM_Odm);

void odm_FastAntTrainingWorkItemCallback(struct odm_dm_struct *pDM_Odm);

void odm_PrimaryCCA_Init(struct odm_dm_struct *pDM_Odm);

bool ODM_DynamicPrimaryCCA_DupRTS(struct odm_dm_struct *pDM_Odm);

void odm_DynamicPrimaryCCA(struct odm_dm_struct *pDM_Odm);

#endif
+43 −0
Original line number Diff line number Diff line
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/
#ifndef __INC_ODM_REGCONFIG_H_8188E
#define __INC_ODM_REGCONFIG_H_8188E

void odm_ConfigRFReg_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Data,
			   enum ODM_RF_RADIO_PATH  RF_PATH, u32 RegAddr);

void odm_ConfigRF_RadioA_8188E(struct odm_dm_struct *pDM_Odm,
			       u32 Addr, u32 Data);

void odm_ConfigRF_RadioB_8188E(struct odm_dm_struct *pDM_Odm,
			       u32 Addr, u32 Data);

void odm_ConfigMAC_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u8 Data);

void odm_ConfigBB_AGC_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr,
			    u32 Bitmask, u32 Data);

void odm_ConfigBB_PHY_REG_PG_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr,
				   u32 Bitmask, u32 Data);

void odm_ConfigBB_PHY_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr,
			    u32 Bitmask, u32 Data);

#endif
+54 −0
Original line number Diff line number Diff line
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/

#ifndef	__ODM_REGDEFINE11AC_H__
#define __ODM_REGDEFINE11AC_H__

/* 2 RF REG LIST */



/* 2 BB REG LIST */
/* PAGE 8 */
/* PAGE 9 */
#define	ODM_REG_OFDM_FA_RST_11AC		0x9A4
/* PAGE A */
#define	ODM_REG_CCK_CCA_11AC				0xA0A
#define	ODM_REG_CCK_FA_RST_11AC			0xA2C
#define	ODM_REG_CCK_FA_11AC				0xA5C
/* PAGE C */
#define	ODM_REG_IGI_A_11AC				0xC50
/* PAGE E */
#define	ODM_REG_IGI_B_11AC				0xE50
/* PAGE F */
#define	ODM_REG_OFDM_FA_11AC			0xF48


/* 2 MAC REG LIST */




/* DIG Related */
#define	ODM_BIT_IGI_11AC				0xFFFFFFFF



#endif
Loading