aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/tables_nphy.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-02 16:42:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-07 16:32:15 -0400
commitc4e197195a0c38b2c0928a03ed1de1a4a32f52c3 (patch)
treeacb94db8eea7af53a563d4b24612ff442b0cff6d /drivers/net/wireless/b43/tables_nphy.c
parent7ef5cd240a133efd506c2e80c060b89406700bf3 (diff)
b43: N-PHY: add TX gains tables for radio 0x2057 rev 9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/tables_nphy.c')
-rw-r--r--drivers/net/wireless/b43/tables_nphy.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index 3d6dda7c4fe8..b28dce950e1f 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -2622,6 +2622,42 @@ static const u32 b43_ntab_tx_gain_ipa_rev6_2g[] = {
2622 0x00f70028, 0x00f70027, 0x00f70026, 0x00f70025, 2622 0x00f70028, 0x00f70027, 0x00f70026, 0x00f70025,
2623}; 2623};
2624 2624
2625/* Extracted from MMIO dump of 6.30.223.141 */
2626static const u32 b43_ntab_tx_gain_ipa_2057_rev9_2g[] = {
2627 0x60ff0031, 0x60e7002c, 0x60cf002a, 0x60c70029,
2628 0x60b70029, 0x60a70029, 0x609f002a, 0x6097002b,
2629 0x6087002e, 0x60770031, 0x606f0032, 0x60670034,
2630 0x60670031, 0x605f0033, 0x605f0031, 0x60570033,
2631 0x60570030, 0x6057002d, 0x6057002b, 0x604f002d,
2632 0x604f002b, 0x604f0029, 0x604f0026, 0x60470029,
2633 0x60470027, 0x603f0029, 0x603f0027, 0x603f0025,
2634 0x60370029, 0x60370027, 0x60370024, 0x602f002a,
2635 0x602f0028, 0x602f0026, 0x602f0024, 0x6027002a,
2636 0x60270028, 0x60270026, 0x60270024, 0x60270022,
2637 0x601f002b, 0x601f0029, 0x601f0027, 0x601f0024,
2638 0x601f0022, 0x601f0020, 0x601f001f, 0x601f001d,
2639 0x60170029, 0x60170027, 0x60170025, 0x60170023,
2640 0x60170021, 0x6017001f, 0x6017001d, 0x6017001c,
2641 0x6017001a, 0x60170018, 0x60170018, 0x60170016,
2642 0x60170015, 0x600f0029, 0x600f0027, 0x600f0025,
2643 0x600f0023, 0x600f0021, 0x600f001f, 0x600f001d,
2644 0x600f001c, 0x600f001a, 0x600f0019, 0x600f0018,
2645 0x600f0016, 0x600f0015, 0x600f0115, 0x600f0215,
2646 0x600f0315, 0x600f0415, 0x600f0515, 0x600f0615,
2647 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2648 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2649 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2650 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2651 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2652 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2653 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2654 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2655 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2656 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2657 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2658 0x600f0715, 0x600f0715, 0x600f0715, 0x600f0715,
2659};
2660
2625/* IPA 2 5Hz */ 2661/* IPA 2 5Hz */
2626 2662
2627static const u32 b43_ntab_tx_gain_ipa_rev3_5g[] = { 2663static const u32 b43_ntab_tx_gain_ipa_rev3_5g[] = {
@@ -2659,6 +2695,42 @@ static const u32 b43_ntab_tx_gain_ipa_rev3_5g[] = {
2659 0x70f70021, 0x70f70020, 0x70f70020, 0x70f7001f, 2695 0x70f70021, 0x70f70020, 0x70f70020, 0x70f7001f,
2660}; 2696};
2661 2697
2698/* Extracted from MMIO dump of 6.30.223.141 */
2699static const u32 b43_ntab_tx_gain_ipa_2057_rev9_5g[] = {
2700 0x7f7f0053, 0x7f7f004b, 0x7f7f0044, 0x7f7f003f,
2701 0x7f7f0039, 0x7f7f0035, 0x7f7f0032, 0x7f7f0030,
2702 0x7f7f002d, 0x7e7f0030, 0x7e7f002d, 0x7d7f0032,
2703 0x7d7f002f, 0x7d7f002c, 0x7c7f0032, 0x7c7f0030,
2704 0x7c7f002d, 0x7b7f0030, 0x7b7f002e, 0x7b7f002b,
2705 0x7a7f0032, 0x7a7f0030, 0x7a7f002d, 0x7a7f002b,
2706 0x797f0030, 0x797f002e, 0x797f002b, 0x797f0029,
2707 0x787f0030, 0x787f002d, 0x787f002b, 0x777f0032,
2708 0x777f0030, 0x777f002d, 0x777f002b, 0x767f0031,
2709 0x767f002f, 0x767f002c, 0x767f002a, 0x757f0031,
2710 0x757f002f, 0x757f002c, 0x757f002a, 0x747f0030,
2711 0x747f002d, 0x747f002b, 0x737f0032, 0x737f002f,
2712 0x737f002c, 0x737f002a, 0x727f0030, 0x727f002d,
2713 0x727f002b, 0x727f0029, 0x717f0030, 0x717f002d,
2714 0x717f002b, 0x707f0031, 0x707f002f, 0x707f002c,
2715 0x707f002a, 0x707f0027, 0x707f0025, 0x707f0023,
2716 0x707f0021, 0x707f001f, 0x707f001d, 0x707f001c,
2717 0x707f001a, 0x707f0019, 0x707f0017, 0x707f0016,
2718 0x707f0015, 0x707f0014, 0x707f0012, 0x707f0012,
2719 0x707f0011, 0x707f0010, 0x707f000f, 0x707f000e,
2720 0x707f000d, 0x707f000d, 0x707f000c, 0x707f000b,
2721 0x707f000a, 0x707f000a, 0x707f0009, 0x707f0008,
2722 0x707f0008, 0x707f0008, 0x707f0008, 0x707f0007,
2723 0x707f0007, 0x707f0006, 0x707f0006, 0x707f0006,
2724 0x707f0005, 0x707f0005, 0x707f0005, 0x707f0004,
2725 0x707f0004, 0x707f0004, 0x707f0003, 0x707f0003,
2726 0x707f0003, 0x707f0003, 0x707f0003, 0x707f0003,
2727 0x707f0003, 0x707f0003, 0x707f0003, 0x707f0003,
2728 0x707f0002, 0x707f0002, 0x707f0002, 0x707f0002,
2729 0x707f0002, 0x707f0002, 0x707f0002, 0x707f0002,
2730 0x707f0002, 0x707f0001, 0x707f0001, 0x707f0001,
2731 0x707f0001, 0x707f0001, 0x707f0001, 0x707f0001,
2732};
2733
2662const s8 b43_ntab_papd_pga_gain_delta_ipa_2g[] = { 2734const s8 b43_ntab_papd_pga_gain_delta_ipa_2g[] = {
2663 -114, -108, -98, -91, -84, -78, -70, -62, 2735 -114, -108, -98, -91, -84, -78, -70, -62,
2664 -54, -46, -39, -31, -23, -15, -8, 0 2736 -54, -46, -39, -31, -23, -15, -8, 0
@@ -3405,6 +3477,9 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev)
3405 3477
3406 if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { 3478 if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3407 switch (phy->rev) { 3479 switch (phy->rev) {
3480 case 16:
3481 if (phy->radio_rev == 9)
3482 return b43_ntab_tx_gain_ipa_2057_rev9_2g;
3408 case 6: 3483 case 6:
3409 if (dev->dev->chip_id == BCMA_CHIP_ID_BCM47162) 3484 if (dev->dev->chip_id == BCMA_CHIP_ID_BCM47162)
3410 return b43_ntab_tx_gain_ipa_rev5_2g; 3485 return b43_ntab_tx_gain_ipa_rev5_2g;
@@ -3421,6 +3496,9 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev)
3421 } 3496 }
3422 } else { 3497 } else {
3423 switch (phy->rev) { 3498 switch (phy->rev) {
3499 case 16:
3500 if (phy->radio_rev == 9)
3501 return b43_ntab_tx_gain_ipa_2057_rev9_5g;
3424 case 3 ... 6: 3502 case 3 ... 6:
3425 return b43_ntab_tx_gain_ipa_rev3_5g; 3503 return b43_ntab_tx_gain_ipa_rev3_5g;
3426 default: 3504 default: