#include <linux/firmware.h>
#include <linux/slab.h>
#include <drv_types.h>
#include <rtl8723b_hal.h>
#include "hal_com_h2c.h"
static void _FWDownloadEnable(struct adapter *padapter, bool enable)
{ … }
static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
{ … }
static int _PageWrite(
struct adapter *padapter,
u32 page,
void *buffer,
u32 size
)
{ … }
static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
{ … }
void _8051Reset8723(struct adapter *padapter)
{ … }
u8 g_fwdl_chksum_fail;
static s32 polling_fwdl_chksum(
struct adapter *adapter, u32 min_cnt, u32 timeout_ms
)
{ … }
u8 g_fwdl_wintint_rdy_fail;
static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ … }
#define IS_FW_81xxC(padapter) …
void rtl8723b_FirmwareSelfReset(struct adapter *padapter)
{ … }
s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw)
{ … }
void rtl8723b_InitializeFirmwareVars(struct adapter *padapter)
{ … }
static void rtl8723b_free_hal_data(struct adapter *padapter)
{ … }
static u8 hal_EfuseSwitchToBank(
struct adapter *padapter, u8 bank, bool bPseudoTest
)
{ … }
static void Hal_GetEfuseDefinition(
struct adapter *padapter,
u8 efuseType,
u8 type,
void *pOut,
bool bPseudoTest
)
{ … }
#define VOLTAGE_V25 …
#define EFUSE_ACCESS_ON_8723 …
#define REG_EFUSE_ACCESS_8723 …
static void Hal_BT_EfusePowerSwitch(
struct adapter *padapter, u8 bWrite, u8 PwrState
)
{ … }
static void Hal_EfusePowerSwitch(
struct adapter *padapter, u8 bWrite, u8 PwrState
)
{ … }
static void hal_ReadEFuse_WiFi(
struct adapter *padapter,
u16 _offset,
u16 _size_byte,
u8 *pbuf,
bool bPseudoTest
)
{ … }
static void hal_ReadEFuse_BT(
struct adapter *padapter,
u16 _offset,
u16 _size_byte,
u8 *pbuf,
bool bPseudoTest
)
{ … }
static void Hal_ReadEFuse(
struct adapter *padapter,
u8 efuseType,
u16 _offset,
u16 _size_byte,
u8 *pbuf,
bool bPseudoTest
)
{ … }
static u16 hal_EfuseGetCurrentSize_WiFi(
struct adapter *padapter, bool bPseudoTest
)
{ … }
static u16 hal_EfuseGetCurrentSize_BT(struct adapter *padapter, u8 bPseudoTest)
{ … }
static u16 Hal_EfuseGetCurrentSize(
struct adapter *padapter, u8 efuseType, bool bPseudoTest
)
{ … }
static u8 Hal_EfuseWordEnableDataWrite(
struct adapter *padapter,
u16 efuse_addr,
u8 word_en,
u8 *data,
bool bPseudoTest
)
{ … }
static s32 Hal_EfusePgPacketRead(
struct adapter *padapter,
u8 offset,
u8 *data,
bool bPseudoTest
)
{ … }
static u8 hal_EfusePgCheckAvailableAddr(
struct adapter *padapter, u8 efuseType, u8 bPseudoTest
)
{ … }
static void hal_EfuseConstructPGPkt(
u8 offset,
u8 word_en,
u8 *pData,
struct pgpkt_struct *pTargetPkt
)
{ … }
static u8 hal_EfusePartialWriteCheck(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
)
{ … }
static u8 hal_EfusePgPacketWrite1ByteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
)
{ … }
static u8 hal_EfusePgPacketWrite2ByteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
)
{ … }
static u8 hal_EfusePgPacketWriteHeader(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
)
{ … }
static u8 hal_EfusePgPacketWriteData(
struct adapter *padapter,
u8 efuseType,
u16 *pAddr,
struct pgpkt_struct *pTargetPkt,
u8 bPseudoTest
)
{ … }
static s32 Hal_EfusePgPacketWrite(
struct adapter *padapter,
u8 offset,
u8 word_en,
u8 *pData,
bool bPseudoTest
)
{ … }
static bool Hal_EfusePgPacketWrite_BT(
struct adapter *padapter,
u8 offset,
u8 word_en,
u8 *pData,
bool bPseudoTest
)
{ … }
static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
{ … }
static void rtl8723b_read_chip_version(struct adapter *padapter)
{ … }
void rtl8723b_InitBeaconParameters(struct adapter *padapter)
{ … }
void _InitBurstPktLen_8723BS(struct adapter *Adapter)
{ … }
static void ResumeTxBeacon(struct adapter *padapter)
{ … }
static void StopTxBeacon(struct adapter *padapter)
{ … }
static void _BeaconFunctionEnable(struct adapter *padapter, u8 Enable, u8 Linked)
{ … }
static void rtl8723b_SetBeaconRelatedRegisters(struct adapter *padapter)
{ … }
static void rtl8723b_GetHalODMVar(
struct adapter *Adapter,
enum hal_odm_variable eVariable,
void *pValue1,
void *pValue2
)
{ … }
static void rtl8723b_SetHalODMVar(
struct adapter *Adapter,
enum hal_odm_variable eVariable,
void *pValue1,
bool bSet
)
{ … }
static void hal_notch_filter_8723b(struct adapter *adapter, bool enable)
{ … }
static void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)
{ … }
void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc)
{ … }
void rtl8723b_InitAntenna_Selection(struct adapter *padapter)
{ … }
void rtl8723b_init_default_value(struct adapter *padapter)
{ … }
u8 GetEEPROMSize8723B(struct adapter *padapter)
{ … }
s32 rtl8723b_InitLLTTable(struct adapter *padapter)
{ … }
static void hal_get_chnl_group_8723b(u8 channel, u8 *group)
{ … }
void Hal_InitPGData(struct adapter *padapter, u8 *PROMContent)
{ … }
void Hal_EfuseParseIDCode(struct adapter *padapter, u8 *hwinfo)
{ … }
static void Hal_ReadPowerValueFromPROM_8723B(
struct adapter *Adapter,
struct TxPowerInfo24G *pwrInfo24G,
u8 *PROMContent,
bool AutoLoadFail
)
{ … }
void Hal_EfuseParseTxPowerInfo_8723B(
struct adapter *padapter, u8 *PROMContent, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseBTCoexistInfo_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseEEPROMVer_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParsePackageType_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseVoltage_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseChnlPlan_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseCustomerID_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseAntennaDiversity_8723B(
struct adapter *padapter,
u8 *hwinfo,
bool AutoLoadFail
)
{ … }
void Hal_EfuseParseXtal_8723B(
struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
)
{ … }
void Hal_EfuseParseThermalMeter_8723B(
struct adapter *padapter, u8 *PROMContent, u8 AutoLoadFail
)
{ … }
void Hal_ReadRFGainOffset(
struct adapter *Adapter, u8 *PROMContent, bool AutoloadFail
)
{ … }
u8 BWMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
{ … }
u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)
{ … }
static void rtl8723b_cal_txdesc_chksum(struct tx_desc *ptxdesc)
{ … }
static u8 fill_txdesc_sectype(struct pkt_attrib *pattrib)
{ … }
static void fill_txdesc_vcs_8723b(struct adapter *padapter, struct pkt_attrib *pattrib, struct txdesc_8723b *ptxdesc)
{ … }
static void fill_txdesc_phy_8723b(struct adapter *padapter, struct pkt_attrib *pattrib, struct txdesc_8723b *ptxdesc)
{ … }
static void rtl8723b_fill_default_txdesc(
struct xmit_frame *pxmitframe, u8 *pbuf
)
{ … }
void rtl8723b_update_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf)
{ … }
void rtl8723b_fill_fake_txdesc(
struct adapter *padapter,
u8 *pDesc,
u32 BufferLen,
u8 IsPsPoll,
u8 IsBTQosNull,
u8 bDataFrame
)
{ … }
static void hw_var_set_opmode(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_macaddr(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_bssid(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_bcn_func(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_correct_tsf(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_mlme_disconnect(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_mlme_sitesurvey(struct adapter *padapter, u8 variable, u8 *val)
{ … }
static void hw_var_set_mlme_join(struct adapter *padapter, u8 variable, u8 *val)
{ … }
void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len)
{ … }
s32 c2h_id_filter_ccx_8723b(u8 *buf)
{ … }
s32 c2h_handler_8723b(struct adapter *padapter, u8 *buf)
{ … }
static void process_c2h_event(struct adapter *padapter, struct c2h_evt_hdr_t *pC2hEvent, u8 *c2hBuf)
{ … }
void C2HPacketHandler_8723B(struct adapter *padapter, u8 *pbuffer, u16 length)
{ … }
void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
{ … }
void GetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
{ … }
u8 SetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, void *pval)
{ … }
u8 GetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, void *pval)
{ … }
void rtl8723b_start_thread(struct adapter *padapter)
{ … }
void rtl8723b_stop_thread(struct adapter *padapter)
{ … }