1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
21 #ifndef __PHYDMDYMICRXPATH_H__
22 #define __PHYDMDYMICRXPATH_H__
24 #define DYNAMIC_RX_PATH_VERSION "1.0" /*2016.07.15 Dino */
27 #define DRP_RSSI_TH 35
29 #define INIT_DRP_TIMMER 0
30 #define CANCEL_DRP_TIMMER 1
31 #define RELEASE_DRP_TIMMER 2
33 #if (CONFIG_DYNAMIC_RX_PATH == 1)
37 DRP_TRAINING_STATE_0 = 1,
38 DRP_TRAINING_STATE_1 = 2,
39 DRP_TRAINING_STATE_2 = 3,
40 DRP_DECISION_STATE = 4
43 enum adjustable_value_e {
44 DRP_TRAINING_TIME = 0,
45 DRP_TRAINING_PERIOD = 1,
46 DRP_RSSI_THRESHOLD = 2,
48 DRP_FA_DIFF_THRESHOLD = 4
51 struct _DYNAMIC_RX_PATH_ {
56 u32 fa_count_thresold;
57 u32 fa_diff_threshold;
58 u32 curr_cca_all_cnt_0;
59 u32 curr_fa_all_cnt_0;
60 u32 curr_cca_all_cnt_1;
61 u32 curr_fa_all_cnt_1;
62 u32 curr_cca_all_cnt_2;
63 u32 curr_fa_all_cnt_2;
68 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
70 RT_WORK_ITEM phydm_dynamic_rx_path_workitem;
73 struct timer_list phydm_dynamic_rx_path_timer;
80 phydm_process_phy_status_for_dynamic_rx_path(
82 void *p_phy_info_void,
87 phydm_dynamic_rx_path(
91 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
93 phydm_dynamic_rx_path_callback(
94 struct timer_list *p_timer
98 phydm_dynamic_rx_path_workitem_callback(
102 #else if (DM_ODM_SUPPORT_TYPE == ODM_CE)
105 phydm_dynamic_rx_path_callback(
106 void *function_context
112 phydm_dynamic_rx_path_timers(
118 phydm_dynamic_rx_path_init(
132 phydm_dynamic_rx_path_caller(