aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/tables_nphy.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-12 06:34:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-15 16:00:16 -0400
commitc9ff78b4ff6aee37155bf8bc1df3d6156a46656d (patch)
tree04e3d2ddb847afdb25965cf6d22c23013d655e4a /drivers/net/wireless/b43/tables_nphy.c
parentc3da74bbbb8b230ad8bb84ca324c4e07607c9a7f (diff)
b43: N-PHY: add missing TX gain table for radio 0x2057 rev 5
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.c58
1 files changed, 50 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index 3a5cd902ff1f..b39a8dd375e9 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -2692,6 +2692,42 @@ static const u32 b43_ntab_tx_gain_ipa_rev6_2g[] = {
2692 0x00f70028, 0x00f70027, 0x00f70026, 0x00f70025, 2692 0x00f70028, 0x00f70027, 0x00f70026, 0x00f70025,
2693}; 2693};
2694 2694
2695/* Copied from brcmsmac (5.75.11): nphy_tpc_txgain_ipa_2g_2057rev5 */
2696static const u32 b43_ntab_tx_gain_ipa_2057_rev5_2g[] = {
2697 0x30ff0031, 0x30e70031, 0x30e7002e, 0x30cf002e,
2698 0x30bf002e, 0x30af002e, 0x309f002f, 0x307f0033,
2699 0x307f0031, 0x307f002e, 0x3077002e, 0x306f002e,
2700 0x3067002e, 0x305f002f, 0x30570030, 0x3057002d,
2701 0x304f002e, 0x30470031, 0x3047002e, 0x3047002c,
2702 0x30470029, 0x303f002c, 0x303f0029, 0x3037002d,
2703 0x3037002a, 0x30370028, 0x302f002c, 0x302f002a,
2704 0x302f0028, 0x302f0026, 0x3027002c, 0x30270029,
2705 0x30270027, 0x30270025, 0x30270023, 0x301f002c,
2706 0x301f002a, 0x301f0028, 0x301f0025, 0x301f0024,
2707 0x301f0022, 0x301f001f, 0x3017002d, 0x3017002b,
2708 0x30170028, 0x30170026, 0x30170024, 0x30170022,
2709 0x30170020, 0x3017001e, 0x3017001d, 0x3017001b,
2710 0x3017001a, 0x30170018, 0x30170017, 0x30170015,
2711 0x300f002c, 0x300f0029, 0x300f0027, 0x300f0024,
2712 0x300f0022, 0x300f0021, 0x300f001f, 0x300f001d,
2713 0x300f001b, 0x300f001a, 0x300f0018, 0x300f0017,
2714 0x300f0016, 0x300f0015, 0x300f0115, 0x300f0215,
2715 0x300f0315, 0x300f0415, 0x300f0515, 0x300f0615,
2716 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2717 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2718 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2719 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2720 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2721 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2722 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2723 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2724 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2725 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2726 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2727 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2728 0x300f0715, 0x300f0715, 0x300f0715, 0x300f0715,
2729};
2730
2695/* Extracted from MMIO dump of 6.30.223.141 */ 2731/* Extracted from MMIO dump of 6.30.223.141 */
2696static const u32 b43_ntab_tx_gain_ipa_2057_rev9_2g[] = { 2732static const u32 b43_ntab_tx_gain_ipa_2057_rev9_2g[] = {
2697 0x60ff0031, 0x60e7002c, 0x60cf002a, 0x60c70029, 2733 0x60ff0031, 0x60e7002c, 0x60cf002a, 0x60c70029,
@@ -3550,6 +3586,11 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev)
3550 case 16: 3586 case 16:
3551 if (phy->radio_rev == 9) 3587 if (phy->radio_rev == 9)
3552 return b43_ntab_tx_gain_ipa_2057_rev9_2g; 3588 return b43_ntab_tx_gain_ipa_2057_rev9_2g;
3589 break;
3590 case 8:
3591 if (phy->radio_rev == 5)
3592 return b43_ntab_tx_gain_ipa_2057_rev5_2g;
3593 break;
3553 case 6: 3594 case 6:
3554 if (dev->dev->chip_id == BCMA_CHIP_ID_BCM47162) 3595 if (dev->dev->chip_id == BCMA_CHIP_ID_BCM47162)
3555 return b43_ntab_tx_gain_ipa_rev5_2g; 3596 return b43_ntab_tx_gain_ipa_rev5_2g;
@@ -3559,23 +3600,24 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev)
3559 case 4: 3600 case 4:
3560 case 3: 3601 case 3:
3561 return b43_ntab_tx_gain_ipa_rev3_2g; 3602 return b43_ntab_tx_gain_ipa_rev3_2g;
3562 default:
3563 b43err(dev->wl,
3564 "No 2GHz IPA gain table available for this device\n");
3565 return NULL;
3566 } 3603 }
3604
3605 b43err(dev->wl,
3606 "No 2GHz IPA gain table available for this device\n");
3607 return NULL;
3567 } else { 3608 } else {
3568 switch (phy->rev) { 3609 switch (phy->rev) {
3569 case 16: 3610 case 16:
3570 if (phy->radio_rev == 9) 3611 if (phy->radio_rev == 9)
3571 return b43_ntab_tx_gain_ipa_2057_rev9_5g; 3612 return b43_ntab_tx_gain_ipa_2057_rev9_5g;
3613 break;
3572 case 3 ... 6: 3614 case 3 ... 6:
3573 return b43_ntab_tx_gain_ipa_rev3_5g; 3615 return b43_ntab_tx_gain_ipa_rev3_5g;
3574 default:
3575 b43err(dev->wl,
3576 "No 5GHz IPA gain table available for this device\n");
3577 return NULL;
3578 } 3616 }
3617
3618 b43err(dev->wl,
3619 "No 5GHz IPA gain table available for this device\n");
3620 return NULL;
3579 } 3621 }
3580} 3622}
3581 3623