Search Linux Wireless

PROPOSAL: cfg80211 antenna selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux