radio_2056.c 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. Broadcom B43 wireless driver
  3. IEEE 802.11n 2056 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_2056.h"
  19. #include "phy_common.h"
  20. #define RADIOREGS3(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
  21. r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
  22. r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \
  23. r30, r31, r32, r33, r34, r35, r36) \
  24. .radio_syn_pll_vcocal1 = r00, \
  25. .radio_syn_pll_vcocal2 = r01, \
  26. .radio_syn_pll_refdiv = r02, \
  27. .radio_syn_pll_mmd2 = r03, \
  28. .radio_syn_pll_mmd1 = r04, \
  29. .radio_syn_pll_loopfilter1 = r05, \
  30. .radio_syn_pll_loopfilter2 = r06, \
  31. .radio_syn_pll_loopfilter3 = r07, \
  32. .radio_syn_pll_loopfilter4 = r08, \
  33. .radio_syn_pll_loopfilter5 = r09, \
  34. .radio_syn_reserved_addr27 = r10, \
  35. .radio_syn_reserved_addr28 = r11, \
  36. .radio_syn_reserved_addr29 = r12, \
  37. .radio_syn_logen_vcobuf1 = r13, \
  38. .radio_syn_logen_mixer2 = r14, \
  39. .radio_syn_logen_buf3 = r15, \
  40. .radio_syn_logen_buf4 = r16, \
  41. .radio_rx0_lnaa_tune = r17, \
  42. .radio_rx0_lnag_tune = r18, \
  43. .radio_tx0_intpaa_boost_tune = r19, \
  44. .radio_tx0_intpag_boost_tune = r20, \
  45. .radio_tx0_pada_boost_tune = r21, \
  46. .radio_tx0_padg_boost_tune = r22, \
  47. .radio_tx0_pgaa_boost_tune = r23, \
  48. .radio_tx0_pgag_boost_tune = r24, \
  49. .radio_tx0_mixa_boost_tune = r25, \
  50. .radio_tx0_mixg_boost_tune = r26, \
  51. .radio_rx1_lnaa_tune = r27, \
  52. .radio_rx1_lnag_tune = r28, \
  53. .radio_tx1_intpaa_boost_tune = r29, \
  54. .radio_tx1_intpag_boost_tune = r30, \
  55. .radio_tx1_pada_boost_tune = r31, \
  56. .radio_tx1_padg_boost_tune = r32, \
  57. .radio_tx1_pgaa_boost_tune = r33, \
  58. .radio_tx1_pgag_boost_tune = r34, \
  59. .radio_tx1_mixa_boost_tune = r35, \
  60. .radio_tx1_mixg_boost_tune = r36
  61. #define PHYREGS(r0, r1, r2, r3, r4, r5) \
  62. .phy_regs.phy_bw1a = r0, \
  63. .phy_regs.phy_bw2 = r1, \
  64. .phy_regs.phy_bw3 = r2, \
  65. .phy_regs.phy_bw4 = r3, \
  66. .phy_regs.phy_bw5 = r4, \
  67. .phy_regs.phy_bw6 = r5
  68. static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = {
  69. };
  70. /* TODO: add support for rev4+ devices by searching in rev4+ tables */
  71. const struct b43_nphy_channeltab_entry_rev3 *
  72. b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq)
  73. {
  74. const struct b43_nphy_channeltab_entry_rev3 *e;
  75. unsigned int i;
  76. for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) {
  77. e = &(b43_nphy_channeltab_rev3[i]);
  78. if (e->freq == freq)
  79. return e;
  80. }
  81. return NULL;
  82. }