Browse Source

qcacld-3.0: use fixed length for array

Fix error of "variable length array ‘duration’ is used ". Use fixed
length for array.

CRs-Fixed: 2383040
Change-Id: I4aee165cd626e56592c18b2211dc7c81e97d4cd4
Yuanyuan Liu 6 years ago
parent
commit
755671ed02

+ 2 - 1
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
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * 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_BK                          1    /* background */
 #define WME_AC_VI                          2    /* video */
 #define WME_AC_VI                          2    /* video */
 #define WME_AC_VO                          3    /* voice */
 #define WME_AC_VO                          3    /* voice */
+#define WME_AC_NUM                         4
 
 
 /* WCN IE */
 /* WCN IE */
 #define WCN_OUI                     0xf25000    /* Microsoft OUI */
 #define WCN_OUI                     0xf25000    /* Microsoft OUI */

+ 1 - 1
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;
 	int errno;
 	uint8_t ac_cat = 4;
 	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);
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	struct hdd_adapter *adapter;
 	struct hdd_adapter *adapter;
 	struct hdd_context *hdd_ctx;
 	struct hdd_context *hdd_ctx;

+ 1 - 1
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:
 	case WE_GET_BA_AGEING_TIMEOUT:
 	{
 	{
 		uint8_t ac_cat = 4;
 		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);
 		void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 
 		if (!soc) {
 		if (!soc) {