8723BU: Update 8723BU wifi driver to version v4.3.16_14189.20150519_BTCOEX2015119...
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bu / hal / OUTSRC / rtl8723b / phydm_RTL8723B.c
1 /******************************************************************************\r
2  *\r
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.\r
4  *                                        \r
5  * This program is free software; you can redistribute it and/or modify it\r
6  * under the terms of version 2 of the GNU General Public License as\r
7  * published by the Free Software Foundation.\r
8  *\r
9  * This program is distributed in the hope that it will be useful, but WITHOUT\r
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
12  * more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along with\r
15  * this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
17  *\r
18  *\r
19  ******************************************************************************/\r
20 \r
21 //============================================================\r
22 // include files\r
23 //============================================================\r
24 \r
25 #include "Mp_Precomp.h"\r
26 #include "../phydm_precomp.h"\r
27 \r
28 #if (RTL8723B_SUPPORT == 1)\r
29 \r
30  s1Byte\r
31 odm_CCKRSSI_8723B(\r
32         IN              u1Byte  LNA_idx,\r
33         IN              u1Byte  VGA_idx\r
34         )\r
35 {\r
36         s1Byte  rx_pwr_all=0x00;\r
37         switch (LNA_idx) {\r
38                 //46  53 73 95 201301231630\r
39                 // 46 53 77 99 201301241630\r
40                 \r
41                 case 6: \r
42                         rx_pwr_all = -40 - (2 * VGA_idx);\r
43                         break;\r
44                 case 4: \r
45                         rx_pwr_all = -20 - (2 * VGA_idx);\r
46                         break;\r
47                 case 1: \r
48                         rx_pwr_all = 0 - (2 * VGA_idx);\r
49                         break;\r
50                 case 0: \r
51                         rx_pwr_all = 10 - (2 * VGA_idx);        \r
52                         break;\r
53                 default:\r
54                         /*rx_pwr_all = -53+(2*(31-VGA_idx));*/\r
55                         /*DbgPrint("wrong LNA index\n");*/\r
56                         break;\r
57                         \r
58         }\r
59         return  rx_pwr_all;\r
60 }\r
61 \r
62 #endif          // end if RTL8723B \r
63 \r
64 \r
65 \r
66 \r
67 \r
68 \r
69 \r
70 \r