b43: N-PHY: fix rev7+ typos at random places
authorRafał Miłecki <zajec5@gmail.com>
Tue, 22 Jul 2014 19:31:05 +0000 (21:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Jul 2014 17:08:35 +0000 (13:08 -0400)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/phy_n.c
drivers/net/wireless/b43/tables_nphy.c

index 11d754360d71a094abeaa2ca7981d13cbdc93fcd..44bb58b748dd584b61d75b8fe0574211a84e1e4f 100644 (file)
@@ -225,13 +225,13 @@ static void b43_nphy_rf_ctl_override_one_to_many(struct b43_wldev *dev,
                b43_nphy_rf_ctl_override_rev7(dev, 0x2, value, core, off, 1);
                b43_nphy_rf_ctl_override_rev7(dev, 0x1, value, core, off, 1);
                b43_nphy_rf_ctl_override_rev7(dev, 0x2, value, core, off, 2);
-               b43_nphy_rf_ctl_override_rev7(dev, 0x0800, value, core, off, 1);
+               b43_nphy_rf_ctl_override_rev7(dev, 0x0800, 0, core, off, 1);
                break;
        case N_RF_CTL_OVER_CMD_TX_PU:
                b43_nphy_rf_ctl_override_rev7(dev, 0x4, value, core, off, 0);
                b43_nphy_rf_ctl_override_rev7(dev, 0x2, value, core, off, 1);
                b43_nphy_rf_ctl_override_rev7(dev, 0x1, value, core, off, 2);
-               b43_nphy_rf_ctl_override_rev7(dev, 0x0800, value, core, off, 1);
+               b43_nphy_rf_ctl_override_rev7(dev, 0x0800, 1, core, off, 1);
                break;
        case N_RF_CTL_OVER_CMD_RX_GAIN:
                tmp = value & 0xFF;
@@ -343,6 +343,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev,
                switch (intc_override) {
                case N_INTC_OVERRIDE_OFF:
                        b43_phy_write(dev, reg, 0);
+                       b43_phy_mask(dev, 0x2ff, ~0x2000);
                        b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX);
                        break;
                case N_INTC_OVERRIDE_TRSW:
@@ -1596,7 +1597,7 @@ static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops,
                bool lpf_bw3, lpf_bw4;
 
                lpf_bw3 = b43_phy_read(dev, B43_NPHY_REV7_RF_CTL_OVER3) & 0x80;
-               lpf_bw4 = b43_phy_read(dev, B43_NPHY_REV7_RF_CTL_OVER3) & 0x80;
+               lpf_bw4 = b43_phy_read(dev, B43_NPHY_REV7_RF_CTL_OVER4) & 0x80;
 
                if (lpf_bw3 || lpf_bw4) {
                        /* TODO */
@@ -2117,7 +2118,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
                                                     N_RF_CTL_OVER_CMD_RX_PU,
                                                     1, 0, false);
                b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0);
-               b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0);
+               b43_nphy_rf_ctl_override_rev7(dev, 0x40, 1, 0, false, 0);
                if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
                        b43_nphy_rf_ctl_override_rev7(dev, 0x20, 0, 0, false,
                                                      0);
@@ -3543,7 +3544,7 @@ static void b43_nphy_stop_playback(struct b43_wldev *dev)
                nphy->bb_mult_save = 0;
        }
 
-       if (phy->rev >= 7) {
+       if (phy->rev >= 7 && nphy->lpf_bw_overrode_for_sample_play) {
                if (phy->rev >= 19)
                        b43_nphy_rf_ctl_override_rev19(dev, 0x80, 0, 0, true,
                                                       1);
@@ -3962,9 +3963,9 @@ static void b43_nphy_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
                b43_nphy_ipa_internal_tssi_setup(dev);
 
        if (phy->rev >= 19)
-               b43_nphy_rf_ctl_override_rev19(dev, 0x2000, 0, 3, false, 0);
+               b43_nphy_rf_ctl_override_rev19(dev, 0x1000, 0, 3, false, 0);
        else if (phy->rev >= 7)
-               b43_nphy_rf_ctl_override_rev7(dev, 0x2000, 0, 3, false, 0);
+               b43_nphy_rf_ctl_override_rev7(dev, 0x1000, 0, 3, false, 0);
        else if (phy->rev >= 3)
                b43_nphy_rf_ctl_override(dev, 0x2000, 0, 3, false);
 
@@ -3977,9 +3978,9 @@ static void b43_nphy_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
        b43_nphy_rssi_select(dev, 0, N_RSSI_W1);
 
        if (phy->rev >= 19)
-               b43_nphy_rf_ctl_override_rev19(dev, 0x2000, 0, 3, true, 0);
+               b43_nphy_rf_ctl_override_rev19(dev, 0x1000, 0, 3, true, 0);
        else if (phy->rev >= 7)
-               b43_nphy_rf_ctl_override_rev7(dev, 0x2000, 0, 3, true, 0);
+               b43_nphy_rf_ctl_override_rev7(dev, 0x1000, 0, 3, true, 0);
        else if (phy->rev >= 3)
                b43_nphy_rf_ctl_override(dev, 0x2000, 0, 3, true);
 
index ab27c2de2f43a5e590f88f98e796dfe052e0310c..4b5885077b01bd5b223a3d45868adfc52a744882 100644 (file)
@@ -3109,11 +3109,11 @@ static const struct nphy_rf_control_override_rev7
        { 0x0010, 0x07A, 0x07D, 0x0010, 4 },
        { 0x0020, 0x07A, 0x07D, 0x0020, 5 },
        { 0x0040, 0x07A, 0x07D, 0x0040, 6 },
-       { 0x0080, 0x0F8, 0x0FA, 0x0080, 7 },
+       { 0x0080, 0x07A, 0x07D, 0x0080, 7 },
        { 0x0400, 0x0F8, 0x0FA, 0x0070, 4 },
        { 0x0800, 0x07B, 0x07E, 0xFFFF, 0 },
        { 0x1000, 0x07C, 0x07F, 0xFFFF, 0 },
-       { 0x6000, 0x348, 0x349, 0xFFFF, 0 },
+       { 0x6000, 0x348, 0x349, 0x00FF, 0 },
        { 0x2000, 0x348, 0x349, 0x000F, 0 },
 };