aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-08-10 16:55:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-12 13:45:04 -0400
commit9946ecfb510462e59afddb2a992da804d58b6bcd (patch)
tree2eb7792cf6363f33f41d0532cb218ad86120f3bb /include
parent5fb628e9105eef6796789b1ae93289e1566ccdf0 (diff)
nl80211/cfg80211: Add extra IE configuration to AP mode setup
The NL80211_CMD_NEW_BEACON command is, in practice, requesting AP mode operations to be started. Add new attributes to provide extra IEs (e.g., WPS IE, P2P IE) for drivers that build Beacon, Probe Response, and (Re)Association Response frames internally (likely in firmware). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h16
-rw-r--r--include/net/cfg80211.h14
2 files changed, 29 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 580fcdceed2c..89dec16b4697 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -166,7 +166,8 @@
166 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, 166 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
167 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, 167 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
168 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, 168 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
169 * %NL80211_ATTR_AUTH_TYPE. 169 * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP,
170 * %NL80211_ATTR_IE_ASSOC_RESP.
170 * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, 171 * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
171 * parameters are like for %NL80211_CMD_SET_BEACON. 172 * parameters are like for %NL80211_CMD_SET_BEACON.
172 * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it 173 * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
@@ -1031,6 +1032,16 @@ enum nl80211_commands {
1031 * and Probe Response (when response to wildcard Probe Request); see 1032 * and Probe Response (when response to wildcard Probe Request); see
1032 * &enum nl80211_hidden_ssid, represented as a u32 1033 * &enum nl80211_hidden_ssid, represented as a u32
1033 * 1034 *
1035 * @NL80211_ATTR_IE_PROBE_RESP: Information element(s) for Probe Response frame.
1036 * This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_SET_BEACON to
1037 * provide extra IEs (e.g., WPS/P2P IE) into Probe Response frames when the
1038 * driver (or firmware) replies to Probe Request frames.
1039 * @NL80211_ATTR_IE_ASSOC_RESP: Information element(s) for (Re)Association
1040 * Response frames. This is used with %NL80211_CMD_NEW_BEACON and
1041 * %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into
1042 * (Re)Association Response frames when the driver (or firmware) replies to
1043 * (Re)Association Request frames.
1044 *
1034 * @NL80211_ATTR_MAX: highest attribute number currently defined 1045 * @NL80211_ATTR_MAX: highest attribute number currently defined
1035 * @__NL80211_ATTR_AFTER_LAST: internal use 1046 * @__NL80211_ATTR_AFTER_LAST: internal use
1036 */ 1047 */
@@ -1238,6 +1249,9 @@ enum nl80211_attrs {
1238 1249
1239 NL80211_ATTR_HIDDEN_SSID, 1250 NL80211_ATTR_HIDDEN_SSID,
1240 1251
1252 NL80211_ATTR_IE_PROBE_RESP,
1253 NL80211_ATTR_IE_ASSOC_RESP,
1254
1241 /* add attributes here, update the policy in nl80211.c */ 1255 /* add attributes here, update the policy in nl80211.c */
1242 1256
1243 __NL80211_ATTR_AFTER_LAST, 1257 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6fcd0bf4dc62..d86a15d87e58 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -383,6 +383,14 @@ struct cfg80211_crypto_settings {
383 * @crypto: crypto settings 383 * @crypto: crypto settings
384 * @privacy: the BSS uses privacy 384 * @privacy: the BSS uses privacy
385 * @auth_type: Authentication type (algorithm) 385 * @auth_type: Authentication type (algorithm)
386 * @beacon_ies: extra information element(s) to add into Beacon frames or %NULL
387 * @beacon_ies_len: length of beacon_ies in octets
388 * @proberesp_ies: extra information element(s) to add into Probe Response
389 * frames or %NULL
390 * @proberesp_ies_len: length of proberesp_ies in octets
391 * @assocresp_ies: extra information element(s) to add into (Re)Association
392 * Response frames or %NULL
393 * @assocresp_ies_len: length of assocresp_ies in octets
386 */ 394 */
387struct beacon_parameters { 395struct beacon_parameters {
388 u8 *head, *tail; 396 u8 *head, *tail;
@@ -394,6 +402,12 @@ struct beacon_parameters {
394 struct cfg80211_crypto_settings crypto; 402 struct cfg80211_crypto_settings crypto;
395 bool privacy; 403 bool privacy;
396 enum nl80211_auth_type auth_type; 404 enum nl80211_auth_type auth_type;
405 const u8 *beacon_ies;
406 size_t beacon_ies_len;
407 const u8 *proberesp_ies;
408 size_t proberesp_ies_len;
409 const u8 *assocresp_ies;
410 size_t assocresp_ies_len;
397}; 411};
398 412
399/** 413/**