Path: blob/master/ALFA-W1F1/RTL8814AU/include/Hal8812PhyCfg.h
1307 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#ifndef __INC_HAL8812PHYCFG_H__15#define __INC_HAL8812PHYCFG_H__161718/*--------------------------Define Parameters-------------------------------*/19#define LOOP_LIMIT 520#define MAX_STALL_TIME 50 /* us */21#define AntennaDiversityValue 0x80 /* (Adapter->bSoftwareAntennaDiversity ? 0x00 : 0x80) */22#define MAX_TXPWR_IDX_NMODE_92S 6323#define Reset_Cnt_Limit 3242526#ifdef CONFIG_PCI_HCI27#define MAX_AGGR_NUM 0x0B28#else29#define MAX_AGGR_NUM 0x0730#endif /* CONFIG_PCI_HCI */313233/*--------------------------Define Parameters-------------------------------*/3435/*------------------------------Define structure----------------------------*/363738/* BB/RF related */3940/*------------------------------Define structure----------------------------*/414243/*------------------------Export global variable----------------------------*/44/*------------------------Export global variable----------------------------*/454647/*------------------------Export Marco Definition---------------------------*/48/*------------------------Export Marco Definition---------------------------*/495051/*--------------------------Exported Function prototype---------------------*/52/*53* BB and RF register read/write54* */55u32 PHY_QueryBBReg8812(PADAPTER Adapter,56u32 RegAddr,57u32 BitMask);58void PHY_SetBBReg8812(PADAPTER Adapter,59u32 RegAddr,60u32 BitMask,61u32 Data);62u32 PHY_QueryRFReg8812(PADAPTER Adapter,63enum rf_path eRFPath,64u32 RegAddr,65u32 BitMask);66void PHY_SetRFReg8812(PADAPTER Adapter,67enum rf_path eRFPath,68u32 RegAddr,69u32 BitMask,70u32 Data);7172/*73* Initialization related function74*75* MAC/BB/RF HAL config */76int PHY_MACConfig8812(PADAPTER Adapter);77int PHY_BBConfig8812(PADAPTER Adapter);78void PHY_BB8812_Config_1T(PADAPTER Adapter);79int PHY_RFConfig8812(PADAPTER Adapter);8081/* RF config */8283s3284PHY_SwitchWirelessBand8812(85PADAPTER Adapter,86u8 Band87);8889/*90* BB TX Power R/W91* */92void PHY_SetTxPowerLevel8812(PADAPTER Adapter, u8 Channel);9394u8 PHY_GetTxPowerIndex_8812A(95PADAPTER pAdapter,96enum rf_path RFPath,97u8 Rate,98u8 BandWidth,99u8 Channel,100struct txpwr_idx_comp *tic101);102103u32 phy_get_tx_bb_swing_8812a(104PADAPTER Adapter,105BAND_TYPE Band,106enum rf_path RFPath107);108109void110PHY_SetTxPowerIndex_8812A(111PADAPTER Adapter,112u32 PowerIndex,113enum rf_path RFPath,114u8 Rate115);116117/*118* channel switch related funciton119* */120void121PHY_SetSwChnlBWMode8812(122PADAPTER Adapter,123u8 channel,124enum channel_width Bandwidth,125u8 Offset40,126u8 Offset80127);128129/*130* BB/MAC/RF other monitor API131* */132133void134phy_set_rf_path_switch_8812a(135struct dm_struct *phydm,136bool bMain137);138139/*--------------------------Exported Function prototype---------------------*/140#endif /* __INC_HAL8192CPHYCFG_H */141142143