aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-18 17:48:30 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-18 17:48:30 -0400
commit82d048186e403f36e083b37ad42aa90abb7dcaac (patch)
treedc0b92ace036ef435318f38ef35b8c6e6b84103a /include
parent62551d3ea05242d97d47f26fb517b2dfdb752310 (diff)
parentd3707d9918d47c0997a6b1e4ae24e7ab55e43796 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h8
-rw-r--r--include/linux/nl80211.h51
-rw-r--r--include/net/cfg80211.h57
-rw-r--r--include/net/mac80211.h28
4 files changed, 87 insertions, 57 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index dc92359f37e6..05c29c01174c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1068,8 +1068,12 @@ enum ieee80211_category {
1068 WLAN_CATEGORY_DLS = 2, 1068 WLAN_CATEGORY_DLS = 2,
1069 WLAN_CATEGORY_BACK = 3, 1069 WLAN_CATEGORY_BACK = 3,
1070 WLAN_CATEGORY_PUBLIC = 4, 1070 WLAN_CATEGORY_PUBLIC = 4,
1071 WLAN_CATEGORY_HT = 7,
1071 WLAN_CATEGORY_SA_QUERY = 8, 1072 WLAN_CATEGORY_SA_QUERY = 8,
1073 WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
1072 WLAN_CATEGORY_WMM = 17, 1074 WLAN_CATEGORY_WMM = 17,
1075 WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
1076 WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
1073}; 1077};
1074 1078
1075/* SPECTRUM_MGMT action code */ 1079/* SPECTRUM_MGMT action code */
@@ -1261,7 +1265,9 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
1261 if (ieee80211_has_protected(hdr->frame_control)) 1265 if (ieee80211_has_protected(hdr->frame_control))
1262 return true; 1266 return true;
1263 category = ((u8 *) hdr) + 24; 1267 category = ((u8 *) hdr) + 24;
1264 return *category != WLAN_CATEGORY_PUBLIC; 1268 return *category != WLAN_CATEGORY_PUBLIC &&
1269 *category != WLAN_CATEGORY_HT &&
1270 *category != WLAN_CATEGORY_VENDOR_SPECIFIC;
1265 } 1271 }
1266 1272
1267 return false; 1273 return false;
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index e9fd13aa79f0..dbea93b694e5 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -25,6 +25,8 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/types.h>
29
28/** 30/**
29 * DOC: Station handling 31 * DOC: Station handling
30 * 32 *
@@ -77,8 +79,8 @@
77 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, 79 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
78 * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. 80 * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
79 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, 81 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
80 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER 82 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC, %NL80211_ATTR_KEY_CIPHER,
81 * attributes. 83 * and %NL80211_ATTR_KEY_SEQ attributes.
82 * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX 84 * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX
83 * or %NL80211_ATTR_MAC. 85 * or %NL80211_ATTR_MAC.
84 * 86 *
@@ -380,7 +382,7 @@ enum nl80211_commands {
380 * 382 *
381 * @NL80211_ATTR_STA_AID: Association ID for the station (u16) 383 * @NL80211_ATTR_STA_AID: Association ID for the station (u16)
382 * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of 384 * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of
383 * &enum nl80211_sta_flags. 385 * &enum nl80211_sta_flags (deprecated, use %NL80211_ATTR_STA_FLAGS2)
384 * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by 386 * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by
385 * IEEE 802.11 7.3.1.6 (u16). 387 * IEEE 802.11 7.3.1.6 (u16).
386 * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported 388 * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported
@@ -494,6 +496,21 @@ enum nl80211_commands {
494 * @NL80211_ATTR_TIMED_OUT: a flag indicating than an operation timed out; this 496 * @NL80211_ATTR_TIMED_OUT: a flag indicating than an operation timed out; this
495 * is used, e.g., with %NL80211_CMD_AUTHENTICATE event 497 * is used, e.g., with %NL80211_CMD_AUTHENTICATE event
496 * 498 *
499 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
500 * used for the association (&enum nl80211_mfp, represented as a u32);
501 * this attribute can be used
502 * with %NL80211_CMD_ASSOCIATE request
503 *
504 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
505 * &struct nl80211_sta_flag_update.
506 *
507 * @NL80211_ATTR_CONTROL_PORT: A flag indicating whether user space controls
508 * IEEE 802.1X port, i.e., sets/clears %NL80211_STA_FLAG_AUTHORIZED, in
509 * station mode. If the flag is included in %NL80211_CMD_ASSOCIATE
510 * request, the driver will assume that the port is unauthorized until
511 * authorized by user space. Otherwise, port is marked authorized by
512 * default in station mode.
513 *
497 * @NL80211_ATTR_MAX: highest attribute number currently defined 514 * @NL80211_ATTR_MAX: highest attribute number currently defined
498 * @__NL80211_ATTR_AFTER_LAST: internal use 515 * @__NL80211_ATTR_AFTER_LAST: internal use
499 */ 516 */
@@ -596,6 +613,12 @@ enum nl80211_attrs {
596 613
597 NL80211_ATTR_TIMED_OUT, 614 NL80211_ATTR_TIMED_OUT,
598 615
616 NL80211_ATTR_USE_MFP,
617
618 NL80211_ATTR_STA_FLAGS2,
619
620 NL80211_ATTR_CONTROL_PORT,
621
599 /* add attributes here, update the policy in nl80211.c */ 622 /* add attributes here, update the policy in nl80211.c */
600 623
601 __NL80211_ATTR_AFTER_LAST, 624 __NL80211_ATTR_AFTER_LAST,
@@ -685,6 +708,18 @@ enum nl80211_sta_flags {
685}; 708};
686 709
687/** 710/**
711 * struct nl80211_sta_flag_update - station flags mask/set
712 * @mask: mask of station flags to set
713 * @set: which values to set them to
714 *
715 * Both mask and set contain bits as per &enum nl80211_sta_flags.
716 */
717struct nl80211_sta_flag_update {
718 __u32 mask;
719 __u32 set;
720} __attribute__((packed));
721
722/**
688 * enum nl80211_rate_info - bitrate information 723 * enum nl80211_rate_info - bitrate information
689 * 724 *
690 * These attribute types are used with %NL80211_STA_INFO_TXRATE 725 * These attribute types are used with %NL80211_STA_INFO_TXRATE
@@ -1179,4 +1214,14 @@ enum nl80211_key_type {
1179 NL80211_KEYTYPE_PEERKEY, 1214 NL80211_KEYTYPE_PEERKEY,
1180}; 1215};
1181 1216
1217/**
1218 * enum nl80211_mfp - Management frame protection state
1219 * @NL80211_MFP_NO: Management frame protection not used
1220 * @NL80211_MFP_REQUIRED: Management frame protection required
1221 */
1222enum nl80211_mfp {
1223 NL80211_MFP_NO,
1224 NL80211_MFP_REQUIRED,
1225};
1226
1182#endif /* __LINUX_NL80211_H */ 1227#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index b8a76764e1c5..9e17a83d3432 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -252,27 +252,6 @@ struct beacon_parameters {
252}; 252};
253 253
254/** 254/**
255 * enum station_flags - station flags
256 *
257 * Station capability flags. Note that these must be the bits
258 * according to the nl80211 flags.
259 *
260 * @STATION_FLAG_CHANGED: station flags were changed
261 * @STATION_FLAG_AUTHORIZED: station is authorized to send frames (802.1X)
262 * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
263 * with short preambles
264 * @STATION_FLAG_WME: station is WME/QoS capable
265 * @STATION_FLAG_MFP: station uses management frame protection
266 */
267enum station_flags {
268 STATION_FLAG_CHANGED = 1<<0,
269 STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED,
270 STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE,
271 STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME,
272 STATION_FLAG_MFP = 1<<NL80211_STA_FLAG_MFP,
273};
274
275/**
276 * enum plink_action - actions to perform in mesh peers 255 * enum plink_action - actions to perform in mesh peers
277 * 256 *
278 * @PLINK_ACTION_INVALID: action 0 is reserved 257 * @PLINK_ACTION_INVALID: action 0 is reserved
@@ -294,14 +273,17 @@ enum plink_actions {
294 * @supported_rates: supported rates in IEEE 802.11 format 273 * @supported_rates: supported rates in IEEE 802.11 format
295 * (or NULL for no change) 274 * (or NULL for no change)
296 * @supported_rates_len: number of supported rates 275 * @supported_rates_len: number of supported rates
297 * @station_flags: station flags (see &enum station_flags) 276 * @sta_flags_mask: station flags that changed
277 * (bitmask of BIT(NL80211_STA_FLAG_...))
278 * @sta_flags_set: station flags values
279 * (bitmask of BIT(NL80211_STA_FLAG_...))
298 * @listen_interval: listen interval or -1 for no change 280 * @listen_interval: listen interval or -1 for no change
299 * @aid: AID or zero for no change 281 * @aid: AID or zero for no change
300 */ 282 */
301struct station_parameters { 283struct station_parameters {
302 u8 *supported_rates; 284 u8 *supported_rates;
303 struct net_device *vlan; 285 struct net_device *vlan;
304 u32 station_flags; 286 u32 sta_flags_mask, sta_flags_set;
305 int listen_interval; 287 int listen_interval;
306 u16 aid; 288 u16 aid;
307 u8 supported_rates_len; 289 u8 supported_rates_len;
@@ -672,6 +654,11 @@ struct cfg80211_auth_request {
672 * @ssid_len: Length of ssid in octets 654 * @ssid_len: Length of ssid in octets
673 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL 655 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
674 * @ie_len: Length of ie buffer in octets 656 * @ie_len: Length of ie buffer in octets
657 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
658 * @control_port: Whether user space controls IEEE 802.1X port, i.e.,
659 * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is
660 * required to assume that the port is unauthorized until authorized by
661 * user space. Otherwise, port is marked authorized by default.
675 */ 662 */
676struct cfg80211_assoc_request { 663struct cfg80211_assoc_request {
677 struct ieee80211_channel *chan; 664 struct ieee80211_channel *chan;
@@ -680,6 +667,8 @@ struct cfg80211_assoc_request {
680 size_t ssid_len; 667 size_t ssid_len;
681 const u8 *ie; 668 const u8 *ie;
682 size_t ie_len; 669 size_t ie_len;
670 bool use_mfp;
671 bool control_port;
683}; 672};
684 673
685/** 674/**
@@ -858,13 +847,13 @@ struct cfg80211_ops {
858 struct vif_params *params); 847 struct vif_params *params);
859 848
860 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, 849 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
861 u8 key_index, u8 *mac_addr, 850 u8 key_index, const u8 *mac_addr,
862 struct key_params *params); 851 struct key_params *params);
863 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev, 852 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
864 u8 key_index, u8 *mac_addr, void *cookie, 853 u8 key_index, const u8 *mac_addr, void *cookie,
865 void (*callback)(void *cookie, struct key_params*)); 854 void (*callback)(void *cookie, struct key_params*));
866 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev, 855 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
867 u8 key_index, u8 *mac_addr); 856 u8 key_index, const u8 *mac_addr);
868 int (*set_default_key)(struct wiphy *wiphy, 857 int (*set_default_key)(struct wiphy *wiphy,
869 struct net_device *netdev, 858 struct net_device *netdev,
870 u8 key_index); 859 u8 key_index);
@@ -1145,8 +1134,11 @@ struct wireless_dev {
1145 1134
1146#ifdef CONFIG_WIRELESS_EXT 1135#ifdef CONFIG_WIRELESS_EXT
1147 /* wext data */ 1136 /* wext data */
1148 struct cfg80211_ibss_params wext; 1137 struct {
1149 u8 wext_bssid[ETH_ALEN]; 1138 struct cfg80211_ibss_params ibss;
1139 u8 bssid[ETH_ALEN];
1140 s8 default_key, default_mgmt_key;
1141 } wext;
1150#endif 1142#endif
1151}; 1143};
1152 1144
@@ -1396,6 +1388,15 @@ int cfg80211_wext_siwretry(struct net_device *dev,
1396int cfg80211_wext_giwretry(struct net_device *dev, 1388int cfg80211_wext_giwretry(struct net_device *dev,
1397 struct iw_request_info *info, 1389 struct iw_request_info *info,
1398 struct iw_param *retry, char *extra); 1390 struct iw_param *retry, char *extra);
1391int cfg80211_wext_siwencodeext(struct net_device *dev,
1392 struct iw_request_info *info,
1393 struct iw_point *erq, char *extra);
1394int cfg80211_wext_siwencode(struct net_device *dev,
1395 struct iw_request_info *info,
1396 struct iw_point *erq, char *keybuf);
1397int cfg80211_wext_giwencode(struct net_device *dev,
1398 struct iw_request_info *info,
1399 struct iw_point *erq, char *keybuf);
1399 1400
1400/* 1401/*
1401 * callbacks for asynchronous cfg80211 methods, notification 1402 * callbacks for asynchronous cfg80211 methods, notification
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 38dc1cd10270..d10ed1776fcd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -73,22 +73,6 @@
73 */ 73 */
74 74
75/** 75/**
76 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
77 *
78 * This structure describes most essential parameters needed
79 * to describe 802.11n HT characteristics in a BSS.
80 *
81 * @primary_channel: channel number of primery channel
82 * @bss_cap: 802.11n's general BSS capabilities (e.g. channel width)
83 * @bss_op_mode: 802.11n's BSS operation modes (e.g. HT protection)
84 */
85struct ieee80211_ht_bss_info {
86 u8 primary_channel;
87 u8 bss_cap; /* use IEEE80211_HT_IE_CHA_ */
88 u8 bss_op_mode; /* use IEEE80211_HT_IE_ */
89};
90
91/**
92 * enum ieee80211_max_queues - maximum number of queues 76 * enum ieee80211_max_queues - maximum number of queues
93 * 77 *
94 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. 78 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
@@ -171,14 +155,6 @@ enum ieee80211_bss_change {
171}; 155};
172 156
173/** 157/**
174 * struct ieee80211_bss_ht_conf - BSS's changing HT configuration
175 * @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
176 */
177struct ieee80211_bss_ht_conf {
178 u16 operation_mode;
179};
180
181/**
182 * struct ieee80211_bss_conf - holds the BSS's changing parameters 158 * struct ieee80211_bss_conf - holds the BSS's changing parameters
183 * 159 *
184 * This structure keeps information about a BSS (and an association 160 * This structure keeps information about a BSS (and an association
@@ -203,6 +179,8 @@ struct ieee80211_bss_ht_conf {
203 * the current band. 179 * the current band.
204 * @bssid: The BSSID for this BSS 180 * @bssid: The BSSID for this BSS
205 * @enable_beacon: whether beaconing should be enabled or not 181 * @enable_beacon: whether beaconing should be enabled or not
182 * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info).
183 * This field is only valid when the channel type is one of the HT types.
206 */ 184 */
207struct ieee80211_bss_conf { 185struct ieee80211_bss_conf {
208 const u8 *bssid; 186 const u8 *bssid;
@@ -219,7 +197,7 @@ struct ieee80211_bss_conf {
219 u16 assoc_capability; 197 u16 assoc_capability;
220 u64 timestamp; 198 u64 timestamp;
221 u32 basic_rates; 199 u32 basic_rates;
222 struct ieee80211_bss_ht_conf ht; 200 u16 ht_operation_mode;
223}; 201};
224 202
225/** 203/**