aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-12-07 23:59:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:27 -0500
commita7ffac9591a2a0ee74c431396ae475a8d0caa51e (patch)
tree174134b89e490592003307263e6b3964d9a1eacf /include/net
parenta08e7ade9ddf4fe79576f953cc5c1725e944d26c (diff)
cfg80211: Add antenna availability information
Add a field to wiphy for the hardware to report the availble antennas for configuration. Only if this is set to something bigger than zero, will the anntenna configuration ops be executed. Allthough this could be a simple number of antennas, I defined it as a bitmap of antennas which are available for configuration, since it's more consistent with the rest of the antenna API and there could be cases where the hardware allows only configuration of certain antennas. As it does not make much of a difference in size or normal usage, I think it's better to be able to support this, in case the need arises. The antenna configuration is now also checked against the availabe antennas and rejected if it does not match. Signed-off-by: Bruno Randolf <br1@einfach.org> -- v3: always apply available antenna mask (for "all" antennas case). v2: reject antenna configurations which don't match the available antennas Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0d5979924be..4d5acb01363 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1468,6 +1468,9 @@ struct ieee80211_txrx_stypes {
1468 * @mgmt_stypes: bitmasks of frame subtypes that can be subscribed to or 1468 * @mgmt_stypes: bitmasks of frame subtypes that can be subscribed to or
1469 * transmitted through nl80211, points to an array indexed by interface 1469 * transmitted through nl80211, points to an array indexed by interface
1470 * type 1470 * type
1471 *
1472 * @available_antennas: bitmap of antennas which are available to configure.
1473 * antenna configuration commands will be rejected unless this is set.
1471 */ 1474 */
1472struct wiphy { 1475struct wiphy {
1473 /* assign these fields before you register the wiphy */ 1476 /* assign these fields before you register the wiphy */
@@ -1507,6 +1510,8 @@ struct wiphy {
1507 1510
1508 u8 max_num_pmkids; 1511 u8 max_num_pmkids;
1509 1512
1513 u32 available_antennas;
1514
1510 /* If multiple wiphys are registered and you're handed e.g. 1515 /* If multiple wiphys are registered and you're handed e.g.
1511 * a regular netdev with assigned ieee80211_ptr, you won't 1516 * a regular netdev with assigned ieee80211_ptr, you won't
1512 * know whether it points to a wiphy your driver has registered 1517 * know whether it points to a wiphy your driver has registered