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
/******************************************************************************
 *
 * Copyright(c) 2007 - 2022 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 __RTW_TXPWR_H__
#define __RTW_TXPWR_H__
 
#define TPC_MODE_DISABLE    0
#define TPC_MODE_MANUAL        1
#define TPC_MODE_INVALID    2    /* keep last */
 
#define TPC_MANUAL_CONSTRAINT_MAX 600 /* mB */
 
struct txpwr_param_status {
   bool enable;
   bool loaded;
   bool external_src;
};
 
#define SET_TXPWR_PARAM_STATUS(_status, _enable, _loaded, _ext_src) \
   do { \
       (_status)->enable = _enable; \
       (_status)->loaded = _loaded; \
       (_status)->external_src = _ext_src; \
   } while (0)
 
struct tx_power_ext_info {
   struct txpwr_param_status by_rate;
   struct txpwr_param_status lmt;
#ifdef CONFIG_80211AX_HE
   struct txpwr_param_status lmt_ru;
#endif
#if CONFIG_IEEE80211_BAND_6GHZ
   struct txpwr_param_status lmt_6g;
   struct txpwr_param_status lmt_ru_6g;
#endif
};
 
void rtw_update_txpwr_level(struct dvobj_priv *dvobj, enum phl_band_idx band_idx);
void rtw_update_txpwr_level_all_hwband(struct dvobj_priv *dvobj);
 
void dump_tx_power_ext_info(void *sel, struct dvobj_priv *dvobj);
void dump_txpwr_tpc_settings(void *sel, struct dvobj_priv *dvobj);
 
#endif /* __RTW_TXPWR_H__ */