linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PROPOSAL: cfg80211 antenna selection
@ 2009-11-25  8:41 Holger Schurig
  2009-11-25 14:37 ` Bob Copeland
  2009-11-25 15:36 ` Luis R. Rodriguez
  0 siblings, 2 replies; 6+ messages in thread
From: Holger Schurig @ 2009-11-25  8:41 UTC (permalink / raw)
  To: linux-wireless

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-26 23:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25  8:41 PROPOSAL: cfg80211 antenna selection Holger Schurig
2009-11-25 14:37 ` 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

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).