aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-05-27 17:35:00 -0700
committerJouni Malinen <j@w1.fi>2012-05-27 17:35:00 -0700
commitb6668734ab8ac235f129d1cd0aff4c4e1c922b41 (patch)
tree7a5932a36263cda9417dd9efc86bacbbade1c822 /src/common
parentb80eb89d8e21eb699d847bec226d897d9e92e0b8 (diff)
downloadexternal_wpa_supplicant_8_ti-b6668734ab8ac235f129d1cd0aff4c4e1c922b41.zip
external_wpa_supplicant_8_ti-b6668734ab8ac235f129d1cd0aff4c4e1c922b41.tar.gz
external_wpa_supplicant_8_ti-b6668734ab8ac235f129d1cd0aff4c4e1c922b41.tar.bz2
WNM: Add advertisement of BSS max idle period
If WNM is enabled for the build (CONFIG_WNM=y), add BSS max idle period information to the (Re)Association Response frame from the AP and parse this information on the station. For SME-in-wpa_supplicant case, add a timer to handle periodic transmission of the keep-alive frame. The actual request for the driver to transmit a frame is not yet implemented. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ieee802_11_common.c11
-rw-r--r--src/common/ieee802_11_common.h3
-rw-r--r--src/common/ieee802_11_defs.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 5b2f2d5..d65675c 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -1,6 +1,6 @@
/*
* IEEE 802.11 Common routines
- * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -262,6 +262,15 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
elems->interworking = pos;
elems->interworking_len = elen;
break;
+ case WLAN_EID_EXT_CAPAB:
+ elems->ext_capab = pos;
+ elems->ext_capab_len = elen;
+ break;
+ case WLAN_EID_BSS_MAX_IDLE_PERIOD:
+ if (elen < 3)
+ break;
+ elems->bss_max_idle_period = pos;
+ break;
default:
unknown++;
if (!show_errors)
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
index 60f13a6..d9b2b6c 100644
--- a/src/common/ieee802_11_common.h
+++ b/src/common/ieee802_11_common.h
@@ -38,6 +38,8 @@ struct ieee802_11_elems {
const u8 *link_id;
const u8 *interworking;
const u8 *hs20;
+ const u8 *ext_capab;
+ const u8 *bss_max_idle_period;
u8 ssid_len;
u8 supp_rates_len;
@@ -65,6 +67,7 @@ struct ieee802_11_elems {
u8 p2p_len;
u8 interworking_len;
u8 hs20_len;
+ u8 ext_capab_len;
};
typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 27b9e61..0206294 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -228,6 +228,7 @@
#define WLAN_EID_20_40_BSS_INTOLERANT 73
#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
#define WLAN_EID_MMIE 76
+#define WLAN_EID_BSS_MAX_IDLE_PERIOD 90
#define WLAN_EID_TFS_REQ 91
#define WLAN_EID_TFS_RESP 92
#define WLAN_EID_WNMSLEEP 93