aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nl80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-12-09 13:58:59 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:28 -0500
commitdbd2fd656f2060abfd3a16257f8b51ec60f6d2ed (patch)
tree71e61430bd8593f2ad8f1c741b5a8a8be4a9d690 /include/linux/nl80211.h
parent897bed8b4320774e56f282cdc1cceb4d77442797 (diff)
cfg80211/nl80211: separate unicast/multicast default TX keys
Allow userspace to specify that a given key is default only for unicast and/or multicast transmissions. Only WEP keys are for both, WPA/RSN keys set here are GTKs for multicast only. For more future flexibility, allow to specify all combiations. Wireless extensions can only set both so use nl80211; WEP keys (connect keys) must be set as default for both (but 802.1X WEP is still possible). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r--include/linux/nl80211.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 380421253d16..b8fa25d741ba 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -851,6 +851,10 @@ enum nl80211_commands {
851 * 851 *
852 * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16) 852 * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
853 * 853 *
854 * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags
855 * attributes, specifying what a key should be set as default as.
856 * See &enum nl80211_key_default_types.
857 *
854 * @NL80211_ATTR_MAX: highest attribute number currently defined 858 * @NL80211_ATTR_MAX: highest attribute number currently defined
855 * @__NL80211_ATTR_AFTER_LAST: internal use 859 * @__NL80211_ATTR_AFTER_LAST: internal use
856 */ 860 */
@@ -1029,6 +1033,8 @@ enum nl80211_attrs {
1029 1033
1030 NL80211_ATTR_BSS_HT_OPMODE, 1034 NL80211_ATTR_BSS_HT_OPMODE,
1031 1035
1036 NL80211_ATTR_KEY_DEFAULT_TYPES,
1037
1032 /* add attributes here, update the policy in nl80211.c */ 1038 /* add attributes here, update the policy in nl80211.c */
1033 1039
1034 __NL80211_ATTR_AFTER_LAST, 1040 __NL80211_ATTR_AFTER_LAST,
@@ -1775,6 +1781,23 @@ enum nl80211_wpa_versions {
1775}; 1781};
1776 1782
1777/** 1783/**
1784 * enum nl80211_key_default_types - key default types
1785 * @__NL80211_KEY_DEFAULT_TYPE_INVALID: invalid
1786 * @NL80211_KEY_DEFAULT_TYPE_UNICAST: key should be used as default
1787 * unicast key
1788 * @NL80211_KEY_DEFAULT_TYPE_MULTICAST: key should be used as default
1789 * multicast key
1790 * @NUM_NL80211_KEY_DEFAULT_TYPES: number of default types
1791 */
1792enum nl80211_key_default_types {
1793 __NL80211_KEY_DEFAULT_TYPE_INVALID,
1794 NL80211_KEY_DEFAULT_TYPE_UNICAST,
1795 NL80211_KEY_DEFAULT_TYPE_MULTICAST,
1796
1797 NUM_NL80211_KEY_DEFAULT_TYPES
1798};
1799
1800/**
1778 * enum nl80211_key_attributes - key attributes 1801 * enum nl80211_key_attributes - key attributes
1779 * @__NL80211_KEY_INVALID: invalid 1802 * @__NL80211_KEY_INVALID: invalid
1780 * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of 1803 * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of
@@ -1790,6 +1813,9 @@ enum nl80211_wpa_versions {
1790 * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not 1813 * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not
1791 * specified the default depends on whether a MAC address was 1814 * specified the default depends on whether a MAC address was
1792 * given with the command using the key or not (u32) 1815 * given with the command using the key or not (u32)
1816 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
1817 * attributes, specifying what a key should be set as default as.
1818 * See &enum nl80211_key_default_types.
1793 * @__NL80211_KEY_AFTER_LAST: internal 1819 * @__NL80211_KEY_AFTER_LAST: internal
1794 * @NL80211_KEY_MAX: highest key attribute 1820 * @NL80211_KEY_MAX: highest key attribute
1795 */ 1821 */
@@ -1802,6 +1828,7 @@ enum nl80211_key_attributes {
1802 NL80211_KEY_DEFAULT, 1828 NL80211_KEY_DEFAULT,
1803 NL80211_KEY_DEFAULT_MGMT, 1829 NL80211_KEY_DEFAULT_MGMT,
1804 NL80211_KEY_TYPE, 1830 NL80211_KEY_TYPE,
1831 NL80211_KEY_DEFAULT_TYPES,
1805 1832
1806 /* keep last */ 1833 /* keep last */
1807 __NL80211_KEY_AFTER_LAST, 1834 __NL80211_KEY_AFTER_LAST,