aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_n.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-02-27 07:03:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-09 15:06:55 -0500
commit7955de0caf70e4aefd51d68e42f78d4bd82f26a2 (patch)
tree20e59643590732b4945b6626018b20d35932de6f /drivers/net/wireless/b43/phy_n.c
parentd24019adaae5a6498c189b42431000cf24d4d355 (diff)
b43: N-PHY: isloate 2055 radio setup
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r--drivers/net/wireless/b43/phy_n.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 30f8bf24ac69..ffe262270664 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -155,6 +155,22 @@ static void b43_nphy_tx_power_fix(struct b43_wldev *dev)
155 //TODO 155 //TODO
156} 156}
157 157
158
159/* http://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2055Setup */
160static void b43_radio_2055_setup(struct b43_wldev *dev,
161 const struct b43_nphy_channeltab_entry *e)
162{
163 B43_WARN_ON(dev->phy.rev >= 3);
164
165 b43_chantab_radio_upload(dev, e);
166 udelay(50);
167 b43_radio_write(dev, B2055_VCO_CAL10, 5);
168 b43_radio_write(dev, B2055_VCO_CAL10, 45);
169 b43_read32(dev, B43_MMIO_MACCTL); /* flush writes */
170 b43_radio_write(dev, B2055_VCO_CAL10, 65);
171 udelay(300);
172}
173
158/* Tune the hardware to a new channel. */ 174/* Tune the hardware to a new channel. */
159static int nphy_channel_switch(struct b43_wldev *dev, unsigned int channel) 175static int nphy_channel_switch(struct b43_wldev *dev, unsigned int channel)
160{ 176{
@@ -169,12 +185,7 @@ static int nphy_channel_switch(struct b43_wldev *dev, unsigned int channel)
169 b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, 0x20); 185 b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, 0x20);
170 else 186 else
171 b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, 0x50); 187 b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, 0x50);
172 b43_chantab_radio_upload(dev, tabent); 188 b43_radio_2055_setup(dev, tabent);
173 udelay(50);
174 b43_radio_write16(dev, B2055_VCO_CAL10, 5);
175 b43_radio_write16(dev, B2055_VCO_CAL10, 45);
176 b43_radio_write16(dev, B2055_VCO_CAL10, 65);
177 udelay(300);
178 if (0 /*FIXME 5Ghz*/) 189 if (0 /*FIXME 5Ghz*/)
179 b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ); 190 b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ);
180 else 191 else