hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
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
/******************************************************************************
 *
 * Copyright(c) 2007 - 2017 Realtek Corporation.
 *
 * 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.
 *
 *****************************************************************************/
 
#include "mp_precomp.h"
#include "../phydm_precomp.h"
#if (RTL8703B_SUPPORT == 1)
s8 phydm_cck_rssi_8703b(struct dm_struct *dm, u16 lna_idx, u8 vga_idx)
{
   s8 rx_pwr_all = 0x00;
 
   switch (lna_idx) {
   case 0xf:
       rx_pwr_all = -48 - (2 * vga_idx);
       break;
   case 0xb:
       rx_pwr_all = -42 - (2 * vga_idx); /*TBD*/
       break;
   case 0xa:
       rx_pwr_all = -36 - (2 * vga_idx);
       break;
   case 8:
       rx_pwr_all = -32 - (2 * vga_idx);
       break;
   case 7:
       rx_pwr_all = -19 - (2 * vga_idx);
       break;
   case 4:
       rx_pwr_all = -6 - (2 * vga_idx);
       break;
   case 0:
       rx_pwr_all = -2 - (2 * vga_idx);
       break;
   default:
       /*rx_pwr_all = -53+(2*(31-vga_idx));*/
       /*dbg_print("wrong LNA index\n");*/
       break;
   }
   return rx_pwr_all;
}
#endif