aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-12-07 15:55:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 15:38:45 -0500
commitabc1f7cd531f80a8468ab654f1dfd35d58bd2490 (patch)
tree94fad4d5f8684c48a07daf52a8974629aac2bf88
parentc7455cf988f06ba578cc6a680392426fce382ca1 (diff)
b43: set TMS to work with current band width for N-PHY
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/main.c6
-rw-r--r--drivers/net/wireless/b43/phy_common.c7
-rw-r--r--drivers/net/wireless/b43/phy_common.h2
-rw-r--r--drivers/net/wireless/b43/phy_n.c7
4 files changed, 15 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index fa4880366586..670fd7b782e2 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1150,6 +1150,12 @@ void b43_wireless_core_reset(struct b43_wldev *dev, u32 flags)
1150 1150
1151 flags |= B43_TMSLOW_PHYCLKEN; 1151 flags |= B43_TMSLOW_PHYCLKEN;
1152 flags |= B43_TMSLOW_PHYRESET; 1152 flags |= B43_TMSLOW_PHYRESET;
1153 if (dev->phy.type == B43_PHYTYPE_N) {
1154 if (b43_channel_type_is_40mhz(dev->phy.channel_type))
1155 flags |= B43_TMSLOW_PHYCLKSPEED_160MHZ;
1156 else
1157 flags |= B43_TMSLOW_PHYCLKSPEED_80MHZ;
1158 }
1153 ssb_device_enable(dev->dev, flags); 1159 ssb_device_enable(dev->dev, flags);
1154 msleep(2); /* Wait for the PLL to turn on. */ 1160 msleep(2); /* Wait for the PLL to turn on. */
1155 1161
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 0a91fc3a2e03..412f1b64cc82 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -429,6 +429,13 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on)
429 b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4); 429 b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4);
430} 430}
431 431
432
433bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type)
434{
435 return (channel_type == NL80211_CHAN_HT40MINUS ||
436 channel_type == NL80211_CHAN_HT40PLUS);
437}
438
432/* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */ 439/* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */
433struct b43_c32 b43_cordic(int theta) 440struct b43_c32 b43_cordic(int theta)
434{ 441{
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 2ed60e5484b6..2401bee8b081 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -436,6 +436,8 @@ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset);
436 */ 436 */
437void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on); 437void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on);
438 438
439bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type);
440
439struct b43_c32 b43_cordic(int theta); 441struct b43_c32 b43_cordic(int theta);
440 442
441#endif /* LINUX_B43_PHY_COMMON_H_ */ 443#endif /* LINUX_B43_PHY_COMMON_H_ */
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index d41da7f5584a..35173419d139 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -88,13 +88,6 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
88static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field, 88static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
89 u16 value, u8 core); 89 u16 value, u8 core);
90 90
91static inline bool b43_channel_type_is_40mhz(
92 enum nl80211_channel_type channel_type)
93{
94 return (channel_type == NL80211_CHAN_HT40MINUS ||
95 channel_type == NL80211_CHAN_HT40PLUS);
96}
97
98void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna) 91void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna)
99{//TODO 92{//TODO
100} 93}