diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-07-19 06:52:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-22 13:53:18 -0400 |
commit | 5af976295eab35b3bb4ad1fc9ed24b2d12930f9a (patch) | |
tree | 25f01ed4e788d669c2fa6d727bf46260ff8be8ad /drivers | |
parent | 8b343c3d6b42a649c6f970cad503367896276b9d (diff) |
b43: N-PHY: final fixes to rev7+ workarounds
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 1052540c97f8..11d754360d71 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -2729,6 +2729,8 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
2729 | 2729 | ||
2730 | u16 bias, conv, filt; | 2730 | u16 bias, conv, filt; |
2731 | 2731 | ||
2732 | u32 noise_tbl[2]; | ||
2733 | |||
2732 | u32 tmp32; | 2734 | u32 tmp32; |
2733 | u8 core; | 2735 | u8 core; |
2734 | 2736 | ||
@@ -2955,9 +2957,10 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
2955 | b43_ntab_write(dev, B43_NTAB16(7, 0x159 + core * 16), | 2957 | b43_ntab_write(dev, B43_NTAB16(7, 0x159 + core * 16), |
2956 | rx2tx_lut_40_11n[core]); | 2958 | rx2tx_lut_40_11n[core]); |
2957 | } | 2959 | } |
2958 | b43_nphy_rf_ctl_override_rev7(dev, 16, 1, 3, false, 2); | ||
2959 | } | 2960 | } |
2961 | |||
2960 | b43_phy_write(dev, 0x32F, 0x3); | 2962 | b43_phy_write(dev, 0x32F, 0x3); |
2963 | |||
2961 | if (phy->radio_rev == 4 || phy->radio_rev == 6) | 2964 | if (phy->radio_rev == 4 || phy->radio_rev == 6) |
2962 | b43_nphy_rf_ctl_override_rev7(dev, 4, 1, 3, false, 0); | 2965 | b43_nphy_rf_ctl_override_rev7(dev, 4, 1, 3, false, 0); |
2963 | 2966 | ||
@@ -3104,8 +3107,8 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
3104 | b43_phy_set(dev, B43_NPHY_AFECTL_OVER1, 0x1); | 3107 | b43_phy_set(dev, B43_NPHY_AFECTL_OVER1, 0x1); |
3105 | b43_phy_mask(dev, B43_NPHY_AFECTL_C2, ~0x1); | 3108 | b43_phy_mask(dev, B43_NPHY_AFECTL_C2, ~0x1); |
3106 | b43_phy_set(dev, B43_NPHY_AFECTL_OVER, 0x1); | 3109 | b43_phy_set(dev, B43_NPHY_AFECTL_OVER, 0x1); |
3107 | b43_ntab_write(dev, B43_NTAB16(8, 0x05), 0x20); | 3110 | b43_ntab_write(dev, B43_NTAB16(8, 0x05), 0); |
3108 | b43_ntab_write(dev, B43_NTAB16(8, 0x15), 0x20); | 3111 | b43_ntab_write(dev, B43_NTAB16(8, 0x15), 0); |
3109 | 3112 | ||
3110 | b43_phy_mask(dev, B43_NPHY_AFECTL_C1, ~0x4); | 3113 | b43_phy_mask(dev, B43_NPHY_AFECTL_C1, ~0x4); |
3111 | b43_phy_mask(dev, B43_NPHY_AFECTL_OVER1, ~0x4); | 3114 | b43_phy_mask(dev, B43_NPHY_AFECTL_OVER1, ~0x4); |
@@ -3116,20 +3119,20 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
3116 | b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, 0x2); | 3119 | b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, 0x2); |
3117 | 3120 | ||
3118 | b43_ntab_write(dev, B43_NTAB32(16, 0x100), 20); | 3121 | b43_ntab_write(dev, B43_NTAB32(16, 0x100), 20); |
3119 | b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x138), 2, ntab7_138_146); | 3122 | b43_ntab_write_bulk(dev, B43_NTAB8(7, 0x138), 2, ntab7_138_146); |
3120 | b43_ntab_write(dev, B43_NTAB16(7, 0x141), 0x77); | 3123 | b43_ntab_write(dev, B43_NTAB16(7, 0x141), 0x77); |
3121 | b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x133), 3, ntab7_133); | 3124 | b43_ntab_write_bulk(dev, B43_NTAB8(7, 0x133), 3, ntab7_133); |
3122 | b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x146), 2, ntab7_138_146); | 3125 | b43_ntab_write_bulk(dev, B43_NTAB8(7, 0x146), 2, ntab7_138_146); |
3123 | b43_ntab_write(dev, B43_NTAB16(7, 0x123), 0x77); | 3126 | b43_ntab_write(dev, B43_NTAB16(7, 0x123), 0x77); |
3124 | b43_ntab_write(dev, B43_NTAB16(7, 0x12A), 0x77); | 3127 | b43_ntab_write(dev, B43_NTAB16(7, 0x12A), 0x77); |
3125 | 3128 | ||
3126 | if (!b43_is_40mhz(dev)) { | 3129 | b43_ntab_read_bulk(dev, B43_NTAB32(16, 0x02), 1, noise_tbl); |
3127 | b43_ntab_write(dev, B43_NTAB32(16, 0x03), 0x18D); | 3130 | noise_tbl[1] = b43_is_40mhz(dev) ? 0x14D : 0x18D; |
3128 | b43_ntab_write(dev, B43_NTAB32(16, 0x7F), 0x18D); | 3131 | b43_ntab_write_bulk(dev, B43_NTAB32(16, 0x02), 2, noise_tbl); |
3129 | } else { | 3132 | |
3130 | b43_ntab_write(dev, B43_NTAB32(16, 0x03), 0x14D); | 3133 | b43_ntab_read_bulk(dev, B43_NTAB32(16, 0x7E), 1, noise_tbl); |
3131 | b43_ntab_write(dev, B43_NTAB32(16, 0x7F), 0x14D); | 3134 | noise_tbl[1] = b43_is_40mhz(dev) ? 0x14D : 0x18D; |
3132 | } | 3135 | b43_ntab_write_bulk(dev, B43_NTAB32(16, 0x7E), 2, noise_tbl); |
3133 | 3136 | ||
3134 | b43_nphy_gain_ctl_workarounds(dev); | 3137 | b43_nphy_gain_ctl_workarounds(dev); |
3135 | 3138 | ||