wl1271_init.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * This file is part of wl1271
  3. *
  4. * Copyright (C) 2009 Nokia Corporation
  5. *
  6. * Contact: Luciano Coelho <luciano.coelho@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. *
  22. */
  23. #ifndef __WL1271_INIT_H__
  24. #define __WL1271_INIT_H__
  25. #include "wl1271.h"
  26. int wl1271_hw_init_power_auth(struct wl1271 *wl);
  27. int wl1271_hw_init(struct wl1271 *wl);
  28. /* These are not really a TEST_CMD, but the ref driver uses them as such */
  29. #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19
  30. #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E
  31. struct wl1271_general_parms {
  32. u8 id;
  33. u8 padding[3];
  34. u8 ref_clk;
  35. u8 settling_time;
  36. u8 clk_valid_on_wakeup;
  37. u8 dc2dcmode;
  38. u8 single_dual_band;
  39. u8 tx_bip_fem_autodetect;
  40. u8 tx_bip_fem_manufacturer;
  41. u8 settings;
  42. } __attribute__ ((packed));
  43. struct wl1271_radio_parms {
  44. u8 id;
  45. u8 padding[3];
  46. /* Static radio parameters */
  47. /* 2.4GHz */
  48. u8 rx_trace_loss;
  49. u8 tx_trace_loss;
  50. s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
  51. /* 5GHz */
  52. u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  53. u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  54. s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
  55. /* Dynamic radio parameters */
  56. /* 2.4GHz */
  57. __le16 tx_ref_pd_voltage;
  58. s8 tx_ref_power;
  59. s8 tx_offset_db;
  60. s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
  61. s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
  62. s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
  63. s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
  64. s8 tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS];
  65. u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
  66. u8 rx_fem_insertion_loss;
  67. u8 padding2;
  68. /* 5GHz */
  69. __le16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
  70. s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
  71. s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
  72. s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
  73. s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
  74. s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
  75. s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
  76. /* FIXME: this is inconsistent with the types for 2.4GHz */
  77. s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
  78. s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  79. u8 padding3[2];
  80. } __attribute__ ((packed));
  81. #endif