hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
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 - 2011 Realtek Corporation. All rights reserved.
 *                                        
 * 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.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/
 
/*============================================================
// include files
============================================================*/
 
#include "mp_precomp.h"
#include "../phydm_precomp.h"
 
#if (RTL8822B_SUPPORT == 1)
 
 
VOID
phydm_dynamic_switch_htstf_mumimo_8822b(
   IN        PDM_ODM_T        pDM_Odm
   )
{
   /*if rssi > 40dBm, enable HT-STF gain controller, otherwise, if rssi < 40dBm, disable the controller*/
   /*add by Chun-Hung Ho 20160711 */
       if (pDM_Odm->RSSI_Min >= 40)
           ODM_SetBBReg(pDM_Odm, 0x8d8, BIT17, 0x1);
       else if (pDM_Odm->RSSI_Min < 35)
           ODM_SetBBReg(pDM_Odm, 0x8d8, BIT17, 0x0);
 
       ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("%s, RSSI_Min = %d\n", __func__, pDM_Odm->RSSI_Min));
}        
 
VOID
phydm_hwsetting_8822b(
   IN        PDM_ODM_T        pDM_Odm
   )
{
   phydm_dynamic_switch_htstf_mumimo_8822b(pDM_Odm);
}
 
#endif    /* RTL8822B_SUPPORT == 1 */