From d056e28ed6b772d91195ac53ddfc098bc887ba1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sat, 3 Mar 2018 20:18:40 +0100 Subject: [PATCH] wifi: Fixes deserialization of ExtendedCapabilities IE --- src/wifi/model/extended-capabilities.cc | 40 ++++++++++--------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/src/wifi/model/extended-capabilities.cc b/src/wifi/model/extended-capabilities.cc index b9506581d..2bccbec00 100644 --- a/src/wifi/model/extended-capabilities.cc +++ b/src/wifi/model/extended-capabilities.cc @@ -371,30 +371,22 @@ uint8_t ExtendedCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8_t length) { Buffer::Iterator i = start; - if (m_htSupported > 0 && m_vhtSupported == 0) - { - uint8_t byte1 = i.ReadU8 (); - SetExtendedCapabilitiesByte1 (byte1 & 0x7f); - } - else if (m_vhtSupported > 0) - { - uint8_t byte1 = i.ReadU8 (); - uint8_t byte2 = i.ReadU8 (); - uint8_t byte3 = i.ReadU8 (); - uint8_t byte4 = i.ReadU8 (); - uint8_t byte5 = i.ReadU8 (); - uint8_t byte6 = i.ReadU8 (); - uint8_t byte7 = i.ReadU8 (); - uint8_t byte8 = i.ReadU8 (); - SetExtendedCapabilitiesByte1 (byte1); - SetExtendedCapabilitiesByte2 (byte2); - SetExtendedCapabilitiesByte3 (byte3); - SetExtendedCapabilitiesByte4 (byte4); - SetExtendedCapabilitiesByte5 (byte5); - SetExtendedCapabilitiesByte6 (byte6); - SetExtendedCapabilitiesByte7 (byte7); - SetExtendedCapabilitiesByte8 (byte8); - } + uint8_t byte1 = i.ReadU8 (); + uint8_t byte2 = i.ReadU8 (); + uint8_t byte3 = i.ReadU8 (); + uint8_t byte4 = i.ReadU8 (); + uint8_t byte5 = i.ReadU8 (); + uint8_t byte6 = i.ReadU8 (); + uint8_t byte7 = i.ReadU8 (); + uint8_t byte8 = i.ReadU8 (); + SetExtendedCapabilitiesByte1 (byte1); + SetExtendedCapabilitiesByte2 (byte2); + SetExtendedCapabilitiesByte3 (byte3); + SetExtendedCapabilitiesByte4 (byte4); + SetExtendedCapabilitiesByte5 (byte5); + SetExtendedCapabilitiesByte6 (byte6); + SetExtendedCapabilitiesByte7 (byte7); + SetExtendedCapabilitiesByte8 (byte8); return length; }