From: Holger Schurig <holgerschurig@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: PROPOSAL: cfg80211 antenna selection
Date: Wed, 25 Nov 2009 09:41:10 +0100 [thread overview]
Message-ID: <200911250941.10929.holgerschurig@gmail.com> (raw)
Hi,
I just wondered how we can do the antenna and diversity
selection.
Assumption: 32 antennas are enought
My current idea is this:
struct cfg80211_ops {
+int (*set_antennas)(struct wiphy *wiphy, struct net_device *dev,
+ u32 rx_antenna_mask, u32 tx_antenna_mask);
+int (*get_antennas)(struct wiphy *wiphy, struct net_device *dev,
+ u32 *rx_antenna_mask, u32 tx_antenna_mask);
}
struct wiphy {
+u8 max_antennas;
}
wiphy->max_antennas will just be used by user-space to query the
driver capability, e.g. in "iw list".
A driver must have wiphy->max_antennas && ops->set/get_antennas
set in order to have antenna-selection. xx_antenna_mask is a
bitfield, where the active bits denote which antenna to use.
When more than one bits are set in tx_antenna_mask, the driver
may use diversity. This means that my proposal doesn't support
diffentiating between diversity and sending the same frame
throught several anteannas at the same time. Not sure if this is
a short-coming, e.g. if there's a use-case behind this or not.
Another thing I'm not sure is if we really need rx_antenna_mask.
it would allow us to receive with one antenna, but send with
another one. Is this over-design or a real use-case?
If a driver doesn't support diversity, the driver simply returns
an error if more than one bit is set in the mask.
For iw, I'd then be able to do:
iw wlan0 get antennas
iw wlan0 set antenna 0 1 (set both tx/rx antenna mask)
iw wlan0 set antenna tx 0 rx 1
--
http://www.holgerschurig.de
next reply other threads:[~2009-11-25 8:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 8:41 Holger Schurig [this message]
2009-11-25 14:37 ` PROPOSAL: cfg80211 antenna selection Bob Copeland
2009-11-26 7:35 ` Holger Schurig
2009-11-25 15:36 ` Luis R. Rodriguez
2009-11-26 7:51 ` Holger Schurig
2009-11-26 23:40 ` Nick Kossifidis
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=200911250941.10929.holgerschurig@gmail.com \
--to=holgerschurig@gmail.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.