phydm_psd.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #ifndef __PHYDMPSD_H__
  26. #define __PHYDMPSD_H__
  27. /*@#define PSD_VERSION "1.0"*/ /*@2016.09.22 Dino*/
  28. #define PSD_VERSION "1.1" /*@2016.10.07 Dino, Add Option for PSD Tone index Selection */
  29. #ifdef CONFIG_PSD_TOOL
  30. struct psd_info {
  31. u8 psd_in_progress;
  32. u32 psd_reg;
  33. u32 psd_report_reg;
  34. u8 psd_pwr_common_offset;
  35. u16 sw_avg_time;
  36. u16 fft_smp_point;
  37. u32 initial_gain_backup;
  38. u32 rf_0x18_bkp;
  39. u32 rf_0x18_bkp_b;
  40. u16 psd_fc_channel;
  41. u32 psd_bw_rf_reg;
  42. u8 psd_result[128];
  43. u8 noise_k_en;
  44. };
  45. u32 phydm_get_psd_data(void *dm_void, u32 psd_tone_idx, u32 igi);
  46. void phydm_psd_debug(void *dm_void, char input[][16], u32 *_used,
  47. char *output, u32 *_out_len);
  48. void phydm_psd(void *dm_void, u32 igi, u16 start_point, u16 stop_point);
  49. void phydm_psd_para_setting(void *dm_void, u8 sw_avg_time,
  50. u8 hw_avg_time, u8 i_q_setting,
  51. u16 fft_smp_point, u8 ant_sel,
  52. u8 psd_input, u8 channel, u8 noise_k_en);
  53. void phydm_psd_init(void *dm_void);
  54. u8 phydm_get_psd_result_table(void *dm_void, int index);
  55. #endif
  56. #endif