From 755671ed02611b8db13a30daa02120b9a6da82d8 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Wed, 16 Jan 2019 16:47:19 -0800 Subject: [PATCH] qcacld-3.0: use fixed length for array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix error of "variable length array ‘duration’ is used ". Use fixed length for array. CRs-Fixed: 2383040 Change-Id: I4aee165cd626e56592c18b2211dc7c81e97d4cd4 --- core/cds/inc/cds_ieee80211_common.h | 3 ++- core/hdd/src/wlan_hdd_hostapd_wext.c | 2 +- core/hdd/src/wlan_hdd_wext.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/cds/inc/cds_ieee80211_common.h b/core/cds/inc/cds_ieee80211_common.h index aa2312665b5b..226d9c0e2569 100644 --- a/core/cds/inc/cds_ieee80211_common.h +++ b/core/cds/inc/cds_ieee80211_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011,2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011,2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1611,6 +1611,7 @@ enum { #define WME_AC_BK 1 /* background */ #define WME_AC_VI 2 /* video */ #define WME_AC_VO 3 /* voice */ +#define WME_AC_NUM 4 /* WCN IE */ #define WCN_OUI 0xf25000 /* Microsoft OUI */ diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c index 2324c2ca1b9a..a66d1154f138 100644 --- a/core/hdd/src/wlan_hdd_hostapd_wext.c +++ b/core/hdd/src/wlan_hdd_hostapd_wext.c @@ -2311,7 +2311,7 @@ static int __iw_softap_get_ba_timeout(struct net_device *dev, { int errno; uint8_t ac_cat = 4; - uint32_t duration[ac_cat], i; + uint32_t duration[WME_AC_NUM], i; void *soc = cds_get_context(QDF_MODULE_ID_SOC); struct hdd_adapter *adapter; struct hdd_context *hdd_ctx; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 59aa19c1af0d..19e54eea3d0e 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -6701,7 +6701,7 @@ static int __iw_get_char_setnone(struct net_device *dev, case WE_GET_BA_AGEING_TIMEOUT: { uint8_t ac_cat = 4; - uint32_t duration[ac_cat], i; + uint32_t duration[WME_AC_NUM], i; void *soc = cds_get_context(QDF_MODULE_ID_SOC); if (!soc) {