wl1271_conf.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. enum conf_rx_queue_type {
  159. CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
  160. CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
  161. };
  162. struct conf_rx_settings {
  163. /*
  164. * The maximum amount of time, in TU, before the
  165. * firmware discards the MSDU.
  166. *
  167. * Range: 0 - 0xFFFFFFFF
  168. */
  169. u32 rx_msdu_life_time;
  170. /*
  171. * Packet detection threshold in the PHY.
  172. *
  173. * FIXME: details unknown.
  174. */
  175. u32 packet_detection_threshold;
  176. /*
  177. * The longest time the STA will wait to receive traffic from the AP
  178. * after a PS-poll has been transmitted.
  179. *
  180. * Range: 0 - 200000
  181. */
  182. u16 ps_poll_timeout;
  183. /*
  184. * The longest time the STA will wait to receive traffic from the AP
  185. * after a frame has been sent from an UPSD enabled queue.
  186. *
  187. * Range: 0 - 200000
  188. */
  189. u16 upsd_timeout;
  190. /*
  191. * The number of octets in an MPDU, below which an RTS/CTS
  192. * handshake is not performed.
  193. *
  194. * Range: 0 - 4096
  195. */
  196. u16 rts_threshold;
  197. /*
  198. * The RX Clear Channel Assessment threshold in the PHY
  199. * (the energy threshold).
  200. *
  201. * Range: ENABLE_ENERGY_D == 0x140A
  202. * DISABLE_ENERGY_D == 0xFFEF
  203. */
  204. u16 rx_cca_threshold;
  205. /*
  206. * Occupied Rx mem-blocks number which requires interrupting the host
  207. * (0 = no buffering, 0xffff = disabled).
  208. *
  209. * Range: u16
  210. */
  211. u16 irq_blk_threshold;
  212. /*
  213. * Rx packets number which requires interrupting the host
  214. * (0 = no buffering).
  215. *
  216. * Range: u16
  217. */
  218. u16 irq_pkt_threshold;
  219. /*
  220. * Max time in msec the FW may delay RX-Complete interrupt.
  221. *
  222. * Range: 1 - 100
  223. */
  224. u16 irq_timeout;
  225. /*
  226. * The RX queue type.
  227. *
  228. * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
  229. */
  230. u8 queue_type;
  231. };
  232. struct conf_drv_settings {
  233. struct conf_sg_settings sg;
  234. struct conf_rx_settings rx;
  235. };
  236. #endif