hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
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
/******************************************************************************
 *
 * 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 (RTL8723B_SUPPORT == 1)
 
 s1Byte
odm_CCKRSSI_8723B(
   IN        u1Byte    LNA_idx,
   IN        u1Byte    VGA_idx
   )
{
   s1Byte    rx_pwr_all=0x00;
   switch (LNA_idx) {
       //46  53 73 95 201301231630
       // 46 53 77 99 201301241630
       
       case 6:    
           rx_pwr_all = -40 - (2 * VGA_idx);
           break;
       case 4:    
           rx_pwr_all = -20 - (2 * VGA_idx);
           break;
       case 1:    
           rx_pwr_all = 0 - (2 * VGA_idx);
           break;
       case 0:    
           rx_pwr_all = 10 - (2 * VGA_idx);    
           break;
       default:
           /*rx_pwr_all = -53+(2*(31-VGA_idx));*/
           /*DbgPrint("wrong LNA index\n");*/
           break;
           
   }
   return    rx_pwr_all;
}
 
#endif        // end if RTL8723B