brintos

brintos / linux-shallow public Read only

0
0
Text · 2.7 KiB · bbe9ef7 Raw
91 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright(c) 2009-2012  Realtek Corporation.*/3 4#ifndef __RTL92D_PHY_H__5#define __RTL92D_PHY_H__6 7#define MAX_PRECMD_CNT				168#define MAX_RFDEPENDCMD_CNT			169#define MAX_POSTCMD_CNT				1610 11#define MAX_DOZE_WAITING_TIMES_9x		6412 13#define HIGHPOWER_RADIOA_ARRAYLEN		2214 15#define	APK_BB_REG_NUM				516#define	APK_AFE_REG_NUM				1617#define	APK_CURVE_REG_NUM			418#define	PATH_NUM				219 20#define LOOP_LIMIT				521#define MAX_STALL_TIME				5022#define ANTENNA_DIVERSITY_VALUE			0x8023#define MAX_TXPWR_IDX_NMODE_92S			6324#define RESET_CNT_LIMIT				325 26#define IQK_ADDA_REG_NUM			1627#define IQK_BB_REG_NUM_test			628#define IQK_MAC_REG_NUM				429 30#define CT_OFFSET_MAC_ADDR			0X1631 32#define CT_OFFSET_CCK_TX_PWR_IDX		0x5A33#define CT_OFFSET_HT401S_TX_PWR_IDX		0x6034#define CT_OFFSET_HT402S_TX_PWR_IDX_DIFF	0x6635#define CT_OFFSET_HT20_TX_PWR_IDX_DIFF		0x6936#define CT_OFFSET_OFDM_TX_PWR_IDX_DIFF		0x6C37 38#define CT_OFFSET_HT40_MAX_PWR_OFFSET		0x6F39#define CT_OFFSET_HT20_MAX_PWR_OFFSET		0x7240 41#define CT_OFFSET_CHANNEL_PLAH			0x7542#define CT_OFFSET_THERMAL_METER			0x7843#define CT_OFFSET_RF_OPTION			0x7944#define CT_OFFSET_VERSION			0x7E45#define CT_OFFSET_CUSTOMER_ID			0x7F46 47enum swchnlcmd_id {48	CMDID_END,49	CMDID_SET_TXPOWEROWER_LEVEL,50	CMDID_BBREGWRITE10,51	CMDID_WRITEPORT_ULONG,52	CMDID_WRITEPORT_USHORT,53	CMDID_WRITEPORT_UCHAR,54	CMDID_RF_WRITEREG,55};56 57struct swchnlcmd {58	enum swchnlcmd_id cmdid;59	u32 para1;60	u32 para2;61	u32 msdelay;62};63 64u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw,65			    u32 regaddr, u32 bitmask);66void rtl92d_phy_set_bb_reg(struct ieee80211_hw *hw,67			   u32 regaddr, u32 bitmask, u32 data);68bool rtl92d_phy_mac_config(struct ieee80211_hw *hw);69bool rtl92d_phy_bb_config(struct ieee80211_hw *hw);70bool rtl92d_phy_rf_config(struct ieee80211_hw *hw);71bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,72					  enum radio_path rfpath);73void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,74			    enum nl80211_channel_type ch_type);75u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw);76bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,77					  enum rf_content content,78					  enum radio_path rfpath);79bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,80				   enum rf_pwrstate rfpwr_state);81 82void rtl92d_phy_set_poweron(struct ieee80211_hw *hw);83bool rtl92d_phy_check_poweroff(struct ieee80211_hw *hw);84void rtl92d_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t);85void rtl92d_update_bbrf_configuration(struct ieee80211_hw *hw);86void rtl92d_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta);87void rtl92d_phy_iq_calibrate(struct ieee80211_hw *hw);88void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel);89 90#endif91