1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. 4 * 5 * Contact Information: wlanfae <wlanfae@realtek.com> 6 */ 7 #ifndef _R819XU_PHY_H 8 #define _R819XU_PHY_H 9 10 #define MAX_DOZE_WAITING_TIMES_9x 64 11 12 enum hw90_block { 13 HW90_BLOCK_MAC = 0, 14 HW90_BLOCK_PHY0 = 1, 15 HW90_BLOCK_PHY1 = 2, 16 HW90_BLOCK_RF = 3, 17 HW90_BLOCK_MAXIMUM = 4, 18 }; 19 20 enum rf90_radio_path { 21 RF90_PATH_A = 0, 22 RF90_PATH_B = 1, 23 RF90_PATH_MAX 24 }; 25 26 void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, 27 u32 dwBitMask, u32 dwData); 28 u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask); 29 void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, 30 u32 RegAddr, u32 BitMask, u32 Data); 31 u32 rtl92e_get_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, 32 u32 RegAddr, u32 BitMask); 33 void rtl92e_config_mac(struct net_device *dev); 34 bool rtl92e_check_bb_and_rf(struct net_device *dev, 35 enum hw90_block CheckBlock, 36 enum rf90_radio_path eRFPath); 37 bool rtl92e_config_bb(struct net_device *dev); 38 void rtl92e_get_tx_power(struct net_device *dev); 39 void rtl92e_set_tx_power(struct net_device *dev, u8 channel); 40 u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath); 41 42 void rtl92e_set_channel(struct net_device *dev, u8 channel); 43 void rtl92e_set_bw_mode(struct net_device *dev, 44 enum ht_channel_width bandwidth, 45 enum ht_extchnl_offset Offset); 46 void rtl92e_init_gain(struct net_device *dev, u8 operation); 47 48 void rtl92e_set_rf_off(struct net_device *dev); 49 50 bool rtl92e_set_rf_power_state(struct net_device *dev, 51 enum rt_rf_power_state rf_power_state); 52 53 void rtl92e_scan_op_backup(struct net_device *dev, u8 operation); 54 55 #endif 56