From: "Rafał Miłecki" <zajec5@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Michael Buesch" <mb@bu3sch.de>
Cc: "bcm43xx-dev@lists.berlios.de" <bcm43xx-dev@lists.berlios.de>
Subject: [RFC] How to store HT (40MHz) support
Date: Wed, 20 Jan 2010 01:06:37 +0100 [thread overview]
Message-ID: <op.u6s09akf9lhzdc@linux-g0th.site> (raw)
In N-PHY code we have to make some decisions based on fact if band is 40MHz.
AFAIU when registering device, driver reports to mac80211 HT capability and this is not implemented yet. For that we will need to modify:
static struct ieee80211_supported_band b43_band_5GHz_nphy = { ... }
Then mac80211 can request switching to 40MHz usage using ieee80211_ops.config (which we handle in b43_op_config).
Is that correct? If so, is attached patch fine for storing 40MHz usage? We don't report HT support to mac80211 so it should not request 40MHz usage for now.
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 9c5c7c9..641c7de 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3571,6 +3571,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
dev = wl->current_dev;
phy = &dev->phy;
+ if (phy->supports_40mhz)
+ phy->use_40mhz = conf_is_ht(conf);
+
b43_mac_suspend(dev);
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 9edd4e8..62c7028 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -212,6 +212,10 @@ struct b43_phy {
bool supports_2ghz;
bool supports_5ghz;
+ /* Band width support and usage */
+ bool supports_40mhz;
+ bool use_40mhz;
+
/* GMODE bit enabled? */
bool gmode;
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index e77f1f2..ed8f372 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1787,7 +1787,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
b43_phy_write(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0x8AA9);
- if (1 /* FIXME: the band width is 20 MHz */)
+ if (!dev->phy.use_40mhz)
freq = 2500;
else
freq = 5000;
--
Rafał
next reply other threads:[~2010-01-20 0:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 0:06 Rafał Miłecki [this message]
2010-01-20 10:18 ` [RFC] How to store HT (40MHz) support Johannes Berg
2010-01-21 15:50 ` Rafał Miłecki
2010-01-21 17:18 ` Luis R. Rodriguez
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=op.u6s09akf9lhzdc@linux-g0th.site \
--to=zajec5@gmail.com \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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