aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2010-08-16 16:39:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-24 16:28:13 -0400
commit4e687b2226f47c656302b9c313bfe2ece85fe2ef (patch)
tree23c0c9101af3863156da40cc87e3e93b31fb4112
parentd2730b2a6a019d14455556019d744ab051e6554b (diff)
b43: N-PHY: Implement RX core state setting for rev.2 and earlier PHYs
Rev.3+ support coming in a later patch. Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/phy_n.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index d212726d509b..a0a6554a76d1 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -3085,6 +3085,44 @@ static void b43_nphy_mac_phy_clock_set(struct b43_wldev *dev, bool on)
3085 ssb_write32(dev->dev, SSB_TMSLOW, tmslow); 3085 ssb_write32(dev->dev, SSB_TMSLOW, tmslow);
3086} 3086}
3087 3087
3088/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreSetState */
3089static void b43_nphy_set_rx_core_state(struct b43_wldev *dev, u8 mask)
3090{
3091 struct b43_phy *phy = &dev->phy;
3092 struct b43_phy_n *nphy = phy->n;
3093 u16 buf[16];
3094
3095 if (0 /* FIXME clk */)
3096 return;
3097
3098 b43_mac_suspend(dev);
3099
3100 if (nphy->hang_avoid)
3101 b43_nphy_stay_in_carrier_search(dev, true);
3102
3103 b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_RXEN,
3104 (mask & 0x3) << B43_NPHY_RFSEQCA_RXEN_SHIFT);
3105
3106 if (mask & 0x3 != 0x3) {
3107 b43_phy_write(dev, B43_NPHY_HPANT_SWTHRES, 1);
3108 if (dev->phy.rev >= 3) {
3109 /* TODO */
3110 }
3111 } else {
3112 b43_phy_write(dev, B43_NPHY_HPANT_SWTHRES, 0x1E);
3113 if (dev->phy.rev >= 3) {
3114 /* TODO */
3115 }
3116 }
3117
3118 b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX);
3119
3120 if (nphy->hang_avoid)
3121 b43_nphy_stay_in_carrier_search(dev, false);
3122
3123 b43_mac_enable(dev);
3124}
3125
3088/* 3126/*
3089 * Init N-PHY 3127 * Init N-PHY
3090 * http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N 3128 * http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N
@@ -3211,7 +3249,7 @@ int b43_phy_initn(struct b43_wldev *dev)
3211 } 3249 }
3212 3250
3213 if (nphy->phyrxchain != 3) 3251 if (nphy->phyrxchain != 3)
3214 ;/* TODO N PHY RX Core Set State with phyrxchain as argument */ 3252 b43_nphy_set_rx_core_state(dev, nphy->phyrxchain);
3215 if (nphy->mphase_cal_phase_id > 0) 3253 if (nphy->mphase_cal_phase_id > 0)
3216 ;/* TODO PHY Periodic Calibration Multi-Phase Restart */ 3254 ;/* TODO PHY Periodic Calibration Multi-Phase Restart */
3217 3255