aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_ht.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/phy_ht.c')
-rw-r--r--drivers/net/wireless/b43/phy_ht.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index c4dc8b020f60..7b445419036f 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -89,6 +89,14 @@ static void b43_radio_2059_channel_setup(struct b43_wldev *dev,
89 udelay(300); 89 udelay(300);
90} 90}
91 91
92static void b43_radio_2059_init_pre(struct b43_wldev *dev)
93{
94 b43_phy_mask(dev, B43_PHY_HT_RF_CTL_CMD, ~B43_PHY_HT_RF_CTL_CMD_CHIP0_PU);
95 b43_phy_set(dev, B43_PHY_HT_RF_CTL_CMD, B43_PHY_HT_RF_CTL_CMD_FORCE);
96 b43_phy_mask(dev, B43_PHY_HT_RF_CTL_CMD, ~B43_PHY_HT_RF_CTL_CMD_FORCE);
97 b43_phy_set(dev, B43_PHY_HT_RF_CTL_CMD, B43_PHY_HT_RF_CTL_CMD_CHIP0_PU);
98}
99
92static void b43_radio_2059_init(struct b43_wldev *dev) 100static void b43_radio_2059_init(struct b43_wldev *dev)
93{ 101{
94 const u16 routing[] = { R2059_C1, R2059_C2, R2059_C3 }; 102 const u16 routing[] = { R2059_C1, R2059_C2, R2059_C3 };
@@ -97,6 +105,9 @@ static void b43_radio_2059_init(struct b43_wldev *dev)
97 }; 105 };
98 u16 i, j; 106 u16 i, j;
99 107
108 /* Prepare (reset?) radio */
109 b43_radio_2059_init_pre(dev);
110
100 b43_radio_write(dev, R2059_ALL | 0x51, 0x0070); 111 b43_radio_write(dev, R2059_ALL | 0x51, 0x0070);
101 b43_radio_write(dev, R2059_ALL | 0x5a, 0x0003); 112 b43_radio_write(dev, R2059_ALL | 0x5a, 0x0003);
102 113
@@ -1002,19 +1013,10 @@ static void b43_phy_ht_op_software_rfkill(struct b43_wldev *dev,
1002 if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED) 1013 if (b43_read32(dev, B43_MMIO_MACCTL) & B43_MACCTL_ENABLED)
1003 b43err(dev->wl, "MAC not suspended\n"); 1014 b43err(dev->wl, "MAC not suspended\n");
1004 1015
1005 /* In the following PHY ops we copy wl's dummy behaviour.
1006 * TODO: Find out if reads (currently hidden in masks/masksets) are
1007 * needed and replace following ops with just writes or w&r.
1008 * Note: B43_PHY_HT_RF_CTL1 register is tricky, wrong operation can
1009 * cause delayed (!) machine lock up. */
1010 if (blocked) { 1016 if (blocked) {
1011 b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0); 1017 b43_phy_mask(dev, B43_PHY_HT_RF_CTL_CMD,
1018 ~B43_PHY_HT_RF_CTL_CMD_CHIP0_PU);
1012 } else { 1019 } else {
1013 b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0);
1014 b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, 0, 0x1);
1015 b43_phy_mask(dev, B43_PHY_HT_RF_CTL1, 0);
1016 b43_phy_maskset(dev, B43_PHY_HT_RF_CTL1, 0, 0x2);
1017
1018 if (dev->phy.radio_ver == 0x2059) 1020 if (dev->phy.radio_ver == 0x2059)
1019 b43_radio_2059_init(dev); 1021 b43_radio_2059_init(dev);
1020 else 1022 else