wl1271_conf.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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_CONF_H__
  24. #define __WL1271_CONF_H__
  25. enum {
  26. CONF_HW_BIT_RATE_1MBPS = BIT(0),
  27. CONF_HW_BIT_RATE_2MBPS = BIT(1),
  28. CONF_HW_BIT_RATE_5_5MBPS = BIT(2),
  29. CONF_HW_BIT_RATE_6MBPS = BIT(3),
  30. CONF_HW_BIT_RATE_9MBPS = BIT(4),
  31. CONF_HW_BIT_RATE_11MBPS = BIT(5),
  32. CONF_HW_BIT_RATE_12MBPS = BIT(6),
  33. CONF_HW_BIT_RATE_18MBPS = BIT(7),
  34. CONF_HW_BIT_RATE_22MBPS = BIT(8),
  35. CONF_HW_BIT_RATE_24MBPS = BIT(9),
  36. CONF_HW_BIT_RATE_36MBPS = BIT(10),
  37. CONF_HW_BIT_RATE_48MBPS = BIT(11),
  38. CONF_HW_BIT_RATE_54MBPS = BIT(12),
  39. CONF_HW_BIT_RATE_MCS_0 = BIT(13),
  40. CONF_HW_BIT_RATE_MCS_1 = BIT(14),
  41. CONF_HW_BIT_RATE_MCS_2 = BIT(15),
  42. CONF_HW_BIT_RATE_MCS_3 = BIT(16),
  43. CONF_HW_BIT_RATE_MCS_4 = BIT(17),
  44. CONF_HW_BIT_RATE_MCS_5 = BIT(18),
  45. CONF_HW_BIT_RATE_MCS_6 = BIT(19),
  46. CONF_HW_BIT_RATE_MCS_7 = BIT(20)
  47. };
  48. enum {
  49. CONF_HW_RATE_INDEX_1MBPS = 0,
  50. CONF_HW_RATE_INDEX_2MBPS = 1,
  51. CONF_HW_RATE_INDEX_5_5MBPS = 2,
  52. CONF_HW_RATE_INDEX_6MBPS = 3,
  53. CONF_HW_RATE_INDEX_9MBPS = 4,
  54. CONF_HW_RATE_INDEX_11MBPS = 5,
  55. CONF_HW_RATE_INDEX_12MBPS = 6,
  56. CONF_HW_RATE_INDEX_18MBPS = 7,
  57. CONF_HW_RATE_INDEX_22MBPS = 8,
  58. CONF_HW_RATE_INDEX_24MBPS = 9,
  59. CONF_HW_RATE_INDEX_36MBPS = 10,
  60. CONF_HW_RATE_INDEX_48MBPS = 11,
  61. CONF_HW_RATE_INDEX_54MBPS = 12,
  62. CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_54MBPS,
  63. };
  64. struct conf_sg_settings {
  65. /*
  66. * Defines the PER threshold in PPM of the BT voice of which reaching
  67. * this value will trigger raising the priority of the BT voice by
  68. * the BT IP until next NFS sample interval time as defined in
  69. * nfs_sample_interval.
  70. *
  71. * Unit: PER value in PPM (parts per million)
  72. * #Error_packets / #Total_packets
  73. * Range: u32
  74. */
  75. u32 per_threshold;
  76. /*
  77. * This value is an absolute time in micro-seconds to limit the
  78. * maximum scan duration compensation while in SG
  79. */
  80. u32 max_scan_compensation_time;
  81. /* Defines the PER threshold of the BT voice of which reaching this
  82. * value will trigger raising the priority of the BT voice until next
  83. * NFS sample interval time as defined in sample_interval.
  84. *
  85. * Unit: msec
  86. * Range: 1-65000
  87. */
  88. u16 nfs_sample_interval;
  89. /*
  90. * Defines the load ratio for the BT.
  91. * The WLAN ratio is: 100 - load_ratio
  92. *
  93. * Unit: Percent
  94. * Range: 0-100
  95. */
  96. u8 load_ratio;
  97. /*
  98. * true - Co-ex is allowed to enter/exit P.S automatically and
  99. * transparently to the host
  100. *
  101. * false - Co-ex is disallowed to enter/exit P.S and will trigger an
  102. * event to the host to notify for the need to enter/exit P.S
  103. * due to BT change state
  104. *
  105. */
  106. u8 auto_ps_mode;
  107. /*
  108. * This parameter defines the compensation percentage of num of probe
  109. * requests in case scan is initiated during BT voice/BT ACL
  110. * guaranteed link.
  111. *
  112. * Unit: Percent
  113. * Range: 0-255 (0 - No compensation)
  114. */
  115. u8 probe_req_compensation;
  116. /*
  117. * This parameter defines the compensation percentage of scan window
  118. * size in case scan is initiated during BT voice/BT ACL Guaranteed
  119. * link.
  120. *
  121. * Unit: Percent
  122. * Range: 0-255 (0 - No compensation)
  123. */
  124. u8 scan_window_compensation;
  125. /*
  126. * Defines the antenna configuration.
  127. *
  128. * Range: 0 - Single Antenna; 1 - Dual Antenna
  129. */
  130. u8 antenna_config;
  131. /*
  132. * The percent out of the Max consecutive beacon miss roaming trigger
  133. * which is the threshold for raising the priority of beacon
  134. * reception.
  135. *
  136. * Range: 1-100
  137. * N = MaxConsecutiveBeaconMiss
  138. * P = coexMaxConsecutiveBeaconMissPrecent
  139. * Threshold = MIN( N-1, round(N * P / 100))
  140. */
  141. u8 beacon_miss_threshold;
  142. /*
  143. * The RX rate threshold below which rate adaptation is assumed to be
  144. * occurring at the AP which will raise priority for ACTIVE_RX and RX
  145. * SP.
  146. *
  147. * Range: HW_BIT_RATE_*
  148. */
  149. u32 rate_adaptation_threshold;
  150. /*
  151. * The SNR above which the RX rate threshold indicating AP rate
  152. * adaptation is valid
  153. *
  154. * Range: -128 - 127
  155. */
  156. s8 rate_adaptation_snr;
  157. };
  158. struct conf_drv_settings {
  159. struct conf_sg_settings sg;
  160. };
  161. #endif