Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: [PATCH 4/4] cfg80211: send channel max bandwidth to userspace
Date: Mon,  9 Mar 2009 22:04:59 -0400	[thread overview]
Message-ID: <1236650699-30538-5-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1236650699-30538-1-git-send-email-lrodriguez@atheros.com>

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 include/linux/nl80211.h |    3 +++
 net/wireless/nl80211.c  |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index f6e5637..55565a4 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -639,6 +639,7 @@ enum nl80211_band_attr {
  *	on this channel in current regulatory domain.
  * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
  *	(100 * dBm).
+ * @NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH: max bandwidth allowed, given in MHz
  */
 enum nl80211_frequency_attr {
 	__NL80211_FREQUENCY_ATTR_INVALID,
@@ -648,6 +649,7 @@ enum nl80211_frequency_attr {
 	NL80211_FREQUENCY_ATTR_NO_IBSS,
 	NL80211_FREQUENCY_ATTR_RADAR,
 	NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
+	NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH,
 
 	/* keep last */
 	__NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -655,6 +657,7 @@ enum nl80211_frequency_attr {
 };
 
 #define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
+#define NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH
 
 /**
  * enum nl80211_bitrate_attr - bitrate attributes
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 08d4f55..4827020 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -207,9 +207,10 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
 				NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_NO_IBSS);
 			if (chan->flags & IEEE80211_CHAN_RADAR)
 				NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR);
-
 			NLA_PUT_U32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
 				    DBM_TO_MBM(chan->max_power));
+			NLA_PUT_U32(msg, NL80211_FREQUENCY_ATTR_MAX_BANDWIDTH,
+				    chan->max_bandwidth);
 
 			nla_nest_end(msg, nl_freq);
 		}
-- 
1.6.0.6


  parent reply	other threads:[~2009-03-10  2:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10  2:04 [PATCH 0/4] wireless: use channel bandwidth Luis R. Rodriguez
2009-03-10  2:04 ` [PATCH 1/4] cfg80211: check allowed channel max bandwidth before setting HT40 Luis R. Rodriguez
2009-03-10  2:04 ` [PATCH 2/4] mac80211: move early error branch check on ieee80211_set_freq() Luis R. Rodriguez
2009-03-10  2:04 ` [PATCH 3/4] mac80211: disallow HT40 if max channel bandwidth is less than 40 MHz Luis R. Rodriguez
2009-03-10  7:15   ` Johannes Berg
2009-03-10  8:43     ` Luis R. Rodriguez
2009-03-10  8:46       ` Johannes Berg
2009-03-10  8:51         ` Luis R. Rodriguez
2009-03-10  2:04 ` Luis R. Rodriguez [this message]
2009-03-10  7:16 ` [PATCH 0/4] wireless: use channel bandwidth Johannes Berg
2009-03-10  8:43   ` 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=1236650699-30538-5-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=johannes@sipsolutions.net \
    --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