1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2017 Realtek Corporation. 4 * 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. 8 * 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 12 * more details. 13 * 14 *****************************************************************************/ 15 16 #include "mp_precomp.h" 17 #include "../phydm_precomp.h" 18 #if (RTL8703B_SUPPORT == 1) phydm_cck_rssi_8703b(struct dm_struct * dm,u16 lna_idx,u8 vga_idx)19s8 phydm_cck_rssi_8703b(struct dm_struct *dm, u16 lna_idx, u8 vga_idx) 20 { 21 s8 rx_pwr_all = 0x00; 22 23 switch (lna_idx) { 24 case 0xf: 25 rx_pwr_all = -48 - (2 * vga_idx); 26 break; 27 case 0xb: 28 rx_pwr_all = -42 - (2 * vga_idx); /*TBD*/ 29 break; 30 case 0xa: 31 rx_pwr_all = -36 - (2 * vga_idx); 32 break; 33 case 8: 34 rx_pwr_all = -32 - (2 * vga_idx); 35 break; 36 case 7: 37 rx_pwr_all = -19 - (2 * vga_idx); 38 break; 39 case 4: 40 rx_pwr_all = -6 - (2 * vga_idx); 41 break; 42 case 0: 43 rx_pwr_all = -2 - (2 * vga_idx); 44 break; 45 default: 46 /*rx_pwr_all = -53+(2*(31-vga_idx));*/ 47 /*dbg_print("wrong LNA index\n");*/ 48 break; 49 } 50 return rx_pwr_all; 51 } 52 #endif 53 54