summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu Wang <huw@qti.qualcomm.com>2016-07-15 09:53:18 +0800
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-07-18 11:52:52 +0530
commitf76b68a4a745928b8a4ac0a7bdf7b93801b87119 (patch)
treeef2ad3219170d8331135e1d7b616814dad7dd23f
parent0594be759e1dd4d65e7a3a7ac2827db7479fbf86 (diff)
qcacld-2.0: Fix probe response dropped by sirvalidateandrectifyies
prima to qcacld-2.0 propagation Some APs will include extra bytes with 0 value after IEs in probe response. sirvalidateandrectifyies() takes it as malformed packet due to which driver drops the packet. This change introduces a workaround to interop with such AP's by making sirvalidateandrectifyies() returning TRUE if extra bytes are all 0 value. Change-Id: Ifdf8d6a1d0c7296713fc23d002beed8a6ac29cc7 CRs-Fixed: 984851
-rw-r--r--CORE/SYS/legacy/src/utils/src/parserApi.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index a368dec38974..9b614467978a 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -2216,7 +2216,28 @@ tSirRetStatus sirvalidateandrectifyies(tpAniSirGlobal pMac,
FL("Added RSN Capability to the RSNIE as 0x00 0x00"));
return eHAL_STATUS_SUCCESS;
+ } else {
+ /*
+ * Workaround: Some APs may add extra 0x00 padding after IEs.
+ * Return true to allow these probe response frames proceed.
+ */
+ if (nFrameBytes - length > 0) {
+ tANI_U32 i;
+ tANI_BOOLEAN zero_padding = VOS_TRUE;
+
+ for (i = length; i < nFrameBytes; i ++) {
+ if (pMgmtFrame[i-1] != 0x0) {
+ zero_padding = VOS_FALSE;
+ break;
+ }
+ }
+
+ if (zero_padding) {
+ return eHAL_STATUS_SUCCESS;
+ }
+ }
}
+
return eSIR_FAILURE;
}
}