aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-05-31 07:01:28 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-05-31 07:01:28 +0000
commit4da5861ef376615c04de3ebfa8a813aea6296c63 (patch)
tree74af6ae060663f9be46e15e5f0827c8a6bd09fed
parent0a31d3f7034c116a55ef78a3caba710724bd9ec2 (diff)
parentbe95c744b71041c3d6fdb8d02eaaec275f22ed2e (diff)
downloadwpa_supplicant_8-4da5861ef376615c04de3ebfa8a813aea6296c63.tar.gz
Change-Id: I2b7b4d8cfe30d653dfa8984d2834d6c5ecb6f609
-rw-r--r--src/common/ieee802_11_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 42c916b5..71c54ba1 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -2724,10 +2724,11 @@ static enum chan_width get_he_operation_channel_width(
if (he_oper_len < expected_len)
return channel_width;
+ const u8 *he_oper_u8 = (const u8 *) he_oper;
if (is_6ghz_info_present) {
struct ieee80211_6ghz_operation_info *six_ghz_oper_info =
(struct ieee80211_6ghz_operation_info *)
- (he_oper + HE_OPERATION_IE_MIN_LEN
+ (he_oper_u8 + HE_OPERATION_IE_MIN_LEN
+ (is_vht_info_present ? HE_OPERATION_VHT_OPER_INFO_LEN : 0)
+ (is_cohosted_bss_present
? HE_OPERATION_COHOSTED_BSSID_INDICATOR_LEN : 0));
@@ -2736,7 +2737,7 @@ static enum chan_width get_he_operation_channel_width(
if (channel_width == CHAN_WIDTH_UNKNOWN && is_vht_info_present) {
struct ieee80211_vht_operation_info *vht_oper_info =
(struct ieee80211_vht_operation_info *)
- (he_oper + HE_OPERATION_IE_MIN_LEN);
+ (he_oper_u8 + HE_OPERATION_IE_MIN_LEN);
channel_width = get_vht_operation_channel_width(vht_oper_info);
}
wpa_printf(MSG_DEBUG, " HE operation CBW: %u", channel_width);