All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
To: linux-wireless@vger.kernel.org
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Subject: [RFC 4/5] ath6kl: add support for NL80211_TX_POWER_REG
Date: Wed, 23 Nov 2011 10:40:57 -0500	[thread overview]
Message-ID: <1322062858-15276-5-git-send-email-mcgrof@qca.qualcomm.com> (raw)
In-Reply-To: <1322062858-15276-1-git-send-email-mcgrof@qca.qualcomm.com>

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 9f3d3f0..983c3e9 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1187,6 +1187,7 @@ static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
 	struct ath6kl_vif *vif;
 	u8 ath6kl_dbm;
 	int dbm = MBM_TO_DBM(mbm);
+	struct ieee80211_channel *chan;
 
 	ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: type 0x%x, dbm %d\n", __func__,
 		   type, dbm);
@@ -1204,6 +1205,11 @@ static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,
 	case NL80211_TX_POWER_LIMITED:
 		ar->tx_pwr = ath6kl_dbm = dbm;
 		break;
+	case NL80211_TX_POWER_REG:
+		chan = ieee80211_get_channel(wiphy, vif->next_chan);
+		if (!chan)
+			return -EIO;
+		ar->tx_pwr = ath6kl_dbm = chan->max_power;
 	default:
 		ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: type 0x%x not supported\n",
 			   __func__, type);
-- 
1.7.4.15.g7811d


  parent reply	other threads:[~2011-11-23 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 15:40 [RFC 0/5] wireless: applying country IE and reg changes immediately Luis R. Rodriguez
2011-11-23 15:40 ` [RFC 1/5] cfg80211: allow following country IE power for custom regdom cards Luis R. Rodriguez
2011-11-23 15:40 ` [RFC 2/5] cfg80211: add support to immediately apply reg settings Luis R. Rodriguez
2011-11-24 16:44   ` Johannes Berg
2011-11-24 16:50     ` Luis R. Rodriguez
2011-11-24 16:52       ` Luis R. Rodriguez
2011-11-23 15:40 ` [RFC 3/5] mac80211: add support for NL80211_TX_POWER_REG Luis R. Rodriguez
2011-11-23 15:40 ` Luis R. Rodriguez [this message]
2011-11-23 15:40 ` [RFC 5/5] wireless: annotate drivers that do not support NL80211_TX_POWER_REG Luis R. Rodriguez
2011-11-24 21:02   ` Jouni Malinen
2011-11-28 20:56     ` 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=1322062858-15276-5-git-send-email-mcgrof@qca.qualcomm.com \
    --to=mcgrof@qca.qualcomm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.