diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-01-17 07:03:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-19 16:37:57 -0500 |
commit | 53ae8e8c92b2715f27c95e8e7169bca9a8909856 (patch) | |
tree | 649843f5ccee003f18c0ea56f1897065667cae72 /drivers | |
parent | ad9716e8e8bc39664a0d41ec94f9bffbf748b45b (diff) |
b43: N-PHY: implement stopping playback
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 | 34 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.h | 1 |
2 files changed, 32 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 1996843eac11..229f2d0364f2 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -749,6 +749,34 @@ static void b43_nphy_stay_in_carrier_search(struct b43_wldev *dev, bool enable) | |||
749 | } | 749 | } |
750 | } | 750 | } |
751 | 751 | ||
752 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/stop-playback */ | ||
753 | static void b43_nphy_stop_playback(struct b43_wldev *dev) | ||
754 | { | ||
755 | struct b43_phy_n *nphy = dev->phy.n; | ||
756 | u16 tmp; | ||
757 | |||
758 | if (nphy->hang_avoid) | ||
759 | b43_nphy_stay_in_carrier_search(dev, 1); | ||
760 | |||
761 | tmp = b43_phy_read(dev, B43_NPHY_SAMP_STAT); | ||
762 | if (tmp & 0x1) | ||
763 | b43_phy_set(dev, B43_NPHY_SAMP_CMD, B43_NPHY_SAMP_CMD_STOP); | ||
764 | else if (tmp & 0x2) | ||
765 | b43_phy_mask(dev, B43_NPHY_IQLOCAL_CMDGCTL, (u16)~0x8000); | ||
766 | |||
767 | b43_phy_mask(dev, B43_NPHY_SAMP_CMD, ~0x0004); | ||
768 | |||
769 | if (nphy->bb_mult_save & 0x80000000) { | ||
770 | tmp = nphy->bb_mult_save & 0xFFFF; | ||
771 | /* TODO: Write an N PHY Table with ID 15, length 1, offset 87, | ||
772 | width 16 and data from tmp */ | ||
773 | nphy->bb_mult_save = 0; | ||
774 | } | ||
775 | |||
776 | if (nphy->hang_avoid) | ||
777 | b43_nphy_stay_in_carrier_search(dev, 0); | ||
778 | } | ||
779 | |||
752 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlCoefSetup */ | 780 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlCoefSetup */ |
753 | static void b43_nphy_tx_pwr_ctrl_coef_setup(struct b43_wldev *dev) | 781 | static void b43_nphy_tx_pwr_ctrl_coef_setup(struct b43_wldev *dev) |
754 | { | 782 | { |
@@ -1906,7 +1934,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, | |||
1906 | nphy->mphase_txcal_bestcoeffs */ | 1934 | nphy->mphase_txcal_bestcoeffs */ |
1907 | } | 1935 | } |
1908 | 1936 | ||
1909 | /* TODO: Call N PHY Stop Playback */ | 1937 | b43_nphy_stop_playback(dev); |
1910 | b43_phy_write(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0); | 1938 | b43_phy_write(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0); |
1911 | } | 1939 | } |
1912 | 1940 | ||
@@ -2053,7 +2081,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, | |||
2053 | /* TODO:Call N PHY RF Ctrl Override with 0x400, tmp[0], | 2081 | /* TODO:Call N PHY RF Ctrl Override with 0x400, tmp[0], |
2054 | 3, 0 as arguments */ | 2082 | 3, 0 as arguments */ |
2055 | /* TODO: Call N PHY Force RF Seq with 2 as argument */ | 2083 | /* TODO: Call N PHY Force RF Seq with 2 as argument */ |
2056 | /* TODO: Call N PHT Stop Playback */ | 2084 | b43_nphy_stop_playback(dev); |
2057 | 2085 | ||
2058 | if (playtone) { | 2086 | if (playtone) { |
2059 | /* TODO: Call N PHY TX Tone with 4000, | 2087 | /* TODO: Call N PHY TX Tone with 4000, |
@@ -2080,7 +2108,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, | |||
2080 | } else { | 2108 | } else { |
2081 | b43_nphy_calc_rx_iq_comp(dev, 1 << i); | 2109 | b43_nphy_calc_rx_iq_comp(dev, 1 << i); |
2082 | } | 2110 | } |
2083 | /* TODO: Call N PHY Stop Playback */ | 2111 | b43_nphy_stop_playback(dev); |
2084 | } | 2112 | } |
2085 | 2113 | ||
2086 | if (ret != 0) | 2114 | if (ret != 0) |
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h index ae00e3f2d613..d6c92a81d3c0 100644 --- a/drivers/net/wireless/b43/phy_n.h +++ b/drivers/net/wireless/b43/phy_n.h | |||
@@ -974,6 +974,7 @@ struct b43_phy_n { | |||
974 | bool mute; | 974 | bool mute; |
975 | u16 papd_epsilon_offset[2]; | 975 | u16 papd_epsilon_offset[2]; |
976 | s32 preamble_override; | 976 | s32 preamble_override; |
977 | u32 bb_mult_save; | ||
977 | 978 | ||
978 | u8 mphase_cal_phase_id; | 979 | u8 mphase_cal_phase_id; |
979 | u16 mphase_txcal_cmdidx; | 980 | u16 mphase_txcal_cmdidx; |