diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-07-17 18:36:03 +0300 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:19:47 -0600 |
| commit | 7ce8d79d856dfab8d6d24174a4eb9f3a3dbe4c31 (patch) | |
| tree | e27c7a050494f2588502b5cae87df32d820ae366 /src/common | |
| parent | d3ec4caaead7a64ea686f7909ca3aa4bfe7368cc (diff) | |
| download | android_external_wpa_supplicant_8-7ce8d79d856dfab8d6d24174a4eb9f3a3dbe4c31.tar.gz android_external_wpa_supplicant_8-7ce8d79d856dfab8d6d24174a4eb9f3a3dbe4c31.tar.bz2 android_external_wpa_supplicant_8-7ce8d79d856dfab8d6d24174a4eb9f3a3dbe4c31.zip | |
FST: Remove the IE header len/size macros
These are confusing when the style used with the couple of FST IE checks
differs from the rest of hostapd/wpa_supplicant implementation.
Change-Id: I2171c0b72e09f3da1e7303da877688f51e012911
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 9721b083f4836db1170d4e77cd0d982766d6e4b1
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 891455
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/ieee802_11_common.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 884ae8d8..d55e2969 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -960,17 +960,14 @@ const char * fc2str(u16 fc) } -#define IE_HEADER_SIZE ((u8) (2 * sizeof(u8))) -#define IE_BUFFER_LENGTH(ie_len_val) ((ie_len_val) + IE_HEADER_SIZE) - int mb_ies_info_by_ies(struct mb_ies_info *info, const u8 *ies_buf, size_t ies_len) { os_memset(info, 0, sizeof(*info)); - while (ies_buf && ies_len >= IE_HEADER_SIZE && + while (ies_buf && ies_len >= 2 && info->nof_ies < MAX_NOF_MB_IES_SUPPORTED) { - size_t len = IE_BUFFER_LENGTH(ies_buf[1]); + size_t len = 2 + ies_buf[1]; if (len > ies_len) { wpa_hexdump(MSG_DEBUG, "Truncated IEs", @@ -980,7 +977,7 @@ int mb_ies_info_by_ies(struct mb_ies_info *info, const u8 *ies_buf, if (ies_buf[0] == WLAN_EID_MULTI_BAND) { wpa_printf(MSG_DEBUG, "MB IE of %zu bytes found", len); - info->ies[info->nof_ies].ie = ies_buf + IE_HEADER_SIZE; + info->ies[info->nof_ies].ie = ies_buf + 2; info->ies[info->nof_ies].ie_len = ies_buf[1]; info->nof_ies++; } @@ -1004,7 +1001,7 @@ struct wpabuf * mb_ies_by_info(struct mb_ies_info *info) size_t mb_ies_size = 0; for (i = 0; i < info->nof_ies; i++) - mb_ies_size += IE_BUFFER_LENGTH(info->ies[i].ie_len); + mb_ies_size += 2 + info->ies[i].ie_len; mb_ies = wpabuf_alloc(mb_ies_size); if (mb_ies) { |
