xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/phl/hal_g6/rtl8852b/rtl8852b_hal.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2019 Realtek Corporation.
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 _RTL8852B_HAL_H_
16 #define _RTL8852B_HAL_H_
17 #include "../hal_headers.h"
18 
19 /*usage under rtl8852b folder*/
20 #include "rtl8852b_spec.h"
21 #include "hal_trx_8852b.h"
22 
23 #ifdef CONFIG_PCI_HCI
24 #include "pci/rtl8852be_hal.h"
25 #endif
26 
27 #ifdef CONFIG_USB_HCI
28 #include "usb/rtl8852bu_hal.h"
29 #endif
30 
31 #ifdef CONFIG_SDIO_HCI
32 #include "sdio/rtl8852bs_hal.h"
33 #endif
34 
35 enum hw_stype_8852b {
36 	EFUSE_HW_STYPE_NONE_8852B = 0,
37 	EFUSE_HW_STYPE_VF1_CG_8852B = 0xe,
38 	EFUSE_HW_STYPE_GENERAL_8852B = 0xf
39 };
40 
41 /* rtl8852b_halinit.c */
42 void init_hal_spec_8852b(struct rtw_phl_com_t *phl_com,
43 					struct hal_info_t *hal);
44 enum rtw_hal_status hal_cfg_fw_8852b(struct rtw_phl_com_t *phl_com,
45 				     struct hal_info_t *hal,
46 				     char *ic_name,
47 				     enum rtw_fw_type fw_type);
48 
49 /* rtl8852b_ops.c */
50 void hal_set_ops_8852b(struct rtw_phl_com_t *phl_com,
51 					struct hal_info_t *hal);
52 /*void hal_set_trx_ops_8852b(struct hal_info_t *hal);*/
53 
54 void init_default_value_8852b(struct hal_info_t *hal);
55 enum rtw_hal_status hal_get_efuse_8852b(struct rtw_phl_com_t *phl_com,
56 					struct hal_info_t *hal,
57 					struct hal_init_info_t *init_info);
58 enum rtw_hal_status hal_start_8852b(struct rtw_phl_com_t *phl_com,
59 				   struct hal_info_t *hal,
60 				   struct hal_init_info_t *init_info);
61 enum rtw_hal_status hal_stop_8852b(struct rtw_phl_com_t *phl_com,
62 				     struct hal_info_t *hal);
63 
64 #ifdef CONFIG_WOWLAN
65 enum rtw_hal_status
66 hal_wow_init_8852b(struct rtw_phl_com_t *phl_com,
67 				struct hal_info_t *hal_info, struct rtw_phl_stainfo_t *sta,
68 					struct hal_init_info_t *init_info);
69 enum rtw_hal_status
70 hal_wow_deinit_8852b(struct rtw_phl_com_t *phl_com,
71 				struct hal_info_t *hal_info, struct rtw_phl_stainfo_t *sta,
72 					struct hal_init_info_t *init_info);
73 #endif /* CONFIG_WOWLAN */
74 
75 #ifdef RTW_PHL_BCN
76 enum rtw_hal_status hal_config_beacon_8852b(struct rtw_phl_com_t *phl_com, struct hal_info_t *hal, struct rtw_bcn_entry *bcn_entry);
77 enum rtw_hal_status hal_update_beacon_8852b(struct rtw_phl_com_t *phl_com, struct hal_info_t *hal, struct rtw_bcn_entry *bcn_entry);
78 #endif
79 
80 enum rtw_hal_status
81 hal_mp_init_8852b(struct rtw_phl_com_t *phl_com,
82 				struct hal_info_t *hal_info,
83 				struct hal_init_info_t *init_info);
84 enum rtw_hal_status
85 hal_mp_deinit_8852b(struct rtw_phl_com_t *phl_com,
86 				struct hal_info_t *hal_info,
87 				struct hal_init_info_t *init_info);
88 
89 
90 #endif /* _RTL8852B_HAL_H_ */
91