summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/phy_ht.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-06-27 12:58:51 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2011-06-29 18:53:23 (GMT)
commitbdb2dfb237997babac7b32c7a94dcfa18507a055 (patch)
tree89dfedec5c560af12a78b666f4a098cd8895c45c /drivers/net/wireless/b43/phy_ht.c
parent1a93139237180404dc01970dfd33f4a5d5b2054c (diff)
downloadlinux-fsl-qoriq-bdb2dfb237997babac7b32c7a94dcfa18507a055.tar.xz
b43: HT-PHY: upload PHY values when switching channel
After calibrating radio you can find few PHY writes in MMIO dumps: phy_read(0x0009) -> 0x0000 phy_write(0x01ce) <- 0x03dd phy_write(0x01cf) <- 0x03d9 phy_write(0x01d0) <- 0x03d5 phy_write(0x01d1) <- 0x0424 phy_write(0x01d2) <- 0x0429 phy_write(0x01d3) <- 0x042d By comparing to N-PHY code we found out that they are PHY tables for channel switching plus band info read at the beginning. 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_ht.c')
-rw-r--r--drivers/net/wireless/b43/phy_ht.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index 72f01ce..c48bcf6 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -82,7 +82,21 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev,
const struct b43_phy_ht_channeltab_e_phy *e,
struct ieee80211_channel *new_channel)
{
- /* TODO */
+ bool old_band_5ghz;
+
+ old_band_5ghz = b43_phy_read(dev, B43_PHY_HT_BANDCTL) & 0; /* FIXME */
+ if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) {
+ /* TODO */
+ } else if (new_channel->band == IEEE80211_BAND_2GHZ && old_band_5ghz) {
+ /* TODO */
+ }
+
+ b43_phy_write(dev, B43_PHY_HT_BW1, e->bw1);
+ b43_phy_write(dev, B43_PHY_HT_BW2, e->bw2);
+ b43_phy_write(dev, B43_PHY_HT_BW3, e->bw3);
+ b43_phy_write(dev, B43_PHY_HT_BW4, e->bw4);
+ b43_phy_write(dev, B43_PHY_HT_BW5, e->bw5);
+ b43_phy_write(dev, B43_PHY_HT_BW6, e->bw6);
}
static int b43_phy_ht_set_channel(struct b43_wldev *dev,