hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
/******************************************************************************
 *
 * 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_CHANA_H_
#define _PHL_CHANA_H_
 
u8 phl_chanctx_get_rnum(struct phl_info_t *phl_info,
                   struct phl_queue *chan_ctx_queue,
                   struct rtw_chan_ctx *chanctx);
 
u8 phl_chanctx_get_rnum_with_lock(struct phl_info_t *phl_info,
           struct phl_queue *chan_ctx_queue,
           struct rtw_chan_ctx *chanctx);
 
u8 phl_get_chanctx_rolemap(struct phl_info_t *phl_info, u8 band_idx);
 
enum rtw_phl_status
phl_chanctx_free(struct phl_info_t *phl_info, struct hw_band_ctl_t *band_ctl);
 
enum rtw_phl_status
phl_set_ch_bw(struct rtw_wifi_role_t *wifi_role,
        struct rtw_chan_def *chdef, bool do_rfk);
 
 
bool rtw_phl_chanctx_add(void *phl, struct rtw_wifi_role_t *wifi_role,
       u8 *chan, enum channel_width *bw, enum chan_offset *offset);
 
int rtw_phl_chanctx_del(void *phl, struct rtw_wifi_role_t *wifi_role,
                       struct rtw_chan_def *chan_def);
 
#ifdef CONFIG_CMD_DISP
enum rtw_phl_status
phl_cmd_chg_op_chdef_start_hdl(struct phl_info_t *phl, u8 *param);
 
enum rtw_phl_status
phl_cmd_set_ch_bw_hdl(struct phl_info_t *phl_info, u8 *param);
enum rtw_phl_status
rtw_phl_cmd_set_ch_bw(struct rtw_wifi_role_t *wifi_role,
                      struct rtw_chan_def *chdef,
                      bool do_rfk,
                      enum phl_cmd_type cmd_type,
                      u32 cmd_timeout);
enum rtw_phl_status
phl_cmd_dfs_tx_pause_hdl(struct phl_info_t *phl_info, u8 *param);
#endif
 
#ifdef DBG_PHL_CHAN
void phl_chan_dump_chandef(const char *caller, const int line, bool show_caller,
                       struct rtw_chan_def *chandef);
#define PHL_DUMP_CHAN_DEF(_chandef) phl_chan_dump_chandef(__FUNCTION__, __LINE__, false, _chandef);
#define PHL_DUMP_CHAN_DEF_EX(_chandef) phl_chan_dump_chandef(__FUNCTION__, __LINE__, true, _chandef);
#else
#define PHL_DUMP_CHAN_DEF(_chandef)
#define PHL_DUMP_CHAN_DEF_EX(_chandef)
#endif
 
#ifdef CONFIG_DBCC_SUPPORT
enum rtw_phl_status
rtw_phl_dbcc_test(void *phl, enum dbcc_test_id id, void *param);
#endif
 
enum band_type rtw_phl_get_band_type(u8 chan);
u8 rtw_phl_get_center_ch(u8 ch,
   enum channel_width bw, enum chan_offset offset);
u8
rtw_phl_get_operating_class(
   struct rtw_chan_def chan_def
);
 
bool
rtw_phl_get_chandef_from_operating_class(
   u8 channel,
   u8 operating_class,
   struct rtw_chan_def *chan_def
);
#endif /*_PHL_CHANA_H_*/