radio_2059.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. Broadcom B43 wireless driver
  3. IEEE 802.11n 2059 radio device data tables
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; see the file COPYING. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "b43.h"
  18. #include "radio_2059.h"
  19. #define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
  20. r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
  21. r20, r21, r22, r23, r24, r25, r26, r27, r28) \
  22. .radio_syn16 = r00, \
  23. .radio_syn17 = r01, \
  24. .radio_syn22 = r02, \
  25. .radio_syn25 = r03, \
  26. .radio_syn27 = r04, \
  27. .radio_syn28 = r05, \
  28. .radio_syn29 = r06, \
  29. .radio_syn2c = r07, \
  30. .radio_syn2d = r08, \
  31. .radio_syn37 = r09, \
  32. .radio_syn41 = r10, \
  33. .radio_syn43 = r11, \
  34. .radio_syn47 = r12, \
  35. .radio_syn4a = r13, \
  36. .radio_syn58 = r14, \
  37. .radio_syn5a = r15, \
  38. .radio_syn6a = r16, \
  39. .radio_syn6d = r17, \
  40. .radio_syn6e = r18, \
  41. .radio_syn92 = r19, \
  42. .radio_syn98 = r20, \
  43. .radio_rxtx4a = r21, \
  44. .radio_rxtx58 = r22, \
  45. .radio_rxtx5a = r23, \
  46. .radio_rxtx6a = r24, \
  47. .radio_rxtx6d = r25, \
  48. .radio_rxtx6e = r26, \
  49. .radio_rxtx92 = r27, \
  50. .radio_rxtx98 = r28
  51. #define PHYREGS(r0, r1, r2, r3, r4, r5) \
  52. .phy_regs.bw1 = r0, \
  53. .phy_regs.bw2 = r1, \
  54. .phy_regs.bw3 = r2, \
  55. .phy_regs.bw4 = r3, \
  56. .phy_regs.bw5 = r4, \
  57. .phy_regs.bw6 = r5
  58. static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
  59. { .freq = 2412,
  60. RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
  61. 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
  62. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  63. 0x00, 0x00, 0x00, 0xf0, 0x00),
  64. PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
  65. },
  66. { .freq = 2417,
  67. RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
  68. 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
  69. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  70. 0x00, 0x00, 0x00, 0xf0, 0x00),
  71. PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
  72. },
  73. { .freq = 2422,
  74. RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
  75. 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
  76. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  77. 0x00, 0x00, 0x00, 0xf0, 0x00),
  78. PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
  79. },
  80. { .freq = 2427,
  81. RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
  82. 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
  83. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  84. 0x00, 0x00, 0x00, 0xf0, 0x00),
  85. PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
  86. },
  87. { .freq = 2432,
  88. RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
  89. 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
  90. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  91. 0x00, 0x00, 0x00, 0xf0, 0x00),
  92. PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
  93. },
  94. { .freq = 2437,
  95. RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
  96. 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
  97. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  98. 0x00, 0x00, 0x00, 0xf0, 0x00),
  99. PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
  100. },
  101. { .freq = 2442,
  102. RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
  103. 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
  104. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  105. 0x00, 0x00, 0x00, 0xf0, 0x00),
  106. PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
  107. },
  108. { .freq = 2447,
  109. RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
  110. 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
  111. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  112. 0x00, 0x00, 0x00, 0xf0, 0x00),
  113. PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
  114. },
  115. { .freq = 2452,
  116. RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
  117. 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
  118. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  119. 0x00, 0x00, 0x00, 0xf0, 0x00),
  120. PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
  121. },
  122. { .freq = 2457,
  123. RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
  124. 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
  125. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  126. 0x00, 0x00, 0x00, 0xf0, 0x00),
  127. PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
  128. },
  129. { .freq = 2462,
  130. RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
  131. 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
  132. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  133. 0x00, 0x00, 0x00, 0xf0, 0x00),
  134. PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
  135. },
  136. { .freq = 2467,
  137. RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
  138. 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
  139. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  140. 0x00, 0x00, 0x00, 0xf0, 0x00),
  141. PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
  142. },
  143. { .freq = 2472,
  144. RADIOREGS(0x70, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa8,
  145. 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
  146. 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
  147. 0x00, 0x00, 0x00, 0xf0, 0x00),
  148. PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
  149. },
  150. };
  151. const struct b43_phy_ht_channeltab_e_radio2059
  152. *b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
  153. {
  154. const struct b43_phy_ht_channeltab_e_radio2059 *e;
  155. unsigned int i;
  156. e = b43_phy_ht_channeltab_radio2059;
  157. for (i = 0; i < ARRAY_SIZE(b43_phy_ht_channeltab_radio2059); i++, e++) {
  158. if (e->freq == freq)
  159. return e;
  160. }
  161. return NULL;
  162. }