Merge "wlan: Avoid overread when configuring MAC addresses" into wlan-driver.lnx.1.0-dev.1.0
diff --git a/Android.mk b/Android.mk
index ad25367..d97d93a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,8 +20,22 @@
LOCAL_PATH := $(call my-dir)
-# This makefile is only for DLKM
+ifeq ($(TARGET_SUPPORTS_WEARABLES),true)
+ifneq ($(findstring device,$(LOCAL_PATH)),)
+ WLAN_DLKM := 1
+else
+ WLAN_DLKM := 0
+endif # findstring device
+else
ifneq ($(findstring vendor,$(LOCAL_PATH)),)
+ WLAN_DLKM := 1
+else
+ WLAN_DLKM := 0
+endif # findstring vendor
+endif # TARGET_SUPPORTS_WEARABLES
+
+# This makefile is only for DLKM
+ifeq ($(WLAN_DLKM),1)
# Determine if we are Proprietary or Open Source
ifneq ($(findstring opensource,$(LOCAL_PATH)),)
@@ -33,13 +47,21 @@
ifeq ($(WLAN_PROPRIETARY),1)
WLAN_BLD_DIR := vendor/qcom/proprietary/wlan
else
+ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
WLAN_BLD_DIR := vendor/qcom/opensource/wlan
+else
+ WLAN_BLD_DIR := device/qcom/msm8909w/opensource/wlan
+endif
endif
# DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16)
ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 16 ))" )))
+ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
DLKM_DIR := $(TOP)/device/qcom/common/dlkm
else
+ DLKM_DIR := $(BOARD_DLKM_DIR)
+endif
+else
DLKM_DIR := build/dlkm
endif
diff --git a/CORE/MAC/src/include/dot11f.h b/CORE/MAC/src/include/dot11f.h
index c428449..50788d8 100644
--- a/CORE/MAC/src/include/dot11f.h
+++ b/CORE/MAC/src/include/dot11f.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, 2016, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -30,7 +30,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Wed Aug 10 14:01:47 2016 from the following file(s):
+ * Tue Jul 4 11:19:48 2017 from the following file(s):
*
* dot11f.frms
*
@@ -84,8 +84,8 @@
#define DOT11F_BUFFER_OVERFLOW ( 0x10000005 )
#define DOT11F_MANDATORY_TLV_MISSING ( 0x00001000 )
#define DOT11F_FAILED(code) ( (code) & 0x10000000 )
-#define DOT11F_WARNED(code) ( ( ( 0 == (code) ) & 0x10000000 ) && code)
#define DOT11F_SUCCEEDED(code) ( (code) == 0 )
+#define DOT11F_WARNED(code) (!DOT11F_SUCCEEDED(code) && !DOT11F_FAILED(code))
/*********************************************************************
* Fixed Fields *
diff --git a/CORE/SYS/legacy/src/utils/src/dot11f.c b/CORE/SYS/legacy/src/utils/src/dot11f.c
index 52117f0..ebdb096 100644
--- a/CORE/SYS/legacy/src/utils/src/dot11f.c
+++ b/CORE/SYS/legacy/src/utils/src/dot11f.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, 2016, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -28,7 +28,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Wed Aug 10 14:01:47 2016 from the following file(s):
+ * Tue Jul 4 11:19:48 2017 from the following file(s):
*
* dot11f.frms
*
@@ -20257,6 +20257,10 @@
}
countOffset = ( (0 != pIe->arraybound) * ( *(tANI_U16* )(pFrm + pIe->countOffset)));
+ if (0 != pIe->arraybound && countOffset >= pIe->arraybound) {
+ status |= DOT11F_DUPLICATE_IE;
+ goto skip_dup_ie;
+ }
switch (pIe->sig)
{
case SigIeAPName:
@@ -20731,6 +20735,7 @@
status |= DOT11F_UNKNOWN_IES;
}
+skip_dup_ie:
pBufRemaining += len;
if (len > nBufRemaining)