aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2009-08-10 14:39:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:58 -0400
commitc65d6fbf91517a0a955de7ce029940bc63ea8203 (patch)
treef5551585d6501b9079b07273c90af20d1516b025 /drivers
parent62b1208e146af048e90a32bc4fe5fba85e4fa51e (diff)
b43: Implement LP-PHY baseband table initialization
Implement LP-PHY baseband table init for all revisions. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/phy_lp.c41
-rw-r--r--drivers/net/wireless/b43/tables_lpphy.c1716
-rw-r--r--drivers/net/wireless/b43/tables_lpphy.h3
3 files changed, 1756 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index e68644d95024..79039c3f60c8 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -59,9 +59,43 @@ static void b43_lpphy_op_free(struct b43_wldev *dev)
59 dev->phy.lp = NULL; 59 dev->phy.lp = NULL;
60} 60}
61 61
62static void lpphy_adjust_gain_table(struct b43_wldev *dev)
63{
64 struct b43_phy_lp *lpphy = dev->phy.lp;
65 u32 freq = dev->wl->hw->conf.channel->center_freq;
66 u16 temp[3];
67 u16 isolation;
68
69 B43_WARN_ON(dev->phy.rev >= 2);
70
71 if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
72 isolation = lpphy->tx_isolation_med_band;
73 else if (freq <= 5320)
74 isolation = lpphy->tx_isolation_low_band;
75 else if (freq <= 5700)
76 isolation = lpphy->tx_isolation_med_band;
77 else
78 isolation = lpphy->tx_isolation_hi_band;
79
80 temp[0] = ((isolation - 26) / 12) << 12;
81 temp[1] = temp[0] + 0x1000;
82 temp[2] = temp[0] + 0x2000;
83
84 b43_lptab_write_bulk(dev, B43_LPTAB16(12, 0), 3, temp);
85 b43_lptab_write_bulk(dev, B43_LPTAB16(13, 0), 3, temp);
86}
87
62static void lpphy_table_init(struct b43_wldev *dev) 88static void lpphy_table_init(struct b43_wldev *dev)
63{ 89{
64 //TODO 90 if (dev->phy.rev < 2)
91 lpphy_rev0_1_table_init(dev);
92 else
93 lpphy_rev2plus_table_init(dev);
94
95 lpphy_init_tx_gain_table(dev);
96
97 if (dev->phy.rev < 2)
98 lpphy_adjust_gain_table(dev);
65} 99}
66 100
67static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) 101static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
@@ -596,13 +630,13 @@ static void lpphy_tx_pctl_init(struct b43_wldev *dev)
596static int b43_lpphy_op_init(struct b43_wldev *dev) 630static int b43_lpphy_op_init(struct b43_wldev *dev)
597{ 631{
598 /* TODO: band SPROM */ 632 /* TODO: band SPROM */
599 /* TODO: tables init */
600 lpphy_baseband_init(dev); 633 lpphy_baseband_init(dev);
601 lpphy_radio_init(dev); 634 lpphy_radio_init(dev);
602 //TODO calibrate RC 635 //TODO calibrate RC
603 //TODO set channel 636 //TODO set channel
604 lpphy_tx_pctl_init(dev); 637 lpphy_tx_pctl_init(dev);
605 //TODO full calib 638 lpphy_calibration(dev);
639 //TODO ACI init
606 640
607 return 0; 641 return 0;
608} 642}
@@ -680,7 +714,6 @@ static enum b43_txpwr_result b43_lpphy_op_recalc_txpower(struct b43_wldev *dev,
680 return B43_TXPWR_RES_DONE; 714 return B43_TXPWR_RES_DONE;
681} 715}
682 716
683
684const struct b43_phy_operations b43_phyops_lp = { 717const struct b43_phy_operations b43_phyops_lp = {
685 .allocate = b43_lpphy_op_allocate, 718 .allocate = b43_lpphy_op_allocate,
686 .free = b43_lpphy_op_free, 719 .free = b43_lpphy_op_free,
diff --git a/drivers/net/wireless/b43/tables_lpphy.c b/drivers/net/wireless/b43/tables_lpphy.c
index cadfe81fd09e..b056811a1703 100644
--- a/drivers/net/wireless/b43/tables_lpphy.c
+++ b/drivers/net/wireless/b43/tables_lpphy.c
@@ -710,3 +710,1719 @@ void b43_lptab_write_bulk(struct b43_wldev *dev, u32 offset,
710 offset++; 710 offset++;
711 } 711 }
712} 712}
713
714static const u8 lpphy_min_sig_sq_table[] = {
715 0xde, 0xdc, 0xda, 0xd8, 0xd6, 0xd4, 0xd2, 0xcf, 0xcd,
716 0xca, 0xc7, 0xc4, 0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe,
717 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x00,
718 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe,
719 0xbe, 0xbe, 0xbe, 0xbe, 0xc1, 0xc4, 0xc7, 0xca, 0xcd,
720 0xcf, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde,
721};
722
723static const u16 lpphy_rev01_noise_scale_table[] = {
724 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
725 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa400, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4,
726 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0xa4a4, 0x00a4,
727 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4c00, 0x2d36,
728 0x0000, 0x0000, 0x4c00, 0x2d36,
729};
730
731static const u16 lpphy_rev2plus_noise_scale_table[] = {
732 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4,
733 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4,
734 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x0000,
735 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4,
736 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4,
737 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4, 0x00a4,
738 0x00a4,
739};
740
741static const u16 lpphy_crs_gain_nft_table[] = {
742 0x0366, 0x036a, 0x036f, 0x0364, 0x0367, 0x036d, 0x0374, 0x037f, 0x036f,
743 0x037b, 0x038a, 0x0378, 0x0367, 0x036d, 0x0375, 0x0381, 0x0374, 0x0381,
744 0x0392, 0x03a9, 0x03c4, 0x03e1, 0x0001, 0x001f, 0x0040, 0x005e, 0x007f,
745 0x009e, 0x00bd, 0x00dd, 0x00fd, 0x011d, 0x013d,
746};
747
748static const u16 lpphy_rev01_filter_control_table[] = {
749 0xa0fc, 0x10fc, 0x10db, 0x20b7, 0xff93, 0x10bf, 0x109b, 0x2077, 0xff53,
750 0x0127,
751};
752
753static const u32 lpphy_rev2plus_filter_control_table[] = {
754 0x000141fc, 0x000021fc, 0x000021b7, 0x0000416f, 0x0001ff27, 0x0000217f,
755 0x00002137, 0x000040ef, 0x0001fea7, 0x0000024f,
756};
757
758static const u32 lpphy_rev01_ps_control_table[] = {
759 0x00010000, 0x000000a0, 0x00040000, 0x00000048, 0x08080101, 0x00000080,
760 0x08080101, 0x00000040, 0x08080101, 0x000000c0, 0x08a81501, 0x000000c0,
761 0x0fe8fd01, 0x000000c0, 0x08300105, 0x000000c0, 0x08080201, 0x000000c0,
762 0x08280205, 0x000000c0, 0xe80802fe, 0x000000c7, 0x28080206, 0x000000c0,
763 0x08080202, 0x000000c0, 0x0ba87602, 0x000000c0, 0x1068013d, 0x000000c0,
764 0x10280105, 0x000000c0, 0x08880102, 0x000000c0, 0x08280106, 0x000000c0,
765 0xe80801fd, 0x000000c7, 0xa8080115, 0x000000c0,
766};
767
768static const u32 lpphy_rev2plus_ps_control_table[] = {
769 0x00e38e08, 0x00e08e38, 0x00000000, 0x00000000, 0x00000000, 0x00002080,
770 0x00006180, 0x00003002, 0x00000040, 0x00002042, 0x00180047, 0x00080043,
771 0x00000041, 0x000020c1, 0x00046006, 0x00042002, 0x00040000, 0x00002003,
772 0x00180006, 0x00080002,
773};
774
775static const u8 lpphy_pll_fraction_table[] = {
776 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80,
777 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
778};
779
780static const u16 lpphy_iq_local_table[] = {
781 0x0200, 0x0300, 0x0400, 0x0600, 0x0800, 0x0b00, 0x1000, 0x1001, 0x1002,
782 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, 0x1707, 0x2007, 0x2d07, 0x4007,
783 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
784 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x0300, 0x0400, 0x0600,
785 0x0800, 0x0b00, 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006,
786 0x1007, 0x1707, 0x2007, 0x2d07, 0x4007, 0x0000, 0x0000, 0x0000, 0x0000,
787 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
788 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
789 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
790 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x0000, 0x0000,
791 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
792 0x0000, 0x0000,
793};
794
795static const u16 lpphy_ofdm_cck_gain_table[] = {
796 0x5000, 0x6000, 0x7000, 0x0001, 0x1001, 0x2001, 0x3001, 0x4001, 0x5001,
797 0x6001, 0x7001, 0x7011, 0x7021, 0x2035, 0x2045, 0x2055, 0x2065, 0x2075,
798 0x006d, 0x007d, 0x014d, 0x015d, 0x115d, 0x035d, 0x135d, 0x055d, 0x155d,
799 0x0d5d, 0x1d5d, 0x2d5d, 0x555d, 0x655d, 0x755d,
800};
801
802static const u16 lpphy_gain_delta_table[] = {
803 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
804};
805
806static const u32 lpphy_tx_power_control_table[] = {
807 0x00000050, 0x0000004f, 0x0000004e, 0x0000004d, 0x0000004c, 0x0000004b,
808 0x0000004a, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045,
809 0x00000044, 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003f,
810 0x0000003e, 0x0000003d, 0x0000003c, 0x0000003b, 0x0000003a, 0x00000039,
811 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, 0x00000033,
812 0x00000032, 0x00000031, 0x00000030, 0x0000002f, 0x0000002e, 0x0000002d,
813 0x0000002c, 0x0000002b, 0x0000002a, 0x00000029, 0x00000028, 0x00000027,
814 0x00000026, 0x00000025, 0x00000024, 0x00000023, 0x00000022, 0x00000021,
815 0x00000020, 0x0000001f, 0x0000001e, 0x0000001d, 0x0000001c, 0x0000001b,
816 0x0000001a, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015,
817 0x00000014, 0x00000013, 0x00000012, 0x00000011, 0x00000000, 0x00000000,
818 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
819 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
820 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
821 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
822 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
823 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
824 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
825 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
826 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
827 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
828 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
829 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
830 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
831 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
832 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
833 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
834 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
835 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
836 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
837 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
838 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
839 0x000075a0, 0x000075a0, 0x000075a1, 0x000075a1, 0x000075a2, 0x000075a2,
840 0x000075a3, 0x000075a3, 0x000074b0, 0x000074b0, 0x000074b1, 0x000074b1,
841 0x000074b2, 0x000074b2, 0x000074b3, 0x000074b3, 0x00006d20, 0x00006d20,
842 0x00006d21, 0x00006d21, 0x00006d22, 0x00006d22, 0x00006d23, 0x00006d23,
843 0x00004660, 0x00004660, 0x00004661, 0x00004661, 0x00004662, 0x00004662,
844 0x00004663, 0x00004663, 0x00003e60, 0x00003e60, 0x00003e61, 0x00003e61,
845 0x00003e62, 0x00003e62, 0x00003e63, 0x00003e63, 0x00003660, 0x00003660,
846 0x00003661, 0x00003661, 0x00003662, 0x00003662, 0x00003663, 0x00003663,
847 0x00002e60, 0x00002e60, 0x00002e61, 0x00002e61, 0x00002e62, 0x00002e62,
848 0x00002e63, 0x00002e63, 0x00002660, 0x00002660, 0x00002661, 0x00002661,
849 0x00002662, 0x00002662, 0x00002663, 0x00002663, 0x000025e0, 0x000025e0,
850 0x000025e1, 0x000025e1, 0x000025e2, 0x000025e2, 0x000025e3, 0x000025e3,
851 0x00001de0, 0x00001de0, 0x00001de1, 0x00001de1, 0x00001de2, 0x00001de2,
852 0x00001de3, 0x00001de3, 0x00001d60, 0x00001d60, 0x00001d61, 0x00001d61,
853 0x00001d62, 0x00001d62, 0x00001d63, 0x00001d63, 0x00001560, 0x00001560,
854 0x00001561, 0x00001561, 0x00001562, 0x00001562, 0x00001563, 0x00001563,
855 0x00000d60, 0x00000d60, 0x00000d61, 0x00000d61, 0x00000d62, 0x00000d62,
856 0x00000d63, 0x00000d63, 0x00000ce0, 0x00000ce0, 0x00000ce1, 0x00000ce1,
857 0x00000ce2, 0x00000ce2, 0x00000ce3, 0x00000ce3, 0x00000e10, 0x00000e10,
858 0x00000e11, 0x00000e11, 0x00000e12, 0x00000e12, 0x00000e13, 0x00000e13,
859 0x00000bf0, 0x00000bf0, 0x00000bf1, 0x00000bf1, 0x00000bf2, 0x00000bf2,
860 0x00000bf3, 0x00000bf3, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
861 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
862 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
863 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
864 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
865 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
866 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
867 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
868 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
869 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
870 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
871 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
872 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
873 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
874 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
875 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
876 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
877 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
878 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
879 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
880 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x04200000, 0x04000000,
881 0x04200000, 0x04000000, 0x04200000, 0x04000000, 0x000000ff, 0x000002fc,
882 0x0000fa08, 0x00000305, 0x00000206, 0x00000304, 0x0000fb04, 0x0000fcff,
883 0x000005fb, 0x0000fd01, 0x00000401, 0x00000006, 0x0000ff03, 0x000007fc,
884 0x0000fc08, 0x00000203, 0x0000fffb, 0x00000600, 0x0000fa01, 0x0000fc03,
885 0x0000fe06, 0x0000fe00, 0x00000102, 0x000007fd, 0x000004fb, 0x000006ff,
886 0x000004fd, 0x0000fdfa, 0x000007fb, 0x0000fdfa, 0x0000fa06, 0x00000500,
887 0x0000f902, 0x000007fa, 0x0000fafa, 0x00000500, 0x000007fa, 0x00000700,
888 0x00000305, 0x000004ff, 0x00000801, 0x00000503, 0x000005f9, 0x00000404,
889 0x0000fb08, 0x000005fd, 0x00000501, 0x00000405, 0x0000fb03, 0x000007fc,
890 0x00000403, 0x00000303, 0x00000402, 0x0000faff, 0x0000fe05, 0x000005fd,
891 0x0000fe01, 0x000007fa, 0x00000202, 0x00000504, 0x00000102, 0x000008fe,
892 0x0000fa04, 0x0000fafc, 0x0000fe08, 0x000000f9, 0x000002fa, 0x000003fe,
893 0x00000304, 0x000004f9, 0x00000100, 0x0000fd06, 0x000008fc, 0x00000701,
894 0x00000504, 0x0000fdfe, 0x0000fdfc, 0x000003fe, 0x00000704, 0x000002fc,
895 0x000004f9, 0x0000fdfd, 0x0000fa07, 0x00000205, 0x000003fd, 0x000005fb,
896 0x000004f9, 0x00000804, 0x0000fc06, 0x0000fcf9, 0x00000100, 0x0000fe05,
897 0x00000408, 0x0000fb02, 0x00000304, 0x000006fe, 0x000004fa, 0x00000305,
898 0x000008fc, 0x00000102, 0x000001fd, 0x000004fc, 0x0000fe03, 0x00000701,
899 0x000001fb, 0x000001f9, 0x00000206, 0x000006fd, 0x00000508, 0x00000700,
900 0x00000304, 0x000005fe, 0x000005ff, 0x0000fa04, 0x00000303, 0x0000fefb,
901 0x000007f9, 0x0000fefc, 0x000004fd, 0x000005fc, 0x0000fffd, 0x0000fc08,
902 0x0000fbf9, 0x0000fd07, 0x000008fb, 0x0000fe02, 0x000006fb, 0x00000702,
903};
904
905static const u32 lpphy_gain_idx_table[] = {
906 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
907 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
908 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
909 0x10000001, 0x00000000, 0x20000082, 0x00000000, 0x40000104, 0x00000000,
910 0x60004207, 0x00000001, 0x7000838a, 0x00000001, 0xd021050d, 0x00000001,
911 0xe041c683, 0x00000001, 0x50828805, 0x00000000, 0x80e34288, 0x00000000,
912 0xb144040b, 0x00000000, 0xe1a6058e, 0x00000000, 0x12064711, 0x00000001,
913 0xb0a18612, 0x00000010, 0xe1024794, 0x00000010, 0x11630915, 0x00000011,
914 0x31c3ca1b, 0x00000011, 0xc1848a9c, 0x00000018, 0xf1e50da0, 0x00000018,
915 0x22468e21, 0x00000019, 0x4286d023, 0x00000019, 0xa347d0a4, 0x00000019,
916 0xb36811a6, 0x00000019, 0xf3e89227, 0x00000019, 0x0408d329, 0x0000001a,
917 0x244953aa, 0x0000001a, 0x346994ab, 0x0000001a, 0x54aa152c, 0x0000001a,
918 0x64ca55ad, 0x0000001a, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
919 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
920 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
921 0x00000000, 0x00000000, 0x10000001, 0x00000000, 0x20000082, 0x00000000,
922 0x40000104, 0x00000000, 0x60004207, 0x00000001, 0x7000838a, 0x00000001,
923 0xd021050d, 0x00000001, 0xe041c683, 0x00000001, 0x50828805, 0x00000000,
924 0x80e34288, 0x00000000, 0xb144040b, 0x00000000, 0xe1a6058e, 0x00000000,
925 0x12064711, 0x00000001, 0xb0a18612, 0x00000010, 0xe1024794, 0x00000010,
926 0x11630915, 0x00000011, 0x31c3ca1b, 0x00000011, 0xc1848a9c, 0x00000018,
927 0xf1e50da0, 0x00000018, 0x22468e21, 0x00000019, 0x4286d023, 0x00000019,
928 0xa347d0a4, 0x00000019, 0xb36811a6, 0x00000019, 0xf3e89227, 0x00000019,
929 0x0408d329, 0x0000001a, 0x244953aa, 0x0000001a, 0x346994ab, 0x0000001a,
930 0x54aa152c, 0x0000001a, 0x64ca55ad, 0x0000001a,
931};
932
933static const u16 lpphy_aux_gain_idx_table[] = {
934 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
935 0x0001, 0x0002, 0x0004, 0x0016, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
936 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0004, 0x0016,
937};
938
939static const u32 lpphy_gain_value_table[] = {
940 0x00000008, 0x0000000e, 0x00000014, 0x0000001a, 0x000000fb, 0x00000004,
941 0x00000008, 0x0000000d, 0x00000001, 0x00000004, 0x00000007, 0x0000000a,
942 0x0000000d, 0x00000010, 0x00000012, 0x00000015, 0x00000000, 0x00000006,
943 0x0000000c, 0x00000000, 0x00000000, 0x00000000, 0x00000012, 0x00000000,
944 0x00000000, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000,
945 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
946 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
947 0x0000001e, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
948 0x00000000, 0x00000003, 0x00000006, 0x00000009, 0x0000000c, 0x0000000f,
949 0x00000012, 0x00000015, 0x00000018, 0x0000001b, 0x0000001e, 0x00000000,
950 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000009, 0x000000f1,
951 0x00000000, 0x00000000,
952};
953
954static const u16 lpphy_gain_table[] = {
955 0x0000, 0x0400, 0x0800, 0x0802, 0x0804, 0x0806, 0x0807, 0x0808, 0x080a,
956 0x080b, 0x080c, 0x080e, 0x080f, 0x0810, 0x0812, 0x0813, 0x0814, 0x0816,
957 0x0817, 0x081a, 0x081b, 0x081f, 0x0820, 0x0824, 0x0830, 0x0834, 0x0837,
958 0x083b, 0x083f, 0x0840, 0x0844, 0x0857, 0x085b, 0x085f, 0x08d7, 0x08db,
959 0x08df, 0x0957, 0x095b, 0x095f, 0x0b57, 0x0b5b, 0x0b5f, 0x0f5f, 0x135f,
960 0x175f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
961 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
962 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
963 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
964 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
965 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
966};
967
968static const u32 lpphy_a0_gain_idx_table[] = {
969 0x001111e0, 0x00652051, 0x00606055, 0x005b005a, 0x00555060, 0x00511065,
970 0x004c806b, 0x0047d072, 0x00444078, 0x00400080, 0x003ca087, 0x0039408f,
971 0x0035e098, 0x0032e0a1, 0x003030aa, 0x002d80b4, 0x002ae0bf, 0x002880ca,
972 0x002640d6, 0x002410e3, 0x002220f0, 0x002020ff, 0x001e510e, 0x001ca11e,
973 0x001b012f, 0x00199140, 0x00182153, 0x0016c168, 0x0015817d, 0x00145193,
974 0x001321ab, 0x001211c5, 0x001111e0, 0x001021fc, 0x000f321a, 0x000e523a,
975 0x000d925c, 0x000cd27f, 0x000c12a5, 0x000b62cd, 0x000ac2f8, 0x000a2325,
976 0x00099355, 0x00091387, 0x000883bd, 0x000813f5, 0x0007a432, 0x00073471,
977 0x0006c4b5, 0x000664fc, 0x00061547, 0x0005b598, 0x000565ec, 0x00051646,
978 0x0004d6a5, 0x0004870a, 0x00044775, 0x000407e6, 0x0003d85e, 0x000398dd,
979 0x00036963, 0x000339f2, 0x00030a89, 0x0002db28,
980};
981
982static const u16 lpphy_a0_aux_gain_idx_table[] = {
983 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
984 0x0000, 0x0000, 0x0002, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
985 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0002, 0x0014,
986};
987
988static const u32 lpphy_a0_gain_value_table[] = {
989 0x00000008, 0x0000000e, 0x00000014, 0x0000001a, 0x000000fb, 0x00000004,
990 0x00000008, 0x0000000d, 0x00000001, 0x00000004, 0x00000007, 0x0000000a,
991 0x0000000d, 0x00000010, 0x00000012, 0x00000015, 0x00000000, 0x00000006,
992 0x0000000c, 0x00000000, 0x00000000, 0x00000000, 0x00000012, 0x00000000,
993 0x00000000, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000,
994 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
995 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
996 0x0000001e, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
997 0x00000000, 0x00000003, 0x00000006, 0x00000009, 0x0000000c, 0x0000000f,
998 0x00000012, 0x00000015, 0x00000018, 0x0000001b, 0x0000001e, 0x00000000,
999 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x000000f7,
1000 0x00000000, 0x00000000,
1001};
1002
1003static const u16 lpphy_a0_gain_table[] = {
1004 0x0000, 0x0002, 0x0004, 0x0006, 0x0007, 0x0008, 0x000a, 0x000b, 0x000c,
1005 0x000e, 0x000f, 0x0010, 0x0012, 0x0013, 0x0014, 0x0016, 0x0017, 0x001a,
1006 0x001b, 0x001f, 0x0020, 0x0024, 0x0030, 0x0034, 0x0037, 0x003b, 0x003f,
1007 0x0040, 0x0044, 0x0057, 0x005b, 0x005f, 0x00d7, 0x00db, 0x00df, 0x0157,
1008 0x015b, 0x015f, 0x0357, 0x035b, 0x035f, 0x075f, 0x0b5f, 0x0f5f, 0x0000,
1009 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1010 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1011 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1012 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1013 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1014 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1015};
1016
1017static const u16 lpphy_sw_control_table[] = {
1018 0x0128, 0x0128, 0x0009, 0x0009, 0x0028, 0x0028, 0x0028, 0x0028, 0x0128,
1019 0x0128, 0x0009, 0x0009, 0x0028, 0x0028, 0x0028, 0x0028, 0x0009, 0x0009,
1020 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0018, 0x0018, 0x0018,
1021 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0128, 0x0128, 0x0009, 0x0009,
1022 0x0028, 0x0028, 0x0028, 0x0028, 0x0128, 0x0128, 0x0009, 0x0009, 0x0028,
1023 0x0028, 0x0028, 0x0028, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009,
1024 0x0009, 0x0009, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
1025 0x0018,
1026};
1027
1028static const u8 lpphy_hf_table[] = {
1029 0x4b, 0x36, 0x24, 0x18, 0x49, 0x34, 0x23, 0x17, 0x48,
1030 0x33, 0x23, 0x17, 0x48, 0x33, 0x23, 0x17,
1031};
1032
1033static const u32 lpphy_papd_eps_table[] = {
1034 0x00000000, 0x00013ffc, 0x0001dff3, 0x0001bff0, 0x00023fe9, 0x00021fdf,
1035 0x00028fdf, 0x00033fd2, 0x00039fcb, 0x00043fc7, 0x0004efc2, 0x00055fb5,
1036 0x0005cfb0, 0x00063fa8, 0x00068fa3, 0x00071f98, 0x0007ef92, 0x00084f8b,
1037 0x0008df82, 0x00097f77, 0x0009df69, 0x000a3f62, 0x000adf57, 0x000b6f4c,
1038 0x000bff41, 0x000c9f39, 0x000cff30, 0x000dbf27, 0x000e4f1e, 0x000edf16,
1039 0x000f7f13, 0x00102f11, 0x00110f10, 0x0011df11, 0x0012ef15, 0x00143f1c,
1040 0x00158f27, 0x00172f35, 0x00193f47, 0x001baf5f, 0x001e6f7e, 0x0021cfa4,
1041 0x0025bfd2, 0x002a2008, 0x002fb047, 0x00360090, 0x003d40e0, 0x0045c135,
1042 0x004fb189, 0x005ae1d7, 0x0067221d, 0x0075025a, 0x007ff291, 0x007ff2bf,
1043 0x007ff2e3, 0x007ff2ff, 0x007ff315, 0x007ff329, 0x007ff33f, 0x007ff356,
1044 0x007ff36e, 0x007ff39c, 0x007ff441, 0x007ff506,
1045};
1046
1047static const u32 lpphy_papd_mult_table[] = {
1048 0x001111e0, 0x00652051, 0x00606055, 0x005b005a, 0x00555060, 0x00511065,
1049 0x004c806b, 0x0047d072, 0x00444078, 0x00400080, 0x003ca087, 0x0039408f,
1050 0x0035e098, 0x0032e0a1, 0x003030aa, 0x002d80b4, 0x002ae0bf, 0x002880ca,
1051 0x002640d6, 0x002410e3, 0x002220f0, 0x002020ff, 0x001e510e, 0x001ca11e,
1052 0x001b012f, 0x00199140, 0x00182153, 0x0016c168, 0x0015817d, 0x00145193,
1053 0x001321ab, 0x001211c5, 0x001111e0, 0x001021fc, 0x000f321a, 0x000e523a,
1054 0x000d925c, 0x000cd27f, 0x000c12a5, 0x000b62cd, 0x000ac2f8, 0x000a2325,
1055 0x00099355, 0x00091387, 0x000883bd, 0x000813f5, 0x0007a432, 0x00073471,
1056 0x0006c4b5, 0x000664fc, 0x00061547, 0x0005b598, 0x000565ec, 0x00051646,
1057 0x0004d6a5, 0x0004870a, 0x00044775, 0x000407e6, 0x0003d85e, 0x000398dd,
1058 0x00036963, 0x000339f2, 0x00030a89, 0x0002db28,
1059};
1060
1061struct lpphy_tx_gain_table_entry {
1062 u8 gm, pga, pad, dac, bb_mult;
1063};
1064
1065static struct lpphy_tx_gain_table_entry lpphy_rev0_nopa_tx_gain_table[] = {
1066 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 152, },
1067 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 147, },
1068 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 143, },
1069 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 139, },
1070 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 135, },
1071 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 131, },
1072 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 128, },
1073 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 124, },
1074 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 121, },
1075 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 117, },
1076 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 114, },
1077 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 111, },
1078 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 107, },
1079 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 104, },
1080 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 101, },
1081 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 99, },
1082 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 96, },
1083 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 93, },
1084 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 90, },
1085 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 88, },
1086 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 85, },
1087 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 83, },
1088 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 81, },
1089 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 78, },
1090 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 76, },
1091 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 74, },
1092 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
1093 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
1094 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
1095 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
1096 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
1097 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
1098 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
1099 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 59, },
1100 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 57, },
1101 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 72, },
1102 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 70, },
1103 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 68, },
1104 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 66, },
1105 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 64, },
1106 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
1107 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
1108 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 59, },
1109 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 57, },
1110 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 71, },
1111 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 69, },
1112 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 67, },
1113 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 65, },
1114 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 63, },
1115 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
1116 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
1117 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 58, },
1118 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 57, },
1119 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 70, },
1120 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 68, },
1121 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 66, },
1122 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 65, },
1123 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 63, },
1124 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 61, },
1125 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 59, },
1126 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 58, },
1127 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 71, },
1128 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 69, },
1129 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 67, },
1130 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 65, },
1131 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 63, },
1132 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 61, },
1133 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
1134 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 58, },
1135 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 56, },
1136 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
1137 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
1138 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 66, },
1139 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1140 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1141 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 60, },
1142 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1143 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 72, },
1144 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 70, },
1145 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1146 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1147 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 64, },
1148 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 62, },
1149 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 60, },
1150 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1151 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 72, },
1152 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1153 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1154 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1155 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1156 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1157 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1158 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1159 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1160 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 72, },
1161 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1162 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1163 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1164 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1165 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1166 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1167 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1168 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 72, },
1169 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1170 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1171 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1172 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1173 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1174 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1175 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1176 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 73, },
1177 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 71, },
1178 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 69, },
1179 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 67, },
1180 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 65, },
1181 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 63, },
1182 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1183 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1184 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 72, },
1185 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1186 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1187 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1188 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 65, },
1189 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 63, },
1190 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1191 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1192 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 73, },
1193 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 71, },
1194};
1195
1196static struct lpphy_tx_gain_table_entry lpphy_rev0_2ghz_tx_gain_table[] = {
1197 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1198 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1199 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 60, },
1200 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1201 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 72, },
1202 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 70, },
1203 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1204 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1205 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 64, },
1206 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 62, },
1207 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 60, },
1208 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1209 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 72, },
1210 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1211 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1212 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1213 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1214 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1215 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1216 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1217 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1218 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 72, },
1219 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1220 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1221 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1222 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1223 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1224 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1225 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1226 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 72, },
1227 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1228 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1229 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1230 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1231 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1232 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1233 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1234 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 73, },
1235 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 71, },
1236 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 69, },
1237 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 67, },
1238 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 65, },
1239 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 63, },
1240 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1241 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1242 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 72, },
1243 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1244 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1245 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1246 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 65, },
1247 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 63, },
1248 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1249 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1250 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 73, },
1251 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 71, },
1252 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 69, },
1253 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 67, },
1254 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 65, },
1255 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 63, },
1256 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 61, },
1257 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 60, },
1258 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 72, },
1259 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 70, },
1260 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 68, },
1261 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 66, },
1262 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 64, },
1263 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 62, },
1264 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 60, },
1265 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 59, },
1266 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 72, },
1267 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 70, },
1268 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 68, },
1269 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 66, },
1270 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 64, },
1271 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 62, },
1272 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 60, },
1273 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 59, },
1274 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 70, },
1275 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 68, },
1276 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 66, },
1277 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 64, },
1278 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 63, },
1279 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 61, },
1280 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 59, },
1281 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 71, },
1282 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 69, },
1283 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 67, },
1284 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 65, },
1285 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 63, },
1286 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 62, },
1287 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 60, },
1288 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 58, },
1289 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 70, },
1290 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 68, },
1291 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 66, },
1292 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 65, },
1293 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 63, },
1294 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 61, },
1295 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 59, },
1296 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 68, },
1297 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 66, },
1298 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 64, },
1299 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 62, },
1300 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 61, },
1301 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 59, },
1302 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 67, },
1303 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 65, },
1304 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 63, },
1305 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 62, },
1306 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 60, },
1307 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 65, },
1308 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 63, },
1309 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 61, },
1310 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 60, },
1311 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 58, },
1312 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 68, },
1313 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 66, },
1314 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 64, },
1315 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 62, },
1316 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 60, },
1317 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 59, },
1318 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 57, },
1319 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 83, },
1320 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 81, },
1321 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 78, },
1322 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 76, },
1323 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 74, },
1324 { .gm = 4, .pga = 4, .pad = 2, .dac = 0, .bb_mult = 72, },
1325};
1326
1327static struct lpphy_tx_gain_table_entry lpphy_rev0_5ghz_tx_gain_table[] = {
1328 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 99, },
1329 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 96, },
1330 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 93, },
1331 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 90, },
1332 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 88, },
1333 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 85, },
1334 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 83, },
1335 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 81, },
1336 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 78, },
1337 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 76, },
1338 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 74, },
1339 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 72, },
1340 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 70, },
1341 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 68, },
1342 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 66, },
1343 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 64, },
1344 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 62, },
1345 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 60, },
1346 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 59, },
1347 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 57, },
1348 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 55, },
1349 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
1350 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
1351 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
1352 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
1353 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
1354 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
1355 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
1356 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 58, },
1357 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 56, },
1358 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 55, },
1359 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 71, },
1360 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 69, },
1361 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 67, },
1362 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 65, },
1363 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 63, },
1364 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
1365 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
1366 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 58, },
1367 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 56, },
1368 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 72, },
1369 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 70, },
1370 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 68, },
1371 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 66, },
1372 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 64, },
1373 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
1374 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
1375 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 59, },
1376 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 57, },
1377 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 73, },
1378 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 71, },
1379 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 69, },
1380 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 67, },
1381 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 65, },
1382 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 63, },
1383 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 61, },
1384 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 60, },
1385 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 58, },
1386 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 71, },
1387 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 69, },
1388 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 67, },
1389 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 65, },
1390 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 63, },
1391 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 61, },
1392 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
1393 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 58, },
1394 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
1395 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
1396 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 66, },
1397 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1398 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1399 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 61, },
1400 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1401 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 57, },
1402 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 56, },
1403 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1404 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1405 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 65, },
1406 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 63, },
1407 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 61, },
1408 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1409 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 58, },
1410 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1411 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1412 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1413 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1414 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1415 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1416 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1417 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1418 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1419 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1420 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1421 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1422 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1423 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1424 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1425 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 57, },
1426 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1427 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1428 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1429 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1430 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1431 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1432 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1433 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 57, },
1434 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 70, },
1435 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 68, },
1436 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 66, },
1437 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 64, },
1438 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 62, },
1439 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1440 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1441 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 57, },
1442 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1443 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1444 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1445 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 64, },
1446 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 62, },
1447 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1448 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1449 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 57, },
1450 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 69, },
1451 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 67, },
1452 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 65, },
1453 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 63, },
1454 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 62, },
1455 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 60, },
1456};
1457
1458static struct lpphy_tx_gain_table_entry lpphy_rev1_nopa_tx_gain_table[] = {
1459 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 152, },
1460 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 147, },
1461 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 143, },
1462 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 139, },
1463 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 135, },
1464 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 131, },
1465 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 128, },
1466 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 124, },
1467 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 121, },
1468 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 117, },
1469 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 114, },
1470 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 111, },
1471 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 107, },
1472 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 104, },
1473 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 101, },
1474 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 99, },
1475 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 96, },
1476 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 93, },
1477 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 90, },
1478 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 88, },
1479 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 85, },
1480 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 83, },
1481 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 81, },
1482 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 78, },
1483 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 76, },
1484 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 74, },
1485 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
1486 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
1487 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
1488 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
1489 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
1490 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
1491 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
1492 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 59, },
1493 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 57, },
1494 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 72, },
1495 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 70, },
1496 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
1497 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
1498 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
1499 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
1500 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
1501 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 59, },
1502 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 57, },
1503 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 72, },
1504 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 70, },
1505 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 68, },
1506 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 66, },
1507 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 64, },
1508 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
1509 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
1510 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 59, },
1511 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 57, },
1512 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 71, },
1513 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 69, },
1514 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 67, },
1515 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 65, },
1516 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 63, },
1517 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
1518 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
1519 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 58, },
1520 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 57, },
1521 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 70, },
1522 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 68, },
1523 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 66, },
1524 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 65, },
1525 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 63, },
1526 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 61, },
1527 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 59, },
1528 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 58, },
1529 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 71, },
1530 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 69, },
1531 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 67, },
1532 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 65, },
1533 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 63, },
1534 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 61, },
1535 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
1536 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 58, },
1537 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 56, },
1538 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
1539 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
1540 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 66, },
1541 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1542 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1543 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 60, },
1544 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1545 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 72, },
1546 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 70, },
1547 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1548 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1549 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 64, },
1550 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 62, },
1551 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 60, },
1552 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1553 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 72, },
1554 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1555 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1556 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1557 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1558 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1559 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1560 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1561 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1562 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 72, },
1563 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1564 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1565 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1566 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1567 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1568 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1569 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1570 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 72, },
1571 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1572 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1573 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1574 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1575 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1576 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1577 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1578 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 73, },
1579 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 71, },
1580 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 69, },
1581 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 67, },
1582 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 65, },
1583 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 63, },
1584 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1585 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1586 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 72, },
1587 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1588 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1589 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1590 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 65, },
1591 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 63, },
1592 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1593 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1594 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 73, },
1595 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 71, },
1596};
1597
1598static struct lpphy_tx_gain_table_entry lpphy_rev1_2ghz_tx_gain_table[] = {
1599 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 85, },
1600 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 81, },
1601 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 78, },
1602 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 76, },
1603 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 74, },
1604 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 72, },
1605 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
1606 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
1607 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 66, },
1608 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1609 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1610 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 60, },
1611 { .gm = 4, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1612 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 72, },
1613 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 70, },
1614 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1615 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1616 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 64, },
1617 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 62, },
1618 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 60, },
1619 { .gm = 4, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1620 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 72, },
1621 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1622 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1623 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1624 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1625 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1626 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1627 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1628 { .gm = 4, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1629 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 72, },
1630 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1631 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1632 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1633 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1634 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1635 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1636 { .gm = 4, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1637 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 72, },
1638 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1639 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1640 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1641 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1642 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1643 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1644 { .gm = 4, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1645 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 73, },
1646 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 71, },
1647 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 69, },
1648 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 67, },
1649 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 65, },
1650 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 63, },
1651 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1652 { .gm = 4, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1653 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 72, },
1654 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1655 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1656 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1657 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 65, },
1658 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 63, },
1659 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1660 { .gm = 4, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1661 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 73, },
1662 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 71, },
1663 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 69, },
1664 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 67, },
1665 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 65, },
1666 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 63, },
1667 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 61, },
1668 { .gm = 4, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 60, },
1669 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 72, },
1670 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 70, },
1671 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 68, },
1672 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 66, },
1673 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 64, },
1674 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 62, },
1675 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 60, },
1676 { .gm = 4, .pga = 10, .pad = 6, .dac = 0, .bb_mult = 59, },
1677 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 72, },
1678 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 70, },
1679 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 68, },
1680 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 66, },
1681 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 64, },
1682 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 62, },
1683 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 60, },
1684 { .gm = 4, .pga = 10, .pad = 5, .dac = 0, .bb_mult = 59, },
1685 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 70, },
1686 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 68, },
1687 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 66, },
1688 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 64, },
1689 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 63, },
1690 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 61, },
1691 { .gm = 4, .pga = 9, .pad = 5, .dac = 0, .bb_mult = 59, },
1692 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 71, },
1693 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 69, },
1694 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 67, },
1695 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 65, },
1696 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 63, },
1697 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 62, },
1698 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 60, },
1699 { .gm = 4, .pga = 9, .pad = 4, .dac = 0, .bb_mult = 58, },
1700 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 70, },
1701 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 68, },
1702 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 66, },
1703 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 65, },
1704 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 63, },
1705 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 61, },
1706 { .gm = 4, .pga = 8, .pad = 4, .dac = 0, .bb_mult = 59, },
1707 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 68, },
1708 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 66, },
1709 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 64, },
1710 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 62, },
1711 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 61, },
1712 { .gm = 4, .pga = 7, .pad = 4, .dac = 0, .bb_mult = 59, },
1713 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 67, },
1714 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 65, },
1715 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 63, },
1716 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 62, },
1717 { .gm = 4, .pga = 7, .pad = 3, .dac = 0, .bb_mult = 60, },
1718 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 65, },
1719 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 63, },
1720 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 61, },
1721 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 60, },
1722 { .gm = 4, .pga = 6, .pad = 3, .dac = 0, .bb_mult = 58, },
1723 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 68, },
1724 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 66, },
1725 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 64, },
1726 { .gm = 4, .pga = 5, .pad = 3, .dac = 0, .bb_mult = 62, },
1727};
1728
1729static struct lpphy_tx_gain_table_entry lpphy_rev1_5ghz_tx_gain_table[] = {
1730 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 99, },
1731 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 96, },
1732 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 93, },
1733 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 90, },
1734 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 88, },
1735 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 85, },
1736 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 83, },
1737 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 81, },
1738 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 78, },
1739 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 76, },
1740 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 74, },
1741 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 72, },
1742 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 70, },
1743 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 68, },
1744 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 66, },
1745 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 64, },
1746 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 62, },
1747 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 60, },
1748 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 59, },
1749 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 57, },
1750 { .gm = 7, .pga = 15, .pad = 15, .dac = 0, .bb_mult = 55, },
1751 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 72, },
1752 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 70, },
1753 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 68, },
1754 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 66, },
1755 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 64, },
1756 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 62, },
1757 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 60, },
1758 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 58, },
1759 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 56, },
1760 { .gm = 7, .pga = 15, .pad = 14, .dac = 0, .bb_mult = 55, },
1761 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 71, },
1762 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 69, },
1763 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 67, },
1764 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 65, },
1765 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 63, },
1766 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 62, },
1767 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 60, },
1768 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 58, },
1769 { .gm = 7, .pga = 15, .pad = 13, .dac = 0, .bb_mult = 56, },
1770 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 72, },
1771 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 70, },
1772 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 68, },
1773 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 66, },
1774 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 64, },
1775 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 62, },
1776 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 60, },
1777 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 59, },
1778 { .gm = 7, .pga = 15, .pad = 12, .dac = 0, .bb_mult = 57, },
1779 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 73, },
1780 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 71, },
1781 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 69, },
1782 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 67, },
1783 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 65, },
1784 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 63, },
1785 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 61, },
1786 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 60, },
1787 { .gm = 7, .pga = 15, .pad = 11, .dac = 0, .bb_mult = 58, },
1788 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 71, },
1789 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 69, },
1790 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 67, },
1791 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 65, },
1792 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 63, },
1793 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 61, },
1794 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 60, },
1795 { .gm = 7, .pga = 15, .pad = 10, .dac = 0, .bb_mult = 58, },
1796 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 70, },
1797 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 68, },
1798 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 66, },
1799 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 64, },
1800 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 62, },
1801 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 61, },
1802 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 59, },
1803 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 57, },
1804 { .gm = 7, .pga = 15, .pad = 9, .dac = 0, .bb_mult = 56, },
1805 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 68, },
1806 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 66, },
1807 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 65, },
1808 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 63, },
1809 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 61, },
1810 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 59, },
1811 { .gm = 7, .pga = 14, .pad = 9, .dac = 0, .bb_mult = 58, },
1812 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 70, },
1813 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 68, },
1814 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 66, },
1815 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 64, },
1816 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 63, },
1817 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 61, },
1818 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 59, },
1819 { .gm = 7, .pga = 13, .pad = 9, .dac = 0, .bb_mult = 57, },
1820 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 70, },
1821 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 68, },
1822 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 66, },
1823 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 64, },
1824 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 62, },
1825 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 60, },
1826 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 59, },
1827 { .gm = 7, .pga = 13, .pad = 8, .dac = 0, .bb_mult = 57, },
1828 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 70, },
1829 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 68, },
1830 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 66, },
1831 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 64, },
1832 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 62, },
1833 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 61, },
1834 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 59, },
1835 { .gm = 7, .pga = 12, .pad = 8, .dac = 0, .bb_mult = 57, },
1836 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 70, },
1837 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 68, },
1838 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 66, },
1839 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 64, },
1840 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 62, },
1841 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 61, },
1842 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 59, },
1843 { .gm = 7, .pga = 12, .pad = 7, .dac = 0, .bb_mult = 57, },
1844 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 70, },
1845 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 68, },
1846 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 66, },
1847 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 64, },
1848 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 62, },
1849 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 61, },
1850 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 59, },
1851 { .gm = 7, .pga = 11, .pad = 7, .dac = 0, .bb_mult = 57, },
1852 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 69, },
1853 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 67, },
1854 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 65, },
1855 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 63, },
1856 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 62, },
1857 { .gm = 7, .pga = 11, .pad = 6, .dac = 0, .bb_mult = 60, },
1858};
1859
1860static struct lpphy_tx_gain_table_entry lpphy_rev2_nopa_tx_gain_table[] = {
1861 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 152, },
1862 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 147, },
1863 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 143, },
1864 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 139, },
1865 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 135, },
1866 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 131, },
1867 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 128, },
1868 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 124, },
1869 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 121, },
1870 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 117, },
1871 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 114, },
1872 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 111, },
1873 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 107, },
1874 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 104, },
1875 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 101, },
1876 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 99, },
1877 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 96, },
1878 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 93, },
1879 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 90, },
1880 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 88, },
1881 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 85, },
1882 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 83, },
1883 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 81, },
1884 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 78, },
1885 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 76, },
1886 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 74, },
1887 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 72, },
1888 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 70, },
1889 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 68, },
1890 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 66, },
1891 { .gm = 255, .pga = 255, .pad = 203, .dac = 0, .bb_mult = 64, },
1892 { .gm = 255, .pga = 255, .pad = 197, .dac = 0, .bb_mult = 64, },
1893 { .gm = 255, .pga = 255, .pad = 192, .dac = 0, .bb_mult = 64, },
1894 { .gm = 255, .pga = 255, .pad = 186, .dac = 0, .bb_mult = 64, },
1895 { .gm = 255, .pga = 255, .pad = 181, .dac = 0, .bb_mult = 64, },
1896 { .gm = 255, .pga = 255, .pad = 176, .dac = 0, .bb_mult = 64, },
1897 { .gm = 255, .pga = 255, .pad = 171, .dac = 0, .bb_mult = 64, },
1898 { .gm = 255, .pga = 255, .pad = 166, .dac = 0, .bb_mult = 64, },
1899 { .gm = 255, .pga = 255, .pad = 161, .dac = 0, .bb_mult = 64, },
1900 { .gm = 255, .pga = 255, .pad = 157, .dac = 0, .bb_mult = 64, },
1901 { .gm = 255, .pga = 255, .pad = 152, .dac = 0, .bb_mult = 64, },
1902 { .gm = 255, .pga = 255, .pad = 148, .dac = 0, .bb_mult = 64, },
1903 { .gm = 255, .pga = 255, .pad = 144, .dac = 0, .bb_mult = 64, },
1904 { .gm = 255, .pga = 255, .pad = 140, .dac = 0, .bb_mult = 64, },
1905 { .gm = 255, .pga = 255, .pad = 136, .dac = 0, .bb_mult = 64, },
1906 { .gm = 255, .pga = 255, .pad = 132, .dac = 0, .bb_mult = 64, },
1907 { .gm = 255, .pga = 255, .pad = 128, .dac = 0, .bb_mult = 64, },
1908 { .gm = 255, .pga = 255, .pad = 124, .dac = 0, .bb_mult = 64, },
1909 { .gm = 255, .pga = 255, .pad = 121, .dac = 0, .bb_mult = 64, },
1910 { .gm = 255, .pga = 255, .pad = 117, .dac = 0, .bb_mult = 64, },
1911 { .gm = 255, .pga = 255, .pad = 114, .dac = 0, .bb_mult = 64, },
1912 { .gm = 255, .pga = 255, .pad = 111, .dac = 0, .bb_mult = 64, },
1913 { .gm = 255, .pga = 255, .pad = 108, .dac = 0, .bb_mult = 64, },
1914 { .gm = 255, .pga = 255, .pad = 105, .dac = 0, .bb_mult = 64, },
1915 { .gm = 255, .pga = 255, .pad = 102, .dac = 0, .bb_mult = 64, },
1916 { .gm = 255, .pga = 255, .pad = 99, .dac = 0, .bb_mult = 64, },
1917 { .gm = 255, .pga = 255, .pad = 96, .dac = 0, .bb_mult = 64, },
1918 { .gm = 255, .pga = 255, .pad = 93, .dac = 0, .bb_mult = 64, },
1919 { .gm = 255, .pga = 255, .pad = 91, .dac = 0, .bb_mult = 64, },
1920 { .gm = 255, .pga = 255, .pad = 88, .dac = 0, .bb_mult = 64, },
1921 { .gm = 255, .pga = 255, .pad = 86, .dac = 0, .bb_mult = 64, },
1922 { .gm = 255, .pga = 255, .pad = 83, .dac = 0, .bb_mult = 64, },
1923 { .gm = 255, .pga = 255, .pad = 81, .dac = 0, .bb_mult = 64, },
1924 { .gm = 255, .pga = 255, .pad = 79, .dac = 0, .bb_mult = 64, },
1925 { .gm = 255, .pga = 255, .pad = 76, .dac = 0, .bb_mult = 64, },
1926 { .gm = 255, .pga = 255, .pad = 74, .dac = 0, .bb_mult = 64, },
1927 { .gm = 255, .pga = 255, .pad = 72, .dac = 0, .bb_mult = 64, },
1928 { .gm = 255, .pga = 255, .pad = 70, .dac = 0, .bb_mult = 64, },
1929 { .gm = 255, .pga = 255, .pad = 68, .dac = 0, .bb_mult = 64, },
1930 { .gm = 255, .pga = 255, .pad = 66, .dac = 0, .bb_mult = 64, },
1931 { .gm = 255, .pga = 255, .pad = 64, .dac = 0, .bb_mult = 64, },
1932 { .gm = 255, .pga = 248, .pad = 64, .dac = 0, .bb_mult = 64, },
1933 { .gm = 255, .pga = 248, .pad = 62, .dac = 0, .bb_mult = 64, },
1934 { .gm = 255, .pga = 241, .pad = 62, .dac = 0, .bb_mult = 64, },
1935 { .gm = 255, .pga = 241, .pad = 60, .dac = 0, .bb_mult = 64, },
1936 { .gm = 255, .pga = 234, .pad = 60, .dac = 0, .bb_mult = 64, },
1937 { .gm = 255, .pga = 234, .pad = 59, .dac = 0, .bb_mult = 64, },
1938 { .gm = 255, .pga = 227, .pad = 59, .dac = 0, .bb_mult = 64, },
1939 { .gm = 255, .pga = 227, .pad = 57, .dac = 0, .bb_mult = 64, },
1940 { .gm = 255, .pga = 221, .pad = 57, .dac = 0, .bb_mult = 64, },
1941 { .gm = 255, .pga = 221, .pad = 55, .dac = 0, .bb_mult = 64, },
1942 { .gm = 255, .pga = 215, .pad = 55, .dac = 0, .bb_mult = 64, },
1943 { .gm = 255, .pga = 215, .pad = 54, .dac = 0, .bb_mult = 64, },
1944 { .gm = 255, .pga = 208, .pad = 54, .dac = 0, .bb_mult = 64, },
1945 { .gm = 255, .pga = 208, .pad = 52, .dac = 0, .bb_mult = 64, },
1946 { .gm = 255, .pga = 203, .pad = 52, .dac = 0, .bb_mult = 64, },
1947 { .gm = 255, .pga = 203, .pad = 51, .dac = 0, .bb_mult = 64, },
1948 { .gm = 255, .pga = 197, .pad = 51, .dac = 0, .bb_mult = 64, },
1949 { .gm = 255, .pga = 197, .pad = 49, .dac = 0, .bb_mult = 64, },
1950 { .gm = 255, .pga = 191, .pad = 49, .dac = 0, .bb_mult = 64, },
1951 { .gm = 255, .pga = 191, .pad = 48, .dac = 0, .bb_mult = 64, },
1952 { .gm = 255, .pga = 186, .pad = 48, .dac = 0, .bb_mult = 64, },
1953 { .gm = 255, .pga = 186, .pad = 47, .dac = 0, .bb_mult = 64, },
1954 { .gm = 255, .pga = 181, .pad = 47, .dac = 0, .bb_mult = 64, },
1955 { .gm = 255, .pga = 181, .pad = 45, .dac = 0, .bb_mult = 64, },
1956 { .gm = 255, .pga = 175, .pad = 45, .dac = 0, .bb_mult = 64, },
1957 { .gm = 255, .pga = 175, .pad = 44, .dac = 0, .bb_mult = 64, },
1958 { .gm = 255, .pga = 170, .pad = 44, .dac = 0, .bb_mult = 64, },
1959 { .gm = 255, .pga = 170, .pad = 43, .dac = 0, .bb_mult = 64, },
1960 { .gm = 255, .pga = 166, .pad = 43, .dac = 0, .bb_mult = 64, },
1961 { .gm = 255, .pga = 166, .pad = 42, .dac = 0, .bb_mult = 64, },
1962 { .gm = 255, .pga = 161, .pad = 42, .dac = 0, .bb_mult = 64, },
1963 { .gm = 255, .pga = 161, .pad = 40, .dac = 0, .bb_mult = 64, },
1964 { .gm = 255, .pga = 156, .pad = 40, .dac = 0, .bb_mult = 64, },
1965 { .gm = 255, .pga = 156, .pad = 39, .dac = 0, .bb_mult = 64, },
1966 { .gm = 255, .pga = 152, .pad = 39, .dac = 0, .bb_mult = 64, },
1967 { .gm = 255, .pga = 152, .pad = 38, .dac = 0, .bb_mult = 64, },
1968 { .gm = 255, .pga = 148, .pad = 38, .dac = 0, .bb_mult = 64, },
1969 { .gm = 255, .pga = 148, .pad = 37, .dac = 0, .bb_mult = 64, },
1970 { .gm = 255, .pga = 143, .pad = 37, .dac = 0, .bb_mult = 64, },
1971 { .gm = 255, .pga = 143, .pad = 36, .dac = 0, .bb_mult = 64, },
1972 { .gm = 255, .pga = 139, .pad = 36, .dac = 0, .bb_mult = 64, },
1973 { .gm = 255, .pga = 139, .pad = 35, .dac = 0, .bb_mult = 64, },
1974 { .gm = 255, .pga = 135, .pad = 35, .dac = 0, .bb_mult = 64, },
1975 { .gm = 255, .pga = 135, .pad = 34, .dac = 0, .bb_mult = 64, },
1976 { .gm = 255, .pga = 132, .pad = 34, .dac = 0, .bb_mult = 64, },
1977 { .gm = 255, .pga = 132, .pad = 33, .dac = 0, .bb_mult = 64, },
1978 { .gm = 255, .pga = 128, .pad = 33, .dac = 0, .bb_mult = 64, },
1979 { .gm = 255, .pga = 128, .pad = 32, .dac = 0, .bb_mult = 64, },
1980 { .gm = 255, .pga = 124, .pad = 32, .dac = 0, .bb_mult = 64, },
1981 { .gm = 255, .pga = 124, .pad = 31, .dac = 0, .bb_mult = 64, },
1982 { .gm = 255, .pga = 121, .pad = 31, .dac = 0, .bb_mult = 64, },
1983 { .gm = 255, .pga = 121, .pad = 30, .dac = 0, .bb_mult = 64, },
1984 { .gm = 255, .pga = 117, .pad = 30, .dac = 0, .bb_mult = 64, },
1985 { .gm = 255, .pga = 117, .pad = 29, .dac = 0, .bb_mult = 64, },
1986 { .gm = 255, .pga = 114, .pad = 29, .dac = 0, .bb_mult = 64, },
1987 { .gm = 255, .pga = 114, .pad = 29, .dac = 0, .bb_mult = 64, },
1988 { .gm = 255, .pga = 111, .pad = 29, .dac = 0, .bb_mult = 64, },
1989};
1990
1991static struct lpphy_tx_gain_table_entry lpphy_rev2_2ghz_tx_gain_table[] = {
1992 { .gm = 7, .pga = 99, .pad = 255, .dac = 0, .bb_mult = 64, },
1993 { .gm = 7, .pga = 96, .pad = 255, .dac = 0, .bb_mult = 64, },
1994 { .gm = 7, .pga = 93, .pad = 255, .dac = 0, .bb_mult = 64, },
1995 { .gm = 7, .pga = 90, .pad = 255, .dac = 0, .bb_mult = 64, },
1996 { .gm = 7, .pga = 88, .pad = 255, .dac = 0, .bb_mult = 64, },
1997 { .gm = 7, .pga = 85, .pad = 255, .dac = 0, .bb_mult = 64, },
1998 { .gm = 7, .pga = 83, .pad = 255, .dac = 0, .bb_mult = 64, },
1999 { .gm = 7, .pga = 81, .pad = 255, .dac = 0, .bb_mult = 64, },
2000 { .gm = 7, .pga = 78, .pad = 255, .dac = 0, .bb_mult = 64, },
2001 { .gm = 7, .pga = 76, .pad = 255, .dac = 0, .bb_mult = 64, },
2002 { .gm = 7, .pga = 74, .pad = 255, .dac = 0, .bb_mult = 64, },
2003 { .gm = 7, .pga = 72, .pad = 255, .dac = 0, .bb_mult = 64, },
2004 { .gm = 7, .pga = 70, .pad = 255, .dac = 0, .bb_mult = 64, },
2005 { .gm = 7, .pga = 68, .pad = 255, .dac = 0, .bb_mult = 64, },
2006 { .gm = 7, .pga = 66, .pad = 255, .dac = 0, .bb_mult = 64, },
2007 { .gm = 7, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
2008 { .gm = 7, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
2009 { .gm = 7, .pga = 62, .pad = 255, .dac = 0, .bb_mult = 64, },
2010 { .gm = 7, .pga = 62, .pad = 248, .dac = 0, .bb_mult = 64, },
2011 { .gm = 7, .pga = 60, .pad = 248, .dac = 0, .bb_mult = 64, },
2012 { .gm = 7, .pga = 60, .pad = 241, .dac = 0, .bb_mult = 64, },
2013 { .gm = 7, .pga = 59, .pad = 241, .dac = 0, .bb_mult = 64, },
2014 { .gm = 7, .pga = 59, .pad = 234, .dac = 0, .bb_mult = 64, },
2015 { .gm = 7, .pga = 57, .pad = 234, .dac = 0, .bb_mult = 64, },
2016 { .gm = 7, .pga = 57, .pad = 227, .dac = 0, .bb_mult = 64, },
2017 { .gm = 7, .pga = 55, .pad = 227, .dac = 0, .bb_mult = 64, },
2018 { .gm = 7, .pga = 55, .pad = 221, .dac = 0, .bb_mult = 64, },
2019 { .gm = 7, .pga = 54, .pad = 221, .dac = 0, .bb_mult = 64, },
2020 { .gm = 7, .pga = 54, .pad = 215, .dac = 0, .bb_mult = 64, },
2021 { .gm = 7, .pga = 52, .pad = 215, .dac = 0, .bb_mult = 64, },
2022 { .gm = 7, .pga = 52, .pad = 208, .dac = 0, .bb_mult = 64, },
2023 { .gm = 7, .pga = 51, .pad = 208, .dac = 0, .bb_mult = 64, },
2024 { .gm = 7, .pga = 51, .pad = 203, .dac = 0, .bb_mult = 64, },
2025 { .gm = 7, .pga = 49, .pad = 203, .dac = 0, .bb_mult = 64, },
2026 { .gm = 7, .pga = 49, .pad = 197, .dac = 0, .bb_mult = 64, },
2027 { .gm = 7, .pga = 48, .pad = 197, .dac = 0, .bb_mult = 64, },
2028 { .gm = 7, .pga = 48, .pad = 191, .dac = 0, .bb_mult = 64, },
2029 { .gm = 7, .pga = 47, .pad = 191, .dac = 0, .bb_mult = 64, },
2030 { .gm = 7, .pga = 47, .pad = 186, .dac = 0, .bb_mult = 64, },
2031 { .gm = 7, .pga = 45, .pad = 186, .dac = 0, .bb_mult = 64, },
2032 { .gm = 7, .pga = 45, .pad = 181, .dac = 0, .bb_mult = 64, },
2033 { .gm = 7, .pga = 44, .pad = 181, .dac = 0, .bb_mult = 64, },
2034 { .gm = 7, .pga = 44, .pad = 175, .dac = 0, .bb_mult = 64, },
2035 { .gm = 7, .pga = 43, .pad = 175, .dac = 0, .bb_mult = 64, },
2036 { .gm = 7, .pga = 43, .pad = 170, .dac = 0, .bb_mult = 64, },
2037 { .gm = 7, .pga = 42, .pad = 170, .dac = 0, .bb_mult = 64, },
2038 { .gm = 7, .pga = 42, .pad = 166, .dac = 0, .bb_mult = 64, },
2039 { .gm = 7, .pga = 40, .pad = 166, .dac = 0, .bb_mult = 64, },
2040 { .gm = 7, .pga = 40, .pad = 161, .dac = 0, .bb_mult = 64, },
2041 { .gm = 7, .pga = 39, .pad = 161, .dac = 0, .bb_mult = 64, },
2042 { .gm = 7, .pga = 39, .pad = 156, .dac = 0, .bb_mult = 64, },
2043 { .gm = 7, .pga = 38, .pad = 156, .dac = 0, .bb_mult = 64, },
2044 { .gm = 7, .pga = 38, .pad = 152, .dac = 0, .bb_mult = 64, },
2045 { .gm = 7, .pga = 37, .pad = 152, .dac = 0, .bb_mult = 64, },
2046 { .gm = 7, .pga = 37, .pad = 148, .dac = 0, .bb_mult = 64, },
2047 { .gm = 7, .pga = 36, .pad = 148, .dac = 0, .bb_mult = 64, },
2048 { .gm = 7, .pga = 36, .pad = 143, .dac = 0, .bb_mult = 64, },
2049 { .gm = 7, .pga = 35, .pad = 143, .dac = 0, .bb_mult = 64, },
2050 { .gm = 7, .pga = 35, .pad = 139, .dac = 0, .bb_mult = 64, },
2051 { .gm = 7, .pga = 34, .pad = 139, .dac = 0, .bb_mult = 64, },
2052 { .gm = 7, .pga = 34, .pad = 135, .dac = 0, .bb_mult = 64, },
2053 { .gm = 7, .pga = 33, .pad = 135, .dac = 0, .bb_mult = 64, },
2054 { .gm = 7, .pga = 33, .pad = 132, .dac = 0, .bb_mult = 64, },
2055 { .gm = 7, .pga = 32, .pad = 132, .dac = 0, .bb_mult = 64, },
2056 { .gm = 7, .pga = 32, .pad = 128, .dac = 0, .bb_mult = 64, },
2057 { .gm = 7, .pga = 31, .pad = 128, .dac = 0, .bb_mult = 64, },
2058 { .gm = 7, .pga = 31, .pad = 124, .dac = 0, .bb_mult = 64, },
2059 { .gm = 7, .pga = 30, .pad = 124, .dac = 0, .bb_mult = 64, },
2060 { .gm = 7, .pga = 30, .pad = 121, .dac = 0, .bb_mult = 64, },
2061 { .gm = 7, .pga = 29, .pad = 121, .dac = 0, .bb_mult = 64, },
2062 { .gm = 7, .pga = 29, .pad = 117, .dac = 0, .bb_mult = 64, },
2063 { .gm = 7, .pga = 29, .pad = 117, .dac = 0, .bb_mult = 64, },
2064 { .gm = 7, .pga = 29, .pad = 114, .dac = 0, .bb_mult = 64, },
2065 { .gm = 7, .pga = 28, .pad = 114, .dac = 0, .bb_mult = 64, },
2066 { .gm = 7, .pga = 28, .pad = 111, .dac = 0, .bb_mult = 64, },
2067 { .gm = 7, .pga = 27, .pad = 111, .dac = 0, .bb_mult = 64, },
2068 { .gm = 7, .pga = 27, .pad = 108, .dac = 0, .bb_mult = 64, },
2069 { .gm = 7, .pga = 26, .pad = 108, .dac = 0, .bb_mult = 64, },
2070 { .gm = 7, .pga = 26, .pad = 104, .dac = 0, .bb_mult = 64, },
2071 { .gm = 7, .pga = 25, .pad = 104, .dac = 0, .bb_mult = 64, },
2072 { .gm = 7, .pga = 25, .pad = 102, .dac = 0, .bb_mult = 64, },
2073 { .gm = 7, .pga = 25, .pad = 102, .dac = 0, .bb_mult = 64, },
2074 { .gm = 7, .pga = 25, .pad = 99, .dac = 0, .bb_mult = 64, },
2075 { .gm = 7, .pga = 24, .pad = 99, .dac = 0, .bb_mult = 64, },
2076 { .gm = 7, .pga = 24, .pad = 96, .dac = 0, .bb_mult = 64, },
2077 { .gm = 7, .pga = 23, .pad = 96, .dac = 0, .bb_mult = 64, },
2078 { .gm = 7, .pga = 23, .pad = 93, .dac = 0, .bb_mult = 64, },
2079 { .gm = 7, .pga = 23, .pad = 93, .dac = 0, .bb_mult = 64, },
2080 { .gm = 7, .pga = 23, .pad = 90, .dac = 0, .bb_mult = 64, },
2081 { .gm = 7, .pga = 22, .pad = 90, .dac = 0, .bb_mult = 64, },
2082 { .gm = 7, .pga = 22, .pad = 88, .dac = 0, .bb_mult = 64, },
2083 { .gm = 7, .pga = 21, .pad = 88, .dac = 0, .bb_mult = 64, },
2084 { .gm = 7, .pga = 21, .pad = 85, .dac = 0, .bb_mult = 64, },
2085 { .gm = 7, .pga = 21, .pad = 85, .dac = 0, .bb_mult = 64, },
2086 { .gm = 7, .pga = 21, .pad = 83, .dac = 0, .bb_mult = 64, },
2087 { .gm = 7, .pga = 20, .pad = 83, .dac = 0, .bb_mult = 64, },
2088 { .gm = 7, .pga = 20, .pad = 81, .dac = 0, .bb_mult = 64, },
2089 { .gm = 7, .pga = 20, .pad = 81, .dac = 0, .bb_mult = 64, },
2090 { .gm = 7, .pga = 20, .pad = 78, .dac = 0, .bb_mult = 64, },
2091 { .gm = 7, .pga = 19, .pad = 78, .dac = 0, .bb_mult = 64, },
2092 { .gm = 7, .pga = 19, .pad = 76, .dac = 0, .bb_mult = 64, },
2093 { .gm = 7, .pga = 19, .pad = 76, .dac = 0, .bb_mult = 64, },
2094 { .gm = 7, .pga = 19, .pad = 74, .dac = 0, .bb_mult = 64, },
2095 { .gm = 7, .pga = 18, .pad = 74, .dac = 0, .bb_mult = 64, },
2096 { .gm = 7, .pga = 18, .pad = 72, .dac = 0, .bb_mult = 64, },
2097 { .gm = 7, .pga = 18, .pad = 72, .dac = 0, .bb_mult = 64, },
2098 { .gm = 7, .pga = 18, .pad = 70, .dac = 0, .bb_mult = 64, },
2099 { .gm = 7, .pga = 17, .pad = 70, .dac = 0, .bb_mult = 64, },
2100 { .gm = 7, .pga = 17, .pad = 68, .dac = 0, .bb_mult = 64, },
2101 { .gm = 7, .pga = 17, .pad = 68, .dac = 0, .bb_mult = 64, },
2102 { .gm = 7, .pga = 17, .pad = 66, .dac = 0, .bb_mult = 64, },
2103 { .gm = 7, .pga = 16, .pad = 66, .dac = 0, .bb_mult = 64, },
2104 { .gm = 7, .pga = 16, .pad = 64, .dac = 0, .bb_mult = 64, },
2105 { .gm = 7, .pga = 16, .pad = 64, .dac = 0, .bb_mult = 64, },
2106 { .gm = 7, .pga = 16, .pad = 62, .dac = 0, .bb_mult = 64, },
2107 { .gm = 7, .pga = 15, .pad = 62, .dac = 0, .bb_mult = 64, },
2108 { .gm = 7, .pga = 15, .pad = 60, .dac = 0, .bb_mult = 64, },
2109 { .gm = 7, .pga = 15, .pad = 60, .dac = 0, .bb_mult = 64, },
2110 { .gm = 7, .pga = 15, .pad = 59, .dac = 0, .bb_mult = 64, },
2111 { .gm = 7, .pga = 14, .pad = 59, .dac = 0, .bb_mult = 64, },
2112 { .gm = 7, .pga = 14, .pad = 57, .dac = 0, .bb_mult = 64, },
2113 { .gm = 7, .pga = 14, .pad = 57, .dac = 0, .bb_mult = 64, },
2114 { .gm = 7, .pga = 14, .pad = 55, .dac = 0, .bb_mult = 64, },
2115 { .gm = 7, .pga = 14, .pad = 55, .dac = 0, .bb_mult = 64, },
2116 { .gm = 7, .pga = 14, .pad = 54, .dac = 0, .bb_mult = 64, },
2117 { .gm = 7, .pga = 13, .pad = 54, .dac = 0, .bb_mult = 64, },
2118 { .gm = 7, .pga = 13, .pad = 52, .dac = 0, .bb_mult = 64, },
2119 { .gm = 7, .pga = 13, .pad = 52, .dac = 0, .bb_mult = 64, },
2120};
2121
2122static struct lpphy_tx_gain_table_entry lpphy_rev2_5ghz_tx_gain_table[] = {
2123 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 152, },
2124 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 147, },
2125 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 143, },
2126 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 139, },
2127 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 135, },
2128 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 131, },
2129 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 128, },
2130 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 124, },
2131 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 121, },
2132 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 117, },
2133 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 114, },
2134 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 111, },
2135 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 107, },
2136 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 104, },
2137 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 101, },
2138 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 99, },
2139 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 96, },
2140 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 93, },
2141 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 90, },
2142 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 88, },
2143 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 85, },
2144 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 83, },
2145 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 81, },
2146 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 78, },
2147 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 76, },
2148 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 74, },
2149 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 72, },
2150 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 70, },
2151 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 68, },
2152 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 66, },
2153 { .gm = 255, .pga = 255, .pad = 255, .dac = 0, .bb_mult = 64, },
2154 { .gm = 255, .pga = 248, .pad = 255, .dac = 0, .bb_mult = 64, },
2155 { .gm = 255, .pga = 241, .pad = 255, .dac = 0, .bb_mult = 64, },
2156 { .gm = 255, .pga = 234, .pad = 255, .dac = 0, .bb_mult = 64, },
2157 { .gm = 255, .pga = 227, .pad = 255, .dac = 0, .bb_mult = 64, },
2158 { .gm = 255, .pga = 221, .pad = 255, .dac = 0, .bb_mult = 64, },
2159 { .gm = 255, .pga = 215, .pad = 255, .dac = 0, .bb_mult = 64, },
2160 { .gm = 255, .pga = 208, .pad = 255, .dac = 0, .bb_mult = 64, },
2161 { .gm = 255, .pga = 203, .pad = 255, .dac = 0, .bb_mult = 64, },
2162 { .gm = 255, .pga = 197, .pad = 255, .dac = 0, .bb_mult = 64, },
2163 { .gm = 255, .pga = 191, .pad = 255, .dac = 0, .bb_mult = 64, },
2164 { .gm = 255, .pga = 186, .pad = 255, .dac = 0, .bb_mult = 64, },
2165 { .gm = 255, .pga = 181, .pad = 255, .dac = 0, .bb_mult = 64, },
2166 { .gm = 255, .pga = 175, .pad = 255, .dac = 0, .bb_mult = 64, },
2167 { .gm = 255, .pga = 170, .pad = 255, .dac = 0, .bb_mult = 64, },
2168 { .gm = 255, .pga = 166, .pad = 255, .dac = 0, .bb_mult = 64, },
2169 { .gm = 255, .pga = 161, .pad = 255, .dac = 0, .bb_mult = 64, },
2170 { .gm = 255, .pga = 156, .pad = 255, .dac = 0, .bb_mult = 64, },
2171 { .gm = 255, .pga = 152, .pad = 255, .dac = 0, .bb_mult = 64, },
2172 { .gm = 255, .pga = 148, .pad = 255, .dac = 0, .bb_mult = 64, },
2173 { .gm = 255, .pga = 143, .pad = 255, .dac = 0, .bb_mult = 64, },
2174 { .gm = 255, .pga = 139, .pad = 255, .dac = 0, .bb_mult = 64, },
2175 { .gm = 255, .pga = 135, .pad = 255, .dac = 0, .bb_mult = 64, },
2176 { .gm = 255, .pga = 132, .pad = 255, .dac = 0, .bb_mult = 64, },
2177 { .gm = 255, .pga = 128, .pad = 255, .dac = 0, .bb_mult = 64, },
2178 { .gm = 255, .pga = 124, .pad = 255, .dac = 0, .bb_mult = 64, },
2179 { .gm = 255, .pga = 121, .pad = 255, .dac = 0, .bb_mult = 64, },
2180 { .gm = 255, .pga = 117, .pad = 255, .dac = 0, .bb_mult = 64, },
2181 { .gm = 255, .pga = 114, .pad = 255, .dac = 0, .bb_mult = 64, },
2182 { .gm = 255, .pga = 111, .pad = 255, .dac = 0, .bb_mult = 64, },
2183 { .gm = 255, .pga = 108, .pad = 255, .dac = 0, .bb_mult = 64, },
2184 { .gm = 255, .pga = 104, .pad = 255, .dac = 0, .bb_mult = 64, },
2185 { .gm = 255, .pga = 102, .pad = 255, .dac = 0, .bb_mult = 64, },
2186 { .gm = 255, .pga = 99, .pad = 255, .dac = 0, .bb_mult = 64, },
2187 { .gm = 255, .pga = 96, .pad = 255, .dac = 0, .bb_mult = 64, },
2188 { .gm = 255, .pga = 93, .pad = 255, .dac = 0, .bb_mult = 64, },
2189 { .gm = 255, .pga = 90, .pad = 255, .dac = 0, .bb_mult = 64, },
2190 { .gm = 255, .pga = 88, .pad = 255, .dac = 0, .bb_mult = 64, },
2191 { .gm = 255, .pga = 85, .pad = 255, .dac = 0, .bb_mult = 64, },
2192 { .gm = 255, .pga = 83, .pad = 255, .dac = 0, .bb_mult = 64, },
2193 { .gm = 255, .pga = 81, .pad = 255, .dac = 0, .bb_mult = 64, },
2194 { .gm = 255, .pga = 78, .pad = 255, .dac = 0, .bb_mult = 64, },
2195 { .gm = 255, .pga = 76, .pad = 255, .dac = 0, .bb_mult = 64, },
2196 { .gm = 255, .pga = 74, .pad = 255, .dac = 0, .bb_mult = 64, },
2197 { .gm = 255, .pga = 72, .pad = 255, .dac = 0, .bb_mult = 64, },
2198 { .gm = 255, .pga = 70, .pad = 255, .dac = 0, .bb_mult = 64, },
2199 { .gm = 255, .pga = 68, .pad = 255, .dac = 0, .bb_mult = 64, },
2200 { .gm = 255, .pga = 66, .pad = 255, .dac = 0, .bb_mult = 64, },
2201 { .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
2202 { .gm = 255, .pga = 64, .pad = 255, .dac = 0, .bb_mult = 64, },
2203 { .gm = 255, .pga = 62, .pad = 255, .dac = 0, .bb_mult = 64, },
2204 { .gm = 255, .pga = 62, .pad = 248, .dac = 0, .bb_mult = 64, },
2205 { .gm = 255, .pga = 60, .pad = 248, .dac = 0, .bb_mult = 64, },
2206 { .gm = 255, .pga = 60, .pad = 241, .dac = 0, .bb_mult = 64, },
2207 { .gm = 255, .pga = 59, .pad = 241, .dac = 0, .bb_mult = 64, },
2208 { .gm = 255, .pga = 59, .pad = 234, .dac = 0, .bb_mult = 64, },
2209 { .gm = 255, .pga = 57, .pad = 234, .dac = 0, .bb_mult = 64, },
2210 { .gm = 255, .pga = 57, .pad = 227, .dac = 0, .bb_mult = 64, },
2211 { .gm = 255, .pga = 55, .pad = 227, .dac = 0, .bb_mult = 64, },
2212 { .gm = 255, .pga = 55, .pad = 221, .dac = 0, .bb_mult = 64, },
2213 { .gm = 255, .pga = 54, .pad = 221, .dac = 0, .bb_mult = 64, },
2214 { .gm = 255, .pga = 54, .pad = 215, .dac = 0, .bb_mult = 64, },
2215 { .gm = 255, .pga = 52, .pad = 215, .dac = 0, .bb_mult = 64, },
2216 { .gm = 255, .pga = 52, .pad = 208, .dac = 0, .bb_mult = 64, },
2217 { .gm = 255, .pga = 51, .pad = 208, .dac = 0, .bb_mult = 64, },
2218 { .gm = 255, .pga = 51, .pad = 203, .dac = 0, .bb_mult = 64, },
2219 { .gm = 255, .pga = 49, .pad = 203, .dac = 0, .bb_mult = 64, },
2220 { .gm = 255, .pga = 49, .pad = 197, .dac = 0, .bb_mult = 64, },
2221 { .gm = 255, .pga = 48, .pad = 197, .dac = 0, .bb_mult = 64, },
2222 { .gm = 255, .pga = 48, .pad = 191, .dac = 0, .bb_mult = 64, },
2223 { .gm = 255, .pga = 47, .pad = 191, .dac = 0, .bb_mult = 64, },
2224 { .gm = 255, .pga = 47, .pad = 186, .dac = 0, .bb_mult = 64, },
2225 { .gm = 255, .pga = 45, .pad = 186, .dac = 0, .bb_mult = 64, },
2226 { .gm = 255, .pga = 45, .pad = 181, .dac = 0, .bb_mult = 64, },
2227 { .gm = 255, .pga = 44, .pad = 181, .dac = 0, .bb_mult = 64, },
2228 { .gm = 255, .pga = 44, .pad = 175, .dac = 0, .bb_mult = 64, },
2229 { .gm = 255, .pga = 43, .pad = 175, .dac = 0, .bb_mult = 64, },
2230 { .gm = 255, .pga = 43, .pad = 170, .dac = 0, .bb_mult = 64, },
2231 { .gm = 255, .pga = 42, .pad = 170, .dac = 0, .bb_mult = 64, },
2232 { .gm = 255, .pga = 42, .pad = 166, .dac = 0, .bb_mult = 64, },
2233 { .gm = 255, .pga = 40, .pad = 166, .dac = 0, .bb_mult = 64, },
2234 { .gm = 255, .pga = 40, .pad = 161, .dac = 0, .bb_mult = 64, },
2235 { .gm = 255, .pga = 39, .pad = 161, .dac = 0, .bb_mult = 64, },
2236 { .gm = 255, .pga = 39, .pad = 156, .dac = 0, .bb_mult = 64, },
2237 { .gm = 255, .pga = 38, .pad = 156, .dac = 0, .bb_mult = 64, },
2238 { .gm = 255, .pga = 38, .pad = 152, .dac = 0, .bb_mult = 64, },
2239 { .gm = 255, .pga = 37, .pad = 152, .dac = 0, .bb_mult = 64, },
2240 { .gm = 255, .pga = 37, .pad = 148, .dac = 0, .bb_mult = 64, },
2241 { .gm = 255, .pga = 36, .pad = 148, .dac = 0, .bb_mult = 64, },
2242 { .gm = 255, .pga = 36, .pad = 143, .dac = 0, .bb_mult = 64, },
2243 { .gm = 255, .pga = 35, .pad = 143, .dac = 0, .bb_mult = 64, },
2244 { .gm = 255, .pga = 35, .pad = 139, .dac = 0, .bb_mult = 64, },
2245 { .gm = 255, .pga = 34, .pad = 139, .dac = 0, .bb_mult = 64, },
2246 { .gm = 255, .pga = 34, .pad = 135, .dac = 0, .bb_mult = 64, },
2247 { .gm = 255, .pga = 33, .pad = 135, .dac = 0, .bb_mult = 64, },
2248 { .gm = 255, .pga = 33, .pad = 132, .dac = 0, .bb_mult = 64, },
2249 { .gm = 255, .pga = 32, .pad = 132, .dac = 0, .bb_mult = 64, },
2250 { .gm = 255, .pga = 32, .pad = 128, .dac = 0, .bb_mult = 64, },
2251};
2252
2253void lpphy_rev0_1_table_init(struct b43_wldev *dev)
2254{
2255 B43_WARN_ON(dev->phy.rev >= 2);
2256
2257 b43_lptab_write_bulk(dev, B43_LPTAB8(2, 0),
2258 ARRAY_SIZE(lpphy_min_sig_sq_table), lpphy_min_sig_sq_table);
2259 b43_lptab_write_bulk(dev, B43_LPTAB16(1, 0),
2260 ARRAY_SIZE(lpphy_rev01_noise_scale_table), lpphy_rev01_noise_scale_table);
2261 b43_lptab_write_bulk(dev, B43_LPTAB16(14, 0),
2262 ARRAY_SIZE(lpphy_crs_gain_nft_table), lpphy_crs_gain_nft_table);
2263 b43_lptab_write_bulk(dev, B43_LPTAB16(8, 0),
2264 ARRAY_SIZE(lpphy_rev01_filter_control_table), lpphy_rev01_filter_control_table);
2265 b43_lptab_write_bulk(dev, B43_LPTAB32(9, 0),
2266 ARRAY_SIZE(lpphy_rev01_ps_control_table), lpphy_rev01_ps_control_table);
2267 b43_lptab_write_bulk(dev, B43_LPTAB8(6, 0),
2268 ARRAY_SIZE(lpphy_pll_fraction_table), lpphy_pll_fraction_table);
2269 b43_lptab_write_bulk(dev, B43_LPTAB16(0, 0),
2270 ARRAY_SIZE(lpphy_iq_local_table), lpphy_iq_local_table);
2271 b43_lptab_write_bulk(dev, B43_LPTAB16(13, 0),
2272 ARRAY_SIZE(lpphy_ofdm_cck_gain_table), lpphy_ofdm_cck_gain_table);
2273 b43_lptab_write_bulk(dev, B43_LPTAB16(12, 0),
2274 ARRAY_SIZE(lpphy_ofdm_cck_gain_table), lpphy_ofdm_cck_gain_table);
2275 b43_lptab_write_bulk(dev, B43_LPTAB16(15, 0),
2276 ARRAY_SIZE(lpphy_gain_delta_table), lpphy_gain_delta_table);
2277 b43_lptab_write_bulk(dev, B43_LPTAB32(10, 0),
2278 ARRAY_SIZE(lpphy_tx_power_control_table), lpphy_tx_power_control_table);
2279}
2280
2281void lpphy_rev2plus_table_init(struct b43_wldev *dev)
2282{
2283 struct ssb_bus *bus = dev->dev->bus;
2284 int i;
2285
2286 B43_WARN_ON(dev->phy.rev < 2);
2287
2288 /*
2289 * FIXME This code follows the specs, but it looks wrong:
2290 * In each pass, it writes 4 bytes to an offset in table ID 7,
2291 * then increments the offset by 1 for the next pass. This results
2292 * in the first 3 bytes of each pass except the first one getting
2293 * written to a location that has already been zeroed in the previous
2294 * pass.
2295 * This is what the vendor driver does, but it still looks suspicious.
2296 *
2297 * This should probably suffice:
2298 *
2299 * for (i = 0; i < 704; i+=4)
2300 * b43_lptab_write(dev, B43_LPTAB32(7, i), 0)
2301 *
2302 * This should be tested once the code is functional.
2303 */
2304 for (i = 0; i < 704; i++)
2305 b43_lptab_write(dev, B43_LPTAB32(7, i), 0);
2306
2307 b43_lptab_write_bulk(dev, B43_LPTAB8(2, 0),
2308 ARRAY_SIZE(lpphy_min_sig_sq_table), lpphy_min_sig_sq_table);
2309 b43_lptab_write_bulk(dev, B43_LPTAB16(1, 0),
2310 ARRAY_SIZE(lpphy_rev2plus_noise_scale_table), lpphy_rev2plus_noise_scale_table);
2311 b43_lptab_write_bulk(dev, B43_LPTAB32(11, 0),
2312 ARRAY_SIZE(lpphy_rev2plus_filter_control_table), lpphy_rev2plus_filter_control_table);
2313 b43_lptab_write_bulk(dev, B43_LPTAB32(12, 0),
2314 ARRAY_SIZE(lpphy_rev2plus_ps_control_table), lpphy_rev2plus_ps_control_table);
2315 b43_lptab_write_bulk(dev, B43_LPTAB32(13, 0),
2316 ARRAY_SIZE(lpphy_gain_idx_table), lpphy_gain_idx_table);
2317 b43_lptab_write_bulk(dev, B43_LPTAB16(14, 0),
2318 ARRAY_SIZE(lpphy_aux_gain_idx_table), lpphy_aux_gain_idx_table);
2319 b43_lptab_write_bulk(dev, B43_LPTAB16(15, 0),
2320 ARRAY_SIZE(lpphy_sw_control_table), lpphy_sw_control_table);
2321 b43_lptab_write_bulk(dev, B43_LPTAB8(16, 0),
2322 ARRAY_SIZE(lpphy_hf_table), lpphy_hf_table);
2323 b43_lptab_write_bulk(dev, B43_LPTAB32(17, 0),
2324 ARRAY_SIZE(lpphy_gain_value_table), lpphy_gain_value_table);
2325 b43_lptab_write_bulk(dev, B43_LPTAB16(18, 0),
2326 ARRAY_SIZE(lpphy_gain_table), lpphy_gain_table);
2327 b43_lptab_write_bulk(dev, B43_LPTAB8(6, 0),
2328 ARRAY_SIZE(lpphy_pll_fraction_table), lpphy_pll_fraction_table);
2329 b43_lptab_write_bulk(dev, B43_LPTAB16(0, 0),
2330 ARRAY_SIZE(lpphy_iq_local_table), lpphy_iq_local_table);
2331 b43_lptab_write_bulk(dev, B43_LPTAB32(9, 0),
2332 ARRAY_SIZE(lpphy_papd_eps_table), lpphy_papd_eps_table);
2333 b43_lptab_write_bulk(dev, B43_LPTAB32(10, 0),
2334 ARRAY_SIZE(lpphy_papd_mult_table), lpphy_papd_mult_table);
2335
2336 if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
2337 b43_lptab_write_bulk(dev, B43_LPTAB32(13, 0),
2338 ARRAY_SIZE(lpphy_a0_gain_idx_table), lpphy_a0_gain_idx_table);
2339 b43_lptab_write_bulk(dev, B43_LPTAB16(14, 0),
2340 ARRAY_SIZE(lpphy_a0_aux_gain_idx_table), lpphy_a0_aux_gain_idx_table);
2341 b43_lptab_write_bulk(dev, B43_LPTAB32(17, 0),
2342 ARRAY_SIZE(lpphy_a0_gain_value_table), lpphy_a0_gain_value_table);
2343 b43_lptab_write_bulk(dev, B43_LPTAB16(18, 0),
2344 ARRAY_SIZE(lpphy_a0_gain_table), lpphy_a0_gain_table);
2345 }
2346}
2347
2348
2349static void lpphy_rev0_1_write_gain_table(struct b43_wldev *dev,
2350 struct lpphy_tx_gain_table_entry *table)
2351{
2352 int i;
2353 u32 tmp;
2354
2355 B43_WARN_ON(dev->phy.rev >= 2);
2356
2357 for (i = 0; i < 128; i++) {
2358 tmp = table[i].pad << 11;
2359 tmp |= table[i].pga << 7;
2360 tmp |= table[i].gm << 4;
2361 tmp |= table[i].dac;
2362 b43_lptab_write(dev, B43_LPTAB32(10, 0xC0 + i), tmp);
2363 tmp = table[i].bb_mult << 20;
2364 b43_lptab_write(dev, B43_LPTAB32(10, 0x140 + i), tmp);
2365 }
2366}
2367
2368static void lpphy_rev2plus_write_gain_table(struct b43_wldev *dev,
2369 struct lpphy_tx_gain_table_entry *table)
2370{
2371 int i;
2372 u32 tmp;
2373
2374 B43_WARN_ON(dev->phy.rev < 2);
2375
2376 for (i = 0; i < 128; i++) {
2377 tmp = table[i].pad << 16;
2378 tmp |= table[i].pga << 8;
2379 tmp |= table[i].gm;
2380 tmp |= 0x7f000000;
2381 b43_lptab_write(dev, B43_LPTAB32(7, 0xC0 + i), tmp);
2382 tmp = table[i].bb_mult << 20;
2383 tmp |= table[i].dac << 28;
2384 b43_lptab_write(dev, B43_LPTAB32(7, 0x140 + i), tmp);
2385 }
2386}
2387
2388void lpphy_init_tx_gain_table(struct b43_wldev *dev)
2389{
2390 struct ssb_bus *bus = dev->dev->bus;
2391
2392 switch (dev->phy.rev) {
2393 case 0:
2394 if ((bus->sprom.boardflags_hi & B43_BFH_NOPA) ||
2395 (bus->sprom.boardflags_lo & B43_BFL_HGPA))
2396 lpphy_rev0_1_write_gain_table(dev,
2397 lpphy_rev0_nopa_tx_gain_table);
2398 else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2399 lpphy_rev0_1_write_gain_table(dev,
2400 lpphy_rev0_2ghz_tx_gain_table);
2401 else
2402 lpphy_rev0_1_write_gain_table(dev,
2403 lpphy_rev0_5ghz_tx_gain_table);
2404 break;
2405 case 1:
2406 if ((bus->sprom.boardflags_hi & B43_BFH_NOPA) ||
2407 (bus->sprom.boardflags_lo & B43_BFL_HGPA))
2408 lpphy_rev0_1_write_gain_table(dev,
2409 lpphy_rev1_nopa_tx_gain_table);
2410 else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2411 lpphy_rev0_1_write_gain_table(dev,
2412 lpphy_rev1_2ghz_tx_gain_table);
2413 else
2414 lpphy_rev0_1_write_gain_table(dev,
2415 lpphy_rev1_5ghz_tx_gain_table);
2416 break;
2417 default:
2418 if (bus->sprom.boardflags_hi & B43_BFH_NOPA)
2419 lpphy_rev2plus_write_gain_table(dev,
2420 lpphy_rev2_nopa_tx_gain_table);
2421 else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2422 lpphy_rev2plus_write_gain_table(dev,
2423 lpphy_rev2_2ghz_tx_gain_table);
2424 else
2425 lpphy_rev2plus_write_gain_table(dev,
2426 lpphy_rev2_5ghz_tx_gain_table);
2427 }
2428}
diff --git a/drivers/net/wireless/b43/tables_lpphy.h b/drivers/net/wireless/b43/tables_lpphy.h
index 52ce32ff43af..b5024b6edab3 100644
--- a/drivers/net/wireless/b43/tables_lpphy.h
+++ b/drivers/net/wireless/b43/tables_lpphy.h
@@ -28,5 +28,8 @@ void b43_lptab_write_bulk(struct b43_wldev *dev, u32 offset,
28void b2062_upload_init_table(struct b43_wldev *dev); 28void b2062_upload_init_table(struct b43_wldev *dev);
29void b2063_upload_init_table(struct b43_wldev *dev); 29void b2063_upload_init_table(struct b43_wldev *dev);
30 30
31void lpphy_rev0_1_table_init(struct b43_wldev *dev);
32void lpphy_rev2plus_table_init(struct b43_wldev *dev);
33void lpphy_init_tx_gain_table(struct b43_wldev *dev);
31 34
32#endif /* B43_TABLES_LPPHY_H_ */ 35#endif /* B43_TABLES_LPPHY_H_ */