From: Nishant Sarmukadam <nishants@marvell.com>
To: <linux-wireless@vger.kernel.org>
Cc: <buytenh@wantstofly.org>
Subject: [PATCH] mwl8k: Do not configure tx power unconditionally
Date: Tue, 5 Apr 2011 14:18:09 +0530 [thread overview]
Message-ID: <1301993289.3447.41.camel@localhost.localdomain> (raw)
Instead of configuring tx power unconditionally, check for
IEEE80211_CONF_CHANGE_POWER and configure it only when stack
sets this flag
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
---
drivers/net/wireless/mwl8k.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 53920f3..45b1704 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4463,9 +4463,12 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
conf->power_level = 18;
if (priv->ap_fw) {
- rc = mwl8k_cmd_tx_power(hw, conf, conf->power_level);
- if (rc)
- goto out;
+
+ if (conf->flags & IEEE80211_CONF_CHANGE_POWER) {
+ rc = mwl8k_cmd_tx_power(hw, conf, conf->power_level);
+ if (rc)
+ goto out;
+ }
rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3);
if (rc)
--
1.6.0.3
reply other threads:[~2011-04-05 10:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1301993289.3447.41.camel@localhost.localdomain \
--to=nishants@marvell.com \
--cc=buytenh@wantstofly.org \
--cc=linux-wireless@vger.kernel.org \
/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).