diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-06-27 08:58:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-29 14:53:24 -0400 |
commit | e5b61007bc15b34fe78d4100dbe1be209b761d9b (patch) | |
tree | 65e291b9abefe936d2fc5a905c1d171955ad14ad /drivers | |
parent | bdb2dfb237997babac7b32c7a94dcfa18507a055 (diff) |
b43: HT-PHY: perform some tables ops on channel switching
Starring at MMIO dumps around PHY channel switching has led to finding
serie of 3 similar ops this patch implements.
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_ht.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index c48bcf6b7d16..42bea3041e57 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include "b43.h" | 25 | #include "b43.h" |
26 | #include "phy_ht.h" | 26 | #include "phy_ht.h" |
27 | #include "tables_phy_ht.h" | ||
27 | #include "radio_2059.h" | 28 | #include "radio_2059.h" |
28 | #include "main.h" | 29 | #include "main.h" |
29 | 30 | ||
@@ -83,6 +84,7 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev, | |||
83 | struct ieee80211_channel *new_channel) | 84 | struct ieee80211_channel *new_channel) |
84 | { | 85 | { |
85 | bool old_band_5ghz; | 86 | bool old_band_5ghz; |
87 | u8 i; | ||
86 | 88 | ||
87 | old_band_5ghz = b43_phy_read(dev, B43_PHY_HT_BANDCTL) & 0; /* FIXME */ | 89 | old_band_5ghz = b43_phy_read(dev, B43_PHY_HT_BANDCTL) & 0; /* FIXME */ |
88 | if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) { | 90 | if (new_channel->band == IEEE80211_BAND_5GHZ && !old_band_5ghz) { |
@@ -97,6 +99,23 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev, | |||
97 | b43_phy_write(dev, B43_PHY_HT_BW4, e->bw4); | 99 | b43_phy_write(dev, B43_PHY_HT_BW4, e->bw4); |
98 | b43_phy_write(dev, B43_PHY_HT_BW5, e->bw5); | 100 | b43_phy_write(dev, B43_PHY_HT_BW5, e->bw5); |
99 | b43_phy_write(dev, B43_PHY_HT_BW6, e->bw6); | 101 | b43_phy_write(dev, B43_PHY_HT_BW6, e->bw6); |
102 | |||
103 | /* TODO: some ops on PHY regs 0x0B0 and 0xC0A */ | ||
104 | |||
105 | /* TODO: separated function? */ | ||
106 | for (i = 0; i < 3; i++) { | ||
107 | u32 tmp = b43_httab_read(dev, B43_HTTAB32(26, 0xE8)); | ||
108 | |||
109 | /* TODO: some op on PHY reg 0x908 */ | ||
110 | |||
111 | b43_httab_write(dev, B43_HTTAB16(7, 0x110 + i), tmp >> 16); | ||
112 | b43_httab_write(dev, B43_HTTAB8(13, 0x63 + (i * 4)), | ||
113 | tmp & 0xFF); | ||
114 | b43_httab_write(dev, B43_HTTAB8(13, 0x73 + (i * 4)), | ||
115 | tmp & 0xFF); | ||
116 | } | ||
117 | |||
118 | b43_phy_write(dev, 0x017e, 0x3830); | ||
100 | } | 119 | } |
101 | 120 | ||
102 | static int b43_phy_ht_set_channel(struct b43_wldev *dev, | 121 | static int b43_phy_ht_set_channel(struct b43_wldev *dev, |