xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/phl/phl_p2pps.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 _PHL_P2PPS_H_
16 #define _PHL_P2PPS_H_
17 #ifdef CONFIG_PHL_P2PPS
18 #ifdef RTW_WKARD_P2PPS_REFINE
19 
20 enum rtw_phl_status
21 phl_p2pps_init(struct phl_info_t* phl_info);
22 
23 void
24 phl_p2pps_deinit(struct phl_info_t* phl_info);
25 
26 void
27 phl_p2pps_query_noa_with_cnt255(struct phl_info_t* phl_info,
28 	struct rtw_wifi_role_t *w_role,
29 	struct rtw_phl_noa_desc *desc);
30 
31 void
32 phl_p2pps_tsf32_tog_handler(struct phl_info_t* phl_info);
33 
34 void
35 phl_p2pps_noa_resume_all(struct phl_info_t *phl,
36 	struct rtw_wifi_role_t *w_role);
37 void
38 phl_p2pps_noa_all_role_resume(struct phl_info_t *phl_info,
39 	u8 band_idx);
40 
41 void
42 phl_p2pps_noa_pause_all(struct phl_info_t *phl,
43 	struct rtw_wifi_role_t *w_role);
44 void
45 phl_p2pps_noa_all_role_pause(struct phl_info_t *phl_info,
46 	u8 band_idx);
47 
48 void
49 phl_p2pps_noa_disable_all(struct phl_info_t *phl,
50 	struct rtw_wifi_role_t *w_role);
51 
52 enum rtw_phl_status
53 rtw_phl_p2pps_noa_update(void *phl,
54 	struct rtw_phl_noa_desc *in_desc);
55 #endif
56 #else
57 #define phl_p2pps_init(_phl_info) RTW_PHL_STATUS_SUCCESS
58 #define phl_p2pps_deinit(_phl_info)
59 #define rtw_phl_p2pps_noa_update(_phl, _in_desc) RTW_PHL_STATUS_SUCCESS
60 #define phl_p2pps_tsf32_tog_handler(_phl_info)
61 #define phl_p2pps_query_noa_with_cnt255(_phl, _wrole, _desc)
62 #define phl_p2pps_noa_resume_all(_phl, _w_role)
63 #define phl_p2pps_noa_all_role_resume(_phl, _band_idx)
64 #define phl_p2pps_noa_pause_all(_phl, _w_role)
65 #define phl_p2pps_noa_all_role_pause(_phl, _band_idx)
66 #define phl_p2pps_noa_disable_all(_phl, _w_role)
67 #endif
68 #endif
69