hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/******************************************************************************
 *
 * Copyright(c) 2019 Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 *****************************************************************************/
#ifndef _PHL_ROLE_H_
#define _PHL_ROLE_H_
 
/* reason of suspended role */
enum phl_role_susp_rsn {
   PHL_ROLE_SUSPEND_RSN_WOW = 0,
   PHL_ROLE_SUSPEND_RSN_DEV_SUSP,
   PHL_ROLE_SUSPEND_RSN_RF_OFF,
   PHL_ROLE_SUSPEND_RSN_MAX
};
 
#ifdef CONFIG_CMD_DISP
enum rtw_phl_status
phl_register_mrc_module(struct phl_info_t *phl_info);
#endif
 
struct rtw_wifi_role_t *
phl_get_wrole_by_ridx(struct phl_info_t *phl_info, u8 rold_idx);
 
struct rtw_wifi_role_link_t *
phl_get_rlink_by_hw_band(struct rtw_wifi_role_t *wrole,
                         u8 hw_band);
 
struct rtw_wifi_role_t *
rtw_phl_get_role_by_band_port(void *phl, u8 hw_band, u8 hw_port);
 
struct rtw_wifi_role_t *
phl_get_wrole_by_addr(struct phl_info_t *phl_info, u8 *mac_addr);
 
enum rtw_phl_status
phl_role_noa_notify(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole);
enum rtw_phl_status
phl_role_ap_client_notify(struct phl_info_t *phl_info,
           struct rtw_wifi_role_t *wrole, u8 link_sts, u16 client_macid);
 
enum rtw_phl_status
phl_role_notify(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole);
 
enum rtw_phl_status
phl_role_recover(struct phl_info_t *phl_info);
enum rtw_phl_status
phl_cmd_role_recover(struct phl_info_t *phl_info);
enum rtw_phl_status
phl_role_suspend(struct phl_info_t *phl_info, enum phl_role_susp_rsn rsn);
enum rtw_phl_status
phl_cmd_role_suspend(struct phl_info_t *phl_info, enum phl_role_susp_rsn rsn);
 
#ifdef RTW_PHL_BCN
enum rtw_phl_status
rtw_phl_free_bcn_entry(void *phl, struct rtw_wifi_role_link_t *rlink);
 
#ifdef CONFIG_CMD_DISP
enum rtw_phl_status
phl_cmd_issue_bcn_hdl(struct phl_info_t *phl_info, u8 *param);
enum rtw_phl_status
phl_cmd_stop_bcn_hdl(struct phl_info_t *phl_info, u8 *param);
#endif
#endif
 
u16 phl_role_get_bcn_intvl(struct phl_info_t *phl,
                           struct rtw_wifi_role_t *wrole,
                           struct rtw_wifi_role_link_t *rlink);
 
#ifdef CONFIG_CMD_DISP
enum rtw_phl_status
phl_wifi_role_start_hdl(struct phl_info_t *phl_info, u8 *param);
enum rtw_phl_status
phl_wifi_role_chg_hdl(struct phl_info_t *phl_info, u8 *param);
enum rtw_phl_status
phl_wifi_role_stop_hdl(struct phl_info_t *phl_info, u8 *param);
enum rtw_phl_status
phl_cmd_get_cur_tsf_hdl(struct phl_info_t *phl_info,
   struct rtw_phl_port_tsf *tsf);
#endif
 
enum rtw_phl_status
phl_wifi_role_change(struct phl_info_t *phl_info,
                     struct rtw_wifi_role_t *wrole,
                     struct rtw_wifi_role_link_t *rlink,
                     enum wr_chg_id chg_id,
                     void *chg_info
);
enum rtw_phl_status
phl_wifi_role_macid_all_pause(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole, bool pause);
 
u8 rtw_phl_wifi_role_alloc(void *phl,
                           u8 *mac_addr,
                           u8 **rlink_mac_addr,
                           enum role_type rtype,
                           u8 ridx,
                           struct rtw_wifi_role_t **wifi_role,
                           enum rtw_device_type dtype,
                           bool ignore_hw_fail);
 
void rtw_phl_wifi_role_free(void *phl, u8 role_idx);
 
#ifdef CONFIG_DBCC_SUPPORT
enum rtw_phl_status
phl_wifi_role_realloc_band(struct phl_info_t *phl_info,
              struct rtw_wifi_role_t *wrole,
                           struct rtw_wifi_role_link_t *rlink,
                           enum phl_band_idx new_band);
#endif
#endif  /*_PHL_ROLE_H_*/