• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 #ifndef __HAL_INTF_H__
16 #define __HAL_INTF_H__
17 
18 #include <osdep_service.h>
19 #include <drv_types.h>
20 
21 enum _CHIP_TYPE {
22 	NULL_CHIP_TYPE,
23 	RTL8712_8188S_8191S_8192S,
24 	RTL8188C_8192C,
25 	RTL8192D,
26 	RTL8723A,
27 	RTL8188E,
28 	MAX_CHIP_TYPE
29 };
30 
31 enum hal_def_variable {
32 	HAL_DEF_UNDERCORATEDSMOOTHEDPWDB,
33 	HAL_DEF_IS_SUPPORT_ANT_DIV,
34 	HAL_DEF_CURRENT_ANTENNA,
35 	HAL_DEF_DRVINFO_SZ,
36 	HAL_DEF_MAX_RECVBUF_SZ,
37 	HAL_DEF_RX_PACKET_OFFSET,
38 	HAL_DEF_DBG_DUMP_RXPKT,/* for dbg */
39 	HAL_DEF_DBG_DM_FUNC,/* for dbg */
40 	HAL_DEF_RA_DECISION_RATE,
41 	HAL_DEF_RA_SGI,
42 	HAL_DEF_PT_PWR_STATUS,
43 	HW_VAR_MAX_RX_AMPDU_FACTOR,
44 	HW_DEF_RA_INFO_DUMP,
45 	HAL_DEF_DBG_DUMP_TXPKT,
46 	HW_DEF_FA_CNT_DUMP,
47 	HW_DEF_ODM_DBG_FLAG,
48 };
49 
50 enum hal_odm_variable {
51 	HAL_ODM_STA_INFO,
52 	HAL_ODM_P2P_STATE,
53 	HAL_ODM_WIFI_DISPLAY_STATE,
54 };
55 
56 enum rt_eeprom_type {
57 	EEPROM_93C46,
58 	EEPROM_93C56,
59 	EEPROM_BOOT_EFUSE,
60 };
61 
62 
63 
64 #define RF_CHANGE_BY_INIT	0
65 #define RF_CHANGE_BY_IPS	BIT(28)
66 #define RF_CHANGE_BY_PS		BIT(29)
67 #define RF_CHANGE_BY_HW		BIT(30)
68 #define RF_CHANGE_BY_SW		BIT(31)
69 
70 enum hardware_type {
71 	HARDWARE_TYPE_RTL8180,
72 	HARDWARE_TYPE_RTL8185,
73 	HARDWARE_TYPE_RTL8187,
74 	HARDWARE_TYPE_RTL8188,
75 	HARDWARE_TYPE_RTL8190P,
76 	HARDWARE_TYPE_RTL8192E,
77 	HARDWARE_TYPE_RTL819xU,
78 	HARDWARE_TYPE_RTL8192SE,
79 	HARDWARE_TYPE_RTL8192SU,
80 	HARDWARE_TYPE_RTL8192CE,
81 	HARDWARE_TYPE_RTL8192CU,
82 	HARDWARE_TYPE_RTL8192DE,
83 	HARDWARE_TYPE_RTL8192DU,
84 	HARDWARE_TYPE_RTL8723AE,
85 	HARDWARE_TYPE_RTL8723AU,
86 	HARDWARE_TYPE_RTL8723AS,
87 	HARDWARE_TYPE_RTL8188EE,
88 	HARDWARE_TYPE_RTL8188EU,
89 	HARDWARE_TYPE_RTL8188ES,
90 	HARDWARE_TYPE_MAX,
91 };
92 
93 #define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
94 
95 void rtw_hal_def_value_init23a(struct rtw_adapter *padapter);
96 int pm_netdev_open23a(struct net_device *pnetdev, u8 bnormal);
97 
98 int rtl8723au_hal_init(struct rtw_adapter *padapter);
99 int rtl8723au_hal_deinit(struct rtw_adapter *padapter);
100 void rtw_hal_stop(struct rtw_adapter *padapter);
101 
102 void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level);
103 void	rtw_hal_clone_data(struct rtw_adapter *dst_padapter, struct rtw_adapter *src_padapter);
104 
105 void hw_var_set_correct_tsf(struct rtw_adapter *padapter);
106 void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter);
107 void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode);
108 void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val);
109 void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val);
110 void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type);
111 
112 int GetHalDefVar8192CUsb(struct rtw_adapter *Adapter,
113 			 enum hal_def_variable eVariable, void *pValue);
114 
115 #endif /* __HAL_INTF_H__ */
116