tables_phy_ht.c 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. /*
  2. Broadcom B43 wireless driver
  3. IEEE 802.11n HT-PHY data tables
  4. Copyright (c) 2011 Rafał Miłecki <zajec5@gmail.com>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; see the file COPYING. If not, write to
  15. the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  16. Boston, MA 02110-1301, USA.
  17. */
  18. #include "b43.h"
  19. #include "tables_phy_ht.h"
  20. #include "phy_common.h"
  21. #include "phy_ht.h"
  22. static const u16 b43_httab_0x12[] = {
  23. 0x0000, 0x0008, 0x000a, 0x0010, 0x0012, 0x0019,
  24. 0x001a, 0x001c, 0x0080, 0x0088, 0x008a, 0x0090,
  25. 0x0092, 0x0099, 0x009a, 0x009c, 0x0100, 0x0108,
  26. 0x010a, 0x0110, 0x0112, 0x0119, 0x011a, 0x011c,
  27. 0x0180, 0x0188, 0x018a, 0x0190, 0x0192, 0x0199,
  28. 0x019a, 0x019c, 0x0000, 0x0098, 0x00a0, 0x00a8,
  29. 0x009a, 0x00a2, 0x00aa, 0x0120, 0x0128, 0x0128,
  30. 0x0130, 0x0138, 0x0138, 0x0140, 0x0122, 0x012a,
  31. 0x012a, 0x0132, 0x013a, 0x013a, 0x0142, 0x01a8,
  32. 0x01b0, 0x01b8, 0x01b0, 0x01b8, 0x01c0, 0x01c8,
  33. 0x01c0, 0x01c8, 0x01d0, 0x01d0, 0x01d8, 0x01aa,
  34. 0x01b2, 0x01ba, 0x01b2, 0x01ba, 0x01c2, 0x01ca,
  35. 0x01c2, 0x01ca, 0x01d2, 0x01d2, 0x01da, 0x0001,
  36. 0x0002, 0x0004, 0x0009, 0x000c, 0x0011, 0x0014,
  37. 0x0018, 0x0020, 0x0021, 0x0022, 0x0024, 0x0081,
  38. 0x0082, 0x0084, 0x0089, 0x008c, 0x0091, 0x0094,
  39. 0x0098, 0x00a0, 0x00a1, 0x00a2, 0x00a4, 0x0007,
  40. 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
  41. 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
  42. 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
  43. 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007,
  44. 0x0007, 0x0007,
  45. };
  46. static const u16 b43_httab_0x27[] = {
  47. 0x0009, 0x000e, 0x0011, 0x0014, 0x0017, 0x001a,
  48. 0x001d, 0x0020, 0x0009, 0x000e, 0x0011, 0x0014,
  49. 0x0017, 0x001a, 0x001d, 0x0020, 0x0009, 0x000e,
  50. 0x0011, 0x0014, 0x0017, 0x001a, 0x001d, 0x0020,
  51. 0x0009, 0x000e, 0x0011, 0x0014, 0x0017, 0x001a,
  52. 0x001d, 0x0020,
  53. };
  54. static const u16 b43_httab_0x26[] = {
  55. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  56. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  57. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  58. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  59. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  60. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  61. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  62. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  63. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  64. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  65. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  66. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  67. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  68. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  69. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  70. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  71. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  72. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  73. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  74. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  75. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  76. 0x0000, 0x0000,
  77. };
  78. static const u32 b43_httab_0x25[] = {
  79. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  80. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  81. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  82. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  83. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  84. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  85. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  86. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  87. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  88. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  89. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  90. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  91. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  92. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  93. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  94. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  95. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  96. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  97. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  98. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  99. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  100. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  101. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  102. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  103. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  104. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  105. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  106. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  107. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  108. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  109. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  110. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  111. };
  112. static const u32 b43_httab_0x2f[] = {
  113. 0x00035700, 0x0002cc9a, 0x00026666, 0x0001581f,
  114. 0x0001581f, 0x0001581f, 0x0001581f, 0x0001581f,
  115. 0x0001581f, 0x0001581f, 0x0001581f, 0x00035700,
  116. 0x0002cc9a, 0x00026666, 0x0001581f, 0x0001581f,
  117. 0x0001581f, 0x0001581f, 0x0001581f, 0x0001581f,
  118. 0x0001581f, 0x0001581f,
  119. };
  120. static const u16 b43_httab_0x1a[] = {
  121. 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
  122. 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
  123. 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
  124. 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
  125. 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
  126. 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
  127. 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
  128. 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
  129. 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
  130. 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
  131. 0x000b, 0x0007, 0x0002, 0x00fd,
  132. };
  133. static const u16 b43_httab_0x1b[] = {
  134. 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
  135. 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
  136. 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
  137. 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
  138. 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
  139. 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
  140. 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
  141. 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
  142. 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
  143. 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
  144. 0x000b, 0x0007, 0x0002, 0x00fd,
  145. };
  146. static const u16 b43_httab_0x1c[] = {
  147. 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052,
  148. 0x0051, 0x0051, 0x0050, 0x004f, 0x004f, 0x004e,
  149. 0x004e, 0x004d, 0x004c, 0x004c, 0x004b, 0x004a,
  150. 0x0049, 0x0049, 0x0048, 0x0047, 0x0046, 0x0046,
  151. 0x0045, 0x0044, 0x0043, 0x0042, 0x0041, 0x0040,
  152. 0x0040, 0x003f, 0x003e, 0x003d, 0x003c, 0x003a,
  153. 0x0039, 0x0038, 0x0037, 0x0036, 0x0035, 0x0033,
  154. 0x0032, 0x0031, 0x002f, 0x002e, 0x002c, 0x002b,
  155. 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001f,
  156. 0x001d, 0x001a, 0x0018, 0x0015, 0x0012, 0x000e,
  157. 0x000b, 0x0007, 0x0002, 0x00fd,
  158. };
  159. static const u32 b43_httab_0x1a_0xc0[] = {
  160. 0x5bf70044, 0x5bf70042, 0x5bf70040, 0x5bf7003e,
  161. 0x5bf7003c, 0x5bf7003b, 0x5bf70039, 0x5bf70037,
  162. 0x5bf70036, 0x5bf70034, 0x5bf70033, 0x5bf70031,
  163. 0x5bf70030, 0x5ba70044, 0x5ba70042, 0x5ba70040,
  164. 0x5ba7003e, 0x5ba7003c, 0x5ba7003b, 0x5ba70039,
  165. 0x5ba70037, 0x5ba70036, 0x5ba70034, 0x5ba70033,
  166. 0x5b770044, 0x5b770042, 0x5b770040, 0x5b77003e,
  167. 0x5b77003c, 0x5b77003b, 0x5b770039, 0x5b770037,
  168. 0x5b770036, 0x5b770034, 0x5b770033, 0x5b770031,
  169. 0x5b770030, 0x5b77002f, 0x5b77002d, 0x5b77002c,
  170. 0x5b470044, 0x5b470042, 0x5b470040, 0x5b47003e,
  171. 0x5b47003c, 0x5b47003b, 0x5b470039, 0x5b470037,
  172. 0x5b470036, 0x5b470034, 0x5b470033, 0x5b470031,
  173. 0x5b470030, 0x5b47002f, 0x5b47002d, 0x5b47002c,
  174. 0x5b47002b, 0x5b47002a, 0x5b270044, 0x5b270042,
  175. 0x5b270040, 0x5b27003e, 0x5b27003c, 0x5b27003b,
  176. 0x5b270039, 0x5b270037, 0x5b270036, 0x5b270034,
  177. 0x5b270033, 0x5b270031, 0x5b270030, 0x5b27002f,
  178. 0x5b170044, 0x5b170042, 0x5b170040, 0x5b17003e,
  179. 0x5b17003c, 0x5b17003b, 0x5b170039, 0x5b170037,
  180. 0x5b170036, 0x5b170034, 0x5b170033, 0x5b170031,
  181. 0x5b170030, 0x5b17002f, 0x5b17002d, 0x5b17002c,
  182. 0x5b17002b, 0x5b17002a, 0x5b170028, 0x5b170027,
  183. 0x5b170026, 0x5b170025, 0x5b170024, 0x5b170023,
  184. 0x5b070044, 0x5b070042, 0x5b070040, 0x5b07003e,
  185. 0x5b07003c, 0x5b07003b, 0x5b070039, 0x5b070037,
  186. 0x5b070036, 0x5b070034, 0x5b070033, 0x5b070031,
  187. 0x5b070030, 0x5b07002f, 0x5b07002d, 0x5b07002c,
  188. 0x5b07002b, 0x5b07002a, 0x5b070028, 0x5b070027,
  189. 0x5b070026, 0x5b070025, 0x5b070024, 0x5b070023,
  190. 0x5b070022, 0x5b070021, 0x5b070020, 0x5b07001f,
  191. 0x5b07001e, 0x5b07001d, 0x5b07001d, 0x5b07001c,
  192. };
  193. static const u32 b43_httab_0x1a_0x140[] = {
  194. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  195. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  196. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  197. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  198. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  199. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  200. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  201. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  202. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  203. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  204. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  205. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  206. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  207. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  208. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  209. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  210. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  211. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  212. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  213. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  214. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  215. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  216. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  217. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  218. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  219. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  220. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  221. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  222. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  223. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  224. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  225. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  226. };
  227. static const u32 b43_httab_0x1b_0x140[] = {
  228. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  229. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  230. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  231. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  232. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  233. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  234. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  235. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  236. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  237. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  238. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  239. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  240. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  241. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  242. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  243. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  244. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  245. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  246. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  247. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  248. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  249. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  250. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  251. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  252. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  253. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  254. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  255. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  256. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  257. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  258. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  259. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  260. };
  261. static const u32 b43_httab_0x1c_0x140[] = {
  262. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  263. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  264. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  265. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  266. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  267. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  268. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  269. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  270. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  271. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  272. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  273. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  274. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  275. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  276. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  277. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  278. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  279. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  280. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  281. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  282. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  283. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  284. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  285. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  286. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  287. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  288. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  289. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  290. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  291. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  292. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  293. 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  294. };
  295. static const u16 b43_httab_0x1a_0x1c0[] = {
  296. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  297. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  298. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  299. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  300. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  301. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  302. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  303. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  304. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  305. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  306. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  307. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  308. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  309. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  310. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  311. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  312. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  313. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  314. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  315. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  316. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  317. 0x0000, 0x0000,
  318. };
  319. static const u16 b43_httab_0x1b_0x1c0[] = {
  320. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  321. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  322. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  323. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  324. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  325. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  326. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  327. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  328. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  329. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  330. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  331. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  332. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  333. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  334. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  335. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  336. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  337. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  338. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  339. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  340. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  341. 0x0000, 0x0000,
  342. };
  343. static const u16 b43_httab_0x1c_0x1c0[] = {
  344. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  345. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  346. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  347. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  348. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  349. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  350. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  351. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  352. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  353. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  354. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  355. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  356. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  357. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  358. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  359. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  360. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  361. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  362. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  363. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  364. 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  365. 0x0000, 0x0000,
  366. };
  367. static const u16 b43_httab_0x1a_0x240[] = {
  368. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  369. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  370. 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  371. 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  372. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  373. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  374. 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
  375. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  376. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  377. 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
  378. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  379. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  380. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  381. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  382. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  383. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  384. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  385. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  386. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  387. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  388. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  389. 0x01d6, 0x01d6,
  390. };
  391. static const u16 b43_httab_0x1b_0x240[] = {
  392. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  393. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  394. 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  395. 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  396. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  397. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  398. 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
  399. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  400. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  401. 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
  402. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  403. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  404. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  405. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  406. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  407. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  408. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  409. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  410. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  411. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  412. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  413. 0x01d6, 0x01d6,
  414. };
  415. static const u16 b43_httab_0x1c_0x240[] = {
  416. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  417. 0x0036, 0x0036, 0x0036, 0x0036, 0x0036, 0x0036,
  418. 0x0036, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  419. 0x002a, 0x002a, 0x002a, 0x002a, 0x002a, 0x002a,
  420. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  421. 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e,
  422. 0x001e, 0x001e, 0x001e, 0x001e, 0x000e, 0x000e,
  423. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  424. 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e,
  425. 0x000e, 0x000e, 0x000e, 0x000e, 0x01fc, 0x01fc,
  426. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  427. 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc,
  428. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  429. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  430. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  431. 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee, 0x01ee,
  432. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  433. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  434. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  435. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  436. 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6, 0x01d6,
  437. 0x01d6, 0x01d6,
  438. };
  439. static const u32 b43_httab_0x1f[] = {
  440. 0x00000000, 0x00000000, 0x00016023, 0x00006028,
  441. 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
  442. 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
  443. 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
  444. 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
  445. 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
  446. 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
  447. 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
  448. 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
  449. 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
  450. 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
  451. 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
  452. 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
  453. 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
  454. 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
  455. 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
  456. };
  457. static const u32 b43_httab_0x21[] = {
  458. 0x00000000, 0x00000000, 0x00016023, 0x00006028,
  459. 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
  460. 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
  461. 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
  462. 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
  463. 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
  464. 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
  465. 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
  466. 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
  467. 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
  468. 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
  469. 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
  470. 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
  471. 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
  472. 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
  473. 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
  474. };
  475. static const u32 b43_httab_0x23[] = {
  476. 0x00000000, 0x00000000, 0x00016023, 0x00006028,
  477. 0x00034036, 0x0003402e, 0x0007203c, 0x0006e037,
  478. 0x00070030, 0x0009401f, 0x0009a00f, 0x000b600d,
  479. 0x000c8007, 0x000ce007, 0x00101fff, 0x00121ff9,
  480. 0x0012e004, 0x0014dffc, 0x0016dff6, 0x0018dfe9,
  481. 0x001b3fe5, 0x001c5fd0, 0x001ddfc2, 0x001f1fb6,
  482. 0x00207fa4, 0x00219f8f, 0x0022ff7d, 0x00247f6c,
  483. 0x0024df5b, 0x00267f4b, 0x0027df3b, 0x0029bf3b,
  484. 0x002b5f2f, 0x002d3f2e, 0x002f5f2a, 0x002fff15,
  485. 0x00315f0b, 0x0032defa, 0x0033beeb, 0x0034fed9,
  486. 0x00353ec5, 0x00361eb0, 0x00363e9b, 0x0036be87,
  487. 0x0036be70, 0x0038fe67, 0x0044beb2, 0x00513ef3,
  488. 0x00595f11, 0x00669f3d, 0x0078dfdf, 0x00a143aa,
  489. 0x01642fff, 0x0162afff, 0x01620fff, 0x0160cfff,
  490. 0x015f0fff, 0x015dafff, 0x015bcfff, 0x015bcfff,
  491. 0x015b4fff, 0x015acfff, 0x01590fff, 0x0156cfff,
  492. };
  493. static const u32 b43_httab_0x20[] = {
  494. 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
  495. 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
  496. 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
  497. 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
  498. 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
  499. 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
  500. 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
  501. 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
  502. 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
  503. 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
  504. 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
  505. 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
  506. 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
  507. 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
  508. 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
  509. 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
  510. };
  511. static const u32 b43_httab_0x22[] = {
  512. 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
  513. 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
  514. 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
  515. 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
  516. 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
  517. 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
  518. 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
  519. 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
  520. 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
  521. 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
  522. 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
  523. 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
  524. 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
  525. 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
  526. 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
  527. 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
  528. };
  529. static const u32 b43_httab_0x24[] = {
  530. 0x0b5e002d, 0x0ae2002f, 0x0a3b0032, 0x09a70035,
  531. 0x09220038, 0x08ab003b, 0x081f003f, 0x07a20043,
  532. 0x07340047, 0x06d2004b, 0x067a004f, 0x06170054,
  533. 0x05bf0059, 0x0571005e, 0x051e0064, 0x04d3006a,
  534. 0x04910070, 0x044c0077, 0x040f007e, 0x03d90085,
  535. 0x03a1008d, 0x036f0095, 0x033d009e, 0x030b00a8,
  536. 0x02e000b2, 0x02b900bc, 0x029200c7, 0x026d00d3,
  537. 0x024900e0, 0x022900ed, 0x020a00fb, 0x01ec010a,
  538. 0x01d20119, 0x01b7012a, 0x019e013c, 0x0188014e,
  539. 0x01720162, 0x015d0177, 0x0149018e, 0x013701a5,
  540. 0x012601be, 0x011501d8, 0x010601f4, 0x00f70212,
  541. 0x00e90231, 0x00dc0253, 0x00d00276, 0x00c4029b,
  542. 0x00b902c3, 0x00af02ed, 0x00a50319, 0x009c0348,
  543. 0x0093037a, 0x008b03af, 0x008303e6, 0x007c0422,
  544. 0x00750460, 0x006e04a3, 0x006804e9, 0x00620533,
  545. 0x005d0582, 0x005805d6, 0x0053062e, 0x004e068c,
  546. };
  547. /* Some late-init table */
  548. const u32 b43_httab_0x1a_0xc0_late[] = {
  549. 0x10f90040, 0x10e10040, 0x10e1003c, 0x10c9003d,
  550. 0x10b9003c, 0x10a9003d, 0x10a1003c, 0x1099003b,
  551. 0x1091003b, 0x1089003a, 0x1081003a, 0x10790039,
  552. 0x10710039, 0x1069003a, 0x1061003b, 0x1059003d,
  553. 0x1051003f, 0x10490042, 0x1049003e, 0x1049003b,
  554. 0x1041003e, 0x1041003b, 0x1039003e, 0x1039003b,
  555. 0x10390038, 0x10390035, 0x1031003a, 0x10310036,
  556. 0x10310033, 0x1029003a, 0x10290037, 0x10290034,
  557. 0x10290031, 0x10210039, 0x10210036, 0x10210033,
  558. 0x10210030, 0x1019003c, 0x10190039, 0x10190036,
  559. 0x10190033, 0x10190030, 0x1019002d, 0x1019002b,
  560. 0x10190028, 0x1011003a, 0x10110036, 0x10110033,
  561. 0x10110030, 0x1011002e, 0x1011002b, 0x10110029,
  562. 0x10110027, 0x10110024, 0x10110022, 0x10110020,
  563. 0x1011001f, 0x1011001d, 0x1009003a, 0x10090037,
  564. 0x10090034, 0x10090031, 0x1009002e, 0x1009002c,
  565. 0x10090029, 0x10090027, 0x10090025, 0x10090023,
  566. 0x10090021, 0x1009001f, 0x1009001d, 0x1009001b,
  567. 0x1009001a, 0x10090018, 0x10090017, 0x10090016,
  568. 0x10090015, 0x10090013, 0x10090012, 0x10090011,
  569. 0x10090010, 0x1009000f, 0x1009000f, 0x1009000e,
  570. 0x1009000d, 0x1009000c, 0x1009000c, 0x1009000b,
  571. 0x1009000a, 0x1009000a, 0x10090009, 0x10090009,
  572. 0x10090008, 0x10090008, 0x10090007, 0x10090007,
  573. 0x10090007, 0x10090006, 0x10090006, 0x10090005,
  574. 0x10090005, 0x10090005, 0x10090005, 0x10090004,
  575. 0x10090004, 0x10090004, 0x10090004, 0x10090003,
  576. 0x10090003, 0x10090003, 0x10090003, 0x10090003,
  577. 0x10090003, 0x10090002, 0x10090002, 0x10090002,
  578. 0x10090002, 0x10090002, 0x10090002, 0x10090002,
  579. 0x10090002, 0x10090002, 0x10090001, 0x10090001,
  580. 0x10090001, 0x10090001, 0x10090001, 0x10090001,
  581. };
  582. /**************************************************
  583. * R/W ops.
  584. **************************************************/
  585. u32 b43_httab_read(struct b43_wldev *dev, u32 offset)
  586. {
  587. u32 type, value;
  588. type = offset & B43_HTTAB_TYPEMASK;
  589. offset &= ~B43_HTTAB_TYPEMASK;
  590. B43_WARN_ON(offset > 0xFFFF);
  591. switch (type) {
  592. case B43_HTTAB_8BIT:
  593. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  594. value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO) & 0xFF;
  595. break;
  596. case B43_HTTAB_16BIT:
  597. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  598. value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
  599. break;
  600. case B43_HTTAB_32BIT:
  601. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  602. value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
  603. value <<= 16;
  604. value |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
  605. break;
  606. default:
  607. B43_WARN_ON(1);
  608. value = 0;
  609. }
  610. return value;
  611. }
  612. void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,
  613. unsigned int nr_elements, void *_data)
  614. {
  615. u32 type;
  616. u8 *data = _data;
  617. unsigned int i;
  618. type = offset & B43_HTTAB_TYPEMASK;
  619. offset &= ~B43_HTTAB_TYPEMASK;
  620. B43_WARN_ON(offset > 0xFFFF);
  621. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  622. for (i = 0; i < nr_elements; i++) {
  623. switch (type) {
  624. case B43_HTTAB_8BIT:
  625. *data = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO) & 0xFF;
  626. data++;
  627. break;
  628. case B43_HTTAB_16BIT:
  629. *((u16 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
  630. data += 2;
  631. break;
  632. case B43_HTTAB_32BIT:
  633. *((u32 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
  634. *((u32 *)data) <<= 16;
  635. *((u32 *)data) |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
  636. data += 4;
  637. break;
  638. default:
  639. B43_WARN_ON(1);
  640. }
  641. }
  642. }
  643. void b43_httab_write(struct b43_wldev *dev, u32 offset, u32 value)
  644. {
  645. u32 type;
  646. type = offset & B43_HTTAB_TYPEMASK;
  647. offset &= 0xFFFF;
  648. switch (type) {
  649. case B43_HTTAB_8BIT:
  650. B43_WARN_ON(value & ~0xFF);
  651. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  652. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  653. break;
  654. case B43_HTTAB_16BIT:
  655. B43_WARN_ON(value & ~0xFFFF);
  656. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  657. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  658. break;
  659. case B43_HTTAB_32BIT:
  660. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  661. b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI, value >> 16);
  662. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value & 0xFFFF);
  663. break;
  664. default:
  665. B43_WARN_ON(1);
  666. }
  667. return;
  668. }
  669. void b43_httab_write_few(struct b43_wldev *dev, u32 offset, size_t num, ...)
  670. {
  671. va_list args;
  672. u32 type, value;
  673. unsigned int i;
  674. type = offset & B43_HTTAB_TYPEMASK;
  675. offset &= 0xFFFF;
  676. va_start(args, num);
  677. switch (type) {
  678. case B43_HTTAB_8BIT:
  679. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  680. for (i = 0; i < num; i++) {
  681. value = va_arg(args, int);
  682. B43_WARN_ON(value & ~0xFF);
  683. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  684. }
  685. break;
  686. case B43_HTTAB_16BIT:
  687. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  688. for (i = 0; i < num; i++) {
  689. value = va_arg(args, int);
  690. B43_WARN_ON(value & ~0xFFFF);
  691. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  692. }
  693. break;
  694. case B43_HTTAB_32BIT:
  695. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  696. for (i = 0; i < num; i++) {
  697. value = va_arg(args, int);
  698. b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI,
  699. value >> 16);
  700. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO,
  701. value & 0xFFFF);
  702. }
  703. break;
  704. default:
  705. B43_WARN_ON(1);
  706. }
  707. va_end(args);
  708. return;
  709. }
  710. void b43_httab_write_bulk(struct b43_wldev *dev, u32 offset,
  711. unsigned int nr_elements, const void *_data)
  712. {
  713. u32 type, value;
  714. const u8 *data = _data;
  715. unsigned int i;
  716. type = offset & B43_HTTAB_TYPEMASK;
  717. offset &= ~B43_HTTAB_TYPEMASK;
  718. B43_WARN_ON(offset > 0xFFFF);
  719. b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
  720. for (i = 0; i < nr_elements; i++) {
  721. switch (type) {
  722. case B43_HTTAB_8BIT:
  723. value = *data;
  724. data++;
  725. B43_WARN_ON(value & ~0xFF);
  726. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  727. break;
  728. case B43_HTTAB_16BIT:
  729. value = *((u16 *)data);
  730. data += 2;
  731. B43_WARN_ON(value & ~0xFFFF);
  732. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO, value);
  733. break;
  734. case B43_HTTAB_32BIT:
  735. value = *((u32 *)data);
  736. data += 4;
  737. b43_phy_write(dev, B43_PHY_HT_TABLE_DATAHI, value >> 16);
  738. b43_phy_write(dev, B43_PHY_HT_TABLE_DATALO,
  739. value & 0xFFFF);
  740. break;
  741. default:
  742. B43_WARN_ON(1);
  743. }
  744. }
  745. }
  746. /**************************************************
  747. * Tables ops.
  748. **************************************************/
  749. #define httab_upload(dev, offset, data) do { \
  750. b43_httab_write_bulk(dev, offset, ARRAY_SIZE(data), data); \
  751. } while (0)
  752. void b43_phy_ht_tables_init(struct b43_wldev *dev)
  753. {
  754. BUILD_BUG_ON(ARRAY_SIZE(b43_httab_0x1a_0xc0_late) !=
  755. B43_HTTAB_1A_C0_LATE_SIZE);
  756. httab_upload(dev, B43_HTTAB16(0x12, 0), b43_httab_0x12);
  757. httab_upload(dev, B43_HTTAB16(0x27, 0), b43_httab_0x27);
  758. httab_upload(dev, B43_HTTAB16(0x26, 0), b43_httab_0x26);
  759. httab_upload(dev, B43_HTTAB32(0x25, 0), b43_httab_0x25);
  760. httab_upload(dev, B43_HTTAB32(0x2f, 0), b43_httab_0x2f);
  761. httab_upload(dev, B43_HTTAB16(0x1a, 0), b43_httab_0x1a);
  762. httab_upload(dev, B43_HTTAB16(0x1b, 0), b43_httab_0x1b);
  763. httab_upload(dev, B43_HTTAB16(0x1c, 0), b43_httab_0x1c);
  764. httab_upload(dev, B43_HTTAB32(0x1a, 0x0c0), b43_httab_0x1a_0xc0);
  765. httab_upload(dev, B43_HTTAB32(0x1a, 0x140), b43_httab_0x1a_0x140);
  766. httab_upload(dev, B43_HTTAB32(0x1b, 0x140), b43_httab_0x1b_0x140);
  767. httab_upload(dev, B43_HTTAB32(0x1c, 0x140), b43_httab_0x1c_0x140);
  768. httab_upload(dev, B43_HTTAB16(0x1a, 0x1c0), b43_httab_0x1a_0x1c0);
  769. httab_upload(dev, B43_HTTAB16(0x1b, 0x1c0), b43_httab_0x1b_0x1c0);
  770. httab_upload(dev, B43_HTTAB16(0x1c, 0x1c0), b43_httab_0x1c_0x1c0);
  771. httab_upload(dev, B43_HTTAB16(0x1a, 0x240), b43_httab_0x1a_0x240);
  772. httab_upload(dev, B43_HTTAB16(0x1b, 0x240), b43_httab_0x1b_0x240);
  773. httab_upload(dev, B43_HTTAB16(0x1c, 0x240), b43_httab_0x1c_0x240);
  774. httab_upload(dev, B43_HTTAB32(0x1f, 0), b43_httab_0x1f);
  775. httab_upload(dev, B43_HTTAB32(0x21, 0), b43_httab_0x21);
  776. httab_upload(dev, B43_HTTAB32(0x23, 0), b43_httab_0x23);
  777. httab_upload(dev, B43_HTTAB32(0x20, 0), b43_httab_0x20);
  778. httab_upload(dev, B43_HTTAB32(0x22, 0), b43_httab_0x22);
  779. httab_upload(dev, B43_HTTAB32(0x24, 0), b43_httab_0x24);
  780. }