From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Cc: b43-dev@lists.infradead.org, "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH 2/4] b43: set TMS to work with current band width for N-PHY
Date: Tue, 7 Dec 2010 21:55:58 +0100 [thread overview]
Message-ID: <1291755360-21570-3-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1291755360-21570-1-git-send-email-zajec5@gmail.com>
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/main.c | 6 ++++++
drivers/net/wireless/b43/phy_common.c | 7 +++++++
drivers/net/wireless/b43/phy_common.h | 2 ++
drivers/net/wireless/b43/phy_n.c | 7 -------
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index fa48803..670fd7b 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)
flags |= B43_TMSLOW_PHYCLKEN;
flags |= B43_TMSLOW_PHYRESET;
+ if (dev->phy.type == B43_PHYTYPE_N) {
+ if (b43_channel_type_is_40mhz(dev->phy.channel_type))
+ flags |= B43_TMSLOW_PHYCLKSPEED_160MHZ;
+ else
+ flags |= B43_TMSLOW_PHYCLKSPEED_80MHZ;
+ }
ssb_device_enable(dev->dev, flags);
msleep(2); /* Wait for the PLL to turn on. */
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 0a91fc3..412f1b6 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)
b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4);
}
+
+bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type)
+{
+ return (channel_type == NL80211_CHAN_HT40MINUS ||
+ channel_type == NL80211_CHAN_HT40PLUS);
+}
+
/* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */
struct b43_c32 b43_cordic(int theta)
{
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 2ed60e5..2401bee 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);
*/
void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on);
+bool b43_channel_type_is_40mhz(enum nl80211_channel_type channel_type);
+
struct b43_c32 b43_cordic(int theta);
#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 d41da7f..3517341 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,
static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
u16 value, u8 core);
-static inline bool b43_channel_type_is_40mhz(
- enum nl80211_channel_type channel_type)
-{
- return (channel_type == NL80211_CHAN_HT40MINUS ||
- channel_type == NL80211_CHAN_HT40PLUS);
-}
-
void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna)
{//TODO
}
--
1.6.3.3
next prev parent reply other threads:[~2010-12-07 20:55 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 20:55 [PATCH 0/4] Make N-PHY support experimental Rafał Miłecki
2010-12-07 20:55 ` [PATCH 1/4] b43: N-PHY: silence warnings Rafał Miłecki
2010-12-07 20:55 ` Rafał Miłecki [this message]
2010-12-07 21:08 ` [PATCH 2/4] b43: set TMS to work with current band width for N-PHY Michael Büsch
2010-12-09 14:12 ` Rafał Miłecki
2010-12-09 14:13 ` Rafał Miłecki
2010-12-09 14:19 ` Michael Büsch
2010-12-09 14:23 ` Rafał Miłecki
2010-12-09 14:28 ` Michael Büsch
2010-12-09 14:41 ` Michael Büsch
2010-12-07 20:55 ` [PATCH 3/4] b43: fix split of N-PHY devices into supported and not (based on PHY rev) Rafał Miłecki
2010-12-07 20:56 ` [PATCH 4/4] b43: rename config option for N-PHY, drop BROKEN Rafał Miłecki
2010-12-07 21:04 ` [PATCH 0/4] Make N-PHY support experimental Johannes Berg
2010-12-07 22:57 ` Gábor Stefanik
2010-12-07 23:11 ` Larry Finger
2010-12-08 3:37 ` Larry Finger
2010-12-09 14:11 ` Rafał Miłecki
2010-12-09 15:20 ` Larry Finger
2010-12-09 15:25 ` Johannes Berg
2010-12-09 15:28 ` Rafał Miłecki
2010-12-09 15:33 ` Johannes Berg
2010-12-09 15:37 ` Rafał Miłecki
2010-12-09 16:03 ` Larry Finger
2010-12-10 3:52 ` Jon Saul
2010-12-10 4:05 ` Larry Finger
2010-12-09 16:10 ` Rafał Miłecki
2010-12-08 15:15 ` b43 N PHY status report Larry Finger
2010-12-10 16:57 ` Peter Stuge
2010-12-10 17:15 ` Larry Finger
2010-12-10 18:34 ` Peter Stuge
2010-12-10 18:44 ` Peter Stuge
2010-12-13 17:00 ` Rafał Miłecki
2010-12-13 17:41 ` Larry Finger
2010-12-13 18:17 ` Rafał Miłecki
2010-12-13 18:37 ` Larry Finger
2010-12-13 18:34 ` Peter Stuge
2010-12-13 18:43 ` Larry Finger
2010-12-10 18:22 ` Francesco Gringoli
2010-12-10 18:30 ` Francesco Gringoli
2010-12-10 18:47 ` Johannes Berg
2010-12-10 19:02 ` Larry Finger
2010-12-10 19:04 ` Gábor Stefanik
2010-12-10 19:08 ` Johannes Berg
2010-12-21 9:25 ` David Woodhouse
2010-12-21 9:30 ` Rafał Miłecki
2010-12-21 14:30 ` Larry Finger
2010-12-10 18:53 ` Konstantinos Karantias
2010-12-10 19:00 ` Larry Finger
2010-12-09 14:09 ` [PATCH 0/4] Make N-PHY support experimental Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291755360-21570-3-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=b43-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).