linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Randolf <br1@einfach.org>
To: johannes@sipsolutions.net, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 1/2] nl80211: Export available antennas
Date: Tue, 14 Dec 2010 11:20:18 +0900	[thread overview]
Message-ID: <20101214022018.2343.8216.stgit@localhost6.localdomain6> (raw)

Signed-off-by: Bruno Randolf <br1@einfach.org>

---

v2:	rebased
---
 include/linux/nl80211.h |    5 +++++
 net/wireless/nl80211.c  |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index b8fa25d..63b603c 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -841,6 +841,9 @@ enum nl80211_commands {
  *	the hardware should not be configured to receive on this antenna.
  *	For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
  *
+ * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are available for
+ *	configuration via the above parameters.
+ *
  * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
  *
  * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be
@@ -1035,6 +1038,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_KEY_DEFAULT_TYPES,
 
+	NL80211_ATTR_WIPHY_ANTENNA_AVAIL,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 53f0443..87eae15 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -613,6 +613,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
 			NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_TX, tx_ant);
 			NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_RX, rx_ant);
 		}
+		NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_AVAIL,
+			    dev->wiphy.available_antennas);
 	}
 
 	nl_modes = nla_nest_start(msg, NL80211_ATTR_SUPPORTED_IFTYPES);


             reply	other threads:[~2010-12-14  2:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14  2:20 Bruno Randolf [this message]
2010-12-14  2:20 ` [PATCH 2/2] ath5k: Set available antenna information for cfg80211 Bruno Randolf
2010-12-14  2:23 ` [PATCH 1/2] nl80211: Export available antennas Daniel Halperin
2010-12-14  2:31   ` Bruno Randolf
2010-12-14  3:11     ` Daniel Halperin
2010-12-15  9:53       ` Bruno Randolf
2010-12-15 18:36         ` Daniel Halperin

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=20101214022018.2343.8216.stgit@localhost6.localdomain6 \
    --to=br1@einfach.org \
    --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;
as well as URLs for NNTP newsgroup(s).