2 /******************************************************************************
4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20 ******************************************************************************/
22 #ifndef __PHYDMADAPTIVITY_H__
23 #define __PHYDMADAPTIVITY_H__
25 #define ADAPTIVITY_VERSION "9.3.5" /*20160902 changed by Kevin, refine method for searching pwdb lower bound*/
27 #define pwdb_upper_bound 7
30 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN))
31 enum phydm_regulation_type {
37 MAX_REGULATION_NUM = 4
41 enum phydm_adapinfo_e {
42 PHYDM_ADAPINFO_CARRIER_SENSE_ENABLE = 0,
43 PHYDM_ADAPINFO_DCBACKOFF,
44 PHYDM_ADAPINFO_DYNAMICLINKADAPTIVITY,
45 PHYDM_ADAPINFO_TH_L2H_INI,
46 PHYDM_ADAPINFO_TH_EDCCA_HL_DIFF,
47 PHYDM_ADAPINFO_AP_NUM_TH
54 phydm_disable_lna = 0,
59 enum phydm_trx_mux_type {
61 phydm_standby_mode = 1,
66 enum phydm_mac_edcca_type {
67 phydm_ignore_edcca = 0,
68 phydm_dont_ignore_edcca = 1
71 struct _ADAPTIVITY_STATISTICS {
73 s8 th_edcca_hl_diff_backup;
79 boolean is_first_link;
81 boolean dynamic_link_adaptivity;
84 boolean acs_for_adaptivity;
87 boolean is_stop_edcca;
88 #if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
89 RT_WORK_ITEM phydm_pause_edcca_work_item;
90 RT_WORK_ITEM phydm_resume_edcca_work_item;
97 boolean is_pasue_edcca
101 phydm_check_adaptivity(
106 phydm_check_environment(
111 phydm_nhm_counter_statistics_init(
116 phydm_nhm_counter_statistics(
121 phydm_nhm_counter_statistics_reset(
126 phydm_get_nhm_counter_statistics(
131 phydm_mac_edcca_state(
133 enum phydm_mac_edcca_type state
137 phydm_set_edcca_threshold(
146 enum phydm_trx_mux_type tx_mode,
147 enum phydm_trx_mux_type rx_mode
156 phydm_search_pwdb_lower_bound(
161 phydm_adaptivity_info_init(
163 enum phydm_adapinfo_e cmn_info,
168 phydm_adaptivity_init(
178 phydm_set_edcca_threshold_api(
183 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
195 phydm_adaptivity_bsod(
202 phydm_pause_edcca_work_item_callback(
203 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
204 struct _ADAPTER *adapter
211 phydm_resume_edcca_work_item_callback(
212 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
213 struct _ADAPTER *adapter